From c2f689e50927795f18b4b1f87a5c45a0313af7ba Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Thu, 18 Jul 2013 19:18:00 +0000 Subject: [PATCH] Run the reindent script on the complete test suite git-svn-id: https://svn.dealii.org/trunk@30045 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/a-framework/compile.cc | 2 +- tests/a-framework/fail.cc | 2 +- tests/a-framework/link.cc | 2 +- tests/aniso/anisotropic_crash.cc | 68 +- tests/aniso/fe_tools.cc | 78 +- tests/aniso/hp_constraints_dgp_08.cc | 2 +- tests/aniso/hp_constraints_dgp_monomial_08.cc | 2 +- .../hp_constraints_dgp_nonparametric_08.cc | 2 +- tests/aniso/mesh_3d_21.cc | 272 +- tests/aniso/refine_and_coarsen_anisotropic.cc | 103 +- tests/aniso/solution_transfer.cc | 32 +- tests/aniso/up_and_down.cc | 236 +- tests/base/anisotropic_1.cc | 102 +- tests/base/anisotropic_2.cc | 29 +- tests/base/auto_derivative_function.cc | 156 +- tests/base/conditional_ostream.cc | 2 +- tests/base/convergence_table_01.cc | 14 +- tests/base/convergence_table_02.cc | 18 +- tests/base/convergence_table_03.cc | 16 +- tests/base/convergence_table_04.cc | 2 +- tests/base/data_out_base.cc | 48 +- tests/base/data_out_base_dx.cc | 130 +- tests/base/data_out_base_eps.cc | 42 +- tests/base/data_out_base_gmv.cc | 31 +- tests/base/data_out_base_gnuplot.cc | 26 +- tests/base/data_out_base_povray.cc | 46 +- tests/base/data_out_base_pvd.cc | 28 +- tests/base/data_out_base_pvtu.cc | 28 +- tests/base/data_out_base_tecplot.cc | 33 +- tests/base/data_out_base_tecplot_bin.cc | 21 +- tests/base/data_out_base_vtk.cc | 31 +- tests/base/data_out_base_vtk_cycle.cc | 33 +- tests/base/data_out_base_vtk_time.cc | 33 +- .../base/data_out_base_vtk_time_and_cycle.cc | 33 +- tests/base/data_out_base_vtu.cc | 23 +- tests/base/data_out_base_vtu_cycle.cc | 23 +- tests/base/data_out_base_vtu_time.cc | 25 +- .../base/data_out_base_vtu_time_and_cycle.cc | 25 +- tests/base/data_out_reader_01.cc | 24 +- tests/base/full_tensor_01.cc | 8 +- tests/base/full_tensor_02.cc | 8 +- tests/base/full_tensor_03.cc | 14 +- tests/base/full_tensor_04.cc | 12 +- tests/base/full_tensor_05.cc | 46 +- tests/base/full_tensor_06.cc | 52 +- tests/base/full_tensor_08.cc | 28 +- tests/base/full_tensor_09.cc | 10 +- tests/base/full_tensor_10.cc | 12 +- tests/base/function_derivative.cc | 106 +- tests/base/function_parser.cc | 99 +- tests/base/function_parser_02.cc | 50 +- tests/base/functions.h | 180 +- tests/base/functions_01.cc | 28 +- tests/base/functions_02.cc | 138 +- tests/base/functions_03.cc | 100 +- tests/base/functions_04.cc | 204 +- tests/base/functions_05.cc | 16 +- tests/base/functions_06.cc | 22 +- tests/base/functions_07.cc | 18 +- tests/base/functions_08.cc | 34 +- tests/base/functions_09.cc | 8 +- tests/base/functions_singularity.cc | 234 +- tests/base/gauss_lobatto.cc | 190 +- tests/base/geometry_info_1.cc | 68 +- tests/base/geometry_info_2.cc | 90 +- tests/base/geometry_info_3.cc | 30 +- tests/base/geometry_info_4.cc | 38 +- tests/base/geometry_info_5.cc | 40 +- tests/base/geometry_info_6.cc | 102 +- tests/base/geometry_info_7.cc | 224 +- tests/base/geometry_info_8.cc | 74 +- tests/base/hierarchical.cc | 2 +- tests/base/index_set_01.cc | 2 +- tests/base/index_set_02.cc | 8 +- tests/base/index_set_03.cc | 4 +- tests/base/index_set_04.cc | 4 +- tests/base/index_set_05.cc | 4 +- tests/base/index_set_06.cc | 4 +- tests/base/index_set_07.cc | 4 +- tests/base/index_set_08.cc | 4 +- tests/base/index_set_09.cc | 2 +- tests/base/index_set_10.cc | 6 +- tests/base/index_set_11.cc | 10 +- tests/base/index_set_12.cc | 6 +- tests/base/index_set_13.cc | 10 +- tests/base/index_set_14.cc | 22 +- tests/base/index_set_15.cc | 28 +- tests/base/index_set_16.cc | 18 +- tests/base/index_set_17.cc | 8 +- tests/base/index_set_18.cc | 6 +- tests/base/index_set_19.cc | 6 +- tests/base/index_set_20.cc | 28 +- tests/base/index_set_20_offset.cc | 22 +- tests/base/index_set_21.cc | 6 +- tests/base/index_set_22.cc | 8 +- tests/base/index_set_readwrite_02.cc | 2 +- tests/base/is_finite.cc | 4 +- tests/base/is_finite_complex.cc | 4 +- tests/base/log_precision.cc | 2 +- tests/base/log_width.cc | 2 +- tests/base/named_data.cc | 14 +- tests/base/number_traits_complex.cc | 14 +- tests/base/number_traits_real.cc | 16 +- tests/base/parallel_accumulate.cc | 4 +- tests/base/parallel_transform_01.cc | 8 +- tests/base/parallel_transform_02.cc | 10 +- tests/base/parallel_transform_03.cc | 16 +- tests/base/patches.h | 130 +- tests/base/path_search.cc | 6 +- tests/base/patterns_01.cc | 16 +- tests/base/polynomial1d.cc | 122 +- .../base/polynomial_hermite_interpolation.cc | 14 +- tests/base/polynomial_lagrange.cc | 52 +- tests/base/polynomial_lagrange_ops.cc | 88 +- tests/base/polynomial_lagrange_order.cc | 68 +- tests/base/polynomial_lagrange_product.cc | 44 +- tests/base/polynomial_minus_equals.cc | 40 +- tests/base/polynomial_test.cc | 94 +- tests/base/polynomials_bdm_01.cc | 24 +- tests/base/polynomials_rt.cc | 20 +- tests/base/polynomials_tensor.cc | 30 +- tests/base/qprojector.cc | 138 +- tests/base/quadrature_selector.cc | 10 +- tests/base/quadrature_test.cc | 188 +- tests/base/reference.cc | 42 +- tests/base/scalar_01.cc | 4 +- tests/base/slice_vector.cc | 18 +- tests/base/symmetric_tensor_01.cc | 18 +- tests/base/symmetric_tensor_02.cc | 18 +- tests/base/symmetric_tensor_03.cc | 24 +- tests/base/symmetric_tensor_04.cc | 22 +- tests/base/symmetric_tensor_05.cc | 50 +- tests/base/symmetric_tensor_06.cc | 52 +- tests/base/symmetric_tensor_07.cc | 46 +- tests/base/symmetric_tensor_08.cc | 44 +- tests/base/symmetric_tensor_09.cc | 6 +- tests/base/symmetric_tensor_10.cc | 14 +- tests/base/symmetric_tensor_11.cc | 14 +- tests/base/symmetric_tensor_12.cc | 6 +- tests/base/symmetric_tensor_13.cc | 6 +- tests/base/symmetric_tensor_14.cc | 6 +- tests/base/symmetric_tensor_15.cc | 22 +- tests/base/symmetric_tensor_16.cc | 10 +- tests/base/symmetric_tensor_17.cc | 30 +- tests/base/symmetric_tensor_18.cc | 54 +- tests/base/symmetric_tensor_19.cc | 96 +- tests/base/symmetric_tensor_20.cc | 4 +- tests/base/symmetric_tensor_21.cc | 6 +- tests/base/symmetric_tensor_22.cc | 6 +- tests/base/symmetric_tensor_23.cc | 8 +- tests/base/symmetric_tensor_24.cc | 12 +- tests/base/symmetric_tensor_25.cc | 22 +- tests/base/symmetric_tensor_26.cc | 6 +- tests/base/table.cc | 241 +- tests/base/table_handler_01.cc | 12 +- tests/base/table_handler_02.cc | 24 +- tests/base/table_handler_05.cc | 10 +- tests/base/table_handler_06.cc | 12 +- tests/base/table_handler_07.cc | 16 +- tests/base/table_handler_08.cc | 16 +- tests/base/table_handler_09.cc | 12 +- tests/base/table_handler_10.cc | 16 +- tests/base/table_handler_11.cc | 10 +- tests/base/table_handler_12.cc | 16 +- tests/base/task_01.cc | 4 +- tests/base/task_02.cc | 6 +- tests/base/task_03.cc | 10 +- tests/base/task_04.cc | 12 +- tests/base/task_05.cc | 30 +- tests/base/task_06.cc | 10 +- tests/base/task_07.cc | 10 +- tests/base/task_08.cc | 10 +- tests/base/task_09.cc | 28 +- tests/base/tensor.cc | 34 +- tests/base/tensor_02.cc | 6 +- tests/base/tensor_03.cc | 6 +- tests/base/tensor_07.cc | 32 +- tests/base/tensor_08.cc | 22 +- tests/base/tensor_24.cc | 12 +- tests/base/tensor_25.cc | 24 +- tests/base/tensor_complex.cc | 36 +- tests/base/tensor_float.cc | 22 +- tests/base/thread_local_storage_01.cc | 72 +- tests/base/thread_local_storage_02.cc | 92 +- tests/base/thread_local_storage_03.cc | 32 +- tests/base/thread_local_storage_04.cc | 38 +- tests/base/thread_validity_01.cc | 16 +- tests/base/thread_validity_02.cc | 18 +- tests/base/thread_validity_03.cc | 30 +- tests/base/thread_validity_04.cc | 30 +- tests/base/thread_validity_05.cc | 76 +- tests/base/thread_validity_06.cc | 20 +- tests/base/thread_validity_07.cc | 10 +- tests/base/thread_validity_08.cc | 36 +- tests/base/thread_validity_10.cc | 12 +- tests/base/thread_validity_11.cc | 8 +- tests/base/thread_validity_12.cc | 10 +- tests/base/timer.cc | 12 +- tests/base/timer_02.cc | 10 +- tests/base/utilities_01.cc | 12 +- tests/base/utilities_02.cc | 6 +- tests/base/utilities_04.cc | 12 +- tests/base/utilities_05.cc | 16 +- tests/base/vectorization_01.cc | 4 +- tests/base/vectorization_02.cc | 6 +- tests/base/vectorization_03.cc | 2 +- tests/base/vectorization_04.cc | 66 +- tests/base/work_stream_01.cc | 36 +- tests/base/work_stream_02.cc | 18 +- tests/base/work_stream_03.cc | 94 +- tests/benchmarks/gettimes/get_times.cc | 273 +- tests/benchmarks/old/benchmark.cc | 26 +- tests/benchmarks/old/dof_handler_size.cc | 56 +- tests/benchmarks/old/dof_handler_timing.cc | 64 +- tests/benchmarks/old/dof_handler_timing_01.cc | 40 +- tests/benchmarks/old/performance.cc | 54 +- tests/benchmarks/old/spec2006-447.dealII.cc | 5960 ++--- tests/benchmarks/step-22/step-22.cc | 1654 +- .../benchmarks/tablehandler/table_handler.cc | 16 +- tests/benchmarks/test_assembly/step-22.cc | 1616 +- tests/benchmarks/test_poisson/poisson.cc | 12 +- tests/bits/accessor_equality.cc | 42 +- tests/bits/anna_1.cc | 96 +- tests/bits/anna_2.cc | 92 +- tests/bits/anna_3.cc | 32 +- tests/bits/anna_4.cc | 144 +- tests/bits/anna_6.cc | 252 +- tests/bits/apply_boundary_values_01.cc | 80 +- tests/bits/apply_boundary_values_02.cc | 80 +- tests/bits/apply_boundary_values_03.cc | 100 +- tests/bits/apply_boundary_values_04.cc | 100 +- tests/bits/block_matrix_array_01.cc | 8 +- tests/bits/block_sparse_matrix_1.cc | 60 +- tests/bits/block_sparse_matrix_2.cc | 44 +- tests/bits/block_sparse_matrix_iterator_01.cc | 50 +- tests/bits/block_sparse_matrix_iterator_02.cc | 50 +- tests/bits/block_sparse_matrix_iterator_03.cc | 50 +- tests/bits/block_sparse_matrix_iterator_04.cc | 34 +- tests/bits/block_sparse_matrix_iterator_05.cc | 54 +- tests/bits/block_vector_iterator_01.cc | 46 +- tests/bits/block_vector_iterator_02.cc | 46 +- tests/bits/block_vector_vector_01.cc | 32 +- tests/bits/christian_1.cc | 68 +- tests/bits/christian_2.cc | 4 +- tests/bits/chunk_sparse_matrix_00.cc | 46 +- tests/bits/chunk_sparse_matrix_01.cc | 40 +- tests/bits/chunk_sparse_matrix_01a.cc | 64 +- tests/bits/chunk_sparse_matrix_02.cc | 38 +- tests/bits/chunk_sparse_matrix_03.cc | 42 +- tests/bits/chunk_sparse_matrix_03a.cc | 46 +- tests/bits/chunk_sparse_matrix_03b.cc | 46 +- tests/bits/chunk_sparse_matrix_04.cc | 36 +- tests/bits/chunk_sparse_matrix_05.cc | 58 +- tests/bits/chunk_sparse_matrix_05a.cc | 44 +- tests/bits/chunk_sparse_matrix_06.cc | 48 +- tests/bits/chunk_sparse_matrix_07.cc | 48 +- tests/bits/chunk_sparse_matrix_08.cc | 46 +- tests/bits/chunk_sparse_matrix_09.cc | 46 +- tests/bits/chunk_sparse_matrix_10.cc | 46 +- tests/bits/chunk_sparse_matrix_11.cc | 36 +- tests/bits/chunk_sparse_matrix_12.cc | 36 +- tests/bits/chunk_sparse_matrix_13.cc | 36 +- tests/bits/chunk_sparse_matrix_14.cc | 36 +- tests/bits/chunk_sparse_matrix_15.cc | 30 +- tests/bits/chunk_sparse_matrix_iterator_01.cc | 28 +- tests/bits/chunk_sparse_matrix_iterator_02.cc | 36 +- tests/bits/chunk_sparse_matrix_iterator_03.cc | 36 +- tests/bits/chunk_sparse_matrix_iterator_04.cc | 32 +- tests/bits/chunk_sparse_matrix_iterator_05.cc | 32 +- tests/bits/chunk_sparse_matrix_iterator_06.cc | 32 +- tests/bits/chunk_sparse_matrix_iterator_07.cc | 32 +- tests/bits/chunk_sparse_matrix_iterator_08.cc | 32 +- tests/bits/chunk_sparse_matrix_iterator_09.cc | 36 +- tests/bits/chunk_sparse_matrix_iterator_10.cc | 36 +- tests/bits/chunk_sparse_matrix_iterator_11.cc | 36 +- tests/bits/chunk_sparse_matrix_iterator_12.cc | 36 +- tests/bits/chunk_sparse_matrix_iterator_13.cc | 54 +- tests/bits/chunk_sparse_matrix_vector_01.cc | 56 +- tests/bits/chunk_sparse_matrix_vector_02.cc | 56 +- tests/bits/chunk_sparse_matrix_vector_03.cc | 56 +- tests/bits/chunk_sparse_matrix_vector_04.cc | 56 +- tests/bits/chunk_sparse_matrix_vector_05.cc | 56 +- tests/bits/chunk_sparse_matrix_vector_06.cc | 54 +- tests/bits/chunk_sparse_matrix_vector_07.cc | 58 +- tests/bits/coarsening_3d.cc | 8 +- tests/bits/complex_complex_full_matrix_02.cc | 6 +- tests/bits/complex_complex_full_matrix_03.cc | 8 +- tests/bits/complex_complex_full_matrix_04.cc | 11 +- tests/bits/complex_complex_full_matrix_06.cc | 2 +- tests/bits/complex_complex_full_matrix_08.cc | 2 +- tests/bits/complex_complex_full_matrix_12.cc | 2 +- tests/bits/complex_complex_full_matrix_13.cc | 2 +- tests/bits/complex_complex_full_matrix_14.cc | 2 +- tests/bits/complex_complex_full_matrix_19.cc | 2 +- tests/bits/complex_complex_full_matrix_24.cc | 2 +- tests/bits/complex_complex_full_matrix_37.cc | 2 +- tests/bits/complex_complex_full_matrix_42.cc | 11 +- tests/bits/complex_real_full_matrix_02.cc | 6 +- tests/bits/complex_real_full_matrix_03.cc | 8 +- tests/bits/complex_real_full_matrix_04.cc | 11 +- tests/bits/complex_real_full_matrix_06.cc | 2 +- tests/bits/complex_real_full_matrix_08.cc | 2 +- tests/bits/complex_real_full_matrix_12.cc | 2 +- tests/bits/complex_real_full_matrix_13.cc | 2 +- tests/bits/complex_real_full_matrix_14.cc | 2 +- tests/bits/complex_real_full_matrix_19.cc | 2 +- tests/bits/complex_real_full_matrix_24.cc | 2 +- tests/bits/complex_real_full_matrix_37.cc | 2 +- tests/bits/complex_real_full_matrix_42.cc | 11 +- tests/bits/complex_vector_11.cc | 34 +- tests/bits/complex_vector_12.cc | 42 +- tests/bits/complex_vector_13.cc | 42 +- tests/bits/complex_vector_14.cc | 48 +- tests/bits/complex_vector_15.cc | 46 +- tests/bits/complex_vector_16.cc | 46 +- tests/bits/complex_vector_17.cc | 34 +- tests/bits/complex_vector_18.cc | 36 +- tests/bits/complex_vector_19.cc | 36 +- tests/bits/complex_vector_20.cc | 46 +- tests/bits/complex_vector_21.cc | 46 +- tests/bits/complex_vector_21_negative.cc | 46 +- tests/bits/complex_vector_22.cc | 36 +- tests/bits/complex_vector_23.cc | 50 +- tests/bits/complex_vector_24.cc | 36 +- tests/bits/complex_vector_25.cc | 36 +- tests/bits/complex_vector_26.cc | 32 +- tests/bits/complex_vector_27.cc | 40 +- tests/bits/complex_vector_28.cc | 40 +- tests/bits/complex_vector_29.cc | 32 +- tests/bits/complex_vector_30.cc | 36 +- tests/bits/complex_vector_31.cc | 36 +- tests/bits/complex_vector_32.cc | 36 +- tests/bits/complex_vector_33.cc | 36 +- tests/bits/complex_vector_34.cc | 36 +- tests/bits/complex_vector_35.cc | 44 +- tests/bits/complex_vector_36.cc | 44 +- tests/bits/complex_vector_37.cc | 36 +- tests/bits/complex_vector_38.cc | 40 +- tests/bits/complex_vector_39.cc | 40 +- tests/bits/complex_vector_40.cc | 36 +- tests/bits/complex_vector_41.cc | 40 +- tests/bits/complex_vector_42.cc | 40 +- tests/bits/complex_vector_43.cc | 36 +- tests/bits/complex_vector_44.cc | 44 +- tests/bits/complex_vector_45.cc | 34 +- tests/bits/complex_vector_46.cc | 38 +- tests/bits/complex_vector_47.cc | 38 +- tests/bits/complex_vector_48.cc | 42 +- tests/bits/complex_vector_49.cc | 38 +- tests/bits/complex_vector_equality_1.cc | 32 +- tests/bits/complex_vector_equality_2.cc | 36 +- tests/bits/complex_vector_equality_3.cc | 32 +- tests/bits/complex_vector_equality_4.cc | 36 +- tests/bits/complex_vector_equality_5.cc | 32 +- tests/bits/complex_vector_equality_6.cc | 36 +- tests/bits/complex_vector_equality_7.cc | 32 +- tests/bits/complex_vector_equality_8.cc | 36 +- tests/bits/complex_vector_vector_01.cc | 32 +- .../compressed_set_sparsity_pattern_01.cc | 10 +- .../compressed_set_sparsity_pattern_02.cc | 10 +- .../compressed_set_sparsity_pattern_03.cc | 12 +- .../compressed_set_sparsity_pattern_04.cc | 8 +- .../compressed_set_sparsity_pattern_05.cc | 8 +- .../compressed_set_sparsity_pattern_06.cc | 2 +- .../compressed_set_sparsity_pattern_07.cc | 2 +- .../compressed_set_sparsity_pattern_08.cc | 10 +- .../compressed_set_sparsity_pattern_09.cc | 4 +- tests/bits/compressed_sparsity_pattern_01.cc | 10 +- tests/bits/compressed_sparsity_pattern_02.cc | 10 +- tests/bits/compressed_sparsity_pattern_03.cc | 12 +- tests/bits/compressed_sparsity_pattern_04.cc | 2 +- tests/bits/compressed_sparsity_pattern_05.cc | 2 +- tests/bits/compressed_sparsity_pattern_06.cc | 2 +- tests/bits/compressed_sparsity_pattern_07.cc | 2 +- tests/bits/compressed_sparsity_pattern_08.cc | 10 +- tests/bits/compressed_sparsity_pattern_09.cc | 4 +- tests/bits/cone_01.cc | 2 +- tests/bits/count_dofs_per_block_01.cc | 30 +- tests/bits/count_dofs_per_block_02.cc | 28 +- tests/bits/count_dofs_per_component_hp_01.cc | 2 +- tests/bits/cylinder.cc | 18 +- tests/bits/cylinder_01.cc | 8 +- tests/bits/cylinder_02.cc | 14 +- tests/bits/cylinder_03.cc | 12 +- tests/bits/cylinder_04.cc | 20 +- tests/bits/cylinder_shell_01.cc | 10 +- tests/bits/cylinder_shell_02.cc | 12 +- tests/bits/data_out_01.cc | 10 +- tests/bits/data_out_02.cc | 12 +- tests/bits/data_out_03.cc | 62 +- tests/bits/data_out_04.cc | 124 +- tests/bits/data_out_05.cc | 46 +- tests/bits/data_out_common.h | 54 +- tests/bits/data_out_curved_cells.cc | 174 +- tests/bits/data_out_faces_01.cc | 36 +- tests/bits/data_out_faces_02.cc | 38 +- tests/bits/data_out_faces_03.cc | 88 +- tests/bits/data_out_faces_04.cc | 138 +- tests/bits/data_out_rotation_01.cc | 36 +- tests/bits/data_out_rotation_02.cc | 38 +- tests/bits/data_out_rotation_03.cc | 92 +- tests/bits/data_out_rotation_04.cc | 142 +- tests/bits/data_out_stack_01.cc | 26 +- tests/bits/data_out_stack_02.cc | 26 +- tests/bits/data_out_stack_03.cc | 18 +- tests/bits/deal_solver_04.cc | 16 +- tests/bits/deal_solver_05.cc | 16 +- tests/bits/denis_1.cc | 48 +- tests/bits/distorted_cells_01.cc | 24 +- tests/bits/distorted_cells_02.cc | 4 +- tests/bits/distorted_cells_03.cc | 78 +- tests/bits/distorted_cells_04.cc | 146 +- tests/bits/distorted_cells_05.cc | 146 +- tests/bits/distorted_cells_06.cc | 64 +- tests/bits/distorted_cells_07.cc | 14 +- tests/bits/distorted_mapped_cells_01.cc | 12 +- tests/bits/distorted_mapped_cells_02.cc | 21 +- tests/bits/dof_constraints_01.cc | 78 +- tests/bits/dof_constraints_02.cc | 76 +- tests/bits/dof_constraints_03.cc | 54 +- tests/bits/dof_constraints_04.cc | 46 +- tests/bits/dof_constraints_05.cc | 54 +- tests/bits/dof_constraints_06.cc | 44 +- tests/bits/dof_constraints_06_x.cc | 46 +- tests/bits/dof_constraints_07.cc | 54 +- tests/bits/dof_constraints_08.cc | 46 +- tests/bits/dof_constraints_09.cc | 56 +- tests/bits/dof_constraints_10.cc | 44 +- tests/bits/dof_constraints_10_x.cc | 46 +- tests/bits/dof_constraints_11.cc | 46 +- tests/bits/dof_constraints_11_x.cc | 46 +- tests/bits/dof_tools_00a.cc | 58 +- tests/bits/dof_tools_01a.cc | 16 +- tests/bits/dof_tools_01a_constraints_false.cc | 18 +- tests/bits/dof_tools_01a_constraints_true.cc | 18 +- tests/bits/dof_tools_01a_subdomain.cc | 26 +- tests/bits/dof_tools_01b.cc | 16 +- tests/bits/dof_tools_01b_x.cc | 18 +- tests/bits/dof_tools_01c.cc | 36 +- tests/bits/dof_tools_01d.cc | 36 +- tests/bits/dof_tools_01d_x.cc | 44 +- tests/bits/dof_tools_02a.cc | 20 +- tests/bits/dof_tools_02a_constraints_false.cc | 20 +- tests/bits/dof_tools_02a_constraints_true.cc | 20 +- tests/bits/dof_tools_02a_subdomain.cc | 28 +- tests/bits/dof_tools_02b.cc | 20 +- tests/bits/dof_tools_02b_x.cc | 22 +- tests/bits/dof_tools_02c.cc | 40 +- tests/bits/dof_tools_02d.cc | 40 +- tests/bits/dof_tools_02d_x.cc | 48 +- tests/bits/dof_tools_03.cc | 44 +- tests/bits/dof_tools_05.cc | 14 +- tests/bits/dof_tools_06.cc | 2 +- tests/bits/dof_tools_09.cc | 4 +- tests/bits/dof_tools_10.cc | 12 +- tests/bits/dof_tools_11.cc | 32 +- tests/bits/dof_tools_12.cc | 4 +- tests/bits/dof_tools_13.cc | 20 +- tests/bits/dof_tools_13a.cc | 54 +- tests/bits/dof_tools_14.cc | 10 +- tests/bits/dof_tools_15a.cc | 24 +- tests/bits/dof_tools_15b.cc | 24 +- tests/bits/dof_tools_15b_x.cc | 26 +- tests/bits/dof_tools_15c.cc | 38 +- tests/bits/dof_tools_15d.cc | 38 +- tests/bits/dof_tools_15d_x.cc | 46 +- tests/bits/dof_tools_16a.cc | 26 +- tests/bits/dof_tools_16b.cc | 24 +- tests/bits/dof_tools_16b_x.cc | 26 +- tests/bits/dof_tools_16c.cc | 34 +- tests/bits/dof_tools_16d.cc | 34 +- tests/bits/dof_tools_16d_x.cc | 42 +- tests/bits/dof_tools_17a.cc | 16 +- tests/bits/dof_tools_17b.cc | 16 +- tests/bits/dof_tools_17b_x.cc | 18 +- tests/bits/dof_tools_17c.cc | 36 +- tests/bits/dof_tools_17d.cc | 36 +- tests/bits/dof_tools_17d_x.cc | 44 +- tests/bits/dof_tools_18a.cc | 46 +- tests/bits/dof_tools_18a_1d.cc | 46 +- tests/bits/dof_tools_18b.cc | 46 +- tests/bits/dof_tools_18b_x.cc | 48 +- tests/bits/dof_tools_18c.cc | 66 +- tests/bits/dof_tools_18d.cc | 66 +- tests/bits/dof_tools_18d_x.cc | 74 +- tests/bits/dof_tools_19.cc | 26 +- tests/bits/dof_tools_20.cc | 24 +- tests/bits/dof_tools_21_b.cc | 335 +- tests/bits/dof_tools_common.h | 78 +- tests/bits/dof_tools_periodic.h | 66 +- tests/bits/error_estimator_01.cc | 106 +- tests/bits/error_estimator_02.cc | 106 +- tests/bits/face_interpolation.cc | 58 +- .../face_orientation_and_fe_nedelec_01.cc | 134 +- tests/bits/face_orientation_and_fe_q_01.cc | 134 +- tests/bits/face_orientation_and_fe_q_02.cc | 168 +- tests/bits/face_orientation_crash.cc | 36 +- tests/bits/fe_face_to_cell_index.cc | 14 +- tests/bits/fe_field_function_01.cc | 21 +- tests/bits/fe_field_function_01_vector.cc | 37 +- tests/bits/fe_field_function_02.cc | 19 +- tests/bits/fe_field_function_02_vector.cc | 35 +- tests/bits/fe_field_function_03.cc | 21 +- tests/bits/fe_field_function_03_vector.cc | 21 +- tests/bits/fe_field_function_04.cc | 44 +- tests/bits/fe_field_function_04_vector.cc | 54 +- tests/bits/fe_field_function_05.cc | 62 +- tests/bits/fe_field_function_05_vector.cc | 72 +- tests/bits/fe_field_function_06_vector.cc | 72 +- tests/bits/fe_field_function_07_vector.cc | 96 +- tests/bits/fe_field_function_08_vector.cc | 90 +- tests/bits/fe_q_3d_01.cc | 76 +- tests/bits/fe_q_constraints.cc | 194 +- tests/bits/fe_system.cc | 28 +- tests/bits/fe_tools_01a.cc | 38 +- tests/bits/fe_tools_01b.cc | 40 +- tests/bits/fe_tools_01c.cc | 48 +- tests/bits/fe_tools_02.cc | 12 +- tests/bits/fe_tools_03.cc | 12 +- tests/bits/fe_tools_04.cc | 12 +- tests/bits/fe_tools_05.cc | 18 +- tests/bits/fe_tools_06.cc | 18 +- tests/bits/fe_tools_06b.cc | 18 +- tests/bits/fe_tools_07.cc | 18 +- tests/bits/fe_tools_08.cc | 24 +- tests/bits/fe_tools_09.cc | 18 +- tests/bits/fe_tools_10.cc | 20 +- tests/bits/fe_tools_11.cc | 20 +- tests/bits/fe_tools_12.cc | 20 +- tests/bits/fe_tools_14.cc | 4 +- tests/bits/fe_tools_common.h | 174 +- tests/bits/fe_tools_cpfqpm_01.cc | 20 +- tests/bits/fe_tools_cpfqpm_02.cc | 42 +- tests/bits/fe_tools_cpfqpm_03.cc | 20 +- tests/bits/fe_tools_cpfqpm_04.cc | 26 +- tests/bits/find_cell_1.cc | 16 +- tests/bits/find_cell_10.cc | 24 +- tests/bits/find_cell_2.cc | 16 +- tests/bits/find_cell_3.cc | 22 +- tests/bits/find_cell_4.cc | 32 +- tests/bits/find_cell_5.cc | 32 +- tests/bits/find_cell_6.cc | 42 +- tests/bits/find_cell_7.cc | 10 +- tests/bits/find_cell_8.cc | 82 +- tests/bits/find_cell_9.cc | 88 +- tests/bits/find_cell_alt_1.cc | 22 +- tests/bits/find_cell_alt_2.cc | 20 +- tests/bits/find_cell_alt_3.cc | 26 +- tests/bits/find_cell_alt_4.cc | 14 +- tests/bits/find_cell_alt_5.cc | 14 +- tests/bits/find_cell_alt_6.cc | 34 +- tests/bits/find_cell_alt_7.cc | 54 +- tests/bits/find_cells_adjacent_to_vertex_1.cc | 17 +- tests/bits/find_cells_adjacent_to_vertex_2.cc | 10 +- tests/bits/find_cells_adjacent_to_vertex_3.cc | 46 +- tests/bits/find_cells_adjacent_to_vertex_4.cc | 48 +- tests/bits/find_cells_adjacent_to_vertex_5.cc | 62 +- tests/bits/find_cells_adjacent_to_vertex_6.cc | 64 +- tests/bits/find_closest_vertex_1.cc | 16 +- tests/bits/full_matrix_02.cc | 6 +- tests/bits/full_matrix_03.cc | 8 +- tests/bits/full_matrix_04.cc | 11 +- tests/bits/full_matrix_06.cc | 2 +- tests/bits/full_matrix_08.cc | 2 +- tests/bits/full_matrix_1.cc | 6 +- tests/bits/full_matrix_12.cc | 2 +- tests/bits/full_matrix_13.cc | 2 +- tests/bits/full_matrix_14.cc | 2 +- tests/bits/full_matrix_19.cc | 2 +- tests/bits/full_matrix_24.cc | 2 +- tests/bits/full_matrix_37.cc | 2 +- tests/bits/full_matrix_42.cc | 11 +- tests/bits/full_matrix_53.cc | 14 +- tests/bits/full_matrix_55.cc | 2 +- tests/bits/full_matrix_56.cc | 68 +- tests/bits/full_matrix_57.cc | 30 +- tests/bits/full_matrix_common.h | 46 +- tests/bits/full_matrix_iterator_01.cc | 28 +- tests/bits/full_matrix_vector_01.cc | 36 +- tests/bits/full_matrix_vector_02.cc | 36 +- tests/bits/full_matrix_vector_05.cc | 36 +- tests/bits/full_matrix_vector_06.cc | 36 +- tests/bits/full_matrix_vector_07.cc | 36 +- tests/bits/gerold_1.cc | 70 +- tests/bits/gerold_2.cc | 32 +- tests/bits/get_dof_indices_01.cc | 42 +- tests/bits/get_fe_from_name.cc | 52 +- tests/bits/grid_generator_01.cc | 56 +- tests/bits/grid_generator_01a.cc | 22 +- tests/bits/grid_generator_02.cc | 14 +- tests/bits/grid_generator_03.cc | 20 +- tests/bits/grid_generator_04.cc | 85 +- tests/bits/grid_generator_05.cc | 24 +- tests/bits/grid_generator_06.cc | 4 +- tests/bits/grid_in_msh_01.cc | 36 +- tests/bits/hp_constraints_are_implemented.cc | 6 +- tests/bits/hyper_ball_3d.cc | 22 +- tests/bits/joa_1.cc | 1898 +- tests/bits/make_boundary_constraints_01.cc | 110 +- tests/bits/make_boundary_constraints_02.cc | 106 +- .../bits/map_dofs_to_support_points_hp_01.cc | 20 +- .../bits/map_dofs_to_support_points_hp_02.cc | 12 +- tests/bits/mapping_cartesian_1.cc | 14 +- tests/bits/mapping_q1_eulerian_01.cc | 42 +- tests/bits/mapping_q4_3d.cc | 8 +- tests/bits/mapping_q_eulerian_01.cc | 42 +- tests/bits/mapping_q_eulerian_02.cc | 42 +- tests/bits/mapping_q_eulerian_03.cc | 42 +- tests/bits/mapping_q_eulerian_04.cc | 41 +- tests/bits/mapping_q_eulerian_05.cc | 55 +- tests/bits/max_n_cells_01.cc | 8 +- tests/bits/max_n_cells_02.cc | 12 +- tests/bits/mesh_3d.h | 76 +- tests/bits/mesh_3d_1.cc | 8 +- tests/bits/mesh_3d_10.cc | 22 +- tests/bits/mesh_3d_11.cc | 22 +- tests/bits/mesh_3d_12.cc | 24 +- tests/bits/mesh_3d_13.cc | 34 +- tests/bits/mesh_3d_14.cc | 44 +- tests/bits/mesh_3d_15.cc | 56 +- tests/bits/mesh_3d_16.cc | 44 +- tests/bits/mesh_3d_17.cc | 52 +- tests/bits/mesh_3d_18.cc | 60 +- tests/bits/mesh_3d_19.cc | 4 +- tests/bits/mesh_3d_2.cc | 14 +- tests/bits/mesh_3d_20.cc | 98 +- tests/bits/mesh_3d_21.cc | 108 +- tests/bits/mesh_3d_22.cc | 72 +- tests/bits/mesh_3d_24.cc | 26 +- tests/bits/mesh_3d_25.cc | 72 +- tests/bits/mesh_3d_26.cc | 76 +- tests/bits/mesh_3d_3.cc | 17 +- tests/bits/mesh_3d_4.cc | 32 +- tests/bits/mesh_3d_5.cc | 26 +- tests/bits/mesh_3d_6.cc | 60 +- tests/bits/mesh_3d_7.cc | 56 +- tests/bits/mesh_3d_8.cc | 22 +- tests/bits/mesh_3d_9.cc | 22 +- tests/bits/multiple_parameter_loop_01.cc | 38 +- tests/bits/multiple_parameter_loop_02.cc | 38 +- tests/bits/n_dofs_per_object.cc | 12 +- tests/bits/nedelec_1.cc | 6 +- tests/bits/neighboring_cells_at_two_faces.cc | 29 +- tests/bits/normals_1.cc | 38 +- tests/bits/normals_2.cc | 30 +- tests/bits/normals_3.cc | 32 +- tests/bits/normals_4.cc | 28 +- tests/bits/oliver_01.cc | 6 +- tests/bits/parameter_handler_1.cc | 4 +- tests/bits/parameter_handler_10.cc | 4 +- tests/bits/parameter_handler_11.cc | 4 +- tests/bits/parameter_handler_13.cc | 4 +- tests/bits/parameter_handler_14.cc | 2 +- tests/bits/parameter_handler_2.cc | 4 +- tests/bits/parameter_handler_3.cc | 40 +- tests/bits/parameter_handler_4.cc | 40 +- tests/bits/parameter_handler_4a.cc | 82 +- tests/bits/parameter_handler_4b.cc | 22 +- tests/bits/parameter_handler_5.cc | 32 +- tests/bits/parameter_handler_6.cc | 44 +- tests/bits/parameter_handler_6_bool.cc | 52 +- tests/bits/parameter_handler_7.cc | 30 +- tests/bits/parameter_handler_8.cc | 82 +- tests/bits/parameter_handler_9.cc | 82 +- tests/bits/parameter_handler_read_xml.cc | 46 +- .../parameter_handler_read_xml_error_01.cc | 46 +- .../parameter_handler_read_xml_error_02.cc | 46 +- .../parameter_handler_read_xml_error_03.cc | 46 +- .../parameter_handler_read_xml_error_04.cc | 46 +- tests/bits/parameter_handler_write_json.cc | 42 +- tests/bits/parameter_handler_write_xml.cc | 42 +- tests/bits/parsed_function.cc | 99 +- tests/bits/periodicity_01.cc | 22 +- tests/bits/periodicity_02.cc | 24 +- tests/bits/periodicity_03.cc | 24 +- tests/bits/periodicity_04.cc | 24 +- tests/bits/point_difference_01.cc | 96 +- tests/bits/point_difference_02.cc | 96 +- tests/bits/point_inside_1.cc | 39 +- tests/bits/point_inside_2.cc | 72 +- tests/bits/point_value_01.cc | 98 +- tests/bits/point_value_02.cc | 98 +- tests/bits/point_value_hp_01.cc | 102 +- tests/bits/point_value_hp_02.cc | 106 +- tests/bits/q_point_sum_1.cc | 42 +- tests/bits/q_point_sum_2.cc | 42 +- tests/bits/q_point_sum_3.cc | 48 +- tests/bits/q_point_sum_4.cc | 32 +- tests/bits/q_points.cc | 34 +- tests/bits/refine_and_coarsen_1d.cc | 22 +- tests/bits/refine_and_coarsen_2d.cc | 22 +- tests/bits/refine_and_coarsen_3d.cc | 22 +- tests/bits/refine_and_coarsen_for_parents.cc | 34 +- .../bits/refine_and_coarsen_for_parents_02.cc | 34 +- .../bits/refine_and_coarsen_for_parents_03.cc | 34 +- tests/bits/roy_1.cc | 25 +- tests/bits/rt_1.cc | 4 +- tests/bits/rt_2.cc | 146 +- tests/bits/solution_transfer.cc | 49 +- tests/bits/solver_01.cc | 19231 ++++++++-------- tests/bits/sparse_lu_decomposition_1.cc | 6 +- tests/bits/sparse_matrix_01.cc | 34 +- tests/bits/sparse_matrix_01a.cc | 34 +- tests/bits/sparse_matrix_02.cc | 32 +- tests/bits/sparse_matrix_03.cc | 36 +- tests/bits/sparse_matrix_03a.cc | 40 +- tests/bits/sparse_matrix_03b.cc | 40 +- tests/bits/sparse_matrix_04.cc | 30 +- tests/bits/sparse_matrix_05.cc | 44 +- tests/bits/sparse_matrix_05a.cc | 30 +- tests/bits/sparse_matrix_06.cc | 42 +- tests/bits/sparse_matrix_07.cc | 42 +- tests/bits/sparse_matrix_08.cc | 40 +- tests/bits/sparse_matrix_09.cc | 40 +- tests/bits/sparse_matrix_10.cc | 40 +- tests/bits/sparse_matrix_add_entries_01.cc | 58 +- tests/bits/sparse_matrix_add_entries_02.cc | 52 +- tests/bits/sparse_matrix_add_entries_03.cc | 54 +- tests/bits/sparse_matrix_add_entries_04.cc | 52 +- tests/bits/sparse_matrix_add_entries_05.cc | 52 +- tests/bits/sparse_matrix_add_entries_06.cc | 58 +- tests/bits/sparse_matrix_iterator_01.cc | 30 +- tests/bits/sparse_matrix_iterator_02.cc | 30 +- tests/bits/sparse_matrix_iterator_03.cc | 30 +- tests/bits/sparse_matrix_iterator_04.cc | 32 +- tests/bits/sparse_matrix_iterator_05.cc | 32 +- tests/bits/sparse_matrix_iterator_06.cc | 32 +- tests/bits/sparse_matrix_iterator_07.cc | 32 +- tests/bits/sparse_matrix_iterator_08.cc | 32 +- tests/bits/sparse_matrix_iterator_09.cc | 36 +- tests/bits/sparse_matrix_iterator_10.cc | 36 +- tests/bits/sparse_matrix_iterator_11.cc | 38 +- tests/bits/sparse_matrix_iterator_12.cc | 36 +- tests/bits/sparse_matrix_iterator_13.cc | 42 +- tests/bits/sparse_matrix_vector_01.cc | 42 +- tests/bits/sparse_matrix_vector_02.cc | 42 +- tests/bits/sparse_matrix_vector_03.cc | 42 +- tests/bits/sparse_matrix_vector_04.cc | 42 +- tests/bits/sparse_matrix_vector_05.cc | 42 +- tests/bits/sparse_matrix_vector_06.cc | 42 +- tests/bits/sparse_matrix_vector_07.cc | 42 +- tests/bits/sparsity_pattern_01.cc | 4 +- tests/bits/sparsity_pattern_01_x.cc | 4 +- tests/bits/sparsity_pattern_iterator_01.cc | 32 +- tests/bits/step-10.cc | 124 +- tests/bits/step-11.cc | 144 +- tests/bits/step-12.cc | 872 +- tests/bits/step-13.cc | 616 +- tests/bits/step-14.cc | 1907 +- tests/bits/step-15.cc | 234 +- tests/bits/step-16.cc | 220 +- tests/bits/step-16b.cc | 220 +- tests/bits/step-2.cc | 46 +- tests/bits/step-3.cc | 130 +- tests/bits/step-4.cc | 182 +- tests/bits/step-5.cc | 228 +- tests/bits/step-6.cc | 250 +- tests/bits/step-7.cc | 639 +- tests/bits/step-8.cc | 346 +- tests/bits/subdomain_ids_01.cc | 36 +- tests/bits/subdomain_ids_02.cc | 48 +- tests/bits/subdomain_ids_03.cc | 24 +- tests/bits/subdomain_ids_04.cc | 42 +- tests/bits/subdomain_ids_05.cc | 32 +- tests/bits/subdomain_ids_06.cc | 32 +- tests/bits/subdomain_ids_07.cc | 38 +- tests/bits/subface_interpolation.cc | 114 +- tests/bits/tria_crash_01.cc | 20 +- tests/bits/unit_support_points.cc | 34 +- tests/bits/unit_support_points_02.cc | 2 +- tests/bits/vector_11.cc | 34 +- tests/bits/vector_12.cc | 42 +- tests/bits/vector_13.cc | 42 +- tests/bits/vector_14.cc | 48 +- tests/bits/vector_15.cc | 46 +- tests/bits/vector_16.cc | 46 +- tests/bits/vector_17.cc | 34 +- tests/bits/vector_18.cc | 34 +- tests/bits/vector_19.cc | 34 +- tests/bits/vector_20.cc | 46 +- tests/bits/vector_21.cc | 46 +- tests/bits/vector_21_negative.cc | 46 +- tests/bits/vector_22.cc | 36 +- tests/bits/vector_23.cc | 40 +- tests/bits/vector_24.cc | 36 +- tests/bits/vector_25.cc | 36 +- tests/bits/vector_26.cc | 32 +- tests/bits/vector_27.cc | 42 +- tests/bits/vector_28.cc | 42 +- tests/bits/vector_29.cc | 32 +- tests/bits/vector_30.cc | 36 +- tests/bits/vector_31.cc | 34 +- tests/bits/vector_32.cc | 34 +- tests/bits/vector_33.cc | 34 +- tests/bits/vector_34.cc | 36 +- tests/bits/vector_35.cc | 40 +- tests/bits/vector_36.cc | 40 +- tests/bits/vector_37.cc | 34 +- tests/bits/vector_38.cc | 36 +- tests/bits/vector_39.cc | 36 +- tests/bits/vector_40.cc | 34 +- tests/bits/vector_41.cc | 36 +- tests/bits/vector_42.cc | 36 +- tests/bits/vector_43.cc | 34 +- tests/bits/vector_44.cc | 34 +- tests/bits/vector_45.cc | 34 +- tests/bits/vector_46.cc | 34 +- tests/bits/vector_47.cc | 34 +- tests/bits/vector_48.cc | 34 +- tests/bits/vector_49.cc | 40 +- tests/bits/vector_57.cc | 42 +- tests/bits/vector_equality_1.cc | 32 +- tests/bits/vector_equality_2.cc | 36 +- tests/bits/vector_equality_3.cc | 32 +- tests/bits/vector_equality_4.cc | 36 +- tests/bits/vector_equality_5.cc | 32 +- tests/bits/vector_equality_6.cc | 36 +- tests/bits/vector_equality_7.cc | 32 +- tests/bits/vector_equality_8.cc | 36 +- tests/bits/vector_vector_01.cc | 32 +- tests/bits/volume_1.cc | 38 +- tests/bits/volume_2.cc | 30 +- tests/bits/volume_3.cc | 32 +- tests/bits/volume_4.cc | 28 +- tests/codim_one/bem.cc | 1147 +- tests/codim_one/bem_integration.cc | 253 +- tests/codim_one/boundary_indicator_01.cc | 62 +- tests/codim_one/data_out.cc | 13 +- tests/codim_one/data_out_02.cc | 2 +- tests/codim_one/data_out_03.cc | 56 +- tests/codim_one/direction_flag_01.cc | 14 +- tests/codim_one/direction_flag_02.cc | 14 +- tests/codim_one/direction_flag_03.cc | 4 +- tests/codim_one/error_estimator_01.cc | 112 +- tests/codim_one/extract_boundary_mesh_00.cc | 86 +- tests/codim_one/extract_boundary_mesh_01.cc | 81 +- tests/codim_one/extract_boundary_mesh_02.cc | 54 +- tests/codim_one/extract_boundary_mesh_03.cc | 90 +- tests/codim_one/extract_boundary_mesh_04.cc | 92 +- tests/codim_one/extract_boundary_mesh_05.cc | 20 +- tests/codim_one/extract_boundary_mesh_06.cc | 8 +- tests/codim_one/extract_boundary_mesh_07.cc | 32 +- tests/codim_one/fe_dgq_prolongation_01.cc | 4 +- tests/codim_one/fe_values_extractor_01.cc | 49 +- tests/codim_one/gradients.cc | 118 +- tests/codim_one/gradients_1.cc | 40 +- tests/codim_one/grid_in_out.cc | 23 +- tests/codim_one/grid_in_out_02.cc | 19 +- tests/codim_one/grid_in_out_03.cc | 19 +- tests/codim_one/grid_refinement.cc | 12 +- tests/codim_one/hanging_nodes_01.cc | 8 +- tests/codim_one/hanging_nodes_02.cc | 34 +- tests/codim_one/hanging_nodes_03.cc | 28 +- tests/codim_one/integrate_log.cc | 136 +- tests/codim_one/integrate_log_2.cc | 263 +- tests/codim_one/integrate_one_over_r.cc | 461 +- .../interpolate_boundary_values_01.cc | 85 +- ...polate_boundary_values_01_vector_valued.cc | 101 +- .../interpolate_boundary_values_02.cc | 89 +- ...polate_boundary_values_02_vector_valued.cc | 105 +- .../interpolate_boundary_values_03.cc | 65 +- ...erpolate_boundary_values_1d_closed_ring.cc | 83 +- tests/codim_one/interpolation.cc | 31 +- tests/codim_one/interpolation_2.cc | 13 +- tests/codim_one/interpolation_3.cc | 23 +- tests/codim_one/mapping_01.cc | 18 +- tests/codim_one/mapping_02.cc | 18 +- tests/codim_one/mapping_03.cc | 8 +- tests/codim_one/mapping_q1.cc | 41 +- tests/codim_one/mapping_q1_eulerian.cc | 43 +- tests/codim_one/mapping_q_eulerian.cc | 55 +- tests/codim_one/mean_value.cc | 8 +- tests/codim_one/mesh_bug.cc | 12 +- tests/codim_one/normal_vectors_01.cc | 34 +- tests/codim_one/projection.cc | 13 +- tests/codim_one/projection_dgp.cc | 17 +- tests/codim_one/renumber_component_wise_01.cc | 4 +- tests/codim_one/solution_transfer_01.cc | 14 +- tests/codim_one/surface.cc | 111 +- tests/codim_one/tensor_matrix_conversion.cc | 54 +- tests/codim_one/transform_01.cc | 20 +- tests/deal.II/accessor_01.cc | 16 +- tests/deal.II/accessor_02.cc | 16 +- tests/deal.II/block_info.cc | 40 +- tests/deal.II/block_info_02.cc | 42 +- tests/deal.II/block_list.h | 24 +- tests/deal.II/block_list_01.cc | 22 +- tests/deal.II/block_list_02.cc | 2 +- tests/deal.II/block_list_03.cc | 8 +- tests/deal.II/block_list_04.cc | 8 +- tests/deal.II/block_matrices.cc | 358 +- tests/deal.II/boundaries.cc | 92 +- tests/deal.II/cell_similarity_crash_01.cc | 14 +- tests/deal.II/cell_similarity_crash_02.cc | 8 +- tests/deal.II/coarsening_02.cc | 72 +- tests/deal.II/coarsening_02_1d.cc | 96 +- tests/deal.II/coarsening_03.cc | 54 +- tests/deal.II/constraint_graph.cc | 10 +- tests/deal.II/constraints.cc | 447 +- tests/deal.II/constraints_block_01.cc | 265 +- tests/deal.II/constraints_hanging_nodes_bc.cc | 72 +- tests/deal.II/constraints_local_to_global.cc | 38 +- .../constraints_local_to_global_chunk.cc | 34 +- tests/deal.II/constraints_merge.cc | 44 +- tests/deal.II/constraints_merge_02.cc | 48 +- tests/deal.II/constraints_merge_03.cc | 50 +- tests/deal.II/constraints_merge_04.cc | 50 +- tests/deal.II/constraints_merge_05.cc | 50 +- tests/deal.II/constraints_merge_06.cc | 50 +- tests/deal.II/constraints_merge_07.cc | 50 +- tests/deal.II/constraints_merge_08.cc | 54 +- tests/deal.II/constraints_merge_09.cc | 58 +- tests/deal.II/create_laplace_matrix_01.cc | 52 +- tests/deal.II/create_laplace_matrix_01b.cc | 48 +- tests/deal.II/create_laplace_matrix_02.cc | 54 +- tests/deal.II/create_laplace_matrix_02b.cc | 48 +- tests/deal.II/create_laplace_matrix_03.cc | 54 +- tests/deal.II/create_laplace_matrix_03b.cc | 50 +- tests/deal.II/create_laplace_matrix_04.cc | 56 +- tests/deal.II/create_laplace_matrix_04b.cc | 52 +- .../create_laplace_matrix_constraints_01.cc | 24 +- .../create_laplace_matrix_constraints_02.cc | 26 +- .../create_laplace_matrix_constraints_02b.cc | 24 +- .../create_laplace_matrix_constraints_03.cc | 26 +- .../create_laplace_matrix_constraints_04.cc | 28 +- tests/deal.II/create_mass_matrix_01.cc | 42 +- tests/deal.II/create_mass_matrix_01b.cc | 48 +- tests/deal.II/create_mass_matrix_02.cc | 54 +- tests/deal.II/create_mass_matrix_02b.cc | 48 +- tests/deal.II/create_mass_matrix_03.cc | 54 +- tests/deal.II/create_mass_matrix_03b.cc | 50 +- tests/deal.II/create_mass_matrix_04.cc | 56 +- tests/deal.II/create_mass_matrix_04b.cc | 52 +- tests/deal.II/create_mass_matrix_05.cc | 48 +- .../create_mass_matrix_constraints_01.cc | 24 +- .../create_mass_matrix_constraints_02.cc | 26 +- .../create_mass_matrix_constraints_02b.cc | 24 +- .../create_mass_matrix_constraints_03.cc | 26 +- .../create_mass_matrix_constraints_04.cc | 28 +- tests/deal.II/create_point_source.cc | 8 +- tests/deal.II/create_point_source_hp.cc | 10 +- tests/deal.II/data_out.cc | 52 +- tests/deal.II/data_out_postprocessor_01.cc | 146 +- .../data_out_postprocessor_scalar_01.cc | 120 +- .../data_out_postprocessor_vector_01.cc | 122 +- tests/deal.II/derivative_approximation.cc | 16 +- tests/deal.II/derivative_approximation_2.cc | 196 +- tests/deal.II/derivatives.cc | 136 +- tests/deal.II/dof_accessor_01.cc | 4 +- tests/deal.II/dof_handler_number_cache.cc | 48 +- tests/deal.II/dof_handler_number_cache_02.cc | 56 +- tests/deal.II/dof_renumbering.cc | 44 +- tests/deal.II/dof_renumbering_02.cc | 44 +- tests/deal.II/dof_renumbering_03.cc | 18 +- tests/deal.II/dof_renumbering_04.cc | 18 +- tests/deal.II/dof_renumbering_04a.cc | 4 +- tests/deal.II/dof_renumbering_05.cc | 18 +- tests/deal.II/dof_renumbering_06.cc | 18 +- tests/deal.II/dof_renumbering_07.cc | 20 +- tests/deal.II/dof_renumbering_zorder_01.cc | 16 +- tests/deal.II/dof_renumbering_zorder_02.cc | 22 +- tests/deal.II/dof_test.cc | 338 +- tests/deal.II/error_estimator.cc | 42 +- tests/deal.II/error_estimator_01.cc | 14 +- tests/deal.II/extent_in_direction.cc | 78 +- tests/deal.II/extract_dofs_by_component_01.cc | 36 +- .../extract_dofs_by_component_01_hp.cc | 38 +- .../extract_dofs_by_component_01_mg.cc | 42 +- .../deal.II/extract_dofs_by_component_01x.cc | 10 +- .../deal.II/extract_dofs_by_component_01y.cc | 8 +- tests/deal.II/extract_dofs_by_component_02.cc | 36 +- .../extract_dofs_by_component_02_hp.cc | 38 +- .../extract_dofs_by_component_02_mg.cc | 42 +- tests/deal.II/extract_dofs_by_component_03.cc | 26 +- tests/deal.II/extract_dofs_by_component_04.cc | 44 +- tests/deal.II/extract_dofs_by_component_05.cc | 6 +- .../extract_dofs_by_component_05_hp.cc | 8 +- tests/deal.II/extract_dofs_by_component_06.cc | 6 +- .../extract_dofs_by_component_06_hp.cc | 8 +- tests/deal.II/face_orientations_3d.cc | 16 +- tests/deal.II/fe_field.cc | 36 +- tests/deal.II/fe_values_view_01.cc | 68 +- tests/deal.II/fe_values_view_02.cc | 122 +- tests/deal.II/fe_values_view_03.cc | 80 +- tests/deal.II/fe_values_view_04.cc | 118 +- tests/deal.II/fe_values_view_05.cc | 34 +- tests/deal.II/fe_values_view_06.cc | 36 +- tests/deal.II/fe_values_view_07.cc | 36 +- tests/deal.II/fe_values_view_08.cc | 34 +- tests/deal.II/fe_values_view_09.cc | 34 +- tests/deal.II/fe_values_view_10.cc | 36 +- tests/deal.II/fe_values_view_10_single_01.cc | 34 +- tests/deal.II/fe_values_view_10_single_02.cc | 34 +- tests/deal.II/fe_values_view_10_single_03.cc | 34 +- tests/deal.II/fe_values_view_10_single_04.cc | 36 +- tests/deal.II/fe_values_view_11.cc | 52 +- tests/deal.II/fe_values_view_12.cc | 54 +- tests/deal.II/fe_values_view_13.cc | 54 +- tests/deal.II/fe_values_view_14.cc | 56 +- tests/deal.II/fe_values_view_15.cc | 54 +- tests/deal.II/fe_values_view_16.cc | 56 +- tests/deal.II/fe_values_view_17.cc | 62 +- tests/deal.II/fe_values_view_18.cc | 64 +- tests/deal.II/fe_values_view_19.cc | 62 +- tests/deal.II/fe_values_view_20.cc | 66 +- tests/deal.II/fe_values_view_21.cc | 98 +- .../deal.II/fe_values_view_21_nonsymmetric.cc | 98 +- tests/deal.II/fe_values_view_22.cc | 331 +- tests/deal.II/fe_values_view_23.cc | 36 +- .../deal.II/fe_values_view_23_nonsymmetric.cc | 36 +- tests/deal.II/fe_values_view_24.cc | 28 +- .../deal.II/fe_values_view_24_nonsymmetric.cc | 28 +- tests/deal.II/fe_values_view_25.cc | 24 +- .../deal.II/fe_values_view_25_nonsymmetric.cc | 24 +- tests/deal.II/fe_values_view_invalid_01.cc | 8 +- tests/deal.II/fe_values_view_invalid_02.cc | 8 +- tests/deal.II/fe_values_view_invalid_03.cc | 8 +- .../fe_values_view_invalid_03_nonsymmetric.cc | 8 +- tests/deal.II/fe_values_view_tensor_01.cc | 80 +- tests/deal.II/filtered_iterator.cc | 180 +- tests/deal.II/filtered_iterator_02.cc | 180 +- tests/deal.II/filtered_iterator_03.cc | 50 +- tests/deal.II/filtered_matrix.cc | 120 +- tests/deal.II/get_finest_common_cells_01.cc | 16 +- tests/deal.II/get_finest_common_cells_02.cc | 18 +- tests/deal.II/get_finest_common_cells_03.cc | 18 +- tests/deal.II/get_finest_common_cells_04.cc | 18 +- tests/deal.II/grid_generator_01.cc | 14 +- tests/deal.II/grid_hyper_shell.cc | 28 +- tests/deal.II/grid_hyper_shell_02.cc | 2 +- tests/deal.II/grid_hyper_shell_03.cc | 2 +- tests/deal.II/grid_hyper_shell_04.cc | 2 +- tests/deal.II/grid_hyper_shell_05.cc | 18 +- tests/deal.II/grid_in.cc | 54 +- tests/deal.II/grid_in_02.cc | 36 +- tests/deal.II/grid_in_3d.cc | 12 +- tests/deal.II/grid_in_3d_02.cc | 4 +- tests/deal.II/grid_in_msh.cc | 8 +- tests/deal.II/grid_in_msh_02.cc | 8 +- tests/deal.II/grid_in_msh_03.cc | 8 +- tests/deal.II/grid_in_msh_version_1.cc | 8 +- tests/deal.II/grid_in_msh_version_2.cc | 8 +- tests/deal.II/grid_in_tecplot.cc | 6 +- tests/deal.II/grid_in_unv_2d.cc | 8 +- tests/deal.II/grid_in_unv_3d.cc | 8 +- tests/deal.II/grid_invert.cc | 12 +- tests/deal.II/grid_out.cc | 6 +- tests/deal.II/grid_out_02.cc | 4 +- tests/deal.II/grid_output_input.cc | 14 +- tests/deal.II/grid_parallelepiped.cc | 8 +- tests/deal.II/grid_parallelepiped_01.cc | 20 +- tests/deal.II/grid_parallelepiped_02.cc | 54 +- tests/deal.II/grid_parallelepiped_03.cc | 8 +- tests/deal.II/grid_test.cc | 288 +- tests/deal.II/grid_tools.cc | 44 +- tests/deal.II/grid_tools_02.cc | 20 +- tests/deal.II/grid_tools_03.cc | 46 +- tests/deal.II/grid_tools_04.cc | 20 +- tests/deal.II/grid_tools_05.cc | 294 +- tests/deal.II/grid_transform.cc | 88 +- tests/deal.II/grid_transform_3d.cc | 56 +- tests/deal.II/have_same_coarse_mesh_01.cc | 8 +- tests/deal.II/have_same_coarse_mesh_02.cc | 12 +- tests/deal.II/have_same_coarse_mesh_03.cc | 12 +- tests/deal.II/have_same_coarse_mesh_04.cc | 12 +- tests/deal.II/helmholtz.h | 22 +- tests/deal.II/inhomogeneous_constraints.cc | 654 +- tests/deal.II/inhomogeneous_constraints_02.cc | 18 +- tests/deal.II/inhomogeneous_constraints_03.cc | 22 +- tests/deal.II/inhomogeneous_constraints_04.cc | 44 +- .../inhomogeneous_constraints_block.cc | 346 +- .../inhomogeneous_constraints_nonsymmetric.cc | 294 +- .../inhomogeneous_constraints_vector.cc | 194 +- tests/deal.II/intergrid_constraints.cc | 262 +- tests/deal.II/intergrid_map.cc | 74 +- .../deal.II/interpolate_boundary_values_01.cc | 84 +- .../deal.II/interpolate_boundary_values_02.cc | 2 +- tests/deal.II/interpolate_dgq_01.cc | 74 +- tests/deal.II/interpolate_dgq_02.cc | 80 +- tests/deal.II/interpolate_q_01.cc | 74 +- tests/deal.II/interpolate_q_02.cc | 80 +- tests/deal.II/interpolate_q_system_01.cc | 74 +- tests/deal.II/interpolate_q_system_02.cc | 76 +- tests/deal.II/kelly_crash_02.cc | 303 +- tests/deal.II/line_coarsening_3d.cc | 36 +- tests/deal.II/matrices.cc | 152 +- tests/deal.II/maximal_cell_diameter.cc | 48 +- tests/deal.II/measure_et_al.cc | 68 +- tests/deal.II/measure_et_al_02.cc | 80 +- tests/deal.II/memory_consumption_01.cc | 112 +- tests/deal.II/merge_triangulations_01.cc | 36 +- tests/deal.II/mesh_smoothing_02.cc | 72 +- tests/deal.II/mesh_smoothing_03.cc | 98 +- tests/deal.II/mg_dof_handler.cc | 8 +- tests/deal.II/minimal_cell_diameter.cc | 32 +- tests/deal.II/newton_01.cc | 102 +- tests/deal.II/no_flux_01.cc | 16 +- tests/deal.II/no_flux_02.cc | 20 +- tests/deal.II/no_flux_03.cc | 10 +- tests/deal.II/no_flux_04.cc | 56 +- tests/deal.II/no_flux_05.cc | 12 +- tests/deal.II/no_flux_06.cc | 14 +- tests/deal.II/no_flux_07.cc | 10 +- tests/deal.II/no_flux_08.cc | 8 +- tests/deal.II/no_flux_10.cc | 83 +- tests/deal.II/no_flux_hp_01.cc | 16 +- tests/deal.II/no_flux_hp_02.cc | 20 +- tests/deal.II/no_flux_hp_03.cc | 10 +- tests/deal.II/no_flux_hp_04.cc | 56 +- tests/deal.II/no_flux_hp_05.cc | 12 +- tests/deal.II/normal_vector_01.cc | 54 +- tests/deal.II/normal_vector_01_2d.cc | 54 +- tests/deal.II/normal_vector_02.cc | 26 +- tests/deal.II/normal_vector_02_2d.cc | 26 +- tests/deal.II/normal_vector_03.cc | 90 +- tests/deal.II/normal_vector_03_2d.cc | 90 +- tests/deal.II/normals_at_vertices_01.cc | 60 +- tests/deal.II/normals_at_vertices_02.cc | 32 +- tests/deal.II/number_cache_01.cc | 34 +- tests/deal.II/number_cache_02.cc | 42 +- tests/deal.II/number_cache_03.cc | 24 +- tests/deal.II/point_value_history_01.cc | 355 +- tests/deal.II/point_value_history_02.cc | 561 +- tests/deal.II/point_value_history_03.cc | 513 +- tests/deal.II/project_01.cc | 32 +- tests/deal.II/project_01_curved_boundary.cc | 66 +- tests/deal.II/project_02.cc | 32 +- tests/deal.II/project_boundary_rt_01.cc | 138 +- tests/deal.II/project_bv_curl_conf.cc | 41 +- tests/deal.II/project_bv_div_conf.cc | 39 +- tests/deal.II/project_common.h | 186 +- tests/deal.II/project_nedelec_01.cc | 2 +- tests/deal.II/project_nedelec_02.cc | 2 +- tests/deal.II/project_nedelec_03.cc | 2 +- tests/deal.II/project_nedelec_04.cc | 2 +- tests/deal.II/project_nedelec_05.cc | 2 +- tests/deal.II/project_q_system_01.cc | 4 +- tests/deal.II/project_q_system_02.cc | 4 +- tests/deal.II/project_q_system_03.cc | 4 +- tests/deal.II/project_q_system_04.cc | 4 +- tests/deal.II/project_q_system_05.cc | 4 +- tests/deal.II/project_rt_01.cc | 6 +- tests/deal.II/project_rt_02.cc | 6 +- tests/deal.II/project_rt_04.cc | 6 +- tests/deal.II/project_rt_05.cc | 6 +- tests/deal.II/project_to_surface_01.cc | 86 +- tests/deal.II/project_to_surface_02.cc | 102 +- tests/deal.II/project_to_surface_03.cc | 86 +- tests/deal.II/recursively_set_material_id.cc | 56 +- tests/deal.II/refinement_listener_01.cc | 88 +- tests/deal.II/refinement_listener_02.cc | 64 +- tests/deal.II/refinement_listener_03.cc | 84 +- tests/deal.II/rt_covariant.cc | 8 +- tests/deal.II/rt_hessian.cc | 22 +- tests/deal.II/sparsity_pattern.cc | 92 +- tests/deal.II/sparsity_pattern_01.cc | 92 +- tests/deal.II/sparsity_pattern_01_x.cc | 92 +- tests/deal.II/sparsity_pattern_02.cc | 18 +- tests/deal.II/sparsity_pattern_03.cc | 16 +- tests/deal.II/sparsity_pattern_04.cc | 16 +- tests/deal.II/sparsity_pattern_05.cc | 56 +- tests/deal.II/sparsity_pattern_05_x.cc | 56 +- tests/deal.II/sparsity_pattern_x.cc | 92 +- tests/deal.II/subcelldata.cc | 67 +- tests/deal.II/subdomain_ids.cc | 148 +- tests/deal.II/subdomain_on_refinement.cc | 14 +- tests/deal.II/time_dependent_01.cc | 24 +- tests/deal.II/union_triangulation.cc | 22 +- tests/deal.II/user_data_01.cc | 198 +- tests/deal.II/vectors_boundary_rhs_01.cc | 50 +- tests/deal.II/vectors_boundary_rhs_02.cc | 48 +- tests/deal.II/vectors_boundary_rhs_03.cc | 46 +- tests/deal.II/vectors_point_source_01.cc | 44 +- tests/deal.II/vectors_rhs_01.cc | 48 +- tests/deal.II/vectors_rhs_03.cc | 44 +- tests/deal.II/vertex_as_face_01.cc | 2 +- tests/deal.II/vertex_as_face_02.cc | 2 +- tests/deal.II/vertex_as_face_03.cc | 2 +- tests/deal.II/vertex_as_face_04.cc | 2 +- tests/deal.II/vertex_as_face_05.cc | 4 +- tests/deal.II/vertex_as_face_06.cc | 8 +- tests/deal.II/vertex_as_face_07.cc | 30 +- tests/deal.II/vertex_as_face_08.cc | 2 +- tests/deal.II/vertex_as_face_09.cc | 2 +- tests/deal.II/vertex_as_face_10.cc | 2 +- tests/deal.II/vertex_as_face_12.cc | 2 +- tests/distributed_grids/2d_coarse_grid_01.cc | 2 +- tests/distributed_grids/2d_coarse_grid_02.cc | 8 +- tests/distributed_grids/2d_coarse_grid_03.cc | 2 +- tests/distributed_grids/2d_coarse_grid_04.cc | 2 +- .../distributed_grids/2d_coarse_grid_x_01.cc | 14 +- tests/distributed_grids/2d_coarsening_01.cc | 2 +- tests/distributed_grids/2d_coarsening_02.cc | 56 +- tests/distributed_grids/2d_coarsening_03.cc | 124 +- tests/distributed_grids/2d_coarsening_05.cc | 54 +- tests/distributed_grids/2d_dofhandler_01.cc | 36 +- tests/distributed_grids/2d_refinement_01.cc | 2 +- tests/distributed_grids/2d_refinement_02.cc | 32 +- tests/distributed_grids/2d_refinement_03.cc | 84 +- tests/distributed_grids/2d_refinement_04.cc | 14 +- tests/distributed_grids/2d_refinement_05.cc | 38 +- tests/distributed_grids/2d_refinement_06.cc | 2 +- tests/distributed_grids/2d_refinement_07.cc | 22 +- tests/distributed_grids/3d_coarse_grid_01.cc | 2 +- tests/distributed_grids/3d_coarse_grid_03.cc | 2 +- tests/distributed_grids/3d_coarse_grid_04.cc | 2 +- tests/distributed_grids/3d_coarse_grid_05.cc | 110 +- tests/distributed_grids/3d_coarse_grid_06.cc | 6 +- .../distributed_grids/3d_coarse_grid_x_01.cc | 14 +- tests/distributed_grids/3d_coarsening_01.cc | 2 +- tests/distributed_grids/3d_coarsening_02.cc | 56 +- tests/distributed_grids/3d_coarsening_03.cc | 56 +- tests/distributed_grids/3d_coarsening_04.cc | 68 +- tests/distributed_grids/3d_coarsening_05.cc | 54 +- tests/distributed_grids/3d_refinement_01.cc | 2 +- tests/distributed_grids/3d_refinement_02.cc | 32 +- tests/distributed_grids/3d_refinement_03.cc | 28 +- tests/distributed_grids/3d_refinement_04.cc | 14 +- tests/distributed_grids/3d_refinement_05.cc | 40 +- tests/distributed_grids/3d_refinement_06.cc | 12 +- tests/distributed_grids/3d_refinement_07.cc | 2 +- tests/distributed_grids/3d_refinement_08.cc | 38 +- tests/distributed_grids/3d_refinement_09.cc | 22 +- tests/distributed_grids/anisotropic.cc | 4 +- tests/distributed_grids/coarse_grid_common.h | 32 +- .../count_dofs_per_block_01.cc | 58 +- .../count_dofs_per_component_01.cc | 16 +- .../dof_handler_number_cache.cc | 52 +- .../distributed_grids/solution_transfer_01.cc | 6 +- .../distributed_grids/solution_transfer_02.cc | 51 +- .../distributed_grids/solution_transfer_03.cc | 93 +- .../distributed_grids/solution_transfer_04.cc | 6 +- tests/distributed_grids/subdomain_id_01.cc | 28 +- tests/distributed_grids/tria_settings_01.cc | 38 +- tests/fail/abf_approximation_01.cc | 382 +- tests/fail/circular_01.cc | 889 +- tests/fail/fe_nothing_04.cc | 46 +- tests/fail/hp-step-14.cc | 2133 +- tests/fail/hp-step-15.cc | 254 +- tests/fail/hp_constraints_q_system_08.cc | 4 +- tests/fail/hp_constraints_q_system_x_08.cc | 4 +- tests/fail/hp_constraints_rt_01.cc | 2 +- tests/fail/hp_constraints_rt_02.cc | 2 +- tests/fail/hp_constraints_rt_03.cc | 2 +- tests/fail/hp_constraints_rt_04.cc | 2 +- tests/fail/hp_constraints_rt_05.cc | 2 +- tests/fail/hp_constraints_rt_06.cc | 4 +- tests/fail/injection_nedelec.cc | 2 +- tests/fail/injection_rt.cc | 2 +- tests/fail/project_rt_03.cc | 6 +- tests/fail/rt_4.cc | 22 +- tests/fail/rt_6.cc | 102 +- tests/fail/rt_crash_01.cc | 26 +- tests/fail/rt_distorted_01.cc | 248 +- tests/fail/rt_distorted_02.cc | 278 +- tests/fail/vectors_boundary_rhs_hp_02.cc | 52 +- tests/fail/vectors_rhs_hp_02.cc | 52 +- tests/fe/abf_01.cc | 660 +- tests/fe/block_mask_02.cc | 4 +- tests/fe/block_mask_03.cc | 2 +- tests/fe/block_mask_05.cc | 12 +- tests/fe/block_mask_06.cc | 22 +- tests/fe/block_mask_07.cc | 24 +- tests/fe/block_mask_08.cc | 14 +- tests/fe/block_mask_09.cc | 2 +- tests/fe/block_mask_10.cc | 2 +- tests/fe/block_mask_11.cc | 10 +- tests/fe/cell_similarity_01.cc | 86 +- tests/fe/cell_similarity_02.cc | 86 +- tests/fe/cell_similarity_03.cc | 86 +- tests/fe/cell_similarity_04.cc | 86 +- tests/fe/cell_similarity_05.cc | 86 +- tests/fe/cell_similarity_06.cc | 86 +- tests/fe/cell_similarity_07.cc | 86 +- tests/fe/cell_similarity_08.cc | 86 +- tests/fe/cell_similarity_09.cc | 86 +- tests/fe/cell_similarity_10.cc | 86 +- tests/fe/cell_similarity_dgp_monomial_01.cc | 86 +- tests/fe/cell_similarity_dgp_monomial_02.cc | 86 +- tests/fe/cell_similarity_dgp_monomial_03.cc | 86 +- tests/fe/cell_similarity_dgp_monomial_04.cc | 86 +- tests/fe/cell_similarity_dgp_monomial_05.cc | 86 +- tests/fe/cell_similarity_dgp_monomial_06.cc | 86 +- tests/fe/cell_similarity_dgp_monomial_07.cc | 86 +- tests/fe/cell_similarity_dgp_monomial_08.cc | 86 +- tests/fe/cell_similarity_dgp_monomial_09.cc | 86 +- tests/fe/cell_similarity_dgp_monomial_10.cc | 86 +- .../cell_similarity_dgp_nonparametric_01.cc | 86 +- .../cell_similarity_dgp_nonparametric_02.cc | 86 +- .../cell_similarity_dgp_nonparametric_03.cc | 86 +- .../cell_similarity_dgp_nonparametric_04.cc | 86 +- .../cell_similarity_dgp_nonparametric_05.cc | 86 +- .../cell_similarity_dgp_nonparametric_06.cc | 86 +- .../cell_similarity_dgp_nonparametric_07.cc | 86 +- .../cell_similarity_dgp_nonparametric_08.cc | 86 +- .../cell_similarity_dgp_nonparametric_09.cc | 86 +- .../cell_similarity_dgp_nonparametric_10.cc | 86 +- tests/fe/check_derivatives.cc | 18 +- tests/fe/component_mask_02.cc | 4 +- tests/fe/component_mask_03.cc | 2 +- tests/fe/component_mask_05.cc | 12 +- tests/fe/component_mask_06.cc | 22 +- tests/fe/component_mask_07.cc | 22 +- tests/fe/component_mask_08.cc | 14 +- tests/fe/component_mask_09.cc | 2 +- tests/fe/component_mask_10.cc | 2 +- tests/fe/component_mask_11.cc | 10 +- tests/fe/component_mask_12.cc | 58 +- tests/fe/component_mask_13.cc | 28 +- tests/fe/component_mask_14.cc | 44 +- tests/fe/copy_01.cc | 12 +- tests/fe/deformed_projection.h | 728 +- tests/fe/derivatives.cc | 58 +- tests/fe/derivatives_face.cc | 42 +- tests/fe/dgp_01.cc | 12 +- tests/fe/dgp_monomial_1.cc | 30 +- tests/fe/dgp_monomial_2.cc | 12 +- tests/fe/dgq_1.cc | 12 +- tests/fe/fe_data_test.cc | 136 +- tests/fe/fe_face_orientation_nedelec.h | 267 +- tests/fe/fe_face_orientation_nedelec_0.cc | 81 +- tests/fe/fe_face_values_1d.cc | 120 +- .../fe/fe_face_values_1d_mapping_cartesian.cc | 120 +- tests/fe/fe_face_values_1d_mapping_q2.cc | 120 +- tests/fe/fe_prolongation_common.h | 32 +- tests/fe/fe_prolongation_sys_05.cc | 6 +- tests/fe/fe_prolongation_sys_06.cc | 8 +- tests/fe/fe_prolongation_sys_08.cc | 8 +- tests/fe/fe_prolongation_sys_10.cc | 8 +- tests/fe/fe_q_dg0.cc | 24 +- tests/fe/fe_restriction_common.h | 24 +- tests/fe/fe_restriction_sys_05.cc | 6 +- tests/fe/fe_restriction_sys_06.cc | 8 +- tests/fe/fe_restriction_sys_08.cc | 8 +- tests/fe/fe_restriction_sys_10.cc | 8 +- tests/fe/fe_support_points_common.h | 16 +- tests/fe/fe_support_points_sys_05.cc | 6 +- tests/fe/fe_support_points_sys_06.cc | 8 +- tests/fe/fe_support_points_sys_08.cc | 8 +- tests/fe/fe_support_points_sys_10.cc | 8 +- tests/fe/fe_tools.cc | 54 +- tests/fe/fe_tools_01.cc | 40 +- tests/fe/fe_tools_test.cc | 124 +- tests/fe/function.cc | 30 +- tests/fe/injection_common.h | 114 +- tests/fe/injection_q_dg0.cc | 10 +- tests/fe/injection_q_system.cc | 6 +- tests/fe/interpolate_common.h | 140 +- tests/fe/interpolate_q1.cc | 36 +- tests/fe/interpolate_q_dg0.cc | 12 +- tests/fe/interpolate_q_iso_q1.cc | 12 +- tests/fe/interpolate_rt.cc | 22 +- tests/fe/interpolate_rtn.cc | 22 +- tests/fe/interpolate_system.cc | 54 +- tests/fe/jacobians.cc | 22 +- tests/fe/mapping.cc | 323 +- tests/fe/mapping_c1.cc | 122 +- tests/fe/mapping_q1_eulerian.cc | 48 +- tests/fe/mapping_q_eulerian.cc | 172 +- tests/fe/mapping_real_to_unit_02.cc | 17 +- tests/fe/mapping_real_to_unit_q1.cc | 84 +- tests/fe/mapping_real_to_unit_q4_curved.cc | 80 +- .../mapping_real_to_unit_q4_curved_codim.cc | 80 +- tests/fe/mapping_real_to_unit_q4_sphere.cc | 34 +- tests/fe/mapping_real_to_unit_q4_sphere_x.cc | 34 +- tests/fe/mapping_real_to_unit_q4_sphere_y.cc | 52 +- tests/fe/mapping_real_to_unit_q4_sphere_z.cc | 32 +- tests/fe/mapping_real_to_unit_q4_straight.cc | 84 +- tests/fe/mass_matrix_arbitrary_nodes.cc | 28 +- tests/fe/nedelec.cc | 146 +- tests/fe/nedelec_2.cc | 152 +- tests/fe/nedelec_3.cc | 36 +- tests/fe/nedelec_crash_01.cc | 19 +- tests/fe/non_primitive_1.cc | 332 +- tests/fe/non_primitive_2.cc | 242 +- tests/fe/numbering.cc | 356 +- tests/fe/q_1.cc | 16 +- tests/fe/q_2.cc | 24 +- tests/fe/q_3.cc | 12 +- tests/fe/q_4.cc | 8 +- tests/fe/rt_1.cc | 80 +- tests/fe/rt_10.cc | 34 +- tests/fe/rt_11.cc | 34 +- tests/fe/rt_12.cc | 34 +- tests/fe/rt_13.cc | 34 +- tests/fe/rt_14.cc | 34 +- tests/fe/rt_15.cc | 34 +- tests/fe/rt_2.cc | 146 +- tests/fe/rt_3.cc | 14 +- tests/fe/rt_5.cc | 22 +- tests/fe/rt_7.cc | 14 +- tests/fe/rt_8.cc | 14 +- tests/fe/rt_9.cc | 6 +- tests/fe/rt_approximation_01.cc | 392 +- tests/fe/rt_normal_02.cc | 372 +- tests/fe/rtdiff.cc | 120 +- tests/fe/rtn_1.cc | 110 +- tests/fe/rtn_2.cc | 10 +- tests/fe/rtn_3.cc | 4 +- tests/fe/shapes.h | 384 +- tests/fe/shapes_dgp.cc | 8 +- tests/fe/shapes_dgp_monomial.cc | 4 +- tests/fe/shapes_dgp_nonparametric.cc | 6 +- tests/fe/shapes_dgq.cc | 10 +- tests/fe/shapes_faceq.cc | 8 +- tests/fe/shapes_nedelec.cc | 2 +- tests/fe/shapes_q.cc | 10 +- tests/fe/shapes_q_dg0.cc | 10 +- tests/fe/shapes_q_hierarchical.cc | 6 +- tests/fe/shapes_q_iso_q1.cc | 4 +- tests/fe/shapes_system.cc | 26 +- tests/fe/system_01.cc | 30 +- tests/fe/system_02.cc | 4 +- tests/fe/system_index.cc | 76 +- tests/fe/traits.cc | 54 +- tests/fe/transfer.cc | 20 +- tests/fe/up_and_down.cc | 250 +- tests/gla/block_mat_01.cc | 30 +- tests/gla/block_mat_02.cc | 134 +- tests/gla/block_vec_01.cc | 8 +- tests/gla/block_vec_02.cc | 10 +- tests/gla/gla.h | 193 +- tests/gla/mat_01.cc | 38 +- tests/gla/mat_02.cc | 38 +- tests/gla/mat_03.cc | 46 +- tests/gla/mat_04.cc | 79 +- tests/gla/vec_00.cc | 52 +- tests/gla/vec_01.cc | 58 +- tests/gla/vec_02.cc | 60 +- tests/gla/vec_03.cc | 30 +- tests/grid/cell_id_01.cc | 16 +- tests/grid/cell_id_02.cc | 18 +- tests/grid/grid_out_svg_01.cc | 66 +- tests/grid/grid_out_svg_02.cc | 80 +- tests/grid/ordering_01.cc | 48 +- tests/grid/refine_and_coarsen_01.cc | 18 +- tests/hp/compare_hp_vs_nonhp_01.cc | 281 +- tests/hp/continuous_1d_01.cc | 10 +- tests/hp/continuous_2d_01.cc | 10 +- tests/hp/continuous_3d_01.cc | 10 +- tests/hp/count_dofs_per_block_01.cc | 24 +- tests/hp/count_dofs_per_block_02.cc | 24 +- tests/hp/crash_01.cc | 8 +- tests/hp/crash_02.cc | 8 +- tests/hp/crash_03.cc | 10 +- tests/hp/crash_04.cc | 6 +- tests/hp/crash_05.cc | 18 +- tests/hp/crash_06.cc | 14 +- tests/hp/crash_07.cc | 26 +- tests/hp/crash_08.cc | 49 +- tests/hp/crash_09.cc | 110 +- tests/hp/crash_10.cc | 64 +- tests/hp/crash_11.cc | 82 +- tests/hp/crash_12.cc | 64 +- tests/hp/crash_13.cc | 6 +- tests/hp/crash_14.cc | 98 +- tests/hp/crash_15.cc | 92 +- tests/hp/crash_16.cc | 100 +- tests/hp/crash_17.cc | 600 +- tests/hp/crash_17_compressed_set_sparsity.cc | 600 +- tests/hp/crash_18.cc | 604 +- tests/hp/crash_18_compressed_set_sparsity.cc | 604 +- tests/hp/crash_19.cc | 57 +- tests/hp/crash_20.cc | 8 +- tests/hp/crash_21.cc | 56 +- tests/hp/create_laplace_matrix_01.cc | 54 +- tests/hp/create_laplace_matrix_01b.cc | 50 +- tests/hp/create_laplace_matrix_02.cc | 58 +- tests/hp/create_laplace_matrix_02b.cc | 52 +- tests/hp/create_laplace_matrix_03.cc | 56 +- tests/hp/create_laplace_matrix_03b.cc | 52 +- tests/hp/create_laplace_matrix_04.cc | 60 +- tests/hp/create_laplace_matrix_04b.cc | 58 +- .../create_laplace_matrix_constraints_02.cc | 44 +- .../create_laplace_matrix_constraints_02b.cc | 42 +- tests/hp/create_mass_matrix_01.cc | 54 +- tests/hp/create_mass_matrix_01b.cc | 50 +- tests/hp/create_mass_matrix_02.cc | 58 +- tests/hp/create_mass_matrix_02b.cc | 52 +- tests/hp/create_mass_matrix_03.cc | 56 +- tests/hp/create_mass_matrix_03b.cc | 56 +- tests/hp/create_mass_matrix_04.cc | 62 +- tests/hp/create_mass_matrix_04b.cc | 56 +- tests/hp/create_mass_matrix_05.cc | 56 +- tests/hp/create_mass_matrix_constraints_02.cc | 44 +- .../hp/create_mass_matrix_constraints_02b.cc | 42 +- tests/hp/create_rhs_01.cc | 68 +- tests/hp/dof_handler_number_cache.cc | 56 +- tests/hp/dof_renumbering_04.cc | 12 +- tests/hp/dof_renumbering_05.cc | 12 +- tests/hp/dof_renumbering_06.cc | 12 +- tests/hp/fe_collection_01.cc | 6 +- tests/hp/fe_collection_02.cc | 12 +- tests/hp/fe_collection_03.cc | 18 +- tests/hp/fe_collection_04.cc | 18 +- tests/hp/fe_nothing_01.cc | 40 +- tests/hp/fe_nothing_02.cc | 60 +- tests/hp/fe_nothing_03.cc | 46 +- tests/hp/fe_nothing_05.cc | 100 +- tests/hp/fe_nothing_06.cc | 100 +- tests/hp/fe_nothing_07.cc | 90 +- tests/hp/fe_nothing_08.cc | 14 +- tests/hp/fe_nothing_09.cc | 14 +- tests/hp/fe_nothing_11.cc | 18 +- tests/hp/fe_nothing_12.cc | 36 +- tests/hp/fe_nothing_13.cc | 32 +- tests/hp/fe_nothing_14.cc | 34 +- tests/hp/fe_nothing_15.cc | 10 +- tests/hp/fe_nothing_16.cc | 14 +- tests/hp/fe_nothing_17.cc | 8 +- tests/hp/get_active_fe_indices.cc | 14 +- tests/hp/hp_constraints_common.h | 316 +- tests/hp/hp_constraints_q_system.cc | 2 +- tests/hp/hp_constraints_q_system_x.cc | 2 +- tests/hp/hp_constraints_rt_nodal.cc | 2 +- tests/hp/hp_dof_handler.cc | 8 +- tests/hp/hp_hanging_nodes_01.cc | 64 +- tests/hp/hp_hanging_nodes_02.cc | 60 +- tests/hp/hp_line_dof_identities_dgp.cc | 46 +- .../hp/hp_line_dof_identities_dgp_monomial.cc | 46 +- ...e_dof_identities_dgp_monomial_system_01.cc | 46 +- ...e_dof_identities_dgp_monomial_system_02.cc | 78 +- ...p_line_dof_identities_dgp_nonparametric.cc | 46 +- ..._identities_dgp_nonparametric_system_01.cc | 46 +- ..._identities_dgp_nonparametric_system_02.cc | 78 +- .../hp_line_dof_identities_dgp_system_01.cc | 46 +- .../hp_line_dof_identities_dgp_system_02.cc | 78 +- tests/hp/hp_line_dof_identities_dgq.cc | 46 +- .../hp_line_dof_identities_dgq_system_01.cc | 46 +- .../hp_line_dof_identities_dgq_system_02.cc | 78 +- tests/hp/hp_line_dof_identities_q.cc | 46 +- tests/hp/hp_line_dof_identities_q_gl.cc | 40 +- .../hp/hp_line_dof_identities_q_system_01.cc | 46 +- .../hp/hp_line_dof_identities_q_system_02.cc | 78 +- .../hp/hp_line_dof_identities_q_system_03.cc | 56 +- tests/hp/hp_line_dof_identities_rt_nodal.cc | 46 +- tests/hp/hp_quad_dof_identities_dgp.cc | 46 +- .../hp/hp_quad_dof_identities_dgp_monomial.cc | 46 +- ...d_dof_identities_dgp_monomial_system_01.cc | 46 +- ...d_dof_identities_dgp_monomial_system_02.cc | 56 +- ...p_quad_dof_identities_dgp_nonparametric.cc | 46 +- ..._identities_dgp_nonparametric_system_01.cc | 46 +- ..._identities_dgp_nonparametric_system_02.cc | 56 +- .../hp_quad_dof_identities_dgp_system_01.cc | 46 +- .../hp_quad_dof_identities_dgp_system_02.cc | 56 +- tests/hp/hp_quad_dof_identities_dgq.cc | 46 +- .../hp_quad_dof_identities_dgq_system_01.cc | 46 +- .../hp_quad_dof_identities_dgq_system_02.cc | 56 +- tests/hp/hp_quad_dof_identities_q.cc | 46 +- tests/hp/hp_quad_dof_identities_q_gl.cc | 40 +- .../hp/hp_quad_dof_identities_q_system_01.cc | 46 +- .../hp/hp_quad_dof_identities_q_system_02.cc | 56 +- tests/hp/hp_quad_dof_identities_rt_nodal.cc | 46 +- tests/hp/hp_vertex_dof_identities_dgp.cc | 46 +- .../hp_vertex_dof_identities_dgp_monomial.cc | 46 +- ...x_dof_identities_dgp_monomial_system_01.cc | 46 +- ...x_dof_identities_dgp_monomial_system_02.cc | 58 +- ...vertex_dof_identities_dgp_nonparametric.cc | 46 +- ..._identities_dgp_nonparametric_system_01.cc | 46 +- ..._identities_dgp_nonparametric_system_02.cc | 58 +- .../hp_vertex_dof_identities_dgp_system_01.cc | 46 +- .../hp_vertex_dof_identities_dgp_system_02.cc | 58 +- tests/hp/hp_vertex_dof_identities_dgq.cc | 46 +- .../hp_vertex_dof_identities_dgq_system_01.cc | 46 +- .../hp_vertex_dof_identities_dgq_system_02.cc | 58 +- tests/hp/hp_vertex_dof_identities_q.cc | 46 +- .../hp_vertex_dof_identities_q_system_01.cc | 46 +- .../hp_vertex_dof_identities_q_system_02.cc | 58 +- tests/hp/hp_vertex_dof_identities_rt_nodal.cc | 46 +- tests/hp/integrate_difference.cc | 34 +- tests/hp/integrate_difference_02.cc | 82 +- tests/hp/interpolate_dgq_01.cc | 74 +- tests/hp/interpolate_dgq_02.cc | 80 +- tests/hp/interpolate_q_01.cc | 76 +- tests/hp/interpolate_q_02.cc | 80 +- tests/hp/interpolate_q_system_01.cc | 74 +- tests/hp/interpolate_q_system_02.cc | 78 +- tests/hp/mapping_collection_01.cc | 12 +- tests/hp/mapping_collection_02.cc | 6 +- tests/hp/mapping_collection_03.cc | 8 +- tests/hp/mapping_collection_04.cc | 8 +- tests/hp/matrices.cc | 150 +- tests/hp/matrices_hp.cc | 154 +- tests/hp/n_active_fe_indices.cc | 22 +- tests/hp/n_dofs.cc | 66 +- tests/hp/q_collection_01.cc | 12 +- tests/hp/random.cc | 14 +- tests/hp/renumber_block_wise_01.cc | 14 +- tests/hp/renumber_block_wise_01a.cc | 12 +- tests/hp/renumber_block_wise_01b.cc | 24 +- tests/hp/renumber_block_wise_02.cc | 26 +- tests/hp/renumber_component_wise.cc | 14 +- tests/hp/solution_transfer.cc | 134 +- tests/hp/solution_transfer_02.cc | 12 +- tests/hp/step-10.cc | 124 +- tests/hp/step-11.cc | 142 +- tests/hp/step-11_compressed_set_sparsity.cc | 144 +- tests/hp/step-12.cc | 876 +- tests/hp/step-13.cc | 620 +- tests/hp/step-2.cc | 46 +- tests/hp/step-3.cc | 130 +- tests/hp/step-3a.cc | 176 +- tests/hp/step-3b.cc | 176 +- tests/hp/step-3c.cc | 174 +- tests/hp/step-4.cc | 182 +- tests/hp/step-5.cc | 228 +- tests/hp/step-6.cc | 250 +- tests/hp/step-7.cc | 639 +- tests/hp/step-8.cc | 346 +- tests/hp/vectors_boundary_rhs_01.cc | 52 +- tests/hp/vectors_boundary_rhs_02.cc | 52 +- tests/hp/vectors_boundary_rhs_03.cc | 48 +- tests/hp/vectors_boundary_rhs_hp_01.cc | 52 +- tests/hp/vectors_boundary_rhs_hp_03.cc | 48 +- tests/hp/vectors_point_source_01.cc | 24 +- tests/hp/vectors_point_source_hp_01.cc | 24 +- tests/hp/vectors_rhs_01.cc | 52 +- tests/hp/vectors_rhs_02.cc | 52 +- tests/hp/vectors_rhs_03.cc | 48 +- tests/hp/vectors_rhs_hp_01.cc | 52 +- tests/hp/vectors_rhs_hp_03.cc | 48 +- tests/hsl/hsl_ma27_01.cc | 26 +- tests/hsl/hsl_ma27_02.cc | 28 +- tests/hsl/hsl_ma47_01.cc | 24 +- tests/hsl/hsl_ma47_02.cc | 28 +- .../integrators/assembler_simple_matrix_01.cc | 12 +- .../integrators/assembler_simple_matrix_02.cc | 12 +- .../integrators/assembler_simple_matrix_03.cc | 40 +- .../assembler_simple_matrix_03tri.cc | 44 +- .../integrators/assembler_simple_matrix_04.cc | 40 +- .../assembler_simple_mgmatrix_01.cc | 12 +- .../assembler_simple_mgmatrix_02.cc | 12 +- .../assembler_simple_mgmatrix_03.cc | 40 +- tests/integrators/cells_and_faces_01.cc | 82 +- tests/integrators/cochain_01.cc | 126 +- tests/integrators/divergence_01.cc | 142 +- tests/integrators/elasticity_01.cc | 214 +- tests/integrators/empty_info.h | 38 +- tests/integrators/functional_01.cc | 66 +- tests/integrators/laplacian_01.cc | 266 +- tests/integrators/mesh_worker_01.cc | 108 +- tests/integrators/mesh_worker_02.cc | 234 +- tests/integrators/mesh_worker_03.cc | 240 +- tests/integrators/mesh_worker_1d_dg.cc | 244 +- tests/integrators/mesh_worker_matrix_01.cc | 118 +- tests/lac/ala_01.cc | 36 +- tests/lac/bicgstab_early.cc | 14 +- tests/lac/bicgstab_large.cc | 8 +- tests/lac/block_compressed_01.cc | 16 +- ...sed_simple_sparsity_pattern_indexset_01.cc | 18 +- tests/lac/block_indices.cc | 30 +- tests/lac/block_matrices.cc | 195 +- tests/lac/block_minres.cc | 24 +- tests/lac/block_sparsity_pattern_01.cc | 42 +- tests/lac/block_sparsity_pattern_02.cc | 4 +- tests/lac/block_sparsity_pattern_03.cc | 42 +- tests/lac/block_vector.cc | 102 +- tests/lac/block_vector_copy.cc | 40 +- tests/lac/block_vector_iterator.cc | 298 +- tests/lac/block_vector_vector_assign.cc | 36 +- tests/lac/chunk_sparsity_pattern_01.cc | 4 +- tests/lac/chunk_sparsity_pattern_02.cc | 4 +- tests/lac/chunk_sparsity_pattern_03.cc | 4 +- tests/lac/chunk_sparsity_pattern_04.cc | 4 +- tests/lac/chunk_sparsity_pattern_05.cc | 4 +- tests/lac/chunk_sparsity_pattern_06.cc | 4 +- tests/lac/chunk_sparsity_pattern_07.cc | 4 +- tests/lac/chunk_sparsity_pattern_08.cc | 4 +- tests/lac/chunk_sparsity_pattern_09.cc | 4 +- tests/lac/chunk_sparsity_pattern_10.cc | 4 +- tests/lac/chunk_sparsity_pattern_11.cc | 4 +- tests/lac/complex_block_vector.cc | 140 +- tests/lac/complex_block_vector_iterator.cc | 298 +- .../lac/complex_block_vector_vector_assign.cc | 36 +- .../lac/compressed_set_sparsity_pattern_01.cc | 4 +- .../lac/compressed_set_sparsity_pattern_02.cc | 4 +- .../lac/compressed_set_sparsity_pattern_03.cc | 4 +- .../lac/compressed_set_sparsity_pattern_04.cc | 4 +- .../lac/compressed_set_sparsity_pattern_05.cc | 4 +- .../lac/compressed_set_sparsity_pattern_10.cc | 4 +- .../lac/compressed_set_sparsity_pattern_11.cc | 4 +- tests/lac/compressed_sparsity_pattern_01.cc | 4 +- tests/lac/compressed_sparsity_pattern_02.cc | 4 +- tests/lac/compressed_sparsity_pattern_03.cc | 4 +- tests/lac/compressed_sparsity_pattern_04.cc | 4 +- tests/lac/compressed_sparsity_pattern_05.cc | 4 +- tests/lac/compressed_sparsity_pattern_10.cc | 4 +- tests/lac/compressed_sparsity_pattern_11.cc | 4 +- tests/lac/constraint_graph_zero.cc | 12 +- tests/lac/constraints_01.cc | 21 +- tests/lac/constraints_c1.cc | 171 +- tests/lac/constraints_c1_02.cc | 30 +- tests/lac/constraints_inhomogeneous.cc | 18 +- tests/lac/constraints_zero.cc | 12 +- tests/lac/constraints_zero_condense.cc | 24 +- tests/lac/constraints_zero_merge.cc | 12 +- tests/lac/copy_transposed.cc | 2 +- tests/lac/eigen.cc | 30 +- tests/lac/filtered_matrix.cc | 44 +- tests/lac/full_matrix.cc | 178 +- tests/lac/full_matrix_02.cc | 6 +- tests/lac/full_matrix_03.cc | 6 +- tests/lac/full_matrix_04.cc | 34 +- tests/lac/full_matrix_05.cc | 14 +- tests/lac/full_matrix_06.cc | 22 +- tests/lac/full_matrix_07.cc | 6 +- tests/lac/full_matrix_08.cc | 6 +- tests/lac/full_matrix_print.cc | 4 +- tests/lac/gmres_reorthogonalize_04.cc | 35 +- tests/lac/gmres_reorthogonalize_05.cc | 35 +- tests/lac/householder.cc | 16 +- tests/lac/identity_matrix_01.cc | 14 +- tests/lac/identity_matrix_02.cc | 14 +- tests/lac/identity_matrix_03.cc | 14 +- tests/lac/identity_matrix_04.cc | 16 +- tests/lac/identity_matrix_05.cc | 16 +- tests/lac/identity_matrix_06.cc | 10 +- tests/lac/is_block_matrix.cc | 58 +- tests/lac/is_block_vector.cc | 30 +- tests/lac/lapack_fill.cc | 20 +- tests/lac/matrices.cc | 14 +- tests/lac/matrices_ez.cc | 2 +- tests/lac/matrices_ez_add.cc | 2 +- tests/lac/matrices_lapack.cc | 2 +- tests/lac/matrices_lapack_fill.cc | 4 +- tests/lac/matrix_lib.cc | 52 +- tests/lac/matrix_out.cc | 38 +- tests/lac/pointer_matrix.cc | 16 +- tests/lac/pointer_matrix_vector.cc | 14 +- tests/lac/print_formatted_ez_01.cc | 2 +- tests/lac/quickmatrix.h | 34 +- tests/lac/solver.cc | 266 +- tests/lac/solver_02.cc | 8 +- tests/lac/solver_leak.cc | 22 +- tests/lac/solver_relaxation_01.cc | 108 +- tests/lac/solver_relaxation_02.cc | 158 +- tests/lac/solver_relaxation_03.cc | 262 +- tests/lac/solver_selector_00.cc | 4 +- tests/lac/solver_selector_01.cc | 22 +- tests/lac/solver_selector_02.cc | 22 +- tests/lac/sparse_ilu.cc | 136 +- tests/lac/sparse_ilu_inverse.cc | 44 +- tests/lac/sparse_ilu_t.cc | 138 +- tests/lac/sparse_matrices.cc | 148 +- tests/lac/sparse_matrix_Tmmult_01.cc | 32 +- tests/lac/sparse_matrix_Tmmult_02.cc | 34 +- tests/lac/sparse_matrix_iterator.cc | 36 +- tests/lac/sparse_matrix_mmult_01.cc | 32 +- tests/lac/sparse_matrix_mmult_02.cc | 34 +- tests/lac/sparse_mic.cc | 130 +- tests/lac/sparsity_pattern.cc | 122 +- tests/lac/sparsity_pattern_01.cc | 4 +- tests/lac/sparsity_pattern_02.cc | 4 +- tests/lac/sparsity_pattern_03.cc | 4 +- tests/lac/sparsity_pattern_04.cc | 4 +- tests/lac/sparsity_pattern_05.cc | 4 +- tests/lac/sparsity_pattern_06.cc | 4 +- tests/lac/sparsity_pattern_07.cc | 4 +- tests/lac/sparsity_pattern_08.cc | 4 +- tests/lac/sparsity_pattern_09.cc | 4 +- tests/lac/sparsity_pattern_10.cc | 4 +- tests/lac/sparsity_pattern_11.cc | 4 +- tests/lac/sparsity_pattern_common.h | 284 +- tests/lac/sparsity_tools_01.cc | 8 +- tests/lac/testmatrix.h | 474 +- tests/lac/trace.cc | 6 +- tests/lac/tridiagonal_matrix.cc | 48 +- tests/lac/tridiagonal_matrix_sym.cc | 40 +- tests/lac/vector-vector.cc | 72 +- tests/lac/vector_memory.cc | 16 +- tests/lac/vector_norms.cc | 8 +- tests/lac/vector_view.cc | 31 +- tests/lapack/full_matrix_01.cc | 44 +- tests/lapack/full_matrix_02.cc | 20 +- tests/lapack/full_matrix_03.cc | 56 +- tests/lapack/full_matrix_04.cc | 46 +- tests/lapack/full_matrix_05.cc | 64 +- tests/lapack/full_matrix_06.cc | 70 +- tests/lapack/full_matrix_07.cc | 42 +- tests/lapack/solver_cg.cc | 74 +- tests/lapack/tridiagonal_ev1.cc | 8 +- tests/lib/dof_tools_frame.h | 20 +- tests/lib/test_grids.h | 128 +- tests/matrix_free/compress_mapping.cc | 10 +- tests/matrix_free/copy.cc | 10 +- tests/matrix_free/create_mesh.h | 34 +- .../estimate_condition_number_mass.cc | 12 +- tests/matrix_free/get_functions_circle.cc | 2 +- tests/matrix_free/get_functions_common.h | 58 +- tests/matrix_free/get_functions_float.cc | 6 +- tests/matrix_free/get_functions_gl.cc | 18 +- tests/matrix_free/get_functions_mappingq.cc | 12 +- tests/matrix_free/get_functions_multife.cc | 40 +- tests/matrix_free/get_functions_multife2.cc | 44 +- .../get_functions_q_hierarchical.cc | 22 +- tests/matrix_free/get_functions_rect.cc | 12 +- tests/matrix_free/get_functions_variants.cc | 30 +- tests/matrix_free/get_values_plain.cc | 20 +- tests/matrix_free/integrate_functions.cc | 18 +- .../integrate_functions_multife.cc | 34 +- .../integrate_functions_multife2.cc | 30 +- tests/matrix_free/matrix_vector_03.cc | 4 +- tests/matrix_free/matrix_vector_05.cc | 4 +- tests/matrix_free/matrix_vector_07.cc | 14 +- tests/matrix_free/matrix_vector_common.h | 24 +- tests/matrix_free/matrix_vector_curl.cc | 24 +- tests/matrix_free/matrix_vector_div.cc | 24 +- tests/matrix_free/matrix_vector_float.cc | 4 +- tests/matrix_free/matrix_vector_hp.cc | 34 +- tests/matrix_free/matrix_vector_mg.cc | 42 +- tests/matrix_free/matrix_vector_stokes.cc | 22 +- .../matrix_vector_stokes_noflux.cc | 24 +- tests/matrix_free/no_index_initialize.cc | 12 +- tests/matrix_free/step-37.cc | 2 +- tests/matrix_free/thread_correctness.cc | 30 +- tests/matrix_free/thread_correctness_hp.cc | 42 +- tests/matrix_free/update_mapping_only.cc | 8 +- tests/metis/metis_01.cc | 40 +- tests/metis/metis_02.cc | 46 +- tests/metis/metis_03.cc | 42 +- tests/mpi/blockvec_01.cc | 34 +- tests/mpi/coarse_grid_common.h | 64 +- tests/mpi/collective_01.cc | 10 +- tests/mpi/collective_02.cc | 16 +- tests/mpi/collective_02_array.cc | 4 +- tests/mpi/collective_03.cc | 16 +- tests/mpi/collective_03_array.cc | 4 +- tests/mpi/compute_mean_value.cc | 26 +- tests/mpi/constraint_matrix_condense_01.cc | 14 +- tests/mpi/constraint_matrix_set_zero_01.cc | 16 +- tests/mpi/constraint_matrix_set_zero_02.cc | 16 +- tests/mpi/constraint_matrix_trilinos_bug.cc | 104 +- tests/mpi/count_dofs_per_block_01.cc | 6 +- tests/mpi/count_dofs_per_block_02.cc | 58 +- tests/mpi/count_dofs_per_component_01.cc | 16 +- tests/mpi/crash_01.cc | 6 +- tests/mpi/crash_02.cc | 4 +- tests/mpi/crash_03.cc | 38 +- tests/mpi/crash_04.cc | 77 +- tests/mpi/distribute_sp_01.cc | 38 +- tests/mpi/distribute_sp_02.cc | 68 +- tests/mpi/dof_handler_number_cache.cc | 92 +- tests/mpi/extract_boundary_dofs.cc | 16 +- tests/mpi/extract_constant_modes_01.cc | 56 +- tests/mpi/extract_locally_active_dofs.cc | 18 +- tests/mpi/fe_field_function_01.cc | 50 +- tests/mpi/flux_edge_01.cc | 52 +- tests/mpi/ghost_01.cc | 22 +- tests/mpi/ghost_02.cc | 32 +- tests/mpi/ghost_03.cc | 10 +- tests/mpi/integrate_difference.cc | 64 +- tests/mpi/interpolate_01.cc | 14 +- tests/mpi/interpolate_02.cc | 16 +- tests/mpi/interpolate_03.cc | 26 +- tests/mpi/interpolate_04.cc | 14 +- tests/mpi/is_locally_owned.cc | 46 +- tests/mpi/make_zero_boundary_values.cc | 12 +- tests/mpi/map_dofs_to_support_points.cc | 28 +- tests/mpi/matrix_free_01.cc | 78 +- tests/mpi/matrix_free_02.cc | 28 +- tests/mpi/matrix_free_03.cc | 78 +- tests/mpi/matrix_free_04.cc | 74 +- tests/mpi/mesh_worker_matrix_01.cc | 228 +- tests/mpi/mg_01.cc | 30 +- tests/mpi/mg_02.cc | 78 +- tests/mpi/mg_03.cc | 44 +- tests/mpi/mg_04.cc | 50 +- tests/mpi/multigrid_adaptive.cc | 30 +- tests/mpi/multigrid_uniform.cc | 30 +- tests/mpi/no_flux_constraints.cc | 102 +- tests/mpi/no_flux_constraints_02.cc | 159 +- tests/mpi/no_flux_constraints_03.cc | 113 +- tests/mpi/p4est_2d_coarse_01.cc | 42 +- tests/mpi/p4est_2d_constraintmatrix_01.cc | 8 +- tests/mpi/p4est_2d_constraintmatrix_02.cc | 36 +- tests/mpi/p4est_2d_constraintmatrix_03.cc | 190 +- tests/mpi/p4est_2d_constraintmatrix_04.cc | 210 +- tests/mpi/p4est_2d_constraintmatrix_05.cc | 16 +- tests/mpi/p4est_2d_dofhandler_01.cc | 38 +- tests/mpi/p4est_2d_dofhandler_02.cc | 56 +- tests/mpi/p4est_2d_dofhandler_03.cc | 74 +- tests/mpi/p4est_2d_dofhandler_04.cc | 116 +- tests/mpi/p4est_2d_ghost_01.cc | 84 +- tests/mpi/p4est_2d_ghost_02.cc | 120 +- tests/mpi/p4est_2d_refine_01.cc | 24 +- tests/mpi/p4est_2d_refine_02.cc | 26 +- tests/mpi/p4est_2d_refine_03.cc | 66 +- tests/mpi/p4est_2d_renumber_01.cc | 55 +- tests/mpi/p4est_2d_renumber_02.cc | 44 +- tests/mpi/p4est_2d_simple.cc | 32 +- tests/mpi/p4est_3d_constraintmatrix_01.cc | 28 +- tests/mpi/p4est_3d_constraintmatrix_02.cc | 48 +- tests/mpi/p4est_3d_constraintmatrix_03.cc | 214 +- tests/mpi/p4est_3d_constraintmatrix_04.cc | 24 +- tests/mpi/p4est_3d_ghost_01.cc | 80 +- tests/mpi/p4est_3d_refine_01.cc | 124 +- tests/mpi/p4est_3d_refine_02.cc | 56 +- tests/mpi/p4est_3d_refine_03.cc | 32 +- tests/mpi/p4est_3d_refine_04.cc | 92 +- tests/mpi/p4est_data_out_01.cc | 4 +- tests/mpi/p4est_get_subdomain_association.cc | 28 +- tests/mpi/p4est_max_refine.cc | 46 +- tests/mpi/p4est_save_01.cc | 34 +- tests/mpi/p4est_save_02.cc | 62 +- tests/mpi/p4est_save_03.cc | 24 +- tests/mpi/parallel_block_vector_01.cc | 50 +- tests/mpi/parallel_partitioner_01.cc | 25 +- tests/mpi/parallel_partitioner_02.cc | 19 +- tests/mpi/parallel_partitioner_03.cc | 17 +- tests/mpi/parallel_partitioner_04.cc | 21 +- tests/mpi/parallel_vector_01.cc | 8 +- tests/mpi/parallel_vector_02.cc | 12 +- tests/mpi/parallel_vector_03.cc | 14 +- tests/mpi/parallel_vector_04.cc | 26 +- tests/mpi/parallel_vector_05.cc | 12 +- tests/mpi/parallel_vector_06.cc | 50 +- tests/mpi/parallel_vector_07.cc | 27 +- tests/mpi/parallel_vector_08.cc | 55 +- tests/mpi/parallel_vector_09.cc | 25 +- tests/mpi/parallel_vector_10.cc | 10 +- tests/mpi/parallel_vector_11.cc | 6 +- tests/mpi/parallel_vector_12.cc | 20 +- tests/mpi/parallel_vector_13.cc | 14 +- tests/mpi/parallel_vector_back_interpolate.cc | 6 +- tests/mpi/parallel_vector_interpolate.cc | 2 +- tests/mpi/petsc_01.cc | 26 +- tests/mpi/petsc_02.cc | 2 +- tests/mpi/petsc_distribute_01.cc | 50 +- tests/mpi/petsc_distribute_01_block.cc | 86 +- tests/mpi/petsc_distribute_01_inhomogenous.cc | 56 +- tests/mpi/petsc_locally_owned_elements.cc | 4 +- tests/mpi/point_to_point_pattern_01.cc | 60 +- .../refine_and_coarsen_fixed_fraction_01.cc | 70 +- .../refine_and_coarsen_fixed_fraction_02.cc | 84 +- .../refine_and_coarsen_fixed_fraction_03.cc | 44 +- .../refine_and_coarsen_fixed_fraction_04.cc | 84 +- .../refine_and_coarsen_fixed_fraction_05.cc | 82 +- .../refine_and_coarsen_fixed_fraction_06.cc | 86 +- .../mpi/refine_and_coarsen_fixed_number_01.cc | 48 +- .../mpi/refine_and_coarsen_fixed_number_02.cc | 48 +- .../mpi/refine_and_coarsen_fixed_number_03.cc | 44 +- .../mpi/refine_and_coarsen_fixed_number_04.cc | 84 +- .../mpi/refine_and_coarsen_fixed_number_05.cc | 82 +- .../mpi/refine_and_coarsen_fixed_number_06.cc | 18 +- tests/mpi/refinement_listener_01.cc | 12 +- tests/mpi/refinement_listener_02.cc | 18 +- tests/mpi/renumber_z_order_01.cc | 4 +- tests/mpi/renumber_z_order_02.cc | 12 +- tests/mpi/simple_mpi_01.cc | 24 +- tests/mpi/solution_transfer_01.cc | 12 +- tests/mpi/step-39.cc | 156 +- tests/mpi/step-40.cc | 112 +- tests/mpi/step-40_direct_solver.cc | 108 +- tests/mpi/step-48.cc | 2 +- tests/mpi/tria_01.cc | 22 +- tests/mpi/trilinos_01.cc | 30 +- tests/mpi/trilinos_02.cc | 2 +- tests/mpi/trilinos_bug_5609.cc | 14 +- tests/mpi/trilinos_compress_bug.cc | 42 +- tests/mpi/trilinos_distribute_01.cc | 50 +- tests/mpi/trilinos_distribute_01_block.cc | 86 +- .../trilinos_distribute_01_inhomogenous.cc | 54 +- tests/mpi/trilinos_distribute_03.cc | 2 +- tests/mpi/trilinos_distribute_04.cc | 32 +- tests/mpi/trilinos_ghost_01.cc | 8 +- tests/mpi/trilinos_ghost_02.cc | 20 +- tests/mpi/trilinos_ghost_03.cc | 14 +- tests/mpi/trilinos_ghost_03_linfty.cc | 16 +- tests/mpi/trilinos_ghost_05.cc | 18 +- tests/mpi/trilinos_matvec_01.cc | 32 +- tests/mpi/trilinos_matvec_02.cc | 32 +- tests/mpi/trilinos_matvec_03.cc | 22 +- tests/mpi/trilinos_sparse_matrix_01.cc | 41 +- tests/mpi/trilinos_sparse_matrix_mmult_01.cc | 82 +- tests/mpi/trilinos_sparse_matrix_print_01.cc | 28 +- tests/mpi/trilinos_vector_ghosts_01.cc | 4 +- tests/mpi/trilinos_vector_reinit.cc | 10 +- tests/multigrid/boundary_01.cc | 18 +- tests/multigrid/count_01.cc | 28 +- tests/multigrid/cycles.cc | 58 +- tests/multigrid/dof_01.cc | 22 +- tests/multigrid/dof_02.cc | 38 +- tests/multigrid/dof_03.cc | 54 +- tests/multigrid/mg_output.cc | 162 +- tests/multigrid/mg_renumbered_01.cc | 384 +- tests/multigrid/mg_renumbered_02.cc | 248 +- tests/multigrid/mg_renumbered_03.cc | 296 +- tests/multigrid/renumbering_01.cc | 53 +- tests/multigrid/renumbering_02.cc | 4 +- tests/multigrid/renumbering_03.cc | 6 +- tests/multigrid/smoother_block.cc | 178 +- tests/multigrid/step-16.cc | 1110 +- tests/multigrid/step-39-02.cc | 38 +- tests/multigrid/step-39-03.cc | 38 +- tests/multigrid/step-39.cc | 32 +- tests/multigrid/transfer_01.cc | 54 +- tests/multigrid/transfer_02.cc | 76 +- tests/multigrid/transfer_03.cc | 124 +- tests/multigrid/transfer_block.cc | 96 +- tests/multigrid/transfer_block_select.cc | 68 +- tests/multigrid/transfer_compare_01.cc | 98 +- tests/multigrid/transfer_prebuilt_01.cc | 6 +- tests/multigrid/transfer_prebuilt_02.cc | 8 +- tests/multigrid/transfer_prebuilt_03.cc | 8 +- tests/multigrid/transfer_select.cc | 66 +- tests/multigrid/transfer_system_01.cc | 18 +- tests/multigrid/transfer_system_02.cc | 30 +- tests/multigrid/transfer_system_03.cc | 26 +- tests/multigrid/transfer_system_04.cc | 18 +- tests/multigrid/transfer_system_05.cc | 52 +- .../multigrid/transfer_system_adaptive_01.cc | 48 +- .../multigrid/transfer_system_adaptive_02.cc | 52 +- .../multigrid/transfer_system_adaptive_03.cc | 52 +- .../multigrid/transfer_system_adaptive_04.cc | 60 +- .../multigrid/transfer_system_adaptive_05.cc | 50 +- .../multigrid/transfer_system_adaptive_06.cc | 52 +- .../multigrid/transfer_system_adaptive_07.cc | 70 +- .../multigrid/transfer_system_adaptive_08.cc | 70 +- .../multigrid/transfer_system_adaptive_09.cc | 82 +- tests/petsc/01.cc | 38 +- tests/petsc/02.cc | 38 +- tests/petsc/04.cc | 32 +- tests/petsc/05.cc | 38 +- tests/petsc/06.cc | 44 +- tests/petsc/07.cc | 44 +- tests/petsc/08.cc | 42 +- tests/petsc/09.cc | 44 +- tests/petsc/10.cc | 44 +- tests/petsc/11.cc | 36 +- tests/petsc/12.cc | 46 +- tests/petsc/13.cc | 42 +- tests/petsc/17.cc | 36 +- tests/petsc/18.cc | 36 +- tests/petsc/19.cc | 36 +- tests/petsc/20.cc | 42 +- tests/petsc/21.cc | 42 +- tests/petsc/22.cc | 38 +- tests/petsc/23.cc | 42 +- tests/petsc/24.cc | 38 +- tests/petsc/25.cc | 38 +- tests/petsc/26.cc | 34 +- tests/petsc/27.cc | 44 +- tests/petsc/28.cc | 44 +- tests/petsc/29.cc | 34 +- tests/petsc/30.cc | 38 +- tests/petsc/31.cc | 36 +- tests/petsc/32.cc | 36 +- tests/petsc/33.cc | 36 +- tests/petsc/34.cc | 38 +- tests/petsc/35.cc | 42 +- tests/petsc/36.cc | 42 +- tests/petsc/37.cc | 36 +- tests/petsc/38.cc | 38 +- tests/petsc/39.cc | 38 +- tests/petsc/40.cc | 36 +- tests/petsc/41.cc | 38 +- tests/petsc/42.cc | 38 +- tests/petsc/43.cc | 36 +- tests/petsc/44.cc | 36 +- tests/petsc/45.cc | 36 +- tests/petsc/46.cc | 36 +- tests/petsc/47.cc | 36 +- tests/petsc/48.cc | 36 +- tests/petsc/49.cc | 36 +- tests/petsc/50.cc | 46 +- tests/petsc/51.cc | 44 +- tests/petsc/52.cc | 42 +- tests/petsc/55.cc | 42 +- tests/petsc/56.cc | 42 +- tests/petsc/57.cc | 46 +- tests/petsc/58.cc | 38 +- tests/petsc/59.cc | 38 +- tests/petsc/60.cc | 44 +- tests/petsc/61.cc | 50 +- tests/petsc/62.cc | 30 +- tests/petsc/63.cc | 32 +- tests/petsc/64.cc | 58 +- tests/petsc/65.cc | 30 +- tests/petsc/66.cc | 50 +- tests/petsc/67.cc | 50 +- tests/petsc/68.cc | 54 +- tests/petsc/69.cc | 54 +- tests/petsc/70.cc | 2 +- tests/petsc/block_vector_iterator_01.cc | 48 +- tests/petsc/block_vector_iterator_02.cc | 48 +- tests/petsc/block_vector_iterator_03.cc | 300 +- tests/petsc/deal_solver_01.cc | 10 +- tests/petsc/deal_solver_02.cc | 10 +- tests/petsc/deal_solver_03.cc | 10 +- tests/petsc/deal_solver_04.cc | 10 +- tests/petsc/deal_solver_05.cc | 10 +- tests/petsc/full_matrix_01.cc | 38 +- tests/petsc/full_matrix_02.cc | 38 +- tests/petsc/full_matrix_04.cc | 32 +- tests/petsc/full_matrix_05.cc | 42 +- tests/petsc/full_matrix_06.cc | 44 +- tests/petsc/full_matrix_07.cc | 44 +- tests/petsc/full_matrix_08.cc | 42 +- tests/petsc/full_matrix_09.cc | 44 +- tests/petsc/full_matrix_10.cc | 44 +- tests/petsc/full_matrix_iterator_01.cc | 34 +- tests/petsc/full_matrix_vector_01.cc | 36 +- tests/petsc/full_matrix_vector_02.cc | 36 +- tests/petsc/full_matrix_vector_03.cc | 36 +- tests/petsc/full_matrix_vector_04.cc | 36 +- tests/petsc/full_matrix_vector_05.cc | 36 +- tests/petsc/full_matrix_vector_06.cc | 36 +- tests/petsc/full_matrix_vector_07.cc | 36 +- tests/petsc/parallel_sparse_matrix_01.cc | 68 +- tests/petsc/petsc_mf_testmatrix.h | 146 +- tests/petsc/slowness_01.cc | 56 +- tests/petsc/slowness_02.cc | 50 +- tests/petsc/slowness_03.cc | 48 +- tests/petsc/slowness_04.cc | 70 +- tests/petsc/solver_01.cc | 24 +- tests/petsc/solver_02.cc | 22 +- tests/petsc/solver_03.cc | 18 +- tests/petsc/solver_03_mf.cc | 14 +- .../petsc/solver_03_precondition_boomeramg.cc | 10 +- ...ver_03_precondition_boomeramg_symmetric.cc | 10 +- .../petsc/solver_03_precondition_eisenstat.cc | 10 +- tests/petsc/solver_03_precondition_icc.cc | 10 +- tests/petsc/solver_03_precondition_ilu.cc | 10 +- tests/petsc/solver_03_precondition_lu.cc | 18 +- .../petsc/solver_03_precondition_parasails.cc | 10 +- tests/petsc/solver_03_precondition_sor.cc | 10 +- tests/petsc/solver_03_precondition_ssor.cc | 10 +- tests/petsc/solver_04.cc | 18 +- tests/petsc/solver_05.cc | 18 +- tests/petsc/solver_06.cc | 18 +- tests/petsc/solver_07.cc | 16 +- tests/petsc/solver_08.cc | 18 +- tests/petsc/solver_09.cc | 18 +- tests/petsc/solver_10.cc | 18 +- tests/petsc/solver_11.cc | 22 +- tests/petsc/solver_12.cc | 18 +- tests/petsc/solver_13.cc | 22 +- tests/petsc/sparse_direct_mumps.cc | 12 +- tests/petsc/sparse_matrix_01.cc | 16 +- tests/petsc/sparse_matrix_02.cc | 64 +- tests/petsc/sparse_matrix_iterator_01.cc | 34 +- tests/petsc/sparse_matrix_vector_01.cc | 36 +- tests/petsc/sparse_matrix_vector_02.cc | 36 +- tests/petsc/sparse_matrix_vector_03.cc | 36 +- tests/petsc/sparse_matrix_vector_04.cc | 36 +- tests/petsc/sparse_matrix_vector_05.cc | 36 +- tests/petsc/sparse_matrix_vector_06.cc | 36 +- tests/petsc/sparse_matrix_vector_07.cc | 36 +- tests/petsc/vector_assign_01.cc | 36 +- tests/petsc/vector_assign_02.cc | 36 +- tests/petsc/vector_equality_1.cc | 34 +- tests/petsc/vector_equality_2.cc | 38 +- tests/petsc/vector_equality_3.cc | 34 +- tests/petsc/vector_equality_4.cc | 38 +- tests/petsc/vector_print.cc | 60 +- tests/petsc/vector_wrap_01.cc | 42 +- tests/serialization/dof_handler_01.cc | 170 +- tests/serialization/parameter_handler.cc | 84 +- tests/serialization/pointer_01.cc | 74 +- tests/serialization/pointer_02.cc | 92 +- tests/serialization/pointer_03.cc | 108 +- tests/serialization/pointer_04.cc | 112 +- tests/serialization/pointer_05.cc | 134 +- tests/serialization/polynomial.cc | 8 +- .../serialization/polynomial_hierarchical.cc | 6 +- tests/serialization/polynomial_lagrange_gl.cc | 4 +- tests/serialization/polynomial_monomial.cc | 4 +- tests/serialization/quadrature.cc | 14 +- .../serialization/quadrature_qanisotropic.cc | 14 +- tests/serialization/quadrature_qiterated.cc | 14 +- tests/serialization/serialization.h | 16 +- tests/serialization/sparsity_pattern.cc | 6 +- tests/serialization/symmetric_tensor.cc | 14 +- tests/serialization/table_1.cc | 14 +- tests/serialization/table_2.cc | 21 +- tests/serialization/table_3.cc | 30 +- tests/serialization/table_4.cc | 33 +- tests/serialization/table_5.cc | 40 +- tests/serialization/table_6.cc | 43 +- tests/serialization/table_7.cc | 50 +- tests/serialization/table_handler.cc | 14 +- tests/serialization/tensor.cc | 12 +- tests/serialization/test_01.cc | 68 +- tests/serialization/triangulation_01.cc | 116 +- tests/serialization/triangulation_02.cc | 118 +- tests/serialization/vector.cc | 18 +- tests/slepc/00.cc | 70 +- tests/tests.h | 220 +- tests/trilinos/01.cc | 36 +- tests/trilinos/02.cc | 42 +- tests/trilinos/03.cc | 44 +- tests/trilinos/03a.cc | 46 +- tests/trilinos/03b.cc | 46 +- tests/trilinos/04.cc | 34 +- tests/trilinos/05.cc | 40 +- tests/trilinos/06.cc | 46 +- tests/trilinos/07.cc | 46 +- tests/trilinos/08.cc | 44 +- tests/trilinos/09.cc | 46 +- tests/trilinos/10.cc | 46 +- tests/trilinos/11.cc | 38 +- tests/trilinos/12.cc | 46 +- tests/trilinos/13.cc | 46 +- tests/trilinos/14.cc | 48 +- tests/trilinos/15.cc | 46 +- tests/trilinos/16.cc | 46 +- tests/trilinos/17.cc | 38 +- tests/trilinos/18.cc | 38 +- tests/trilinos/19.cc | 38 +- tests/trilinos/20.cc | 48 +- tests/trilinos/21.cc | 46 +- tests/trilinos/22.cc | 40 +- tests/trilinos/23.cc | 44 +- tests/trilinos/24.cc | 40 +- tests/trilinos/25.cc | 40 +- tests/trilinos/26.cc | 36 +- tests/trilinos/27.cc | 46 +- tests/trilinos/28.cc | 46 +- tests/trilinos/29.cc | 36 +- tests/trilinos/30.cc | 40 +- tests/trilinos/31.cc | 38 +- tests/trilinos/32.cc | 38 +- tests/trilinos/33.cc | 38 +- tests/trilinos/34.cc | 40 +- tests/trilinos/35.cc | 44 +- tests/trilinos/36.cc | 44 +- tests/trilinos/37.cc | 38 +- tests/trilinos/38.cc | 40 +- tests/trilinos/39.cc | 40 +- tests/trilinos/40.cc | 38 +- tests/trilinos/41.cc | 40 +- tests/trilinos/42.cc | 40 +- tests/trilinos/43.cc | 38 +- tests/trilinos/44.cc | 38 +- tests/trilinos/45.cc | 38 +- tests/trilinos/46.cc | 38 +- tests/trilinos/47.cc | 38 +- tests/trilinos/48.cc | 38 +- tests/trilinos/49.cc | 38 +- tests/trilinos/49a.cc | 46 +- tests/trilinos/49b.cc | 40 +- tests/trilinos/50.cc | 48 +- tests/trilinos/51.cc | 46 +- tests/trilinos/52.cc | 42 +- tests/trilinos/53.cc | 46 +- tests/trilinos/54.cc | 46 +- tests/trilinos/55.cc | 46 +- tests/trilinos/56.cc | 46 +- tests/trilinos/57.cc | 48 +- tests/trilinos/58.cc | 40 +- tests/trilinos/59.cc | 40 +- tests/trilinos/60.cc | 46 +- tests/trilinos/61.cc | 52 +- tests/trilinos/62.cc | 32 +- tests/trilinos/63.cc | 34 +- tests/trilinos/64.cc | 48 +- tests/trilinos/65.cc | 26 +- tests/trilinos/66.cc | 52 +- tests/trilinos/67.cc | 52 +- tests/trilinos/68.cc | 56 +- tests/trilinos/69.cc | 56 +- tests/trilinos/70.cc | 6 +- tests/trilinos/block_sparse_matrix_add_01.cc | 128 +- tests/trilinos/block_sparse_matrix_set_01.cc | 130 +- .../trilinos/block_sparse_matrix_vector_01.cc | 30 +- .../trilinos/block_sparse_matrix_vector_02.cc | 30 +- .../trilinos/block_sparse_matrix_vector_03.cc | 30 +- .../trilinos/block_sparse_matrix_vector_04.cc | 30 +- tests/trilinos/block_vector_iterator_01.cc | 50 +- tests/trilinos/block_vector_iterator_02.cc | 50 +- tests/trilinos/block_vector_iterator_03.cc | 302 +- tests/trilinos/deal_solver_01.cc | 18 +- tests/trilinos/deal_solver_02.cc | 20 +- tests/trilinos/deal_solver_03.cc | 20 +- tests/trilinos/deal_solver_04.cc | 20 +- tests/trilinos/deal_solver_05.cc | 20 +- tests/trilinos/deal_solver_06.cc | 8 +- tests/trilinos/mg_transfer_prebuilt_01.cc | 76 +- tests/trilinos/parallel_sparse_matrix_01.cc | 64 +- tests/trilinos/precondition_q_iso_q1.cc | 22 +- tests/trilinos/slowness_01.cc | 56 +- tests/trilinos/slowness_02.cc | 50 +- tests/trilinos/slowness_03.cc | 38 +- tests/trilinos/slowness_04.cc | 52 +- tests/trilinos/solver_03.cc | 20 +- tests/trilinos/solver_05.cc | 20 +- tests/trilinos/solver_07.cc | 14 +- tests/trilinos/sparse_matrix_01.cc | 10 +- tests/trilinos/sparse_matrix_02.cc | 8 +- tests/trilinos/sparse_matrix_03.cc | 4 +- tests/trilinos/sparse_matrix_04.cc | 8 +- tests/trilinos/sparse_matrix_05.cc | 4 +- tests/trilinos/sparse_matrix_07.cc | 4 +- tests/trilinos/sparse_matrix_07_rectangle.cc | 2 +- tests/trilinos/sparse_matrix_add_01.cc | 96 +- tests/trilinos/sparse_matrix_add_02.cc | 82 +- tests/trilinos/sparse_matrix_copy_from_01.cc | 6 +- tests/trilinos/sparse_matrix_iterator.cc | 40 +- tests/trilinos/sparse_matrix_iterator_01.cc | 22 +- tests/trilinos/sparse_matrix_set_01.cc | 90 +- tests/trilinos/sparse_matrix_set_02.cc | 82 +- tests/trilinos/sparse_matrix_vector_01.cc | 38 +- tests/trilinos/sparse_matrix_vector_02.cc | 38 +- tests/trilinos/sparse_matrix_vector_03.cc | 38 +- tests/trilinos/sparse_matrix_vector_04.cc | 36 +- tests/trilinos/sparse_matrix_vector_05.cc | 38 +- tests/trilinos/sparse_matrix_vector_06.cc | 38 +- tests/trilinos/sparse_matrix_vector_07.cc | 38 +- tests/trilinos/sparse_matrix_vector_08.cc | 40 +- tests/trilinos/sparse_matrix_vector_09.cc | 40 +- tests/trilinos/sparse_matrix_vector_10.cc | 40 +- tests/trilinos/sparse_matrix_vector_11.cc | 40 +- tests/trilinos/sparsity_pattern_01.cc | 6 +- tests/trilinos/sparsity_pattern_02.cc | 6 +- tests/trilinos/sparsity_pattern_03.cc | 6 +- tests/trilinos/sparsity_pattern_common.h | 16 +- tests/trilinos/trilinos_64_bit_crash_01.cc | 8 +- .../trilinos_sparse_matrix_iterator_01.cc | 22 +- .../trilinos_sparse_matrix_iterator_02.cc | 22 +- .../trilinos_sparse_matrix_iterator_03.cc | 22 +- .../trilinos_sparse_matrix_iterator_04.cc | 22 +- .../trilinos_sparse_matrix_iterator_05.cc | 22 +- .../trilinos_sparse_matrix_iterator_06.cc | 22 +- .../trilinos_sparse_matrix_iterator_07.cc | 22 +- .../trilinos_sparse_matrix_iterator_08.cc | 22 +- .../trilinos_sparse_matrix_iterator_09.cc | 32 +- .../trilinos_sparse_matrix_iterator_10.cc | 32 +- .../trilinos_sparse_matrix_iterator_11.cc | 32 +- .../trilinos_sparse_matrix_iterator_12.cc | 32 +- tests/trilinos/vector_assign_01.cc | 38 +- tests/trilinos/vector_assign_02.cc | 38 +- tests/trilinos/vector_equality_1.cc | 36 +- tests/trilinos/vector_equality_2.cc | 40 +- tests/trilinos/vector_equality_3.cc | 36 +- tests/trilinos/vector_equality_4.cc | 40 +- tests/trilinos/vector_swap_01.cc | 54 +- tests/umfpack/umfpack_01.cc | 24 +- tests/umfpack/umfpack_02.cc | 28 +- tests/umfpack/umfpack_03.cc | 18 +- tests/umfpack/umfpack_04.cc | 140 +- tests/umfpack/umfpack_05.cc | 18 +- tests/umfpack/umfpack_06.cc | 18 +- tests/umfpack/umfpack_07.cc | 34 +- tests/umfpack/umfpack_08.cc | 56 +- tests/umfpack/umfpack_09.cc | 56 +- tests/umfpack/umfpack_10.cc | 22 +- tests/umfpack/umfpack_11.cc | 56 +- 2347 files changed, 78171 insertions(+), 77561 deletions(-) diff --git a/tests/a-framework/compile.cc b/tests/a-framework/compile.cc index 0a5e356894..2a85bf623a 100644 --- a/tests/a-framework/compile.cc +++ b/tests/a-framework/compile.cc @@ -34,7 +34,7 @@ int main () deallog.depth_console(0); function_that_does_not_exist (); - + deallog << "OK" << std::endl; } diff --git a/tests/a-framework/fail.cc b/tests/a-framework/fail.cc index 63983b93b6..d564110b2c 100644 --- a/tests/a-framework/fail.cc +++ b/tests/a-framework/fail.cc @@ -32,7 +32,7 @@ int main () deallog.depth_console(0); compile error; - + deallog << "OK" << std::endl; } diff --git a/tests/a-framework/link.cc b/tests/a-framework/link.cc index 96f8c885ab..d2da112194 100644 --- a/tests/a-framework/link.cc +++ b/tests/a-framework/link.cc @@ -32,7 +32,7 @@ int main () deallog.depth_console(0); std::abort (); - + deallog << "OK" << std::endl; } diff --git a/tests/aniso/anisotropic_crash.cc b/tests/aniso/anisotropic_crash.cc index 160e6d714c..34b5fb308e 100644 --- a/tests/aniso/anisotropic_crash.cc +++ b/tests/aniso/anisotropic_crash.cc @@ -45,53 +45,53 @@ int main() deallog.depth_console(0); deallog.threshold_double(1.e-10); - // Create triangulation + // Create triangulation Triangulation<2> tri; GridGenerator::hyper_cube( tri ); tri.refine_global( 2 ); - // now do some sort of random, anisotropic - // refinement + // now do some sort of random, anisotropic + // refinement Triangulation<2>::active_cell_iterator cell = tri.begin_active(), end = tri.end(); - for( ; cell != end; ++cell ) + for ( ; cell != end; ++cell ) { switch (rand()%4) - { - /// 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; - case 1: - cell->set_refine_flag( RefinementCase<2>::cut_axis(1) ); - break; - - case 2: - /// If the number is 2 we - /// refine isotropically - cell->set_refine_flag(); - break; - - default: - /// If the number is 3 we don't refine - ; - } + { + /// 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; + case 1: + cell->set_refine_flag( RefinementCase<2>::cut_axis(1) ); + break; + + case 2: + /// If the number is 2 we + /// refine isotropically + cell->set_refine_flag(); + break; + + default: + /// If the number is 3 we don't refine + ; + } } - /// refine the mesh + /// refine the mesh tri.execute_coarsening_and_refinement(); - /// For each vertex find the patch of cells - /// that surrounds it - for( unsigned v=0; v void print_formatted (const FullMatrix &A, - const unsigned int precision, - const unsigned int width) + const unsigned int precision, + const unsigned int width) { for (unsigned int i=0; i &A, template -void test_embedding (const FiniteElement& fe) +void test_embedding (const FiniteElement &fe) { const std::string refine_case_names[8]= - {"no_refinement", - "cut_x", - "cut_y", - "cut_xy", - "cut_z", - "cut_xz", - "cut_yz", - "cut_xyz"}; - + { + "no_refinement", + "cut_x", + "cut_y", + "cut_xy", + "cut_z", + "cut_xz", + "cut_yz", + "cut_xyz" + }; + const unsigned int n = fe.dofs_per_cell; - + std::vector > > P; P.resize(RefinementCase::isotropic_refinement); for (unsigned int ref_case=RefinementCase::cut_x; ref_case::isotropic_refinement+1; ++ref_case) for (unsigned int c=0; - c::n_children(RefinementCase(ref_case)); - ++c) + c::n_children(RefinementCase(ref_case)); + ++c) P[ref_case-1].push_back(FullMatrix(n)); - + FETools::compute_embedding_matrices(fe, P); - + for (unsigned int ref_case=RefinementCase::cut_x; ref_case::isotropic_refinement+1; ++ref_case) for (unsigned int c=0; - c::n_children(RefinementCase(ref_case)); - ++c) + c::n_children(RefinementCase(ref_case)); + ++c) { - deallog << fe.get_name() << " embedding, RefinementCase:: " << refine_case_names[ref_case] << ", child " << c << std::endl; - print_formatted(P[ref_case-1][c], 4, 6); + deallog << fe.get_name() << " embedding, RefinementCase:: " << refine_case_names[ref_case] << ", child " << c << std::endl; + print_formatted(P[ref_case-1][c], 4, 6); } } - + template -void test_projection (const FiniteElement& fe1, - const FiniteElement& fe2, - std::ostream& out) +void test_projection (const FiniteElement &fe1, + const FiniteElement &fe2, + std::ostream &out) { out << fe1.get_name() << " -> " << fe2.get_name() << std::endl; - + const unsigned int n1 = fe1.dofs_per_cell; const unsigned int n2 = fe2.dofs_per_cell; @@ -113,13 +115,13 @@ void test_projection (const FiniteElement& fe1, for (unsigned int i=0; i -void test_projection (std::ostream& out) +void test_projection (std::ostream &out) { FE_DGQ q0(0); FE_DGQ q1(1); diff --git a/tests/aniso/hp_constraints_dgp_08.cc b/tests/aniso/hp_constraints_dgp_08.cc index f3ad8f2b79..8f22793248 100644 --- a/tests/aniso/hp_constraints_dgp_08.cc +++ b/tests/aniso/hp_constraints_dgp_08.cc @@ -30,6 +30,6 @@ void test () hp::FECollection fe; for (unsigned int i=0; i<4; ++i) fe.push_back (FE_DGP(i)); - + test_with_hanging_nodes_random_aniso (fe); } diff --git a/tests/aniso/hp_constraints_dgp_monomial_08.cc b/tests/aniso/hp_constraints_dgp_monomial_08.cc index a03eef4798..3c5ad3d265 100644 --- a/tests/aniso/hp_constraints_dgp_monomial_08.cc +++ b/tests/aniso/hp_constraints_dgp_monomial_08.cc @@ -30,6 +30,6 @@ void test () hp::FECollection fe; for (unsigned int i=0; i<4; ++i) fe.push_back (FE_DGPMonomial(i)); - + test_with_hanging_nodes_random_aniso (fe); } diff --git a/tests/aniso/hp_constraints_dgp_nonparametric_08.cc b/tests/aniso/hp_constraints_dgp_nonparametric_08.cc index d3e0a294a7..59fe4fa9a7 100644 --- a/tests/aniso/hp_constraints_dgp_nonparametric_08.cc +++ b/tests/aniso/hp_constraints_dgp_nonparametric_08.cc @@ -31,6 +31,6 @@ void test () hp::FECollection fe; for (unsigned int i=0; i<4; ++i) fe.push_back (FE_DGPMonomial(i)); - + test_with_hanging_nodes_random_aniso (fe); } diff --git a/tests/aniso/mesh_3d_21.cc b/tests/aniso/mesh_3d_21.cc index 95c961edf5..c23032f94a 100644 --- a/tests/aniso/mesh_3d_21.cc +++ b/tests/aniso/mesh_3d_21.cc @@ -44,18 +44,18 @@ FE_DGQ<3> fe(1); QGauss<2> quadrature(3); MappingQ<3> mapping(2); FEFaceValues<3> fe_face_values1 (mapping, fe, quadrature, - update_q_points | update_JxW_values | - update_normal_vectors); + update_q_points | update_JxW_values | + update_normal_vectors); FESubfaceValues<3> fe_face_values2 (mapping, fe, quadrature, - update_q_points | update_JxW_values | - update_normal_vectors); + update_q_points | update_JxW_values | + update_normal_vectors); void check_this (Triangulation<3> &tria) { DoFHandler<3> dof_handler (tria); dof_handler.distribute_dofs (fe); - + DoFHandler<3>::active_cell_iterator cell = dof_handler.begin_active(); for (; cell!=dof_handler.end(); ++cell) for (unsigned int face_no=0; face_no::faces_per_cell; @@ -67,8 +67,8 @@ void check_this (Triangulation<3> &tria) subface_noface(face_no)->number_of_children(); ++subface_no) { - unsigned int neighbor_neighbor = cell->neighbor_face_no(face_no); - + unsigned int neighbor_neighbor = cell->neighbor_face_no(face_no); + const DoFHandler<3>::active_cell_iterator neighbor_child = cell->neighbor_child_on_subface(face_no, subface_no); @@ -89,7 +89,7 @@ void check_this (Triangulation<3> &tria) fe_face_values2.normal_vector(q)).square() < 1e-20, ExcInternalError()); - } + } } } @@ -99,34 +99,34 @@ void check_this (Triangulation<3> &tria) // quadrature points both on faces and neighboring subfaces match. void check (Triangulation<3> &tria_org) { - for (unsigned int c=0;c tria; - tria.copy_triangulation(tria_org); - Triangulation<3>::active_cell_iterator cell=tria.begin_active(); - for (unsigned int j=0;jset_refine_flag (RefinementCase<3>(i)); - tria.execute_coarsening_and_refinement (); - - deallog << "Initial check, cell = "< tria; + tria.copy_triangulation(tria_org); + Triangulation<3>::active_cell_iterator cell=tria.begin_active(); + for (unsigned int j=0; jset_refine_flag (RefinementCase<3>(i)); + tria.execute_coarsening_and_refinement (); + + deallog << "Initial check, cell = "< &tria_org) void check2 (Triangulation<3> &orig_tria) { for (unsigned int i=0; i tria; - tria.copy_triangulation(orig_tria); - Triangulation<3>::cell_iterator cell = tria.begin_active(), - endc = tria.end(); - for (unsigned int j=0; jset_refine_flag(RefinementCase<3>::cut_z); - tria.execute_coarsening_and_refinement (); - - cell=tria.begin(); - for (; cell!=endc;++cell) - if (cell->refinement_case()==RefinementCase<3>::cut_z) - { - cell->child(0)->set_refine_flag(RefinementCase<3>::cut_xy); - cell->child(1)->set_refine_flag(RefinementCase<3>::cut_xy); - } - tria.execute_coarsening_and_refinement (); - - deallog << "2 -> Initial check, cell " << i << ", " << tria.n_active_cells() << " active cells" << std::endl; - check_this (tria); - - for (unsigned int r=0; r<2; ++r) - { - tria.refine_global (1); - deallog << "2 -> Check " << r << ", " << tria.n_active_cells() << " active cells" << std::endl; - check_this (tria); - deallog << " ... done." << std::endl; - } - - coarsen_global (tria); - deallog << "Check " << 0 << ", " << tria.n_active_cells() << " active cells"<< std::endl; - check_this (tria); - - tria.refine_global (1); - deallog << "Check " << 1 << ", " << tria.n_active_cells() << " active cells"<< std::endl; - check_this (tria); - } + { + Triangulation<3> tria; + tria.copy_triangulation(orig_tria); + Triangulation<3>::cell_iterator cell = tria.begin_active(), + endc = tria.end(); + for (unsigned int j=0; jset_refine_flag(RefinementCase<3>::cut_z); + tria.execute_coarsening_and_refinement (); + + cell=tria.begin(); + for (; cell!=endc; ++cell) + if (cell->refinement_case()==RefinementCase<3>::cut_z) + { + cell->child(0)->set_refine_flag(RefinementCase<3>::cut_xy); + cell->child(1)->set_refine_flag(RefinementCase<3>::cut_xy); + } + tria.execute_coarsening_and_refinement (); + + deallog << "2 -> Initial check, cell " << i << ", " << tria.n_active_cells() << " active cells" << std::endl; + check_this (tria); + + for (unsigned int r=0; r<2; ++r) + { + tria.refine_global (1); + deallog << "2 -> Check " << r << ", " << tria.n_active_cells() << " active cells" << std::endl; + check_this (tria); + deallog << " ... done." << std::endl; + } + + coarsen_global (tria); + deallog << "Check " << 0 << ", " << tria.n_active_cells() << " active cells"<< std::endl; + check_this (tria); + + tria.refine_global (1); + deallog << "Check " << 1 << ", " << tria.n_active_cells() << " active cells"<< std::endl; + check_this (tria); + } } -int main () +int main () { std::ofstream logfile("mesh_3d_21/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<3> coarse_grid(Triangulation<3>::allow_anisotropic_smoothing); GridGenerator::hyper_cube (coarse_grid); coarse_grid.refine_global(1); check2 (coarse_grid); check (coarse_grid); } - - { - Triangulation<3> coarse_grid; - create_two_cubes (coarse_grid); - check (coarse_grid); - } - - { - Triangulation<3> coarse_grid; - create_L_shape (coarse_grid); - check (coarse_grid); - } - - { - Triangulation<3> coarse_grid; - GridGenerator::hyper_ball (coarse_grid); - check (coarse_grid); - } - - { - Triangulation<3> coarse_grid; - create_two_cubes_rotation (coarse_grid,1); - check (coarse_grid); - } - - { - Triangulation<3> coarse_grid; - create_two_cubes_rotation (coarse_grid,2); - check (coarse_grid); - } - - { - Triangulation<3> coarse_grid; - create_two_cubes_rotation (coarse_grid,3); - check (coarse_grid); - } - - { - Triangulation<3> coarse_grid; - GridGenerator::moebius(coarse_grid, 5, 0, 10.0, 2.0); - check (coarse_grid); - } - - { - Triangulation<3> coarse_grid; - GridGenerator::moebius(coarse_grid, 5, 1, 10.0, 2.0); - check (coarse_grid); - } - - { - Triangulation<3> coarse_grid; - GridGenerator::moebius(coarse_grid, 5, 2, 10.0, 2.0); - check (coarse_grid); - } - - { - Triangulation<3> coarse_grid; - GridGenerator::moebius(coarse_grid, 5, 3, 10.0, 2.0); - check (coarse_grid); - } + + { + Triangulation<3> coarse_grid; + create_two_cubes (coarse_grid); + check (coarse_grid); + } + + { + Triangulation<3> coarse_grid; + create_L_shape (coarse_grid); + check (coarse_grid); + } + + { + Triangulation<3> coarse_grid; + GridGenerator::hyper_ball (coarse_grid); + check (coarse_grid); + } + + { + Triangulation<3> coarse_grid; + create_two_cubes_rotation (coarse_grid,1); + check (coarse_grid); + } + + { + Triangulation<3> coarse_grid; + create_two_cubes_rotation (coarse_grid,2); + check (coarse_grid); + } + + { + Triangulation<3> coarse_grid; + create_two_cubes_rotation (coarse_grid,3); + check (coarse_grid); + } + + { + Triangulation<3> coarse_grid; + GridGenerator::moebius(coarse_grid, 5, 0, 10.0, 2.0); + check (coarse_grid); + } + + { + Triangulation<3> coarse_grid; + GridGenerator::moebius(coarse_grid, 5, 1, 10.0, 2.0); + check (coarse_grid); + } + + { + Triangulation<3> coarse_grid; + GridGenerator::moebius(coarse_grid, 5, 2, 10.0, 2.0); + check (coarse_grid); + } + + { + Triangulation<3> coarse_grid; + GridGenerator::moebius(coarse_grid, 5, 3, 10.0, 2.0); + check (coarse_grid); + } } - - + + diff --git a/tests/aniso/refine_and_coarsen_anisotropic.cc b/tests/aniso/refine_and_coarsen_anisotropic.cc index 92afeb3733..647e064203 100644 --- a/tests/aniso/refine_and_coarsen_anisotropic.cc +++ b/tests/aniso/refine_and_coarsen_anisotropic.cc @@ -36,32 +36,33 @@ #include #include - // flag to decide, whether - // 1) a single output_file should - // be generated for automated tests or - // 2) multiple eps-files and output to - // std::cout in order to check - // changes in the library +// flag to decide, whether +// 1) a single output_file should +// be generated for automated tests or +// 2) multiple eps-files and output to +// std::cout in order to check +// changes in the library bool single_file=true; - // maximum number of refinement steps and cells - // to be created during refinement. whichever - // is reached first terminates the loop +// maximum number of refinement steps and cells +// to be created during refinement. whichever +// is reached first terminates the loop const unsigned int max_cycle = 200; const unsigned int max_cells = 50000; template -void test_isotropic (int type, std::ostream* logfile) +void test_isotropic (int type, std::ostream *logfile) { const RefinementCase ref_cases[7] = - {RefinementCase::cut_x, - RefinementCase(dim > 1 ? RefinementCase<2>::cut_y : RefinementCase<2>::no_refinement), - RefinementCase(dim > 1 ? RefinementCase<2>::cut_xy : RefinementCase<2>::no_refinement), - RefinementCase(dim > 2 ? RefinementCase<3>::cut_z : RefinementCase<3>::no_refinement), - RefinementCase(dim > 2 ? RefinementCase<3>::cut_xz : RefinementCase<3>::no_refinement), - RefinementCase(dim > 2 ? RefinementCase<3>::cut_yz : RefinementCase<3>::no_refinement), - RefinementCase(dim > 2 ? RefinementCase<3>::cut_xyz : RefinementCase<3>::no_refinement) - }; + { + RefinementCase::cut_x, + RefinementCase(dim > 1 ? RefinementCase<2>::cut_y : RefinementCase<2>::no_refinement), + RefinementCase(dim > 1 ? RefinementCase<2>::cut_xy : RefinementCase<2>::no_refinement), + RefinementCase(dim > 2 ? RefinementCase<3>::cut_z : RefinementCase<3>::no_refinement), + RefinementCase(dim > 2 ? RefinementCase<3>::cut_xz : RefinementCase<3>::no_refinement), + RefinementCase(dim > 2 ? RefinementCase<3>::cut_yz : RefinementCase<3>::no_refinement), + RefinementCase(dim > 2 ? RefinementCase<3>::cut_xyz : RefinementCase<3>::no_refinement) + }; Triangulation tria(Triangulation::allow_anisotropic_smoothing); if (type == 0) @@ -70,54 +71,54 @@ void test_isotropic (int type, std::ostream* logfile) GridGenerator::hyper_ball (tria); tria.refine_global(1); - + *logfile << "cycle: 0, number of cells: "<::active_cell_iterator cell = tria.begin_active(), - endc = tria.end(); + endc = tria.end(); for (unsigned int cycle=1; cycleset_refine_flag(ref_cases[rand()% - RefinementCase::isotropic_refinement]); - } - else - cell->set_coarsen_flag(); + if (rand()%5==0) + { + if (rand()%2==0) + cell->set_refine_flag(ref_cases[rand()% + RefinementCase::isotropic_refinement]); + } + else + cell->set_coarsen_flag(); tria.execute_coarsening_and_refinement(); if (!single_file) - { - // graphical output - GridOut grid_out; - GridOutFlags::Eps<2> eps2(GridOutFlags::EpsFlagsBase::width, - 300, .01, false, 5, false); - grid_out.set_flags (eps2); - std::ostringstream filename; - filename << "refine_and_coarsen_anisotropic/grid_" << type << "_" << cycle << ".eps"; - std::ofstream outfile(filename.str().c_str()); - grid_out.write_eps (tria, outfile); - } + { + // graphical output + GridOut grid_out; + GridOutFlags::Eps<2> eps2(GridOutFlags::EpsFlagsBase::width, + 300, .01, false, 5, false); + grid_out.set_flags (eps2); + std::ostringstream filename; + filename << "refine_and_coarsen_anisotropic/grid_" << type << "_" << cycle << ".eps"; + std::ofstream outfile(filename.str().c_str()); + grid_out.write_eps (tria, outfile); + } *logfile << "cycle: "< max_cells || cycle == max_cycle) - break; + break; } } - + int main () { - std::ostream* logfile; + std::ostream *logfile; if (single_file) logfile = new std::ofstream("refine_and_coarsen_anisotropic/output"); @@ -125,19 +126,19 @@ int main () logfile = &std::cout; *logfile< (0,logfile); *logfile<<"HyperBall:"< (1,logfile); - + *logfile< (0,logfile); diff --git a/tests/aniso/solution_transfer.cc b/tests/aniso/solution_transfer.cc index 374871e122..ad62b77dbc 100644 --- a/tests/aniso/solution_transfer.cc +++ b/tests/aniso/solution_transfer.cc @@ -42,17 +42,17 @@ template class MyFunction : public Function { - public: - MyFunction () : Function() {}; - - virtual double value (const Point &p, - const unsigned int) const - { - double ret_value=sin(p[0]*4)*cos(p[1]*4); - if (dim==3) - ret_value*=sin(5*p[2]+1); - return ret_value; - }; +public: + MyFunction () : Function() {}; + + virtual double value (const Point &p, + const unsigned int) const + { + double ret_value=sin(p[0]*4)*cos(p[1]*4); + if (dim==3) + ret_value*=sin(5*p[2]+1); + return ret_value; + }; }; @@ -68,7 +68,7 @@ void transfer(std::ostream &out) Vector solution; MappingQ1 mapping; DataOut data_out; - + dof_handler.distribute_dofs (fe); solution.reinit(dof_handler.n_dofs()); @@ -82,9 +82,9 @@ void transfer(std::ostream &out) SolutionTransfer soltrans(dof_handler); - // test a): pure refinement + // test a): pure refinement typename Triangulation::active_cell_iterator cell=tria.begin_active(), - endc=tria.end(); + endc=tria.end(); for (; cell!=endc; ++cell) cell->set_refine_flag(RefinementCase::cut_x); @@ -104,7 +104,7 @@ void transfer(std::ostream &out) deallog << "Interpolated/tranferred solution after pure refinement" << std::endl << std::endl; data_out.write_gnuplot (out); - // test b): with coarsening + // test b): with coarsening SolutionTransfer soltrans2(dof_handler); cell=tria.begin_active(tria.n_levels()-1); endc=tria.end(tria.n_levels()-1); @@ -135,7 +135,7 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + transfer<2>(logfile); transfer<3>(logfile); } diff --git a/tests/aniso/up_and_down.cc b/tests/aniso/up_and_down.cc index c2f1a17b69..453bcef29f 100644 --- a/tests/aniso/up_and_down.cc +++ b/tests/aniso/up_and_down.cc @@ -47,19 +47,19 @@ template Point transform (const Point p) { - switch (dim) + switch (dim) { - case 1: - return p; - case 2: - return Point(p(0)*(1+p(1)), p(1)*(1+p(0))); - case 3: - return Point(p(0)*(1+p(1))*(1+p(2)), - p(1)*(1+p(0))*(1+p(2)), - p(2)*(1+p(0))*(1+p(1))); - default: - Assert (false, ExcNotImplemented()); - return Point(); + case 1: + return p; + case 2: + return Point(p(0)*(1+p(1)), p(1)*(1+p(0))); + case 3: + return Point(p(0)*(1+p(1))*(1+p(2)), + p(1)*(1+p(0))*(1+p(2)), + p(2)*(1+p(0))*(1+p(1))); + default: + Assert (false, ExcNotImplemented()); + return Point(); }; } @@ -71,17 +71,17 @@ void check_element (const Triangulation &tr, DoFHandler dof_handler(tr); dof_handler.distribute_dofs (fe); - // create a mostly arbitrary - // function plus a trend on this - // grid + // create a mostly arbitrary + // function plus a trend on this + // grid Vector tmp(dof_handler.n_dofs()); for (unsigned int i=0; i x(tmp.size()); Vector v(fe.dofs_per_cell); for (typename DoFHandler::cell_iterator cell=dof_handler.begin(); @@ -89,24 +89,24 @@ void check_element (const Triangulation &tr, if (cell->has_children() && cell->child(0)->active()) { - // first make sure that what - // we do is reasonable. for - // this, _all_ children have - // to be active, not only - // some of them + // first make sure that what + // we do is reasonable. for + // this, _all_ children have + // to be active, not only + // some of them for (unsigned int c=0; cn_children(); ++c) Assert (cell->child(c)->active(), ExcInternalError()); - // then restrict and prolongate + // then restrict and prolongate cell->get_interpolated_dof_values (tmp, v); cell->set_dof_values_by_interpolation (v, x); }; - // now x is a function on the fine - // grid that is representable on - // the coarse grid. so another - // cycle should not alter it any - // more: + // now x is a function on the fine + // grid that is representable on + // the coarse grid. so another + // cycle should not alter it any + // more: Vector x2(x.size()); for (typename DoFHandler::cell_iterator cell=dof_handler.begin(); cell!=dof_handler.end(); ++cell) @@ -117,7 +117,7 @@ void check_element (const Triangulation &tr, cell->set_dof_values_by_interpolation (v, x2); }; - // then check that this is so: + // then check that this is so: x2 -= x; const double relative_residual = (x2.l2_norm() / x.l2_norm()); @@ -130,106 +130,108 @@ void check_element (const Triangulation &tr, template -void test () +void test () { const std::string ref_case_names[7]= - {"RefinementCase::cut_x", - "RefinementCase::cut_y", - "RefinementCase::cut_xy", - "RefinementCase::cut_z", - "RefinementCase::cut_xz", - "RefinementCase::cut_yz", - "RefinementCase::cut_xyz"}; - - const unsigned int n_ref_cases_for_dim[4]={0,1,3,7}; - - // now for a list of finite - // elements, for which we want to - // test. we happily waste tons of - // memory here, but who cares... + { + "RefinementCase::cut_x", + "RefinementCase::cut_y", + "RefinementCase::cut_xy", + "RefinementCase::cut_z", + "RefinementCase::cut_xz", + "RefinementCase::cut_yz", + "RefinementCase::cut_xyz" + }; + + const unsigned int n_ref_cases_for_dim[4]= {0,1,3,7}; + + // now for a list of finite + // elements, for which we want to + // test. we happily waste tons of + // memory here, but who cares... const FiniteElement *fe_list[] - = - { - // FE_DGQ - new FE_DGQ(0), - new FE_DGQ(1), - new FE_DGQ(2), - (dim<3 ? new FE_DGQ(3) : 0), - (dim<3 ? new FE_DGQ(4) : 0), - - // FE_DGP - new FE_DGP(0), - new FE_DGP(1), - new FE_DGP(2), - new FE_DGP(3), - - // some composed elements - // of increasing - // complexity, to check the - // logics by which the - // matrices of the composed - // elements are assembled - // from those of the base - // elements. - new FESystem (FE_DGQ(1), 2), - new FESystem (FE_DGP(1), 1, - FE_DGQ(2), 2), - new FESystem (FE_DGP(1), 2, - FE_DGQ(2), 2, - FE_DGP(0), 1), - new FESystem (FE_DGQ(1), 2, - FESystem (FE_DGQ(1), 2, - FE_DGP(2), 2, - FE_DGQ(2), 1), 2, - FE_DGP(0), 1), - new FESystem (FE_DGP(1), 2, - FESystem (FE_DGP(1), 2, - FE_DGQ(2), 2, - FESystem(FE_DGQ(0), - 3), - 1), 2, - FE_DGQ(0), 1), - - // some continuous FEs - new FE_Q(1), - new FE_Q(2), - new FESystem (FE_Q(1), 2), - new FESystem (FE_DGQ(1), 2, - FESystem (FE_Q(1), 2, - FE_Q(2), 1, - FE_DGP(2), 1), 2, - FE_Q(3),1) - }; + = + { + // FE_DGQ + new FE_DGQ(0), + new FE_DGQ(1), + new FE_DGQ(2), + (dim<3 ? new FE_DGQ(3) : 0), + (dim<3 ? new FE_DGQ(4) : 0), + + // FE_DGP + new FE_DGP(0), + new FE_DGP(1), + new FE_DGP(2), + new FE_DGP(3), + + // some composed elements + // of increasing + // complexity, to check the + // logics by which the + // matrices of the composed + // elements are assembled + // from those of the base + // elements. + new FESystem (FE_DGQ(1), 2), + new FESystem (FE_DGP(1), 1, + FE_DGQ(2), 2), + new FESystem (FE_DGP(1), 2, + FE_DGQ(2), 2, + FE_DGP(0), 1), + new FESystem (FE_DGQ(1), 2, + FESystem (FE_DGQ(1), 2, + FE_DGP(2), 2, + FE_DGQ(2), 1), 2, + FE_DGP(0), 1), + new FESystem (FE_DGP(1), 2, + FESystem (FE_DGP(1), 2, + FE_DGQ(2), 2, + FESystem(FE_DGQ(0), + 3), + 1), 2, + FE_DGQ(0), 1), + + // some continuous FEs + new FE_Q(1), + new FE_Q(2), + new FESystem (FE_Q(1), 2), + new FESystem (FE_DGQ(1), 2, + FESystem (FE_Q(1), 2, + FE_Q(2), 1, + FE_DGP(2), 1), 2, + FE_Q(3),1) + }; for (unsigned int j=0; j tr; GridGenerator::hyper_cube(tr, 0., 1.); Point (*p) (Point) = &transform; GridTools::transform (p, tr); tr.refine_global (1); typename Triangulation::active_cell_iterator cell=tr.begin_active(), - endc=tr.end(); + endc=tr.end(); for (; cell!=endc; ++cell) - cell->set_refine_flag(RefinementCase(j+1)); + cell->set_refine_flag(RefinementCase(j+1)); tr.execute_coarsening_and_refinement(); - - + + for (unsigned int i=0; i(); test<2>(); test<3>(); - + return 0; } diff --git a/tests/base/anisotropic_1.cc b/tests/base/anisotropic_1.cc index 7599728ec0..30746cd61e 100644 --- a/tests/base/anisotropic_1.cc +++ b/tests/base/anisotropic_1.cc @@ -35,79 +35,79 @@ using namespace Polynomials; template void check_poly(const Point &x, - const POLY1 &p, + const POLY1 &p, const POLY2 &q) { const unsigned int n = p.n(); - + std::vector values1 (n), values2 (n); std::vector > gradients1(n), gradients2(n); std::vector > second1(n), second2(n); - + p.compute (x, values1, gradients1, second1); q.compute (x, values2, gradients2, second2); - + for (unsigned int k=0; k 5.0E-16) - deallog << 'P' << k << ": values differ " << val1 << " != " - << values1[k] << std::endl; + deallog << 'P' << k << ": values differ " << val1 << " != " + << values1[k] << std::endl; double val2 = q.compute_value(k,x); if (std::fabs(val2 - values2[k]) > 5.0E-16) - deallog << 'Q' << k << ": values differ " << val2 << " != " - << values2[k] << std::endl; + deallog << 'Q' << k << ": values differ " << val2 << " != " + << values2[k] << std::endl; if (std::fabs(val2 - val1) > 5.0E-16) - deallog << "PQ" << k << ": values differ " << val1 << " != " - << val2 << std::endl; + deallog << "PQ" << k << ": values differ " << val1 << " != " + << val2 << std::endl; - // Check if compute_grad is ok + // Check if compute_grad is ok Tensor<1,dim> grad1 = p.compute_grad(k,x); if (grad1 != gradients1[k]) - deallog << 'P' << k << ": gradients differ " << grad1 << " != " - << gradients1[k] << std::endl; + deallog << 'P' << k << ": gradients differ " << grad1 << " != " + << gradients1[k] << std::endl; Tensor<1,dim> grad2 = q.compute_grad(k,x); if (grad2 != gradients2[k]) - deallog << 'Q' << k << ": gradients differ " << grad1 << " != " - << gradients2[k] << std::endl; + deallog << 'Q' << k << ": gradients differ " << grad1 << " != " + << gradients2[k] << std::endl; if (grad2 != grad1) - deallog << "PQ" << k << ": gradients differ " << grad1 << " != " - << grad2 << std::endl; - - // Check if compute_grad_grad is ok + deallog << "PQ" << k << ": gradients differ " << grad1 << " != " + << grad2 << std::endl; + + // Check if compute_grad_grad is ok Tensor<2,dim> grad_grad1 = p.compute_grad_grad(k,x); if (grad_grad1 != second1[k]) - deallog << 'P' << k << ": second derivatives differ " << grad_grad1 << " != " - << second1[k] << std::endl; + deallog << 'P' << k << ": second derivatives differ " << grad_grad1 << " != " + << second1[k] << std::endl; Tensor<2,dim> grad_grad2 = q.compute_grad_grad(k,x); if (grad_grad2 != second2[k]) - deallog << 'Q' << k << ": second derivatives differ " << grad_grad2 << " != " - << second2[k] << std::endl; + deallog << 'Q' << k << ": second derivatives differ " << grad_grad2 << " != " + << second2[k] << std::endl; if (grad_grad2 != grad_grad1) - deallog << "PQ" << k << ": second derivatives differ " << grad_grad1 << " != " - << grad_grad2 << std::endl; - - - // finally output values, - // gradients, etc, to make sure - // that they are not only - // consistent, but also - // correct. Multiply them - // somewhat to make them - // significant despite our - // two-post-dot-digits limit + deallog << "PQ" << k << ": second derivatives differ " << grad_grad1 << " != " + << grad_grad2 << std::endl; + + + // finally output values, + // gradients, etc, to make sure + // that they are not only + // consistent, but also + // correct. Multiply them + // somewhat to make them + // significant despite our + // two-post-dot-digits limit values1[k] *= std::pow(10., dim); gradients1[k] *= std::pow(10., dim); - + deallog << 'P' << k << "\t= " << values1[k] - << "\tgradient\t"; - for (unsigned int d=0;d &x, template void -check_tensor (const std::vector >& v, - const Point& x) +check_tensor (const std::vector > &v, + const Point &x) { TensorProductPolynomials p(v); std::vector > > pols (dim, v); AnisotropicPolynomials q(pols); - + check_poly (x, p, q); } void -check_dimensions (const std::vector >& p) +check_dimensions (const std::vector > &p) { deallog.push("1d"); check_tensor(p, Point<1>(.5)); @@ -154,16 +154,16 @@ int main() deallog.push("Lagrange"); std::vector > p; - for (unsigned int i=0;i<3;++i) + for (unsigned int i=0; i<3; ++i) p.push_back (LagrangeEquidistant(3, i)); check_dimensions(p); deallog.pop(); deallog.push("Legendre"); - + p.clear (); - for (unsigned int i=0;i<3;++i) + for (unsigned int i=0; i<3; ++i) p.push_back (Legendre(i)); check_dimensions(p); @@ -172,7 +172,7 @@ int main() deallog.push("Hierarchical"); p.clear (); - for (unsigned int i=0;i<3;++i) + for (unsigned int i=0; i<3; ++i) p.push_back (Hierarchical(i)); check_dimensions(p); diff --git a/tests/base/anisotropic_2.cc b/tests/base/anisotropic_2.cc index 1adbf72a85..500d013455 100644 --- a/tests/base/anisotropic_2.cc +++ b/tests/base/anisotropic_2.cc @@ -58,20 +58,22 @@ void print_2d (const AnisotropicPolynomials<2> &aniso) template -void check_2d () +void check_2d () { - // two checks with higher degree in - // x or y direction + // two checks with higher degree in + // x or y direction { PolVector pols[2] = { Pol::generate_complete_basis (3), - Pol::generate_complete_basis (1) }; + Pol::generate_complete_basis (1) + }; std::vector p(&pols[0], &pols[2]); AnisotropicPolynomials<2> aniso (p); print_2d (aniso); } { PolVector pols[2] = { Pol::generate_complete_basis (2), - Pol::generate_complete_basis (3) }; + Pol::generate_complete_basis (3) + }; std::vector p(&pols[0], &pols[2]); AnisotropicPolynomials<2> aniso (p); @@ -110,14 +112,15 @@ void print_3d (const AnisotropicPolynomials<3> &aniso) template -void check_3d () +void check_3d () { - // three checks with higher degree - // in x, y or z direction + // three checks with higher degree + // in x, y or z direction { PolVector pols[3] = { Pol::generate_complete_basis (3), Pol::generate_complete_basis (1), - Pol::generate_complete_basis (1) }; + Pol::generate_complete_basis (1) + }; std::vector p(&pols[0], &pols[3]); AnisotropicPolynomials<3> aniso (p); print_3d (aniso); @@ -125,7 +128,8 @@ void check_3d () { PolVector pols[3] = { Pol::generate_complete_basis (1), Pol::generate_complete_basis (3), - Pol::generate_complete_basis (1) }; + Pol::generate_complete_basis (1) + }; std::vector p(&pols[0], &pols[3]); AnisotropicPolynomials<3> aniso (p); print_3d (aniso); @@ -133,7 +137,8 @@ void check_3d () { PolVector pols[3] = { Pol::generate_complete_basis (1), Pol::generate_complete_basis (2), - Pol::generate_complete_basis (3) }; + Pol::generate_complete_basis (3) + }; std::vector p(&pols[0], &pols[3]); AnisotropicPolynomials<3> aniso (p); print_3d (aniso); @@ -143,7 +148,7 @@ void check_3d () template -void check () +void check () { check_2d (); check_3d (); diff --git a/tests/base/auto_derivative_function.cc b/tests/base/auto_derivative_function.cc index 6b3f1b7153..af85ba30dd 100644 --- a/tests/base/auto_derivative_function.cc +++ b/tests/base/auto_derivative_function.cc @@ -34,34 +34,34 @@ template class AutoSinExp: public AutoDerivativeFunction { - public: - AutoSinExp(); - virtual ~AutoSinExp() {} - - virtual double value (const Point &p, - const unsigned int component = 0) const; - - /** - * n_components=2. First - * component=0, second component - * filled by @p{value} function. - */ - virtual void vector_value (const Point &p, - Vector &values) const; +public: + AutoSinExp(); + virtual ~AutoSinExp() {} + + virtual double value (const Point &p, + const unsigned int component = 0) const; + + /** + * n_components=2. First + * component=0, second component + * filled by @p{value} function. + */ + virtual void vector_value (const Point &p, + Vector &values) const; }; template AutoSinExp::AutoSinExp(): - AutoDerivativeFunction(1e-6, 2) + AutoDerivativeFunction(1e-6, 2) {} template double AutoSinExp::value (const Point &p, - const unsigned int) const + const unsigned int) const { return std::sin(2*p(0))*std::exp(3*p(1)); } @@ -69,7 +69,7 @@ double AutoSinExp::value (const Point &p, template void AutoSinExp::vector_value (const Point &p, - Vector &values) const + Vector &values) const { Assert(values.size()==this->n_components, ExcDimensionMismatch(values.size(), this->n_components)); @@ -82,15 +82,15 @@ void AutoSinExp::vector_value (const Point &p, template class ExactSinExp: public AutoSinExp { - public: - ExactSinExp() {} - ~ExactSinExp() {} - - virtual Tensor<1,dim> gradient (const Point &p, - const unsigned int component = 0) const; - - virtual void vector_gradient (const Point &p, - typename std::vector > &gradients) const; +public: + ExactSinExp() {} + ~ExactSinExp() {} + + virtual Tensor<1,dim> gradient (const Point &p, + const unsigned int component = 0) const; + + virtual void vector_gradient (const Point &p, + typename std::vector > &gradients) const; }; @@ -98,7 +98,7 @@ class ExactSinExp: public AutoSinExp template Tensor<1,dim> ExactSinExp::gradient (const Point &p, - const unsigned int) const + const unsigned int) const { Tensor<1,dim> grad; grad[0]=2*std::cos(2*p(0))*std::exp(3*p(1)); @@ -109,11 +109,11 @@ Tensor<1,dim> ExactSinExp::gradient (const Point &p, template void ExactSinExp::vector_gradient (const Point &p, - typename std::vector > &gradients) const + typename std::vector > &gradients) const { Assert(gradients.size()==this->n_components, ExcDimensionMismatch(gradients.size(), this->n_components)); - + gradients[0].clear(); gradients[1]=gradient(p); } @@ -132,7 +132,7 @@ int main() ExactSinExp exact_function; Point p(0.23, 0.1); std::vector > ps(1, p); - + Tensor<1,dim> u_grad=exact_function.gradient(p); @@ -144,57 +144,57 @@ int main() auto_function.set_formula(formula); deallog << "order=" << order << ", formula=" << formula << std::endl; ConvergenceTable history; - + unsigned int factor=1; for (unsigned int i=0; i<6; ++i, factor*=2) - { - history.add_value("f", factor); - history.omit_column_from_convergence_rate_evaluation("f"); - - auto_function.set_h(h_base/factor); - - // Test of gradient function - Tensor<1,dim> a_grad=auto_function.gradient(p); - a_grad-=u_grad; - double value=std::sqrt(a_grad*a_grad); - history.add_value("grad", value); - history.set_scientific("grad", true); - history.set_precision("grad", 2); - - // Test of gradient_list - // function - std::vector > a_grads(1); - auto_function.gradient_list(ps, a_grads); - a_grads[0]-=u_grad; - value=std::sqrt(a_grads[0]*a_grads[0]); - history.add_value("grads[0]", value); - history.set_scientific("grads[0]", true); - history.set_precision("grads[0]", 2); - - // Test of vector_gradient - // function - std::vector > a_vgrad(2); - auto_function.vector_gradient(p, a_vgrad); - a_vgrad[1]-=u_grad; - value=std::sqrt(a_vgrad[1]*a_vgrad[1]); - history.add_value("vgrad[1]", value); - history.set_scientific("vgrad[1]", true); - history.set_precision("vgrad[1]", 2); - - // Test of - // vector_gradient_list - // function - std::vector > > - a_vgrads(1, std::vector > (2)); - auto_function.vector_gradient_list(ps, a_vgrads); - a_vgrads[0][1]-=u_grad; - value=std::sqrt(a_vgrads[0][1]*a_vgrads[0][1]); - history.add_value("vgrads[1]", value); - history.set_scientific("vgrads[1]", true); - history.set_precision("vgrads[1]", 2); - } + { + history.add_value("f", factor); + history.omit_column_from_convergence_rate_evaluation("f"); + + auto_function.set_h(h_base/factor); + + // Test of gradient function + Tensor<1,dim> a_grad=auto_function.gradient(p); + a_grad-=u_grad; + double value=std::sqrt(a_grad*a_grad); + history.add_value("grad", value); + history.set_scientific("grad", true); + history.set_precision("grad", 2); + + // Test of gradient_list + // function + std::vector > a_grads(1); + auto_function.gradient_list(ps, a_grads); + a_grads[0]-=u_grad; + value=std::sqrt(a_grads[0]*a_grads[0]); + history.add_value("grads[0]", value); + history.set_scientific("grads[0]", true); + history.set_precision("grads[0]", 2); + + // Test of vector_gradient + // function + std::vector > a_vgrad(2); + auto_function.vector_gradient(p, a_vgrad); + a_vgrad[1]-=u_grad; + value=std::sqrt(a_vgrad[1]*a_vgrad[1]); + history.add_value("vgrad[1]", value); + history.set_scientific("vgrad[1]", true); + history.set_precision("vgrad[1]", 2); + + // Test of + // vector_gradient_list + // function + std::vector > > + a_vgrads(1, std::vector > (2)); + auto_function.vector_gradient_list(ps, a_vgrads); + a_vgrads[0][1]-=u_grad; + value=std::sqrt(a_vgrads[0][1]*a_vgrads[0][1]); + history.add_value("vgrads[1]", value); + history.set_scientific("vgrads[1]", true); + history.set_precision("vgrads[1]", 2); + } history.evaluate_all_convergence_rates( - ConvergenceTable::reduction_rate); + ConvergenceTable::reduction_rate); history.write_text(deallog.get_file_stream()); } } diff --git a/tests/base/conditional_ostream.cc b/tests/base/conditional_ostream.cc index ea56fa9c4c..6e12f63f37 100644 --- a/tests/base/conditional_ostream.cc +++ b/tests/base/conditional_ostream.cc @@ -32,7 +32,7 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + ConditionalOStream o(logfile, true); o << "Yes" << std::endl; deallog << o.is_active() << std::endl; diff --git a/tests/base/convergence_table_01.cc b/tests/base/convergence_table_01.cc index f95557e0cf..a736b3bde6 100644 --- a/tests/base/convergence_table_01.cc +++ b/tests/base/convergence_table_01.cc @@ -40,17 +40,17 @@ int main () ConvergenceTable table_2; for (unsigned int i=1; i<=4; ++i) - { - table.add_value("error", 3.*i); - table.add_value("key", i); - table_2.add_value("error", std::pow(1./sqrt(i),4.)); - table_2.add_value("key", i); - } + { + table.add_value("error", 3.*i); + table.add_value("key", i); + table_2.add_value("error", std::pow(1./sqrt(i),4.)); + table_2.add_value("key", i); + } table.evaluate_convergence_rates("error", "key", ConvergenceTable::reduction_rate); table_2.evaluate_convergence_rates("error", "key", ConvergenceTable::reduction_rate_log2); - // output + // output table.write_text(deallog.get_file_stream()); table_2.write_text(deallog.get_file_stream()); } diff --git a/tests/base/convergence_table_02.cc b/tests/base/convergence_table_02.cc index b91314f954..f2dad06233 100644 --- a/tests/base/convergence_table_02.cc +++ b/tests/base/convergence_table_02.cc @@ -26,7 +26,7 @@ #include #include -// test the method evaluate_all_convergence_rates with argument reference_column_key, +// test the method evaluate_all_convergence_rates with argument reference_column_key, int main () { @@ -38,16 +38,16 @@ int main () ConvergenceTable table; for (unsigned int i=1; i<=4; ++i) - { - table.add_value("error", 1./sqrt(i)); - table.add_value("error2", std::pow(1./sqrt(i),2.)); - table.add_value("error3", std::pow(1./sqrt(i),3.)); - table.add_value("error4", std::pow(1./sqrt(i),4.)); - table.add_value("key", i); - } + { + table.add_value("error", 1./sqrt(i)); + table.add_value("error2", std::pow(1./sqrt(i),2.)); + table.add_value("error3", std::pow(1./sqrt(i),3.)); + table.add_value("error4", std::pow(1./sqrt(i),4.)); + table.add_value("key", i); + } table.omit_column_from_convergence_rate_evaluation ( "key" ); table.evaluate_all_convergence_rates("key", ConvergenceTable::reduction_rate_log2); - // output + // output table.write_text(deallog.get_file_stream()); } diff --git a/tests/base/convergence_table_03.cc b/tests/base/convergence_table_03.cc index add19af9a4..71a775928a 100644 --- a/tests/base/convergence_table_03.cc +++ b/tests/base/convergence_table_03.cc @@ -40,16 +40,16 @@ int main () table.set_auto_fill_mode (true); for (unsigned int i=1; i<=4; ++i) - { - table.add_value("error", 1./sqrt(i)); - table.add_value("error2", std::pow(1./sqrt(i),2.)); - table.add_value("error3", std::pow(1./sqrt(i),3.)); - table.add_value("error4", std::pow(1./sqrt(i),4.)); - table.add_value("key", i); - } + { + table.add_value("error", 1./sqrt(i)); + table.add_value("error2", std::pow(1./sqrt(i),2.)); + table.add_value("error3", std::pow(1./sqrt(i),3.)); + table.add_value("error4", std::pow(1./sqrt(i),4.)); + table.add_value("key", i); + } table.omit_column_from_convergence_rate_evaluation ( "key" ); table.evaluate_all_convergence_rates("key", ConvergenceTable::reduction_rate_log2); - // output + // output table.write_text(deallog.get_file_stream()); } diff --git a/tests/base/convergence_table_04.cc b/tests/base/convergence_table_04.cc index 232e308d43..31666ca791 100644 --- a/tests/base/convergence_table_04.cc +++ b/tests/base/convergence_table_04.cc @@ -58,7 +58,7 @@ int main () table_1.add_value("n_cells", 96); table_1.add_value("error", 2.274e-06); table_1.add_value("n_cells", 128); - table_1.add_value("error", 9.597e-07); + table_1.add_value("error", 9.597e-07); table_1.set_scientific("error", true); table_1.evaluate_convergence_rates("error", "n_cells", ConvergenceTable::reduction_rate); table_1.evaluate_convergence_rates("error", "n_cells", ConvergenceTable::reduction_rate_log2, 1); diff --git a/tests/base/data_out_base.cc b/tests/base/data_out_base.cc index 2fa3687fd3..e31b508051 100644 --- a/tests/base/data_out_base.cc +++ b/tests/base/data_out_base.cc @@ -27,13 +27,13 @@ //TODO: Several functions are commented out since implementations are missing #define WRITE(type) { out << "Writing " # type " dimensions " \ -<< dim << ',' << spacedim << std::endl; \ -DataOutBase::write_ ## type (patches, names, vectors, type ## flags, out); } + << dim << ',' << spacedim << std::endl; \ + DataOutBase::write_ ## type (patches, names, vectors, type ## flags, out); } template void -write_patches(const std::vector >& patches, - std::ostream& out) +write_patches(const std::vector > &patches, + std::ostream &out) { std::vector names(2); names[0] = std::string("first name"); @@ -67,9 +67,9 @@ write_patches(const std::vector >& patches, template struct PatchInfo { - static double vertices[GeometryInfo::vertices_per_cell][3]; - static double offsets[GeometryInfo::vertices_per_cell][3]; - static int neighbors[GeometryInfo::vertices_per_cell][GeometryInfo::faces_per_cell]; + static double vertices[GeometryInfo::vertices_per_cell][3]; + static double offsets[GeometryInfo::vertices_per_cell][3]; + static int neighbors[GeometryInfo::vertices_per_cell][GeometryInfo::faces_per_cell]; }; @@ -164,43 +164,43 @@ double PatchInfo<3>::offsets[8][3] template void -create_patches(std::vector >& patches) +create_patches(std::vector > &patches) { const unsigned int ncells = GeometryInfo::vertices_per_cell; const unsigned int nsub = 3; patches.resize(ncells); - for (unsigned int c = 0; c < ncells;++c) + for (unsigned int c = 0; c < ncells; ++c) { - DataOutBase::Patch& p = patches[c]; + DataOutBase::Patch &p = patches[c]; p.patch_index = c; p.n_subdivisions = nsub; - for (unsigned int i=0;i::vertices[i][j] - + PatchInfo::offsets[c][j]; + for (unsigned int i=0; i::vertices[i][j] + + PatchInfo::offsets[c][j]; - for (unsigned int i=0;i::faces_per_cell;++i) - p.neighbors[i] = (unsigned int) PatchInfo::neighbors[c][i]; + for (unsigned int i=0; i::faces_per_cell; ++i) + p.neighbors[i] = (unsigned int) PatchInfo::neighbors[c][i]; unsigned int ndata = 1; - for (unsigned int i=0;i -void test(std::ostream& out) +void test(std::ostream &out) { std::vector > patches; create_patches(patches); diff --git a/tests/base/data_out_base_dx.cc b/tests/base/data_out_base_dx.cc index 7b1538ef67..59e4c20d05 100644 --- a/tests/base/data_out_base_dx.cc +++ b/tests/base/data_out_base_dx.cc @@ -36,14 +36,14 @@ template void check(DataOutBase::DXFlags flags, - std::ostream& out) + std::ostream &out) { const unsigned int np = 4; - + std::vector > patches(np); - + create_patches(patches); - + std::vector names(5); names[0] = "x1"; names[1] = "x2"; @@ -59,14 +59,14 @@ void check(DataOutBase::DXFlags flags, template void check_cont(unsigned int ncells, - unsigned int nsub, - DataOutBase::DXFlags flags, - std::ostream& out) + unsigned int nsub, + DataOutBase::DXFlags flags, + std::ostream &out) { std::vector > patches; - + create_continuous_patches(patches, ncells, nsub); - + std::vector names(1); names[0] = "CutOff"; std::vector > vectors; @@ -75,85 +75,91 @@ void check_cont(unsigned int ncells, template -void check_all(std::ostream& log) +void check_all(std::ostream &log) { #if SEPARATE_FILES == 0 - std::ostream& out = log; + std::ostream &out = log; #endif - + char name[100]; - const char* format = "data_out_base_dx/%d%d%s.dx"; + const char *format = "data_out_base_dx/%d%d%s.dx"; DataOutBase::DXFlags flags(false, false, false, false); - if (dim == 2 && spacedim == 2) { - sprintf(name, format, dim, spacedim, "ffffcont"); + if (dim == 2 && spacedim == 2) + { + sprintf(name, format, dim, spacedim, "ffffcont"); #if SEPARATE_FILES==1 - std::ofstream out(name); + std::ofstream out(name); #else - out << "==============================\n" - << name - << "\n==============================\n"; + out << "==============================\n" + << name + << "\n==============================\n"; #endif - check_cont(4,4,flags, out); - } - if (true) { - sprintf(name, format, dim, spacedim, "ffff"); + check_cont(4,4,flags, out); + } + if (true) + { + sprintf(name, format, dim, spacedim, "ffff"); #if SEPARATE_FILES==1 - std::ofstream out(name); + std::ofstream out(name); #else - out << "==============================\n" - << name - << "\n==============================\n"; + out << "==============================\n" + << name + << "\n==============================\n"; #endif - check(flags, out); - } + check(flags, out); + } flags.int_binary = true; - if (true) { - sprintf(name, format, dim, spacedim, "tfff"); + if (true) + { + sprintf(name, format, dim, spacedim, "tfff"); #if SEPARATE_FILES==1 - std::ofstream out(name); + std::ofstream out(name); #else - out << "==============================\n" - << name - << "\n==============================\n"; + out << "==============================\n" + << name + << "\n==============================\n"; #endif - check(flags, out); - } + check(flags, out); + } flags.coordinates_binary = true; - if (true) { - sprintf(name, format, dim, spacedim, "ttff"); + if (true) + { + sprintf(name, format, dim, spacedim, "ttff"); #if SEPARATE_FILES==1 - std::ofstream out(name); + std::ofstream out(name); #else - out << "==============================\n" - << name - << "\n==============================\n"; + out << "==============================\n" + << name + << "\n==============================\n"; #endif - check(flags, out); - } + check(flags, out); + } flags.data_binary = true; - if (true) { - sprintf(name, format, dim, spacedim, "tttf"); + if (true) + { + sprintf(name, format, dim, spacedim, "tttf"); #if SEPARATE_FILES==1 - std::ofstream out(name); + std::ofstream out(name); #else - out << "==============================\n" - << name - << "\n==============================\n"; + out << "==============================\n" + << name + << "\n==============================\n"; #endif - check(flags, out); - } + check(flags, out); + } flags.data_double = true; - if (true) { - sprintf(name, format, dim, spacedim, "tttf"); + if (true) + { + sprintf(name, format, dim, spacedim, "tttf"); #if SEPARATE_FILES==1 - std::ofstream out(name); + std::ofstream out(name); #else - out << "==============================\n" - << name - << "\n==============================\n"; + out << "==============================\n" + << name + << "\n==============================\n"; #endif - check(flags, out); - } + check(flags, out); + } } int main() @@ -163,5 +169,5 @@ int main() check_all<1,2>(logfile); check_all<2,2>(logfile); check_all<2,3>(logfile); - check_all<3,3>(logfile); + check_all<3,3>(logfile); } diff --git a/tests/base/data_out_base_eps.cc b/tests/base/data_out_base_eps.cc index 6590d10f03..c993d53a9e 100644 --- a/tests/base/data_out_base_eps.cc +++ b/tests/base/data_out_base_eps.cc @@ -36,14 +36,14 @@ template void check(DataOutBase::EpsFlags flags, - std::ostream& out) + std::ostream &out) { const unsigned int np = 4; - + std::vector > patches(np); - + create_patches(patches); - + std::vector names(5); names[0] = "x1"; names[1] = "x2"; @@ -57,14 +57,14 @@ void check(DataOutBase::EpsFlags flags, template void check_cont(unsigned int ncells, - unsigned int nsub, - DataOutBase::EpsFlags flags, - std::ostream& out) + unsigned int nsub, + DataOutBase::EpsFlags flags, + std::ostream &out) { std::vector > patches; - + create_continuous_patches(patches, ncells, nsub); - + std::vector names(1); names[0] = "CutOff"; std::vector > vectors; @@ -73,14 +73,14 @@ void check_cont(unsigned int ncells, template -void check_all(std::ostream& log) +void check_all(std::ostream &log) { #if SEPARATE_FILES == 0 - std::ostream& out = log; + std::ostream &out = log; #endif - + char name[100]; - const char* format = "data_out_base_eps/%d%d%d%s.eps"; + const char *format = "data_out_base_eps/%d%d%d%s.eps"; DataOutBase::EpsFlags flags; if (true) @@ -90,24 +90,24 @@ void check_all(std::ostream& log) std::ofstream out(name); #else out << "==============================\n" - << name - << "\n==============================\n"; + << name + << "\n==============================\n"; #endif check_cont(4, 4, flags, out); } - for (unsigned int i=0;i<5;++i) + for (unsigned int i=0; i<5; ++i) { flags.height_vector = i; flags.color_vector = i; - + sprintf(name, format, dim, spacedim, i, ""); #if SEPARATE_FILES==1 std::ofstream out(name); #else - out << "==============================\n" - << name - << "\n==============================\n"; + out << "==============================\n" + << name + << "\n==============================\n"; #endif check(flags, out); } @@ -120,5 +120,5 @@ int main() // check_all<1,2>(logfile); check_all<2,2>(logfile); check_all<2,3>(logfile); -// check_all<3,3>(logfile); +// check_all<3,3>(logfile); } diff --git a/tests/base/data_out_base_gmv.cc b/tests/base/data_out_base_gmv.cc index 28af169f37..7c67694ad6 100644 --- a/tests/base/data_out_base_gmv.cc +++ b/tests/base/data_out_base_gmv.cc @@ -35,14 +35,14 @@ template void check(DataOutBase::GmvFlags flags, - std::ostream& out) + std::ostream &out) { const unsigned int np = 4; - + std::vector > patches(np); - + create_patches(patches); - + std::vector names(5); names[0] = "x1"; names[1] = "x2"; @@ -55,25 +55,26 @@ void check(DataOutBase::GmvFlags flags, template -void check_all(std::ostream& log) +void check_all(std::ostream &log) { #if SEPARATE_FILES == 0 - std::ostream& out = log; + std::ostream &out = log; #endif - + char name[100]; DataOutBase::GmvFlags flags; - if (true) { - sprintf(name, "data_out_base_gmv/%d%d.gmv", dim, spacedim); + if (true) + { + sprintf(name, "data_out_base_gmv/%d%d.gmv", dim, spacedim); #if SEPARATE_FILES==1 - std::ofstream out(name); + std::ofstream out(name); #else - out << "==============================\n" - << name - << "\n==============================\n"; + out << "==============================\n" + << name + << "\n==============================\n"; #endif - check(flags, out); - } + check(flags, out); + } } int main() diff --git a/tests/base/data_out_base_gnuplot.cc b/tests/base/data_out_base_gnuplot.cc index f3c2da3ad3..849c8d5cc2 100644 --- a/tests/base/data_out_base_gnuplot.cc +++ b/tests/base/data_out_base_gnuplot.cc @@ -34,14 +34,14 @@ template void check(DataOutBase::GnuplotFlags flags, - std::ostream& out) + std::ostream &out) { const unsigned int np = 4; - + std::vector > patches(np); - + create_patches(patches); - + std::vector names(5); names[0] = "x1"; names[1] = "x2"; @@ -54,24 +54,24 @@ void check(DataOutBase::GnuplotFlags flags, template -void check_all(std::ostream& log) +void check_all(std::ostream &log) { #if SEPARATE_FILES == 0 - std::ostream& out = log; + std::ostream &out = log; #endif - + char name[100]; - const char* format = "data_out_base_gnuplot/%d%d.gnuplot"; + const char *format = "data_out_base_gnuplot/%d%d.gnuplot"; DataOutBase::GnuplotFlags flags; - for (unsigned int i=0;i<5;++i) + for (unsigned int i=0; i<5; ++i) { sprintf(name, format, dim, spacedim, ""); #if SEPARATE_FILES==1 std::ofstream out(name); #else - out << "==============================\n" - << name - << "\n==============================\n"; + out << "==============================\n" + << name + << "\n==============================\n"; #endif check(flags, out); } @@ -84,5 +84,5 @@ int main() check_all<1,2>(logfile); check_all<2,2>(logfile); check_all<2,3>(logfile); - check_all<3,3>(logfile); + check_all<3,3>(logfile); } diff --git a/tests/base/data_out_base_povray.cc b/tests/base/data_out_base_povray.cc index a364d14e7c..1eb125d2ed 100644 --- a/tests/base/data_out_base_povray.cc +++ b/tests/base/data_out_base_povray.cc @@ -36,14 +36,14 @@ template void check(DataOutBase::PovrayFlags flags, - std::ostream& out) + std::ostream &out) { const unsigned int np = 4; - + std::vector > patches(np); - + create_patches(patches); - + std::vector names(5); names[0] = "x1"; names[1] = "x2"; @@ -57,14 +57,14 @@ void check(DataOutBase::PovrayFlags flags, template void check_cont(unsigned int ncells, - unsigned int nsub, - DataOutBase::PovrayFlags flags, - std::ostream& out) + unsigned int nsub, + DataOutBase::PovrayFlags flags, + std::ostream &out) { std::vector > patches; - + create_continuous_patches(patches, ncells, nsub); - + std::vector names(1); names[0] = "CutOff"; std::vector > vectors; @@ -73,12 +73,12 @@ void check_cont(unsigned int ncells, template -void check_all(std::ostream& log) +void check_all(std::ostream &log) { #if SEPARATE_FILES == 0 - std::ostream& out = log; + std::ostream &out = log; #endif - + char name[100]; // const char* format = "data_out_base_povray/%d%d%d%s.pov"; DataOutBase::PovrayFlags flags; @@ -90,12 +90,12 @@ void check_all(std::ostream& log) std::ofstream out(name); #else out << "==============================\n" - << name - << "\n==============================\n"; + << name + << "\n==============================\n"; #endif check_cont(4, 4, flags, out); } - + flags.external_data = true; if (true) { @@ -104,8 +104,8 @@ void check_all(std::ostream& log) std::ofstream out(name); #else out << "==============================\n" - << name - << "\n==============================\n"; + << name + << "\n==============================\n"; #endif check_cont(4, 4, flags, out); } @@ -118,12 +118,12 @@ void check_all(std::ostream& log) std::ofstream out(name); #else out << "==============================\n" - << name - << "\n==============================\n"; + << name + << "\n==============================\n"; #endif check_cont(4, 4, flags, out); } - + flags.bicubic_patch = true; if (true) { @@ -132,8 +132,8 @@ void check_all(std::ostream& log) std::ofstream out(name); #else out << "==============================\n" - << name - << "\n==============================\n"; + << name + << "\n==============================\n"; #endif check_cont(4, 3, flags, out); } @@ -146,5 +146,5 @@ int main() // check_all<1,2>(logfile); check_all<2,2>(logfile); check_all<2,3>(logfile); -// check_all<3,3>(logfile); +// check_all<3,3>(logfile); } diff --git a/tests/base/data_out_base_pvd.cc b/tests/base/data_out_base_pvd.cc index 82f92cb5e6..2a9d144a67 100644 --- a/tests/base/data_out_base_pvd.cc +++ b/tests/base/data_out_base_pvd.cc @@ -36,24 +36,24 @@ std::vector > patches; class DataOutX : public DataOutInterface<2,2> { - virtual - const std::vector< ::DataOutBase::Patch<2,2> > & - get_patches () const - { - return patches; - } - - virtual - std::vector - get_dataset_names () const - { - return std::vector(); - } + virtual + const std::vector< ::DataOutBase::Patch<2,2> > & + get_patches () const + { + return patches; + } + + virtual + std::vector + get_dataset_names () const + { + return std::vector(); + } }; template -void check(std::ostream& out) +void check(std::ostream &out) { std::vector > names(5); names[0] = std::make_pair(0,"x1"); diff --git a/tests/base/data_out_base_pvtu.cc b/tests/base/data_out_base_pvtu.cc index 639e4d1cf7..4715dbe084 100644 --- a/tests/base/data_out_base_pvtu.cc +++ b/tests/base/data_out_base_pvtu.cc @@ -37,24 +37,24 @@ std::vector names; class DataOutX : public DataOutInterface<2,2> { - virtual - const std::vector< ::DataOutBase::Patch<2,2> > & - get_patches () const - { - return patches; - } - - virtual - std::vector - get_dataset_names () const - { - return names; - } + virtual + const std::vector< ::DataOutBase::Patch<2,2> > & + get_patches () const + { + return patches; + } + + virtual + std::vector + get_dataset_names () const + { + return names; + } }; template -void check(std::ostream& out) +void check(std::ostream &out) { names.resize (5); names[0] = "x1"; diff --git a/tests/base/data_out_base_tecplot.cc b/tests/base/data_out_base_tecplot.cc index 2026f888ed..7294d43b2d 100644 --- a/tests/base/data_out_base_tecplot.cc +++ b/tests/base/data_out_base_tecplot.cc @@ -35,14 +35,14 @@ template void check(DataOutBase::TecplotFlags flags, - std::ostream& out) + std::ostream &out) { const unsigned int np = 4; - + std::vector > patches(np); - + create_patches(patches); - + std::vector names(5); names[0] = "x1"; names[1] = "x2"; @@ -55,31 +55,32 @@ void check(DataOutBase::TecplotFlags flags, template -void check_all(std::ostream& log) +void check_all(std::ostream &log) { #if SEPARATE_FILES == 0 - std::ostream& out = log; + std::ostream &out = log; #endif - + char name[100]; DataOutBase::TecplotFlags flags; - if (true) { - sprintf(name, "data_out_base_tecplot/%d%d.tecplot", dim, spacedim); + if (true) + { + sprintf(name, "data_out_base_tecplot/%d%d.tecplot", dim, spacedim); #if SEPARATE_FILES==1 - std::ofstream out(name); + std::ofstream out(name); #else - out << "==============================\n" - << name - << "\n==============================\n"; + out << "==============================\n" + << name + << "\n==============================\n"; #endif - check(flags, out); - } + check(flags, out); + } } int main() { std::ofstream logfile("data_out_base_tecplot/output", - std::ios_base::trunc | std::ios_base::binary); + std::ios_base::trunc | std::ios_base::binary); check_all<1,1>(logfile); check_all<1,2>(logfile); check_all<2,2>(logfile); diff --git a/tests/base/data_out_base_tecplot_bin.cc b/tests/base/data_out_base_tecplot_bin.cc index 816d9d0626..5825318924 100644 --- a/tests/base/data_out_base_tecplot_bin.cc +++ b/tests/base/data_out_base_tecplot_bin.cc @@ -32,14 +32,14 @@ template void check(DataOutBase::TecplotFlags flags, - std::ostream& out) + std::ostream &out) { const unsigned int np = 4; - + std::vector > patches(np); - + create_patches(patches); - + std::vector names(5); names[0] = "x1"; names[1] = "x2"; @@ -56,12 +56,13 @@ void check_all() { char name[100]; DataOutBase::TecplotFlags flags; - if (true) { - sprintf(name, "data_out_base_tecplot_bin/%d%d.tecplot", dim, spacedim); - flags.tecplot_binary_file_name=name; - - check(flags, deallog.get_file_stream()); - } + if (true) + { + sprintf(name, "data_out_base_tecplot_bin/%d%d.tecplot", dim, spacedim); + flags.tecplot_binary_file_name=name; + + check(flags, deallog.get_file_stream()); + } } int main() diff --git a/tests/base/data_out_base_vtk.cc b/tests/base/data_out_base_vtk.cc index 80c0aefa23..5845cc6ae9 100644 --- a/tests/base/data_out_base_vtk.cc +++ b/tests/base/data_out_base_vtk.cc @@ -35,14 +35,14 @@ template void check(DataOutBase::VtkFlags flags, - std::ostream& out) + std::ostream &out) { const unsigned int np = 4; - + std::vector > patches(np); - + create_patches(patches); - + std::vector names(5); names[0] = "x1"; names[1] = "x2"; @@ -55,25 +55,26 @@ void check(DataOutBase::VtkFlags flags, template -void check_all(std::ostream& log) +void check_all(std::ostream &log) { #if SEPARATE_FILES == 0 - std::ostream& out = log; + std::ostream &out = log; #endif - + char name[100]; DataOutBase::VtkFlags flags; - if (true) { - sprintf(name, "data_out_base_vtk/%d%d.vtk", dim, spacedim); + if (true) + { + sprintf(name, "data_out_base_vtk/%d%d.vtk", dim, spacedim); #if SEPARATE_FILES==1 - std::ofstream out(name); + std::ofstream out(name); #else - out << "==============================\n" - << name - << "\n==============================\n"; + out << "==============================\n" + << name + << "\n==============================\n"; #endif - check(flags, out); - } + check(flags, out); + } } int main() diff --git a/tests/base/data_out_base_vtk_cycle.cc b/tests/base/data_out_base_vtk_cycle.cc index ea4e41a413..bdca62d055 100644 --- a/tests/base/data_out_base_vtk_cycle.cc +++ b/tests/base/data_out_base_vtk_cycle.cc @@ -38,14 +38,14 @@ template void check(DataOutBase::VtkFlags flags, - std::ostream& out) + std::ostream &out) { const unsigned int np = 4; - + std::vector > patches(np); - + create_patches(patches); - + std::vector names(5); names[0] = "x1"; names[1] = "x2"; @@ -58,28 +58,29 @@ void check(DataOutBase::VtkFlags flags, template -void check_all(std::ostream& log) +void check_all(std::ostream &log) { #if SEPARATE_FILES == 0 - std::ostream& out = log; + std::ostream &out = log; #endif - + char name[100]; DataOutBase::VtkFlags flags; flags.cycle = 42; - - if (true) { - sprintf(name, "data_out_base_vtk_cycle/%d%d.vtk", dim, spacedim); + + if (true) + { + sprintf(name, "data_out_base_vtk_cycle/%d%d.vtk", dim, spacedim); #if SEPARATE_FILES==1 - std::ofstream out(name); + std::ofstream out(name); #else - out << "==============================\n" - << name - << "\n==============================\n"; + out << "==============================\n" + << name + << "\n==============================\n"; #endif - check(flags, out); - } + check(flags, out); + } } int main() diff --git a/tests/base/data_out_base_vtk_time.cc b/tests/base/data_out_base_vtk_time.cc index e993beffed..7f42523a59 100644 --- a/tests/base/data_out_base_vtk_time.cc +++ b/tests/base/data_out_base_vtk_time.cc @@ -38,14 +38,14 @@ template void check(DataOutBase::VtkFlags flags, - std::ostream& out) + std::ostream &out) { const unsigned int np = 4; - + std::vector > patches(np); - + create_patches(patches); - + std::vector names(5); names[0] = "x1"; names[1] = "x2"; @@ -58,28 +58,29 @@ void check(DataOutBase::VtkFlags flags, template -void check_all(std::ostream& log) +void check_all(std::ostream &log) { #if SEPARATE_FILES == 0 - std::ostream& out = log; + std::ostream &out = log; #endif - + char name[100]; DataOutBase::VtkFlags flags; flags.time = numbers::PI; - - if (true) { - sprintf(name, "data_out_base_vtk_time/%d%d.vtk", dim, spacedim); + + if (true) + { + sprintf(name, "data_out_base_vtk_time/%d%d.vtk", dim, spacedim); #if SEPARATE_FILES==1 - std::ofstream out(name); + std::ofstream out(name); #else - out << "==============================\n" - << name - << "\n==============================\n"; + out << "==============================\n" + << name + << "\n==============================\n"; #endif - check(flags, out); - } + check(flags, out); + } } int main() diff --git a/tests/base/data_out_base_vtk_time_and_cycle.cc b/tests/base/data_out_base_vtk_time_and_cycle.cc index 5ba7d69cf7..7a9f0fbba1 100644 --- a/tests/base/data_out_base_vtk_time_and_cycle.cc +++ b/tests/base/data_out_base_vtk_time_and_cycle.cc @@ -38,14 +38,14 @@ template void check(DataOutBase::VtkFlags flags, - std::ostream& out) + std::ostream &out) { const unsigned int np = 4; - + std::vector > patches(np); - + create_patches(patches); - + std::vector names(5); names[0] = "x1"; names[1] = "x2"; @@ -58,29 +58,30 @@ void check(DataOutBase::VtkFlags flags, template -void check_all(std::ostream& log) +void check_all(std::ostream &log) { #if SEPARATE_FILES == 0 - std::ostream& out = log; + std::ostream &out = log; #endif - + char name[100]; DataOutBase::VtkFlags flags; flags.time = numbers::PI; flags.cycle = 42; - - if (true) { - sprintf(name, "data_out_base_vtk_time_and_cycle/%d%d.vtk", dim, spacedim); + + if (true) + { + sprintf(name, "data_out_base_vtk_time_and_cycle/%d%d.vtk", dim, spacedim); #if SEPARATE_FILES==1 - std::ofstream out(name); + std::ofstream out(name); #else - out << "==============================\n" - << name - << "\n==============================\n"; + out << "==============================\n" + << name + << "\n==============================\n"; #endif - check(flags, out); - } + check(flags, out); + } } int main() diff --git a/tests/base/data_out_base_vtu.cc b/tests/base/data_out_base_vtu.cc index ba43d9e808..030df7bb9f 100644 --- a/tests/base/data_out_base_vtu.cc +++ b/tests/base/data_out_base_vtu.cc @@ -35,7 +35,7 @@ template void check(DataOutBase::VtkFlags flags, - std::ostream& out) + std::ostream &out) { const unsigned int np = 4; @@ -55,25 +55,26 @@ void check(DataOutBase::VtkFlags flags, template -void check_all(std::ostream& log) +void check_all(std::ostream &log) { #if SEPARATE_FILES == 0 - std::ostream& out = log; + std::ostream &out = log; #endif char name[100]; DataOutBase::VtkFlags flags; - if (true) { - sprintf(name, "data_out_base_vtu/%d%d.vtu", dim, spacedim); + if (true) + { + sprintf(name, "data_out_base_vtu/%d%d.vtu", dim, spacedim); #if SEPARATE_FILES==1 - std::ofstream out(name); + std::ofstream out(name); #else - out << "==============================\n" - << name - << "\n==============================\n"; + out << "==============================\n" + << name + << "\n==============================\n"; #endif - check(flags, out); - } + check(flags, out); + } } int main() diff --git a/tests/base/data_out_base_vtu_cycle.cc b/tests/base/data_out_base_vtu_cycle.cc index 6d4fb95542..8c5b24cbfd 100644 --- a/tests/base/data_out_base_vtu_cycle.cc +++ b/tests/base/data_out_base_vtu_cycle.cc @@ -37,7 +37,7 @@ template void check(DataOutBase::VtkFlags flags, - std::ostream& out) + std::ostream &out) { const unsigned int np = 4; @@ -57,10 +57,10 @@ void check(DataOutBase::VtkFlags flags, template -void check_all(std::ostream& log) +void check_all(std::ostream &log) { #if SEPARATE_FILES == 0 - std::ostream& out = log; + std::ostream &out = log; #endif char name[100]; @@ -68,17 +68,18 @@ void check_all(std::ostream& log) flags.cycle = 42; - if (true) { - sprintf(name, "data_out_base_vtu_cycle/%d%d.vtu", dim, spacedim); + if (true) + { + sprintf(name, "data_out_base_vtu_cycle/%d%d.vtu", dim, spacedim); #if SEPARATE_FILES==1 - std::ofstream out(name); + std::ofstream out(name); #else - out << "==============================\n" - << name - << "\n==============================\n"; + out << "==============================\n" + << name + << "\n==============================\n"; #endif - check(flags, out); - } + check(flags, out); + } } int main() diff --git a/tests/base/data_out_base_vtu_time.cc b/tests/base/data_out_base_vtu_time.cc index fe5bbca156..48615e6ce6 100644 --- a/tests/base/data_out_base_vtu_time.cc +++ b/tests/base/data_out_base_vtu_time.cc @@ -37,7 +37,7 @@ template void check(DataOutBase::VtkFlags flags, - std::ostream& out) + std::ostream &out) { const unsigned int np = 4; @@ -57,28 +57,29 @@ void check(DataOutBase::VtkFlags flags, template -void check_all(std::ostream& log) +void check_all(std::ostream &log) { #if SEPARATE_FILES == 0 - std::ostream& out = log; + std::ostream &out = log; #endif char name[100]; DataOutBase::VtkFlags flags; flags.time = numbers::PI; - - if (true) { - sprintf(name, "data_out_base_vtu_time/%d%d.vtu", dim, spacedim); + + if (true) + { + sprintf(name, "data_out_base_vtu_time/%d%d.vtu", dim, spacedim); #if SEPARATE_FILES==1 - std::ofstream out(name); + std::ofstream out(name); #else - out << "==============================\n" - << name - << "\n==============================\n"; + out << "==============================\n" + << name + << "\n==============================\n"; #endif - check(flags, out); - } + check(flags, out); + } } int main() diff --git a/tests/base/data_out_base_vtu_time_and_cycle.cc b/tests/base/data_out_base_vtu_time_and_cycle.cc index d398465c32..f60fd290fc 100644 --- a/tests/base/data_out_base_vtu_time_and_cycle.cc +++ b/tests/base/data_out_base_vtu_time_and_cycle.cc @@ -38,7 +38,7 @@ template void check(DataOutBase::VtkFlags flags, - std::ostream& out) + std::ostream &out) { const unsigned int np = 4; @@ -58,10 +58,10 @@ void check(DataOutBase::VtkFlags flags, template -void check_all(std::ostream& log) +void check_all(std::ostream &log) { #if SEPARATE_FILES == 0 - std::ostream& out = log; + std::ostream &out = log; #endif char name[100]; @@ -69,18 +69,19 @@ void check_all(std::ostream& log) flags.time = numbers::PI; flags.cycle = 42; - - if (true) { - sprintf(name, "data_out_base_vtu_time_and_cycle/%d%d.vtu", dim, spacedim); + + if (true) + { + sprintf(name, "data_out_base_vtu_time_and_cycle/%d%d.vtu", dim, spacedim); #if SEPARATE_FILES==1 - std::ofstream out(name); + std::ofstream out(name); #else - out << "==============================\n" - << name - << "\n==============================\n"; + out << "==============================\n" + << name + << "\n==============================\n"; #endif - check(flags, out); - } + check(flags, out); + } } int main() diff --git a/tests/base/data_out_reader_01.cc b/tests/base/data_out_reader_01.cc index a3f3521b49..1e105e3ffd 100644 --- a/tests/base/data_out_reader_01.cc +++ b/tests/base/data_out_reader_01.cc @@ -28,7 +28,7 @@ // test DataOutReader::merge -void cat_file(const char * filename) +void cat_file(const char *filename) { std::ifstream in(filename); while (in) @@ -43,11 +43,11 @@ template void check() { const unsigned int np = 1; - + std::vector > patches(np); - + create_patches(patches); - + std::vector names(5); names[0] = "x1"; names[1] = "x2"; @@ -55,29 +55,29 @@ void check() names[3] = "x4"; names[4] = "i"; std::vector > vectors; - + std::ostringstream old_data; - DataOutBase::write_deal_II_intermediate(patches, names, vectors, - DataOutBase::Deal_II_IntermediateFlags(), - old_data); + DataOutBase::write_deal_II_intermediate(patches, names, vectors, + DataOutBase::Deal_II_IntermediateFlags(), + old_data); DataOutReader data; { std::istringstream input(old_data.str()); data.read (input); - } + } DataOutReader additional_data; { std::istringstream input(old_data.str()); additional_data.read (input); } - + data.merge (additional_data); { std::ofstream out2( "data_out_reader_01/outfile"); data.write_deal_II_intermediate (out2); - } + } cat_file("data_out_reader_01/outfile"); std::remove ("data_out_reader_01/outfile"); @@ -93,5 +93,5 @@ int main() check<1,2>(); check<2,2>(); check<2,3>(); - check<3,3>(); + check<3,3>(); } diff --git a/tests/base/full_tensor_01.cc b/tests/base/full_tensor_01.cc index 829af439b9..d88af2634a 100644 --- a/tests/base/full_tensor_01.cc +++ b/tests/base/full_tensor_01.cc @@ -30,17 +30,17 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + Tensor<2,2> t; t[0][0] = 1; t[1][1] = 2; t[0][1] = 4; t[1][0] = 4; - // make sure transposition doesn't change - // anything + // make sure transposition doesn't change + // anything Assert (t == transpose(t), ExcInternalError()); - // check norm of tensor + // check norm of tensor Assert (std::fabs(t.norm() - std::sqrt(1.*1+2*2+2*4*4)) < 1e-14, ExcInternalError()); diff --git a/tests/base/full_tensor_02.cc b/tests/base/full_tensor_02.cc index 1634f3f8dc..dc066402d2 100644 --- a/tests/base/full_tensor_02.cc +++ b/tests/base/full_tensor_02.cc @@ -30,7 +30,7 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + Tensor<2,3> t; t[0][0] = 1; t[1][1] = 2; @@ -44,11 +44,11 @@ int main () Assert (t[0][1] == t[1][0], ExcInternalError()); - // make sure transposition doesn't change - // anything + // make sure transposition doesn't change + // anything Assert (t == transpose(t), ExcInternalError()); - // check norm of tensor + // check norm of tensor Assert (std::fabs(t.norm() - std::sqrt(1.*1+2*2+3*3+2*4*4+2*5*5+2*6*6)) < 1e-14, ExcInternalError()); diff --git a/tests/base/full_tensor_03.cc b/tests/base/full_tensor_03.cc index bfe3d4f367..4833fd1b25 100644 --- a/tests/base/full_tensor_03.cc +++ b/tests/base/full_tensor_03.cc @@ -30,7 +30,7 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + Tensor<4,2> t; t[0][0][0][0] = 1; t[1][1][1][1] = 2; @@ -39,18 +39,18 @@ int main () Assert (t[0][1][0][1] == t[1][0][1][0], ExcInternalError()); - // check norm of tensor + // check norm of tensor deallog << t.norm() << std::endl; - // make sure norm is induced by scalar - // product + // make sure norm is induced by scalar + // product double norm_sqr = 0; for (unsigned int i=0; i<2; ++i) for (unsigned int j=0; j<2; ++j) for (unsigned int k=0; k<2; ++k) - for (unsigned int l=0; l<2; ++l) - norm_sqr += t[i][j][k][l] * t[i][j][k][l]; - + for (unsigned int l=0; l<2; ++l) + norm_sqr += t[i][j][k][l] * t[i][j][k][l]; + Assert (std::fabs (t.norm()*t.norm() - norm_sqr) < 1e-14, ExcInternalError()); diff --git a/tests/base/full_tensor_04.cc b/tests/base/full_tensor_04.cc index c4a9d00341..742c3b6756 100644 --- a/tests/base/full_tensor_04.cc +++ b/tests/base/full_tensor_04.cc @@ -30,7 +30,7 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + Tensor<4,3> t; t[0][0][0][0] = 1; t[1][1][1][1] = 2; @@ -39,17 +39,17 @@ int main () Assert (t[0][1][0][1] == t[1][0][1][0], ExcInternalError()); - // check norm of tensor + // check norm of tensor deallog << t.norm() << std::endl; - // make sure norm is induced by scalar - // product + // make sure norm is induced by scalar + // product double norm_sqr = 0; for (unsigned int i=0; i<2; ++i) for (unsigned int j=0; j<2; ++j) for (unsigned int k=0; k<2; ++k) - for (unsigned int l=0; l<2; ++l) - norm_sqr += t[i][j][k][l] * t[i][j][k][l]; + for (unsigned int l=0; l<2; ++l) + norm_sqr += t[i][j][k][l] * t[i][j][k][l]; Assert (std::fabs (t.norm()*t.norm() - norm_sqr) < 1e-14, ExcInternalError()); diff --git a/tests/base/full_tensor_05.cc b/tests/base/full_tensor_05.cc index 59ea220336..f81f79504d 100644 --- a/tests/base/full_tensor_05.cc +++ b/tests/base/full_tensor_05.cc @@ -32,9 +32,9 @@ void test () for (unsigned int i=0; i a, b; a[0][0] = 1; a[1][1] = 2; @@ -43,38 +43,38 @@ void test () for (unsigned int i=0; i (); test<3> (); - + deallog << "OK" << std::endl; } diff --git a/tests/base/full_tensor_06.cc b/tests/base/full_tensor_06.cc index 642d7c0643..fc0bd8616d 100644 --- a/tests/base/full_tensor_06.cc +++ b/tests/base/full_tensor_06.cc @@ -30,56 +30,56 @@ template void test () { const double lambda = 5, - mu = 7; + mu = 7; Tensor<4,dim> ts; Tensor<4,dim> ta; for (unsigned int i=0; i as, bs; Tensor<2,dim> aa, ba; for (unsigned int i=0; i (); test<3> (); - + deallog << "OK" << std::endl; } diff --git a/tests/base/full_tensor_08.cc b/tests/base/full_tensor_08.cc index 4c6512cce8..9a5caf016e 100644 --- a/tests/base/full_tensor_08.cc +++ b/tests/base/full_tensor_08.cc @@ -23,31 +23,31 @@ #include #include - + template void test () { const double lambda = 1.5, - mu = 1.7; + mu = 1.7; Tensor<2,dim> t; for (unsigned int i=0; i a; for (unsigned int i=0; i (); test<3> (); - + deallog << "OK" << std::endl; } diff --git a/tests/base/full_tensor_09.cc b/tests/base/full_tensor_09.cc index 31b4f0e796..eb726fadd7 100644 --- a/tests/base/full_tensor_09.cc +++ b/tests/base/full_tensor_09.cc @@ -29,8 +29,8 @@ void test () { Tensor<2,dim> t; - // choose the same symmetric tensor - // as in symmetric_tensor_09 + // choose the same symmetric tensor + // as in symmetric_tensor_09 for (unsigned int i=0; i (); test<3> (); - + deallog << "OK" << std::endl; } diff --git a/tests/base/full_tensor_10.cc b/tests/base/full_tensor_10.cc index 2a2b4b6c1d..f21e83bcf3 100644 --- a/tests/base/full_tensor_10.cc +++ b/tests/base/full_tensor_10.cc @@ -29,8 +29,8 @@ void test () { Tensor<2,dim> t; - // choose the same symmetric tensor - // as in symmetric_tensor_10 + // choose the same symmetric tensor + // as in symmetric_tensor_10 for (unsigned int i=0; i void -check_derivative_order(const std::vector >& gradients, - FunctionDerivative& df, - const Quadrature& quadrature, - const unsigned int direction, - const double order) +check_derivative_order(const std::vector > &gradients, + FunctionDerivative &df, + const Quadrature &quadrature, + const unsigned int direction, + const double order) { std::vector derivatives(quadrature.size()); std::vector differences(quadrature.size()); - // Compute derivatives with one - // step size and store errors + // Compute derivatives with one + // step size and store errors df.set_h(1.e-2); df.value_list(quadrature.get_points(), derivatives); - for (unsigned int i=0;i 1.2 * expected || reduction < .8 * expected) - deallog << "Derivative error " << direction - << ' ' << order - << ' ' << i - << " " << reduction << std::endl; + deallog << "Derivative error " << direction + << ' ' << order + << ' ' << i + << " " << reduction << std::endl; } } template void -check_hessian_order(const std::vector& values, - FunctionDerivative& df, - const Quadrature& quadrature, - const Point& k, - const unsigned int direction, - const double order) +check_hessian_order(const std::vector &values, + FunctionDerivative &df, + const Quadrature &quadrature, + const Point &k, + const unsigned int direction, + const double order) { std::vector > derivatives(quadrature.size()); std::vector > differences(quadrature.size()); const double h = (order < 3) ? 1.e-2 : 1.e-1 ; - // Compute derivatives with one - // step size and store errors + // Compute derivatives with one + // step size and store errors df.set_h(h); df.gradient_list(quadrature.get_points(), derivatives); - for (unsigned int i=0;i 1.2 * expected || reduction < .8 * expected) - deallog << "Hessian error " << direction << ' ' << d - << ' ' << order - << ' ' << i - << " " << reduction - << " " << expected - << " " << differences[i][d] - << std::endl; - } + const double reduction = std::fabs(-values[i]*k[direction]*k[d] - derivatives[i][d]) + / std::fabs(differences[i][d]); + if (reduction > 1.2 * expected || reduction < .8 * expected) + deallog << "Hessian error " << direction << ' ' << d + << ' ' << order + << ' ' << i + << " " << reduction + << " " << expected + << " " << differences[i][d] + << std::endl; + } } @@ -119,21 +119,21 @@ void check_sine(unsigned int nquad) { QGauss quadrature(nquad); - + Point wave_vector; - for (unsigned int d=0;d f(wave_vector); - + std::vector values(quadrature.size()); std::vector > gradients(quadrature.size()); - + f.value_list(quadrature.get_points(), values); f.gradient_list(quadrature.get_points(), gradients); - - // Check derivatives in all directions - for (unsigned int d=0;d dir; diff --git a/tests/base/function_parser.cc b/tests/base/function_parser.cc index 2f6fe68c7d..513a52712c 100644 --- a/tests/base/function_parser.cc +++ b/tests/base/function_parser.cc @@ -17,7 +17,7 @@ // This program tests the functionality of the function parser -// wrapper. +// wrapper. #include "../tests.h" #include @@ -29,72 +29,79 @@ #include -int main () +int main () { std::ofstream logfile("function_parser/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + // Define some constants that will be used by the function parser std::map constants; constants["pi"] = M_PI; - + // Define the variables that will be used inside the expressions std::string variables = "x,y"; - + // Define the expressions of the vector_valued function. std::vector expressions; expressions.push_back("sin(2*pi*x)"); expressions.push_back("cos(2*pi*y*x)"); expressions.push_back("if(x<.5,y,exp(x))"); expressions.push_back("if(x<.5,y,exp(x)*exp(x*y))"); - + // Concatenate the declared expressions, to test the second way of // initializing std::string concatenated="cos(pi*y)"; // Now test each possibility - for(unsigned int i=1; i<=expressions.size(); ++i) { - try { - { - FunctionParser<2> function(i); - function.initialize(variables, - expressions, - constants); - deallog << "Initialize Succeded with dim = 2, " - << i << " components, " - << expressions.size() << " expressions, " - << variables << " as variables." << std::endl; - } - } catch(...) { - deallog << "Initialize Failed with dim = 2, " - << i << " components, " - << expressions.size() << " expressions, " - << variables << " as variables." << std::endl; - } - - try { - { - FunctionParser<2> function_bis(i); - function_bis.initialize(variables, - concatenated, - constants); - deallog << "Initialize Succeded with dim = 2, " - << i << " components, " - << concatenated << " as function and " - << variables << " as variables." << std::endl; - } - } catch(...) { - deallog << "Initialize Failed with dim = 2, " - << i << " components, " - << concatenated << " as function and " - << variables << " as variables." << std::endl; + for (unsigned int i=1; i<=expressions.size(); ++i) + { + try + { + { + FunctionParser<2> function(i); + function.initialize(variables, + expressions, + constants); + deallog << "Initialize Succeded with dim = 2, " + << i << " components, " + << expressions.size() << " expressions, " + << variables << " as variables." << std::endl; + } + } + catch (...) + { + deallog << "Initialize Failed with dim = 2, " + << i << " components, " + << expressions.size() << " expressions, " + << variables << " as variables." << std::endl; + } + + try + { + { + FunctionParser<2> function_bis(i); + function_bis.initialize(variables, + concatenated, + constants); + deallog << "Initialize Succeded with dim = 2, " + << i << " components, " + << concatenated << " as function and " + << variables << " as variables." << std::endl; + } + } + catch (...) + { + deallog << "Initialize Failed with dim = 2, " + << i << " components, " + << concatenated << " as function and " + << variables << " as variables." << std::endl; + } + + concatenated += "; " + expressions[i-1]; } - - concatenated += "; " + expressions[i-1]; - } } - - + + diff --git a/tests/base/function_parser_02.cc b/tests/base/function_parser_02.cc index df44384a5f..6e4cc091b7 100644 --- a/tests/base/function_parser_02.cc +++ b/tests/base/function_parser_02.cc @@ -29,14 +29,14 @@ #include -int main () +int main () { std::ofstream logfile("function_parser_02/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + std::vector function(1); std::map constants; std::map units; @@ -47,51 +47,51 @@ int main () Point<2> point(2.0, 3.0); - //initialized with units + //initialized with units FunctionParser<2> fp; function[0] = "x cm + y m + PI"; fp.initialize(FunctionParser<2>::default_variable_names(), - function, constants, units); + function, constants, units); deallog << "Function " << "[" << function[0] << "]" << - " @point " << "[" << point << "]" << " is " << - "[" << fp.value(point) << "]" << std::endl; + " @point " << "[" << point << "]" << " is " << + "[" << fp.value(point) << "]" << std::endl; - //now initialize with a function - //that's a string, not vector of - //strings + //now initialize with a function + //that's a string, not vector of + //strings FunctionParser<2> fp4; fp4.initialize(FunctionParser<2>::default_variable_names(), - function[0], constants, units); + function[0], constants, units); deallog << "Function " << "[" << function[0] << "]" << - " @point " << "[" << point << "]" << " is " << - "[" << fp4.value(point) << "]" << std::endl; + " @point " << "[" << point << "]" << " is " << + "[" << fp4.value(point) << "]" << std::endl; - //now initialize a function without - //units to check backwards - //compatibility + //now initialize a function without + //units to check backwards + //compatibility FunctionParser<2> fp2; function[0] = "x + y + PI"; fp2.initialize(FunctionParser<2>::default_variable_names(), - function, constants); + function, constants); deallog << "Function " << "[" << function[0] << "]" << - " @point " << "[" << point << "]" << " is " << - "[" << fp2.value(point) << "]" << std::endl; + " @point " << "[" << point << "]" << " is " << + "[" << fp2.value(point) << "]" << std::endl; - //same as above but the function is - //a string, not a vector + //same as above but the function is + //a string, not a vector FunctionParser<2> fp3; fp3.initialize(FunctionParser<2>::default_variable_names(), - function[0], constants); + function[0], constants); deallog << "Function " << "[" << function[0] << "]" << - " @point " << "[" << point << "]" << " is " << - "[" << fp3.value(point) << "]" << std::endl; + " @point " << "[" << point << "]" << " is " << + "[" << fp3.value(point) << "]" << std::endl; } - - + + diff --git a/tests/base/functions.h b/tests/base/functions.h index 7c06a1c00f..204d65b4eb 100644 --- a/tests/base/functions.h +++ b/tests/base/functions.h @@ -1,6 +1,6 @@ //----------------------------------------------------------------------------- // $Id$ -// Version: $Name$ +// Version: $Name$ // // Copyright (C) 2007, 2008, 2010 by the deal.II authors // @@ -22,7 +22,7 @@ template void check_function_value_consistency( - const Function& f, + const Function &f, unsigned int sub, double threshold = 1.e-15) { @@ -31,26 +31,26 @@ check_function_value_consistency( std::vector f1(quadrature.size()); std::vector > f2(quadrature.size(), Vector(f.n_components)); - + f.vector_value_list(quadrature.get_points(), f2); deallog << "value vs vector value list"; - for (unsigned int d=0;d threshold) - deallog << "v-vl " << d << ':' << i << ':' << v-f2[i](d); + const double v = f.value(quadrature.point(i), d); + if (std::fabs(v-f2[i](d)) > threshold) + deallog << "v-vl " << d << ':' << i << ':' << v-f2[i](d); } deallog << std::endl << "value list vs vector value list"; - for (unsigned int d=0;d threshold) - deallog << ' ' << d << ':' << i << ':' << f1[i]-f2[i](d); - } + for (unsigned int i=0; i threshold) + deallog << ' ' << d << ':' << i << ':' << f1[i]-f2[i](d); + } } deallog << std::endl; } @@ -59,7 +59,7 @@ check_function_value_consistency( template void check_function_gradient_consistency( - const Function& f, + const Function &f, unsigned int sub, double threshold = 1.e-15) { @@ -68,29 +68,29 @@ check_function_gradient_consistency( std::vector > f1(quadrature.size()); std::vector > > f2(quadrature.size(), - std::vector >(f.n_components)); - + std::vector >(f.n_components)); + f.vector_gradient_list(quadrature.get_points(), f2); deallog << "gradient vs vector gradient list"; - for (unsigned int d=0;d v = f.gradient(quadrature.point(i), d)-f2[i][d]; - - if (std::sqrt(v*v) > threshold) - deallog << "v-vl " << d << ':' << i << ':' << v; + const Tensor<1,dim> v = f.gradient(quadrature.point(i), d)-f2[i][d]; + + if (std::sqrt(v*v) > threshold) + deallog << "v-vl " << d << ':' << i << ':' << v; } deallog << std::endl << "gradient list vs vector gradient list"; - for (unsigned int d=0;d v = f1[i]-f2[i][d]; - if (std::sqrt(v*v) > threshold) - deallog << ' ' << d << ':' << i << ':' << v; - } + for (unsigned int i=0; i v = f1[i]-f2[i][d]; + if (std::sqrt(v*v) > threshold) + deallog << ' ' << d << ':' << i << ':' << v; + } } deallog << std::endl; } @@ -104,26 +104,26 @@ template class DerivativeTestFunction : public AutoDerivativeFunction { - public: - DerivativeTestFunction(const Function&, const double h); - ~DerivativeTestFunction(); - - virtual void vector_value (const Point& points, Vector& value) const; - virtual double value (const Point& points, const unsigned int component) const; - virtual void vector_value_list (const std::vector< Point< dim > > &points, - std::vector< Vector< double > > &values) const; - - private: - const Function& func; +public: + DerivativeTestFunction(const Function &, const double h); + ~DerivativeTestFunction(); + + virtual void vector_value (const Point &points, Vector &value) const; + virtual double value (const Point &points, const unsigned int component) const; + virtual void vector_value_list (const std::vector< Point< dim > > &points, + std::vector< Vector< double > > &values) const; + +private: + const Function &func; }; template -DerivativeTestFunction::DerivativeTestFunction(const Function& f, - const double h) - : - AutoDerivativeFunction(h, f.n_components), - func(f) +DerivativeTestFunction::DerivativeTestFunction(const Function &f, + const double h) + : + AutoDerivativeFunction(h, f.n_components), + func(f) { this->set_formula(AutoDerivativeFunction::FourthOrder); } @@ -146,8 +146,8 @@ DerivativeTestFunction::vector_value_list ( template void DerivativeTestFunction::vector_value ( - const Point& point, - Vector& value) const + const Point &point, + Vector &value) const { func.vector_value(point, value); } @@ -155,11 +155,11 @@ void DerivativeTestFunction::vector_value ( template double DerivativeTestFunction::value ( - const Point& point, - const unsigned int comp) const + const Point &point, + const unsigned int comp) const { // std::cerr << '[' << point << '!' << func.value(point, comp) << ']'; - + return func.value(point, comp); } @@ -168,62 +168,62 @@ double DerivativeTestFunction::value ( template void check_gradient( - const Function& f, + const Function &f, unsigned int sub, double threshold = 1./14.) { DerivativeTestFunction dtest1(f, 1.e-2); DerivativeTestFunction dtest2(f, 2.e-2); - + QMidpoint<1> mid; QIterated quadrature(mid, sub); - const std::vector >& points = quadrature.get_points(); - + const std::vector > &points = quadrature.get_points(); + std::vector > > - gradients(f.n_components, std::vector >(points.size())); + gradients(f.n_components, std::vector >(points.size())); std::vector > > - gradients1(f.n_components, std::vector >(points.size())); + gradients1(f.n_components, std::vector >(points.size())); std::vector > > - gradients2(f.n_components, std::vector >(points.size())); + gradients2(f.n_components, std::vector >(points.size())); deallog << "gradients vs difference quotients"; f.vector_gradients(points, gradients); dtest1.vector_gradients(points, gradients1); dtest2.vector_gradients(points, gradients2); - - // Compare gradients and difference quotients - for (unsigned int k=0;k d1 = gradients1[k][i] - gradients[k][i]; - Tensor<1,dim> d2 = gradients2[k][i] - gradients[k][i]; - - // If the difference is - // already small, we are fine - if (d1.norm() > 1.e-13) - { - // Check for - // convergence. For full - // 4th order, gradients2 - // should be 16 times as - // large, so let's be a - // bit generous - if (threshold * d2.norm() < d1.norm()) - { - deallog << "Gradient error: point " << i - << " (" << points[i] << " )" - << " comp " << k -// << " norms " << d1.norm() << " " << d2.norm() - << std::endl; - for (unsigned int d=0;d d1 = gradients1[k][i] - gradients[k][i]; + Tensor<1,dim> d2 = gradients2[k][i] - gradients[k][i]; + + // If the difference is + // already small, we are fine + if (d1.norm() > 1.e-13) + { + // Check for + // convergence. For full + // 4th order, gradients2 + // should be 16 times as + // large, so let's be a + // bit generous + if (threshold * d2.norm() < d1.norm()) + { + deallog << "Gradient error: point " << i + << " (" << points[i] << " )" + << " comp " << k +// << " norms " << d1.norm() << " " << d2.norm() + << std::endl; + for (unsigned int d=0; d #include -#define CHECK(F) { deallog << #F << std::endl; \ - F f; \ - check_function_value_consistency(f, 5); \ - check_function_gradient_consistency(f, 5); \ - check_gradient(f, 5); \ -} - +#define CHECK(F) { deallog << #F << std::endl; \ + F f; \ + check_function_value_consistency(f, 5); \ + check_function_gradient_consistency(f, 5); \ + check_gradient(f, 5); \ + } + + +#define CHECKN(F,arg) { deallog << #F << '(' << arg << ')' << std::endl; \ + F f(arg); \ + check_function_value_consistency(f, arg+1); \ + check_function_gradient_consistency(f, arg+1); \ + } -#define CHECKN(F,arg) { deallog << #F << '(' << arg << ')' << std::endl; \ - F f(arg); \ - check_function_value_consistency(f, arg+1); \ - check_function_gradient_consistency(f, arg+1); \ -} - int main() { @@ -67,5 +67,5 @@ int main() CHECK(Functions::CosineGradFunction<3>); CHECK(Functions::ExpFunction<1>); CHECK(Functions::ExpFunction<2>); - CHECK(Functions::ExpFunction<3>); + CHECK(Functions::ExpFunction<3>); } diff --git a/tests/base/functions_02.cc b/tests/base/functions_02.cc index 093b405ac2..d8190b0f45 100644 --- a/tests/base/functions_02.cc +++ b/tests/base/functions_02.cc @@ -36,135 +36,135 @@ template -void check_values(const Function& f) +void check_values(const Function &f) { Point p; - for(unsigned int i=0; i -void check_value_list(const Function& f) +void check_value_list(const Function &f) { const unsigned int max_points = 3; std::vector< Point > point_vector(max_points); - for(unsigned int j=0; j p; - for(unsigned int i=0; i p; + for (unsigned int i=0; i values(max_points); f.value_list(point_vector, values); - for(unsigned int j=0; j -void check_vector_value_list(const Function& f) +void check_vector_value_list(const Function &f) { const unsigned int max_points = 3; std::vector< Point > point_vector(max_points); - for(unsigned int j=0; j p; - for(unsigned int i=0; i p; + for (unsigned int i=0; i > values(max_points, Vector(1)); f.vector_value_list(point_vector, values); - for(unsigned int j=0; j -void check_gradients(const Function& f) +void check_gradients(const Function &f) { Point p; - for(unsigned int i=0; i grads = f.gradient(p); - for(unsigned int i=0; i -void check_gradient_list(const Function& f) +void check_gradient_list(const Function &f) { const unsigned int max_points = 3; std::vector< Point > point_vector(max_points); - for(unsigned int j=0; j p; - for(unsigned int i=0; i p; + for (unsigned int i=0; i > grads(max_points); f.gradient_list(point_vector, grads); - for(unsigned int j=0; j -void check_vector_gradient_list(const Function& f) +void check_vector_gradient_list(const Function &f) { const unsigned int max_points = 3; std::vector< Point > point_vector(max_points); - for(unsigned int j=0; j p; - for(unsigned int i=0; i > > gradients(max_points, - std::vector< Tensor<1,dim> > (1)); + for (unsigned int j=0; j p; + for (unsigned int i=0; i > > gradients(max_points, + std::vector< Tensor<1,dim> > (1)); f.vector_gradient_list(point_vector, gradients); - for(unsigned int j=0; j -void check_laplacian(const Function& f) +void check_laplacian(const Function &f) { Point p; - for(unsigned int i=0; i -void check_laplacian_list(const Function& f) +void check_laplacian_list(const Function &f) { const unsigned int max_points = 3; std::vector< Point > point_vector(max_points); - for(unsigned int j=0; j p; - for(unsigned int i=0; i p; + for (unsigned int i=0; i values(max_points); f.laplacian_list(point_vector, values); - for(unsigned int j=0; j" << std::endl; diff --git a/tests/base/functions_03.cc b/tests/base/functions_03.cc index fbcd1ee100..23fbb2ee9c 100644 --- a/tests/base/functions_03.cc +++ b/tests/base/functions_03.cc @@ -32,108 +32,108 @@ template -void check_value (const Function& f) +void check_value (const Function &f) { Point p; for (unsigned int i=0; i -void check_value_list (const Function& f) +void check_value_list (const Function &f) { const unsigned int max_number_of_points = 5; std::vector< Point > points(max_number_of_points); - - for(unsigned int i=0; i p; - for(unsigned int j=0; j p; + for (unsigned int j=0; j values(max_number_of_points); f.value_list(points, values); - for(unsigned int j=0; j -void check_gradient (const Function& f) +void check_gradient (const Function &f) { Point p; for (unsigned int i=0; i -void check_gradient_list (const Function& f) +void check_gradient_list (const Function &f) { const unsigned int max_number_of_points = 5; std::vector< Point > points(max_number_of_points); - - for(unsigned int i=0; i p; - for(unsigned int j=0; j p; + for (unsigned int j=0; j > tensors(max_number_of_points); f.gradient_list(points, tensors); - for(unsigned int j=0; j -void check_laplacian (const Function& f) +void check_laplacian (const Function &f) { Point p; for (unsigned int i=0; i -void check_laplacian_list (const Function& f) +void check_laplacian_list (const Function &f) { const unsigned int max_number_of_points = 5; std::vector< Point > points(max_number_of_points); - - for(unsigned int i=0; i p; - for(unsigned int j=0; j p; + for (unsigned int j=0; j values(max_number_of_points); f.laplacian_list(points, values); - for(unsigned int j=0; j()); check_value (Functions::PillowFunction<2>()); check_value (Functions::PillowFunction<3>()); - + check_value_list (Functions::PillowFunction<1>()); check_value_list (Functions::PillowFunction<2>()); check_value_list (Functions::PillowFunction<3>()); - + check_gradient (Functions::PillowFunction<1>()); check_gradient (Functions::PillowFunction<2>()); check_gradient (Functions::PillowFunction<3>()); - + check_gradient_list (Functions::PillowFunction<1>()); check_gradient_list (Functions::PillowFunction<2>()); check_gradient_list (Functions::PillowFunction<3>()); - + check_laplacian (Functions::PillowFunction<1>()); check_laplacian (Functions::PillowFunction<2>()); check_laplacian (Functions::PillowFunction<3>()); - + check_laplacian_list (Functions::PillowFunction<1>()); check_laplacian_list (Functions::PillowFunction<2>()); check_laplacian_list (Functions::PillowFunction<3>()); - + } diff --git a/tests/base/functions_04.cc b/tests/base/functions_04.cc index f031202b89..6b50070eef 100644 --- a/tests/base/functions_04.cc +++ b/tests/base/functions_04.cc @@ -36,153 +36,153 @@ template void -check_function(const Functions::FlowFunction& f, - unsigned int sub, - std::ostream& out) +check_function(const Functions::FlowFunction &f, + unsigned int sub, + std::ostream &out) { DerivativeTestFunction dtest1(f, 1.e-2); DerivativeTestFunction dtest2(f, 2.e-2); - // Prepare a vector with a single - // patch stretching over the cube - // [-1,1]^dim + // Prepare a vector with a single + // patch stretching over the cube + // [-1,1]^dim std::vector > patches(1); unsigned int vertex_number = 0; - for (unsigned int iz=0;iz < ((dim>2) ? 2 : 1) ;++iz) - for (unsigned int iy=0;iy < ((dim>1) ? 2 : 1) ;++iy) - for (unsigned int ix=0;ix < 2 ;++ix) - { - if (dim>0) patches[0].vertices[vertex_number](0) = -1. + 2.*ix; - if (dim>1) patches[0].vertices[vertex_number](1) = -1. + 2.*iy; - if (dim>2) patches[0].vertices[vertex_number](2) = -1. + 2.*iz; - ++vertex_number; - } - for (unsigned int i=0;i::faces_per_cell;++i) + for (unsigned int iz=0; iz < ((dim>2) ? 2 : 1) ; ++iz) + for (unsigned int iy=0; iy < ((dim>1) ? 2 : 1) ; ++iy) + for (unsigned int ix=0; ix < 2 ; ++ix) + { + if (dim>0) patches[0].vertices[vertex_number](0) = -1. + 2.*ix; + if (dim>1) patches[0].vertices[vertex_number](1) = -1. + 2.*iy; + if (dim>2) patches[0].vertices[vertex_number](2) = -1. + 2.*iz; + ++vertex_number; + } + for (unsigned int i=0; i::faces_per_cell; ++i) patches[0].neighbors[i] = numbers::invalid_unsigned_int; patches[0].patch_index = 0; patches[0].n_subdivisions = sub; patches[0].points_are_available = false; vertex_number = 1; - for (unsigned int d=0;d > points(vertex_number); const double h = 2./sub; vertex_number = 0; - for (unsigned int iz=0;iz <= ((dim>2) ? sub : 0) ;++iz) - for (unsigned int iy=0;iy <= ((dim>1) ? sub : 0) ;++iy) - for (unsigned int ix=0;ix <= sub ;++ix) - { - if (dim>0) points[vertex_number](0) = -1.+ix*h; - if (dim>1) points[vertex_number](1) = -1.+iy*h; - if (dim>2) points[vertex_number](2) = -1.+iz*h; - ++vertex_number; - } - + for (unsigned int iz=0; iz <= ((dim>2) ? sub : 0) ; ++iz) + for (unsigned int iy=0; iy <= ((dim>1) ? sub : 0) ; ++iy) + for (unsigned int ix=0; ix <= sub ; ++ix) + { + if (dim>0) points[vertex_number](0) = -1.+ix*h; + if (dim>1) points[vertex_number](1) = -1.+iy*h; + if (dim>2) points[vertex_number](2) = -1.+iz*h; + ++vertex_number; + } + std::vector > values(points.size(), Vector(f.n_components)); std::vector > values2(f.n_components, - std::vector(points.size())); + std::vector(points.size())); f.vector_value_list(points, values); f.vector_values(points, values2); - for (unsigned int i=0;i 1e-10) - patches[0].data(j, i) = values[i](j); - else - patches[0].data(j, i) = 0; - if (values[i](j) != values2[j][i]) - deallog << "Error values (" << i << ',' << j << ") : " - << values[i](j) << " != " << values2[j][i] << std::endl; + // generate data, but + // truncate too small values + // to avoid output that + // depends on round-off + if (std::fabs (values[i](j)) > 1e-10) + patches[0].data(j, i) = values[i](j); + else + patches[0].data(j, i) = 0; + if (values[i](j) != values2[j][i]) + deallog << "Error values (" << i << ',' << j << ") : " + << values[i](j) << " != " << values2[j][i] << std::endl; } - + deallog << "Gradients "; - // Compute gradients and difference approximations + // Compute gradients and difference approximations std::vector > > - gradients(f.n_components, std::vector >(points.size())); + gradients(f.n_components, std::vector >(points.size())); std::vector > > - gradients1(points.size(), std::vector >(f.n_components)); + gradients1(points.size(), std::vector >(f.n_components)); std::vector > > - gradients2(points.size(), std::vector >(f.n_components)); - + gradients2(points.size(), std::vector >(f.n_components)); + f.vector_gradients(points, gradients); dtest1.vector_gradient_list(points, gradients1); dtest2.vector_gradient_list(points, gradients2); - // Compare gradients and difference quotients - for (unsigned int k=0;k d1 = gradients1[i][k] - gradients[k][i]; - Tensor<1,dim> d2 = gradients2[i][k] - gradients[k][i]; - - // If the difference is - // already small, we are fine - if (d1.norm() > 1.e-13) - { - // Check for - // convergence. For full - // 4th order, gradients2 - // should be 16 times as - // large, so let's be a - // bit generous - if (d2.norm() < 12.* d1.norm()) - { - deallog << "Gradient error: point " << i - << " (" << points[i] << " )" - << " comp " << k -// << " norms " << d1.norm() << " " << d2.norm() - << std::endl; - for (unsigned int d=0;d d1 = gradients1[i][k] - gradients[k][i]; + Tensor<1,dim> d2 = gradients2[i][k] - gradients[k][i]; + + // If the difference is + // already small, we are fine + if (d1.norm() > 1.e-13) + { + // Check for + // convergence. For full + // 4th order, gradients2 + // should be 16 times as + // large, so let's be a + // bit generous + if (d2.norm() < 12.* d1.norm()) + { + deallog << "Gradient error: point " << i + << " (" << points[i] << " )" + << " comp " << k +// << " norms " << d1.norm() << " " << d2.norm() + << std::endl; + for (unsigned int d=0; d 1.e-13) - deallog << "Divergence " << k << " " - << div << std::endl; + deallog << "Divergence " << k << " " + << div << std::endl; } deallog << "tested" << std::endl; - + f.vector_laplacian_list(points, values); f.vector_laplacians(points, values2); double sum = 0.; - for (unsigned int i=0;i names(f.n_components); - for (unsigned int i=0;i" << std::endl; @@ -220,9 +220,9 @@ int main() { deallog << "Functions::StokesLSingularity" << std::endl; Functions::StokesLSingularity f; - // Use odd number of points to - // avoid lines with - // discontinuous derivatives. + // Use odd number of points to + // avoid lines with + // discontinuous derivatives. check_function(f, 5, logfile); } @@ -232,14 +232,14 @@ int main() Functions::Kovasznay f(10.); check_function(f, 4, logfile); } - + if (true) { deallog << "Functions::PoisseuilleFlow<2>" << std::endl; Functions::PoisseuilleFlow<2> f(.8, 10.); check_function(f, 4, logfile); } - + if (true) { deallog << "Functions::PoisseuilleFlow<3>" << std::endl; diff --git a/tests/base/functions_05.cc b/tests/base/functions_05.cc index 0292cae6d4..1772b8b09a 100644 --- a/tests/base/functions_05.cc +++ b/tests/base/functions_05.cc @@ -25,16 +25,16 @@ template void check1 () { ScalarFunctionFromFunctionObject - object (&Point::norm); + object (&Point::norm); for (unsigned int i=0; i<10; ++i) { Point p; for (unsigned int d=0; d - object (std_cxx1x::bind (&Point::distance, - q, - std_cxx1x::_1)); + object (std_cxx1x::bind (&Point::distance, + q, + std_cxx1x::_1)); for (unsigned int i=0; i<10; ++i) { Point p; for (unsigned int d=0; d void check1 () { VectorFunctionFromScalarFunctionObject - object (&Point::norm, 1, 3); + object (&Point::norm, 1, 3); Assert (object.n_components == 3, ExcInternalError()); @@ -34,17 +34,17 @@ void check1 () { Point p; for (unsigned int d=0; d v(3); object.vector_value (p, v); for (unsigned int c=0; c<3; ++c) - Assert (v(c) == (c==1 ? p.norm() : 0), - ExcInternalError()); + Assert (v(c) == (c==1 ? p.norm() : 0), + ExcInternalError()); } deallog << "OK" << std::endl; @@ -59,18 +59,18 @@ void check2 () q[d] = d; ScalarFunctionFromFunctionObject - object (std_cxx1x::bind (&Point::distance, - q, - std_cxx1x::_1)); + object (std_cxx1x::bind (&Point::distance, + q, + std_cxx1x::_1)); for (unsigned int i=0; i<10; ++i) { Point p; for (unsigned int d=0; d class F : public Function { - public: - double laplacian (const Point &p, - const unsigned int c) const - { - Assert (c == 0, ExcInternalError()); - return p.norm(); - } +public: + double laplacian (const Point &p, + const unsigned int c) const + { + Assert (c == 0, ExcInternalError()); + return p.norm(); + } }; @@ -44,7 +44,7 @@ void check () { Point p; for (unsigned int d=0; d { public: virtual Tensor<1,dim> value (const Point &p) const - { - return p; - } + { + return p; + } }; @@ -39,7 +39,7 @@ void check1 () { X x; VectorFunctionFromTensorFunction - object (x, 1, dim+2); + object (x, 1, dim+2); Assert (object.n_components == dim+2, ExcInternalError()); @@ -47,25 +47,25 @@ void check1 () { Point p; for (unsigned int d=0; d v(dim+2); object.vector_value (p, v); for (unsigned int c=0; c &tensor, int base) { - for(int i = 0; i < dim; ++i) + for (int i = 0; i < dim; ++i) FillTensor::fill_tensor(tensor[i], 10 * base + i); } }; @@ -38,7 +38,7 @@ struct FillTensor<1, dim> { static void fill_tensor(Tensor<1, dim> &tensor, int base) { - for(int i = 0; i < dim; ++i) + for (int i = 0; i < dim; ++i) tensor[i] = 10 * base + i; } }; @@ -51,7 +51,7 @@ struct PrintTensor { static void print_tensor(const Tensor &tensor) { - for(int i = 0; i < dim; ++i) + for (int i = 0; i < dim; ++i) { PrintTensor::print_tensor(tensor[i]); deallog << " "; @@ -64,7 +64,7 @@ struct PrintTensor<1, dim> { static void print_tensor(const Tensor<1, dim> &tensor) { - for(int i = 0; i < dim; ++i) + for (int i = 0; i < dim; ++i) deallog << tensor[i] << " "; } }; diff --git a/tests/base/functions_singularity.cc b/tests/base/functions_singularity.cc index c9fc80dc5a..8e9ddd587c 100644 --- a/tests/base/functions_singularity.cc +++ b/tests/base/functions_singularity.cc @@ -37,8 +37,8 @@ template void check_function_consistency( - const Function& f, - const Function& gradf, + const Function &f, + const Function &gradf, unsigned int sub) { QMidpoint<1> mid; @@ -46,29 +46,29 @@ check_function_consistency( std::vector > fg1(quadrature.size()); std::vector > > fg2(quadrature.size(), std::vector >(1)); - + std::vector g1(quadrature.size()); std::vector > g2(quadrature.size(), Vector(dim)); - - // Derivative values are in fg1, - // fg2, g1, and g2 + + // Derivative values are in fg1, + // fg2, g1, and g2 f.gradient_list(quadrature.get_points(), fg1, 0); f.vector_gradient_list(quadrature.get_points(), fg2); gradf.vector_value_list(quadrature.get_points(), g2); deallog << "Gradient consistency "; - - for (unsigned int d=0;d 1.e-14) - deallog << ' ' << i << ':' << g1[i]-g2[i](d); - if (std::fabs(g1[i]-fg2[i][0][d]) > 1.e-14) - deallog << ' ' << i << ';' << g1[i]-fg2[i][0][d]; - if (std::fabs(g1[i]-fg1[i][d]) > 1.e-14) - deallog << ' ' << i << '#' << g1[i]-fg1[i][d]; - } + for (unsigned int i=0; i 1.e-14) + deallog << ' ' << i << ':' << g1[i]-g2[i](d); + if (std::fabs(g1[i]-fg2[i][0][d]) > 1.e-14) + deallog << ' ' << i << ';' << g1[i]-fg2[i][0][d]; + if (std::fabs(g1[i]-fg1[i][d]) > 1.e-14) + deallog << ' ' << i << '#' << g1[i]-fg1[i][d]; + } } deallog << std::endl; } @@ -76,153 +76,153 @@ check_function_consistency( template void -check_function_derivative(const Functions::FlowFunction& f, - unsigned int sub, - std::ostream& out) +check_function_derivative(const Functions::FlowFunction &f, + unsigned int sub, + std::ostream &out) { DerivativeTestFunction dtest1(f, 1.e-2); DerivativeTestFunction dtest2(f, 2.e-2); - // Prepare a vector with a single - // patch stretching over the cube - // [-1,1]^dim + // Prepare a vector with a single + // patch stretching over the cube + // [-1,1]^dim std::vector > patches(1); unsigned int vertex_number = 0; - for (unsigned int iz=0;iz < ((dim>2) ? 2 : 1) ;++iz) - for (unsigned int iy=0;iy < ((dim>1) ? 2 : 1) ;++iy) - for (unsigned int ix=0;ix < 2 ;++ix) - { - if (dim>0) patches[0].vertices[vertex_number](0) = -1. + 2.*ix; - if (dim>1) patches[0].vertices[vertex_number](1) = -1. + 2.*iy; - if (dim>2) patches[0].vertices[vertex_number](2) = -1. + 2.*iz; - ++vertex_number; - } - for (unsigned int i=0;i::faces_per_cell;++i) + for (unsigned int iz=0; iz < ((dim>2) ? 2 : 1) ; ++iz) + for (unsigned int iy=0; iy < ((dim>1) ? 2 : 1) ; ++iy) + for (unsigned int ix=0; ix < 2 ; ++ix) + { + if (dim>0) patches[0].vertices[vertex_number](0) = -1. + 2.*ix; + if (dim>1) patches[0].vertices[vertex_number](1) = -1. + 2.*iy; + if (dim>2) patches[0].vertices[vertex_number](2) = -1. + 2.*iz; + ++vertex_number; + } + for (unsigned int i=0; i::faces_per_cell; ++i) patches[0].neighbors[i] = numbers::invalid_unsigned_int; patches[0].patch_index = 0; patches[0].n_subdivisions = sub; patches[0].points_are_available = false; vertex_number = 1; - for (unsigned int d=0;d > points(vertex_number); const double h = 2./sub; vertex_number = 0; - for (unsigned int iz=0;iz <= ((dim>2) ? sub : 0) ;++iz) - for (unsigned int iy=0;iy <= ((dim>1) ? sub : 0) ;++iy) - for (unsigned int ix=0;ix <= sub ;++ix) - { - if (dim>0) points[vertex_number](0) = -1.+ix*h; - if (dim>1) points[vertex_number](1) = -1.+iy*h; - if (dim>2) points[vertex_number](2) = -1.+iz*h; - ++vertex_number; - } - + for (unsigned int iz=0; iz <= ((dim>2) ? sub : 0) ; ++iz) + for (unsigned int iy=0; iy <= ((dim>1) ? sub : 0) ; ++iy) + for (unsigned int ix=0; ix <= sub ; ++ix) + { + if (dim>0) points[vertex_number](0) = -1.+ix*h; + if (dim>1) points[vertex_number](1) = -1.+iy*h; + if (dim>2) points[vertex_number](2) = -1.+iz*h; + ++vertex_number; + } + std::vector > values(points.size(), Vector(f.n_components)); std::vector > values2(f.n_components, - std::vector(points.size())); + std::vector(points.size())); f.vector_value_list(points, values); f.vector_values(points, values2); - for (unsigned int i=0;i 1e-10) - patches[0].data(j, i) = values[i](j); - else - patches[0].data(j, i) = 0; - if (values[i](j) != values2[j][i]) - deallog << "Error values (" << i << ',' << j << ") : " - << values[i](j) << " != " << values2[j][i] << std::endl; + // generate data, but + // truncate too small values + // to avoid output that + // depends on round-off + if (std::fabs (values[i](j)) > 1e-10) + patches[0].data(j, i) = values[i](j); + else + patches[0].data(j, i) = 0; + if (values[i](j) != values2[j][i]) + deallog << "Error values (" << i << ',' << j << ") : " + << values[i](j) << " != " << values2[j][i] << std::endl; } - + deallog << "Gradients "; - // Compute gradients and difference approximations + // Compute gradients and difference approximations std::vector > > - gradients(f.n_components, std::vector >(points.size())); + gradients(f.n_components, std::vector >(points.size())); std::vector > > - gradients1(points.size(), std::vector >(f.n_components)); + gradients1(points.size(), std::vector >(f.n_components)); std::vector > > - gradients2(points.size(), std::vector >(f.n_components)); - + gradients2(points.size(), std::vector >(f.n_components)); + f.vector_gradients(points, gradients); dtest1.vector_gradient_list(points, gradients1); dtest2.vector_gradient_list(points, gradients2); - // Compare gradients and difference quotients - for (unsigned int k=0;k d1 = gradients1[i][k] - gradients[k][i]; - Tensor<1,dim> d2 = gradients2[i][k] - gradients[k][i]; - - // If the difference is - // already small, we are fine - if (d1.norm() > 1.e-13) - { - // Check for - // convergence. For full - // 4th order, gradients2 - // should be 16 times as - // large, so let's be a - // bit generous - if (d2.norm() < 12.* d1.norm()) - { - deallog << "Gradient error: point " << i - << " (" << points[i] << " )" - << " comp " << k -// << " norms " << d1.norm() << " " << d2.norm() - << std::endl; - for (unsigned int d=0;d d1 = gradients1[i][k] - gradients[k][i]; + Tensor<1,dim> d2 = gradients2[i][k] - gradients[k][i]; + + // If the difference is + // already small, we are fine + if (d1.norm() > 1.e-13) + { + // Check for + // convergence. For full + // 4th order, gradients2 + // should be 16 times as + // large, so let's be a + // bit generous + if (d2.norm() < 12.* d1.norm()) + { + deallog << "Gradient error: point " << i + << " (" << points[i] << " )" + << " comp " << k +// << " norms " << d1.norm() << " " << d2.norm() + << std::endl; + for (unsigned int d=0; d 1.e-13) - deallog << "Divergence " << k << " " - << div << std::endl; + deallog << "Divergence " << k << " " + << div << std::endl; } deallog << "tested" << std::endl; - + f.vector_laplacian_list(points, values); f.vector_laplacians(points, values2); double sum = 0.; - for (unsigned int i=0;i names(f.n_components); - for (unsigned int i=0;i void -fill_vector (std::vector *>& quadratures) +fill_vector (std::vector *> &quadratures) { quadratures.push_back (new QMidpoint()); quadratures.push_back (new QTrapez()); quadratures.push_back (new QSimpson()); quadratures.push_back (new QMilne()); quadratures.push_back (new QWeddle()); - for (unsigned int i=0;i<9;++i) + for (unsigned int i=0; i<9; ++i) { quadratures.push_back (new QGauss(i)); } QMilne<1> q1d; quadratures.push_back (new Quadrature(q1d)); - for (unsigned int i=2;i<8;++i) + for (unsigned int i=2; i<8; ++i) { quadratures.push_back (new QGaussLobatto(i)); } @@ -53,7 +53,7 @@ fill_vector (std::vector *>& quadratures) template void -check_cells (std::vector*>& quadratures) +check_cells (std::vector*> &quadratures) { Quadrature quadrature; for (unsigned int n=0; n*>& quadratures) double err = 0; do - { - ++i; - - quadrature_int=0; - // Check the polynomial x^i*y^i - - for (unsigned int x=0; x(points[x](2)), i*1.0); - case 2: - f *= std::pow(static_cast(points[x](1)), i*1.0); - case 1: - f *= std::pow(static_cast(points[x](0)), i*1.0); - } - quadrature_int+=f*weights[x]; - } - - // the exact integral is 1/(i+1) - exact_int=1./std::pow(static_cast(i+1),dim); - err = std::fabs(quadrature_int-exact_int); - } + { + ++i; + + quadrature_int=0; + // Check the polynomial x^i*y^i + + for (unsigned int x=0; x(points[x](2)), i*1.0); + case 2: + f *= std::pow(static_cast(points[x](1)), i*1.0); + case 1: + f *= std::pow(static_cast(points[x](0)), i*1.0); + } + quadrature_int+=f*weights[x]; + } + + // the exact integral is 1/(i+1) + exact_int=1./std::pow(static_cast(i+1),dim); + err = std::fabs(quadrature_int-exact_int); + } while (err<1e-14); - // Uncomment here for testing + // Uncomment here for testing // deallog << " (Int " << quadrature_int << ',' << exact_int << ")"; deallog << " is exact for polynomials of degree " << i-1 << std::endl; if (dim==1) - { - // check the ordering of - // the quadrature points - bool in_order=true; - for (unsigned int x=1; x*>& quadratures, const bool sub) for (unsigned int n=0; n quadrature (sub == false? - QProjector::project_to_all_faces(*quadratures[n]) : - QProjector::project_to_all_subfaces(*quadratures[n])); + QProjector::project_to_all_faces(*quadratures[n]) : + QProjector::project_to_all_subfaces(*quadratures[n])); const std::vector > &points=quadrature.get_points(); const std::vector &weights=quadrature.get_weights(); @@ -143,49 +143,49 @@ check_faces (const std::vector*>& quadratures, const bool sub) double err = 0; do - { - ++i; - - quadrature_int=0; - // Check the polynomial - // x^i*y^i*z^i - - for (unsigned int x=0; x void test () { - // Output normal directions for each face - for (unsigned int f=0;f::faces_per_cell;++f) + // Output normal directions for each face + for (unsigned int f=0; f::faces_per_cell; ++f) { deallog << "Face " << f << ": n = ( "; - for (unsigned int d=0;d::unit_normal_direction[f]) - deallog << GeometryInfo::unit_normal_orientation[f]; - else - deallog << '0'; - } + for (unsigned int d=0; d::unit_normal_direction[f]) + deallog << GeometryInfo::unit_normal_orientation[f]; + else + deallog << '0'; + } deallog << " )" << std::endl; } - - + + Point p; for (unsigned int ref_case_no=1; ref_case_no<=RefinementPossibilities::isotropic_refinement; ++ref_case_no) { RefinementCase ref_case(ref_case_no); - + deallog << "RefinementCase=" << static_cast (ref_case) << std::endl; // generate N random points in // [-2:2]^d, and transform them @@ -65,30 +65,30 @@ void test () // and child cell const unsigned int N = 7; for (unsigned int i=0; i::is_inside_unit_cell (p) << std::endl; - for (unsigned int c=0; c::n_children(ref_case); ++c) - { - const Point q = GeometryInfo::cell_to_child_coordinates(p,c); - const Point pp = GeometryInfo::child_to_cell_coordinates(q,c); - - deallog << " " << c << " [" << q << "] [" << pp << ']' - << std::endl; - Assert ((p-pp).square() < 1e-15*1e-15, ExcInternalError()); - Assert (GeometryInfo::is_inside_unit_cell (p) == - GeometryInfo::is_inside_unit_cell (pp), - ExcInternalError()); - } - } + { + for (unsigned int d=0; d::is_inside_unit_cell (p) << std::endl; + for (unsigned int c=0; c::n_children(ref_case); ++c) + { + const Point q = GeometryInfo::cell_to_child_coordinates(p,c); + const Point pp = GeometryInfo::child_to_cell_coordinates(q,c); + + deallog << " " << c << " [" << q << "] [" << pp << ']' + << std::endl; + Assert ((p-pp).square() < 1e-15*1e-15, ExcInternalError()); + Assert (GeometryInfo::is_inside_unit_cell (p) == + GeometryInfo::is_inside_unit_cell (pp), + ExcInternalError()); + } + } } } -int main () +int main () { std::ofstream logfile("geometry_info_1/output"); deallog.attach(logfile); diff --git a/tests/base/geometry_info_2.cc b/tests/base/geometry_info_2.cc index 6dca3cf068..47839fe1a3 100644 --- a/tests/base/geometry_info_2.cc +++ b/tests/base/geometry_info_2.cc @@ -29,88 +29,88 @@ template void test () { deallog << "max_children_per_cell " - << GeometryInfo::max_children_per_cell << std::endl; + << GeometryInfo::max_children_per_cell << std::endl; deallog << "faces_per_cell " - << GeometryInfo::faces_per_cell << std::endl; + << GeometryInfo::faces_per_cell << std::endl; deallog << "max_children_per_face " - << GeometryInfo::max_children_per_face << std::endl; + << GeometryInfo::max_children_per_face << std::endl; deallog << "vertices_per_cell " - <::vertices_per_cell << std::endl; + <::vertices_per_cell << std::endl; deallog << "lines_per_cell " - << GeometryInfo::lines_per_cell << std::endl; + << GeometryInfo::lines_per_cell << std::endl; deallog << "quads_per_cell " - << GeometryInfo::quads_per_cell << std::endl; + << GeometryInfo::quads_per_cell << std::endl; deallog << "hexes_per_cell " - << GeometryInfo::hexes_per_cell << std::endl; + << GeometryInfo::hexes_per_cell << std::endl; deallog << "vertices_per_face " - << GeometryInfo::vertices_per_face << std::endl; + << GeometryInfo::vertices_per_face << std::endl; deallog << "lines_per_face " - << GeometryInfo::lines_per_face << std::endl; + << GeometryInfo::lines_per_face << std::endl; deallog << "quads_per_face " - << GeometryInfo::quads_per_face << std::endl; + << GeometryInfo::quads_per_face << std::endl; - for (unsigned int f=0;f::faces_per_cell;++f) + for (unsigned int f=0; f::faces_per_cell; ++f) deallog << "face normal" << f << ' ' - << (GeometryInfo::unit_normal_orientation[f] > 0. - ? '+' : '-') - << "x" << GeometryInfo::unit_normal_direction[f] - << std::endl; + << (GeometryInfo::unit_normal_orientation[f] > 0. + ? '+' : '-') + << "x" << GeometryInfo::unit_normal_direction[f] + << std::endl; - for (unsigned int f=0;f::faces_per_cell;++f) + for (unsigned int f=0; f::faces_per_cell; ++f) { deallog << "face_children" << f << "[true ]"; - for (unsigned int v=0;v < GeometryInfo::max_children_per_face;++v) - deallog << ' ' - << GeometryInfo::child_cell_on_face(RefinementCase::isotropic_refinement,f, v, true); + for (unsigned int v=0; v < GeometryInfo::max_children_per_face; ++v) + deallog << ' ' + << GeometryInfo::child_cell_on_face(RefinementCase::isotropic_refinement,f, v, true); deallog << std::endl; deallog << "face_children" << f << "[false]"; - for (unsigned int v=0;v < GeometryInfo::max_children_per_face;++v) - deallog << ' ' - << GeometryInfo::child_cell_on_face(RefinementCase::isotropic_refinement,f, v, false); + for (unsigned int v=0; v < GeometryInfo::max_children_per_face; ++v) + deallog << ' ' + << GeometryInfo::child_cell_on_face(RefinementCase::isotropic_refinement,f, v, false); deallog << std::endl; } - - for (unsigned int f=0;f::faces_per_cell;++f) + + for (unsigned int f=0; f::faces_per_cell; ++f) { deallog << "face_vertices" << f << "[true ]"; - for (unsigned int v=0;v < GeometryInfo::vertices_per_face;++v) - deallog << ' ' - << GeometryInfo::face_to_cell_vertices(f, v, true); + for (unsigned int v=0; v < GeometryInfo::vertices_per_face; ++v) + deallog << ' ' + << GeometryInfo::face_to_cell_vertices(f, v, true); deallog << std::endl; deallog << "face_vertices" << f << "[false]"; - for (unsigned int v=0;v < GeometryInfo::vertices_per_face;++v) - deallog << ' ' - << GeometryInfo::face_to_cell_vertices(f, v, false); + for (unsigned int v=0; v < GeometryInfo::vertices_per_face; ++v) + deallog << ' ' + << GeometryInfo::face_to_cell_vertices(f, v, false); deallog << std::endl; } - - for (unsigned int f=0;f::faces_per_cell;++f) + + for (unsigned int f=0; f::faces_per_cell; ++f) { deallog << "face_lines" << f << "[true ]"; - for (unsigned int v=1;v <= GeometryInfo::lines_per_face;++v) - deallog << ' ' - << GeometryInfo::face_to_cell_lines(f, v-1, true); + for (unsigned int v=1; v <= GeometryInfo::lines_per_face; ++v) + deallog << ' ' + << GeometryInfo::face_to_cell_lines(f, v-1, true); deallog << std::endl; deallog << "face_lines" << f << "[false]"; - for (unsigned int v=1;v <= GeometryInfo::lines_per_face;++v) - deallog << ' ' - << GeometryInfo::face_to_cell_lines(f, v-1, false); + for (unsigned int v=1; v <= GeometryInfo::lines_per_face; ++v) + deallog << ' ' + << GeometryInfo::face_to_cell_lines(f, v-1, false); deallog << std::endl; } - - for (unsigned int f=0;f::lines_per_cell;++f) + + for (unsigned int f=0; f::lines_per_cell; ++f) { deallog << "line_vertices" << f; - for (unsigned int v=0;v < GeometryInfo<1>::vertices_per_cell;++v) - deallog << ' ' - << GeometryInfo::line_to_cell_vertices(f, v); + for (unsigned int v=0; v < GeometryInfo<1>::vertices_per_cell; ++v) + deallog << ' ' + << GeometryInfo::line_to_cell_vertices(f, v); deallog << std::endl; - } + } } -int main () +int main () { std::ofstream logfile("geometry_info_2/output"); deallog.attach(logfile); diff --git a/tests/base/geometry_info_3.cc b/tests/base/geometry_info_3.cc index 5ec89422d8..9c79c24889 100644 --- a/tests/base/geometry_info_3.cc +++ b/tests/base/geometry_info_3.cc @@ -30,28 +30,28 @@ template void test () { deallog << "Checking in " << dim << "d" << std::endl; - - for (unsigned int f=0;f::faces_per_cell;++f) - for (unsigned int v=0;v::vertices_per_face;++v) + + for (unsigned int f=0; f::faces_per_cell; ++f) + for (unsigned int v=0; v::vertices_per_face; ++v) { - deallog << "Face " << f << ", vertex=" << v << ": "; - deallog << GeometryInfo::face_to_cell_vertices(f,v,true) - << std::endl; + deallog << "Face " << f << ", vertex=" << v << ": "; + deallog << GeometryInfo::face_to_cell_vertices(f,v,true) + << std::endl; } if (dim == 3) - for (unsigned int f=0;f::faces_per_cell;++f) - for (unsigned int v=0;v::vertices_per_face;++v) - { - deallog << "Face " << f << ", vertex=" << v - << " (reverse orientation): "; - deallog << GeometryInfo::face_to_cell_vertices(f,v,false) - << std::endl; - } + for (unsigned int f=0; f::faces_per_cell; ++f) + for (unsigned int v=0; v::vertices_per_face; ++v) + { + deallog << "Face " << f << ", vertex=" << v + << " (reverse orientation): "; + deallog << GeometryInfo::face_to_cell_vertices(f,v,false) + << std::endl; + } } -int main () +int main () { std::ofstream logfile("geometry_info_3/output"); deallog.attach(logfile); diff --git a/tests/base/geometry_info_4.cc b/tests/base/geometry_info_4.cc index 70e3e4698c..7707570a79 100644 --- a/tests/base/geometry_info_4.cc +++ b/tests/base/geometry_info_4.cc @@ -31,27 +31,27 @@ void test () { deallog << "Checking in " << dim << "d" << std::endl; - // check phi_i(v_j) = delta_{ij} - for (unsigned int i=0;i::vertices_per_cell;++i) - for (unsigned int v=0;v::vertices_per_cell;++v) + // check phi_i(v_j) = delta_{ij} + for (unsigned int i=0; i::vertices_per_cell; ++i) + for (unsigned int v=0; v::vertices_per_cell; ++v) { - const double - phi_i = GeometryInfo::d_linear_shape_function(GeometryInfo::unit_cell_vertex(v),i); - - deallog << phi_i << std::endl; - Assert (phi_i == (i==v ? 1 : 0), - ExcInternalError()); + const double + phi_i = GeometryInfo::d_linear_shape_function(GeometryInfo::unit_cell_vertex(v),i); + + deallog << phi_i << std::endl; + Assert (phi_i == (i==v ? 1 : 0), + ExcInternalError()); } - // check that - // sum_i phi_i(x) == 1 - // at all points. do so at every - // vertex, and then at the center - for (unsigned int v=0;v::vertices_per_cell;++v) + // check that + // sum_i phi_i(x) == 1 + // at all points. do so at every + // vertex, and then at the center + for (unsigned int v=0; v::vertices_per_cell; ++v) { double s = 0; - for (unsigned int i=0;i::vertices_per_cell;++i) - s += GeometryInfo::d_linear_shape_function(GeometryInfo::unit_cell_vertex(v),i); + for (unsigned int i=0; i::vertices_per_cell; ++i) + s += GeometryInfo::d_linear_shape_function(GeometryInfo::unit_cell_vertex(v),i); Assert (s == 1, ExcInternalError()); deallog << "Sum of shape functions: " << s << std::endl; @@ -60,9 +60,9 @@ void test () Point center; for (unsigned int i=0; i::vertices_per_cell;++i) + for (unsigned int i=0; i::vertices_per_cell; ++i) s += GeometryInfo::d_linear_shape_function(center,i); Assert (s == 1, ExcInternalError()); @@ -71,7 +71,7 @@ void test () } -int main () +int main () { std::ofstream logfile("geometry_info_4/output"); deallog.attach(logfile); diff --git a/tests/base/geometry_info_5.cc b/tests/base/geometry_info_5.cc index 0cea1b73a3..36535f9a25 100644 --- a/tests/base/geometry_info_5.cc +++ b/tests/base/geometry_info_5.cc @@ -31,28 +31,28 @@ void test () { deallog << "Checking in " << dim << "d" << std::endl; - // check phi_i(v_j) = delta_{ij} - for (unsigned int i=0;i::vertices_per_cell;++i) - for (unsigned int v=0;v::vertices_per_cell;++v) + // check phi_i(v_j) = delta_{ij} + for (unsigned int i=0; i::vertices_per_cell; ++i) + for (unsigned int v=0; v::vertices_per_cell; ++v) { - const Tensor<1,dim> - phi_i_grad - = GeometryInfo::d_linear_shape_function_gradient(GeometryInfo::unit_cell_vertex(v),i); - - deallog << phi_i_grad << std::endl; + const Tensor<1,dim> + phi_i_grad + = GeometryInfo::d_linear_shape_function_gradient(GeometryInfo::unit_cell_vertex(v),i); + + deallog << phi_i_grad << std::endl; } - // check that - // sum_i phi_i(x) == const - // at all points by verifying that the - // gradient of the sum of shape functions - // is zero. do so at every vertex, and then - // at the center - for (unsigned int v=0;v::vertices_per_cell;++v) + // check that + // sum_i phi_i(x) == const + // at all points by verifying that the + // gradient of the sum of shape functions + // is zero. do so at every vertex, and then + // at the center + for (unsigned int v=0; v::vertices_per_cell; ++v) { Tensor<1,dim> s; - for (unsigned int i=0;i::vertices_per_cell;++i) - s += GeometryInfo::d_linear_shape_function_gradient(GeometryInfo::unit_cell_vertex(v),i); + for (unsigned int i=0; i::vertices_per_cell; ++i) + s += GeometryInfo::d_linear_shape_function_gradient(GeometryInfo::unit_cell_vertex(v),i); Assert (s.norm() == 0, ExcInternalError()); deallog << "Sum of shape functions: " << s << std::endl; @@ -61,9 +61,9 @@ void test () Point center; for (unsigned int i=0; i s; - for (unsigned int i=0;i::vertices_per_cell;++i) + for (unsigned int i=0; i::vertices_per_cell; ++i) s += GeometryInfo::d_linear_shape_function_gradient(center,i); Assert (s.norm() == 0, ExcInternalError()); @@ -72,7 +72,7 @@ void test () } -int main () +int main () { std::ofstream logfile("geometry_info_5/output"); deallog.attach(logfile); diff --git a/tests/base/geometry_info_6.cc b/tests/base/geometry_info_6.cc index e8ed972300..756f2f1c38 100644 --- a/tests/base/geometry_info_6.cc +++ b/tests/base/geometry_info_6.cc @@ -31,111 +31,111 @@ void test () { deallog << "Checking in " << dim << "d" << std::endl; - // check the determinant of the - // transformation for the reference - // cell. the determinant should be one in - // that case + // check the determinant of the + // transformation for the reference + // cell. the determinant should be one in + // that case { Point vertices[GeometryInfo::vertices_per_cell]; - for (unsigned int v=0;v::vertices_per_cell;++v) + for (unsigned int v=0; v::vertices_per_cell; ++v) vertices[v] = GeometryInfo::unit_cell_vertex(v); Tensor<0,dim> determinants[GeometryInfo::vertices_per_cell]; GeometryInfo::alternating_form_at_vertices (vertices, - determinants); - for (unsigned int v=0;v::vertices_per_cell;++v) + determinants); + for (unsigned int v=0; v::vertices_per_cell; ++v) { - deallog << "Reference cell: " << determinants[v] - << std::endl; - Assert (static_cast(determinants[v]) == 1, ExcInternalError()); + deallog << "Reference cell: " << determinants[v] + << std::endl; + Assert (static_cast(determinants[v]) == 1, ExcInternalError()); } } - // try the same, but move squash the cell - // in the x-direction by a factor of 10 + // try the same, but move squash the cell + // in the x-direction by a factor of 10 { Point vertices[GeometryInfo::vertices_per_cell]; - for (unsigned int v=0;v::vertices_per_cell;++v) + for (unsigned int v=0; v::vertices_per_cell; ++v) { - vertices[v] = GeometryInfo::unit_cell_vertex(v); - vertices[v][0] /= 10; + vertices[v] = GeometryInfo::unit_cell_vertex(v); + vertices[v][0] /= 10; } Tensor<0,dim> determinants[GeometryInfo::vertices_per_cell]; GeometryInfo::alternating_form_at_vertices (vertices, - determinants); - for (unsigned int v=0;v::vertices_per_cell;++v) + determinants); + for (unsigned int v=0; v::vertices_per_cell; ++v) { - deallog << "Squashed cell: " << determinants[v] - << std::endl; - Assert (static_cast(determinants[v]) == 0.1, ExcInternalError()); + deallog << "Squashed cell: " << determinants[v] + << std::endl; + Assert (static_cast(determinants[v]) == 0.1, ExcInternalError()); } } - // try the same, but move squash the cell - // in the x-direction by a factor of 10 and - // rotate it around the z-axis (unless in - // 1d) + // try the same, but move squash the cell + // in the x-direction by a factor of 10 and + // rotate it around the z-axis (unless in + // 1d) { Point vertices[GeometryInfo::vertices_per_cell]; - for (unsigned int v=0;v::vertices_per_cell;++v) + for (unsigned int v=0; v::vertices_per_cell; ++v) { - vertices[v] = GeometryInfo::unit_cell_vertex(v); - vertices[v][0] /= 10; - - if (dim > 1) - { - std::swap (vertices[v][0], vertices[v][1]); - vertices[v][1] *= -1; - } + vertices[v] = GeometryInfo::unit_cell_vertex(v); + vertices[v][0] /= 10; + + if (dim > 1) + { + std::swap (vertices[v][0], vertices[v][1]); + vertices[v][1] *= -1; + } } Tensor<0,dim> determinants[GeometryInfo::vertices_per_cell]; GeometryInfo::alternating_form_at_vertices (vertices, - determinants); - for (unsigned int v=0;v::vertices_per_cell;++v) + determinants); + for (unsigned int v=0; v::vertices_per_cell; ++v) { - deallog << "Squashed+rotated cell: " << determinants[v] - << std::endl; - Assert (static_cast(determinants[v]) == 0.1, ExcInternalError()); + deallog << "Squashed+rotated cell: " << determinants[v] + << std::endl; + Assert (static_cast(determinants[v]) == 0.1, ExcInternalError()); } } - // pinched cell + // pinched cell { Point vertices[GeometryInfo::vertices_per_cell]; - for (unsigned int v=0;v::vertices_per_cell;++v) + for (unsigned int v=0; v::vertices_per_cell; ++v) vertices[v] = GeometryInfo::unit_cell_vertex(v); vertices[1] /= 10; - + Tensor<0,dim> determinants[GeometryInfo::vertices_per_cell]; GeometryInfo::alternating_form_at_vertices (vertices, - determinants); - for (unsigned int v=0;v::vertices_per_cell;++v) + determinants); + for (unsigned int v=0; v::vertices_per_cell; ++v) deallog << "Pinched cell: " << determinants[v] - << std::endl; + << std::endl; } - // inverted cell + // inverted cell { Point vertices[GeometryInfo::vertices_per_cell]; - for (unsigned int v=0;v::vertices_per_cell;++v) + for (unsigned int v=0; v::vertices_per_cell; ++v) vertices[v] = GeometryInfo::unit_cell_vertex(v); std::swap (vertices[0], vertices[1]); - + Tensor<0,dim> determinants[GeometryInfo::vertices_per_cell]; GeometryInfo::alternating_form_at_vertices (vertices, - determinants); - for (unsigned int v=0;v::vertices_per_cell;++v) + determinants); + for (unsigned int v=0; v::vertices_per_cell; ++v) deallog << "Inverted cell: " << determinants[v] - << std::endl; + << std::endl; } } -int main () +int main () { std::ofstream logfile("geometry_info_6/output"); deallog.attach(logfile); diff --git a/tests/base/geometry_info_7.cc b/tests/base/geometry_info_7.cc index 5a95d4f2ab..41b0aefa82 100644 --- a/tests/base/geometry_info_7.cc +++ b/tests/base/geometry_info_7.cc @@ -31,166 +31,166 @@ void test () { deallog << "Checking in " << dim << "d" << std::endl; - // check the determinant of the - // transformation for the reference - // cell. the determinant should be one in - // that case + // check the determinant of the + // transformation for the reference + // cell. the determinant should be one in + // that case { Point vertices[GeometryInfo::vertices_per_cell]; - for (unsigned int v=0;v::vertices_per_cell;++v) + for (unsigned int v=0; v::vertices_per_cell; ++v) vertices[v] = GeometryInfo::unit_cell_vertex(v); for (unsigned int f=0; f::faces_per_cell; ++f) { - Point face_vertices[GeometryInfo::vertices_per_face]; - for (unsigned int v=0; v::vertices_per_face; ++v) - face_vertices[v] = vertices[GeometryInfo::face_to_cell_vertices (f, v)]; - - Tensor<1,dim> alternating_forms[GeometryInfo::vertices_per_face]; - GeometryInfo::alternating_form_at_vertices (face_vertices, - alternating_forms); - for (unsigned int v=0;v::vertices_per_face;++v) - { - deallog << "Reference cell: face " << f << ": " << alternating_forms[v] - << std::endl; - Assert (alternating_forms[v].norm() == 1, ExcInternalError()); - } + Point face_vertices[GeometryInfo::vertices_per_face]; + for (unsigned int v=0; v::vertices_per_face; ++v) + face_vertices[v] = vertices[GeometryInfo::face_to_cell_vertices (f, v)]; + + Tensor<1,dim> alternating_forms[GeometryInfo::vertices_per_face]; + GeometryInfo::alternating_form_at_vertices (face_vertices, + alternating_forms); + for (unsigned int v=0; v::vertices_per_face; ++v) + { + deallog << "Reference cell: face " << f << ": " << alternating_forms[v] + << std::endl; + Assert (alternating_forms[v].norm() == 1, ExcInternalError()); + } } } - - // try the same, but move squash the cell - // in the x-direction by a factor of 10 + + // try the same, but move squash the cell + // in the x-direction by a factor of 10 { Point vertices[GeometryInfo::vertices_per_cell]; - for (unsigned int v=0;v::vertices_per_cell;++v) + for (unsigned int v=0; v::vertices_per_cell; ++v) { - vertices[v] = GeometryInfo::unit_cell_vertex(v); - vertices[v][0] /= 10; + vertices[v] = GeometryInfo::unit_cell_vertex(v); + vertices[v][0] /= 10; } for (unsigned int f=0; f::faces_per_cell; ++f) { - Point face_vertices[GeometryInfo::vertices_per_face]; - for (unsigned int v=0; v::vertices_per_face; ++v) - face_vertices[v] = vertices[GeometryInfo::face_to_cell_vertices (f, v)]; - Tensor<1,dim> alternating_forms[GeometryInfo::vertices_per_face]; - GeometryInfo::alternating_form_at_vertices (face_vertices, - alternating_forms); - for (unsigned int v=0;v::vertices_per_face;++v) - { - deallog << "Squashed cell: face " << f << ": " << alternating_forms[v] - << std::endl; - // faces 0,1 should be - // unaffected, but all - // other faces are - // squashed - if (f < 2) - Assert (alternating_forms[v].norm() == 1, ExcInternalError()) - else - Assert (alternating_forms[v].norm() == 0.1, ExcInternalError()); - } + Point face_vertices[GeometryInfo::vertices_per_face]; + for (unsigned int v=0; v::vertices_per_face; ++v) + face_vertices[v] = vertices[GeometryInfo::face_to_cell_vertices (f, v)]; + Tensor<1,dim> alternating_forms[GeometryInfo::vertices_per_face]; + GeometryInfo::alternating_form_at_vertices (face_vertices, + alternating_forms); + for (unsigned int v=0; v::vertices_per_face; ++v) + { + deallog << "Squashed cell: face " << f << ": " << alternating_forms[v] + << std::endl; + // faces 0,1 should be + // unaffected, but all + // other faces are + // squashed + if (f < 2) + Assert (alternating_forms[v].norm() == 1, ExcInternalError()) + else + Assert (alternating_forms[v].norm() == 0.1, ExcInternalError()); + } } } - - // try the same, but move squash the cell - // in the x-direction by a factor of 10 and - // rotate it around the z-axis (unless in - // 1d) + + // try the same, but move squash the cell + // in the x-direction by a factor of 10 and + // rotate it around the z-axis (unless in + // 1d) { Point vertices[GeometryInfo::vertices_per_cell]; - for (unsigned int v=0;v::vertices_per_cell;++v) + for (unsigned int v=0; v::vertices_per_cell; ++v) { - vertices[v] = GeometryInfo::unit_cell_vertex(v); - vertices[v][0] /= 10; - - if (dim > 1) - { - std::swap (vertices[v][0], vertices[v][1]); - vertices[v][1] *= -1; - } + vertices[v] = GeometryInfo::unit_cell_vertex(v); + vertices[v][0] /= 10; + + if (dim > 1) + { + std::swap (vertices[v][0], vertices[v][1]); + vertices[v][1] *= -1; + } } for (unsigned int f=0; f::faces_per_cell; ++f) { - Point face_vertices[GeometryInfo::vertices_per_face]; - for (unsigned int v=0; v::vertices_per_face; ++v) - face_vertices[v] = vertices[GeometryInfo::face_to_cell_vertices (f, v)]; - Tensor<1,dim> alternating_forms[GeometryInfo::vertices_per_face]; - GeometryInfo::alternating_form_at_vertices (face_vertices, - alternating_forms); - for (unsigned int v=0;v::vertices_per_face;++v) - { - deallog << "Squashed+rotated cell: face " << f << ": " << alternating_forms[v] - << std::endl; - - // in 2d and 3d, faces - // 0,1 should be - // unaffected (just like - // for the squashed cell, - // the rotation has - // nothing to do with - // face numbers though - // the direction of the - // alternating form - // vector would have - // rotated along) - if (f<2) - Assert (alternating_forms[v].norm() == 1, ExcInternalError()) - else - Assert (alternating_forms[v].norm() == 0.1, ExcInternalError()); - } + Point face_vertices[GeometryInfo::vertices_per_face]; + for (unsigned int v=0; v::vertices_per_face; ++v) + face_vertices[v] = vertices[GeometryInfo::face_to_cell_vertices (f, v)]; + Tensor<1,dim> alternating_forms[GeometryInfo::vertices_per_face]; + GeometryInfo::alternating_form_at_vertices (face_vertices, + alternating_forms); + for (unsigned int v=0; v::vertices_per_face; ++v) + { + deallog << "Squashed+rotated cell: face " << f << ": " << alternating_forms[v] + << std::endl; + + // in 2d and 3d, faces + // 0,1 should be + // unaffected (just like + // for the squashed cell, + // the rotation has + // nothing to do with + // face numbers though + // the direction of the + // alternating form + // vector would have + // rotated along) + if (f<2) + Assert (alternating_forms[v].norm() == 1, ExcInternalError()) + else + Assert (alternating_forms[v].norm() == 0.1, ExcInternalError()); + } } } - - // pinched cell + + // pinched cell { Point vertices[GeometryInfo::vertices_per_cell]; - for (unsigned int v=0;v::vertices_per_cell;++v) + for (unsigned int v=0; v::vertices_per_cell; ++v) vertices[v] = GeometryInfo::unit_cell_vertex(v); vertices[1] /= 10; - + for (unsigned int f=0; f::faces_per_cell; ++f) { - Point face_vertices[GeometryInfo::vertices_per_face]; - for (unsigned int v=0; v::vertices_per_face; ++v) - face_vertices[v] = vertices[GeometryInfo::face_to_cell_vertices (f, v)]; - Tensor<1,dim> alternating_forms[GeometryInfo::vertices_per_face]; - GeometryInfo::alternating_form_at_vertices (face_vertices, - alternating_forms); - for (unsigned int v=0;v::vertices_per_face;++v) - deallog << "Pinched cell: face " << f << ": " << alternating_forms[v] - << std::endl; + Point face_vertices[GeometryInfo::vertices_per_face]; + for (unsigned int v=0; v::vertices_per_face; ++v) + face_vertices[v] = vertices[GeometryInfo::face_to_cell_vertices (f, v)]; + Tensor<1,dim> alternating_forms[GeometryInfo::vertices_per_face]; + GeometryInfo::alternating_form_at_vertices (face_vertices, + alternating_forms); + for (unsigned int v=0; v::vertices_per_face; ++v) + deallog << "Pinched cell: face " << f << ": " << alternating_forms[v] + << std::endl; } } - - // inverted cell + + // inverted cell { Point vertices[GeometryInfo::vertices_per_cell]; - for (unsigned int v=0;v::vertices_per_cell;++v) + for (unsigned int v=0; v::vertices_per_cell; ++v) vertices[v] = GeometryInfo::unit_cell_vertex(v); std::swap (vertices[0], vertices[1]); - + for (unsigned int f=0; f::faces_per_cell; ++f) { - Point face_vertices[GeometryInfo::vertices_per_face]; - for (unsigned int v=0; v::vertices_per_face; ++v) - face_vertices[v] = vertices[GeometryInfo::face_to_cell_vertices (f, v)]; - - Tensor<1,dim> alternating_forms[GeometryInfo::vertices_per_face]; - GeometryInfo::alternating_form_at_vertices (face_vertices, - alternating_forms); - for (unsigned int v=0;v::vertices_per_face;++v) - deallog << "Inverted cell: face " << f << ": " << alternating_forms[v] - << std::endl; + Point face_vertices[GeometryInfo::vertices_per_face]; + for (unsigned int v=0; v::vertices_per_face; ++v) + face_vertices[v] = vertices[GeometryInfo::face_to_cell_vertices (f, v)]; + + Tensor<1,dim> alternating_forms[GeometryInfo::vertices_per_face]; + GeometryInfo::alternating_form_at_vertices (face_vertices, + alternating_forms); + for (unsigned int v=0; v::vertices_per_face; ++v) + deallog << "Inverted cell: face " << f << ": " << alternating_forms[v] + << std::endl; } } } -int main () +int main () { std::ofstream logfile("geometry_info_7/output"); deallog.attach(logfile); diff --git a/tests/base/geometry_info_8.cc b/tests/base/geometry_info_8.cc index ad50a82fc3..8aa2533e93 100644 --- a/tests/base/geometry_info_8.cc +++ b/tests/base/geometry_info_8.cc @@ -35,26 +35,29 @@ void test_vertices() { deallog << dim << "D:" << std::endl; - for(unsigned int i = 0; i < GeometryInfo::faces_per_cell; ++i) { - - deallog << "face " << i << ":" << std::endl; - - for(unsigned int o = 0; o < 8; ++o) { - const std::bitset<3> orientation = o; - - deallog << "orientation " << orientation[0] - << ", flip " << orientation[1] - << ", rotation " << orientation[2] - << ":" << std::endl << " "; - - for(unsigned int j = 0; j < GeometryInfo::vertices_per_face; ++j) { - deallog << " (" << j << " -> " - << GeometryInfo::face_to_cell_vertices(i, j, orientation[0], orientation[1], orientation[2]) - << " )"; - } - deallog << std::endl; + for (unsigned int i = 0; i < GeometryInfo::faces_per_cell; ++i) + { + + deallog << "face " << i << ":" << std::endl; + + for (unsigned int o = 0; o < 8; ++o) + { + const std::bitset<3> orientation = o; + + deallog << "orientation " << orientation[0] + << ", flip " << orientation[1] + << ", rotation " << orientation[2] + << ":" << std::endl << " "; + + for (unsigned int j = 0; j < GeometryInfo::vertices_per_face; ++j) + { + deallog << " (" << j << " -> " + << GeometryInfo::face_to_cell_vertices(i, j, orientation[0], orientation[1], orientation[2]) + << " )"; + } + deallog << std::endl; + } } - } } @@ -63,26 +66,29 @@ void test_lines() { deallog << dim << "D:" << std::endl; - for(unsigned int i = 0; i < GeometryInfo::faces_per_cell; ++i) { + for (unsigned int i = 0; i < GeometryInfo::faces_per_cell; ++i) + { - deallog << "face " << i << ":" << std::endl; + deallog << "face " << i << ":" << std::endl; - for(unsigned int o = 0; o < 8; ++o) { - const std::bitset<3> orientation = o; + for (unsigned int o = 0; o < 8; ++o) + { + const std::bitset<3> orientation = o; - deallog << "orientation " << orientation[0] - << ", flip " << orientation[1] - << ", rotation " << orientation[2] - << ":" << std::endl << " "; + deallog << "orientation " << orientation[0] + << ", flip " << orientation[1] + << ", rotation " << orientation[2] + << ":" << std::endl << " "; - for(unsigned int j = 0; j < GeometryInfo::lines_per_face; ++j) { - deallog << " (" << j << " -> " - << GeometryInfo::face_to_cell_lines(i, j, orientation[0], orientation[1], orientation[2]) - << " )"; - } - deallog << std::endl; + for (unsigned int j = 0; j < GeometryInfo::lines_per_face; ++j) + { + deallog << " (" << j << " -> " + << GeometryInfo::face_to_cell_lines(i, j, orientation[0], orientation[1], orientation[2]) + << " )"; + } + deallog << std::endl; + } } - } } diff --git a/tests/base/hierarchical.cc b/tests/base/hierarchical.cc index fb834a6e4f..fe8d2f9a2c 100644 --- a/tests/base/hierarchical.cc +++ b/tests/base/hierarchical.cc @@ -40,7 +40,7 @@ int main () deallog.threshold_double(1.e-10); const std::vector > - p = Hierarchical::generate_complete_basis (10); + p = Hierarchical::generate_complete_basis (10); const unsigned int div=30; for (unsigned int i=0; i<=div; ++i) diff --git a/tests/base/index_set_01.cc b/tests/base/index_set_01.cc index 6d808749e9..203d950736 100644 --- a/tests/base/index_set_01.cc +++ b/tests/base/index_set_01.cc @@ -38,7 +38,7 @@ void test () for (unsigned int i=0; i -void testor(IndexSet & a, IndexSet & other, bool verbose=true) +void testor(IndexSet &a, IndexSet &other, bool verbose=true) { IndexSet merged(a); @@ -41,13 +41,13 @@ void testor(IndexSet & a, IndexSet & other, bool verbose=true) merged.print(deallog); } - for (unsigned int i=0;i -void testor(IndexSet & a, - IndexSet & other, - unsigned int offset, - bool verbose) +void testor(IndexSet &a, + IndexSet &other, + unsigned int offset, + bool verbose) { IndexSet merged(a); @@ -44,13 +44,13 @@ void testor(IndexSet & a, merged.print(deallog); } - for (unsigned int i=0;i=offset && other.is_element(i-offset))), - ExcInternalError()); + merged.is_element(i) + == + (a.is_element(i) || (i>=offset && other.is_element(i-offset))), + ExcInternalError()); } } @@ -60,14 +60,14 @@ void testor(IndexSet & a, void test() { const int size = 10; - + IndexSet empty(size); IndexSet id(size); id.add_index(3); id.add_index(4); id.add_index(7); - + deallog << "* add empty: " << std::endl; testor(id, empty, 2, true); diff --git a/tests/base/index_set_21.cc b/tests/base/index_set_21.cc index c97b197b26..1bcaaf199d 100644 --- a/tests/base/index_set_21.cc +++ b/tests/base/index_set_21.cc @@ -36,8 +36,8 @@ void test () index_set.add_index (14); index_set.add_index (16); - // clear the IndexSet and then set elements - // again + // clear the IndexSet and then set elements + // again index_set.clear (); index_set.add_range (2,4); @@ -49,7 +49,7 @@ void test () for (unsigned int i=0; i void check () { using namespace numbers; - + deallog << std::numeric_limits::quiet_NaN() << " --> "; deallog << is_finite(std::numeric_limits::quiet_NaN()) << std::endl; @@ -68,7 +68,7 @@ int main () check (); check (); - + return 0; } diff --git a/tests/base/is_finite_complex.cc b/tests/base/is_finite_complex.cc index bfe860da80..67d065b49a 100644 --- a/tests/base/is_finite_complex.cc +++ b/tests/base/is_finite_complex.cc @@ -28,7 +28,7 @@ template void check () { using namespace numbers; - + deallog << std::numeric_limits::real_type>::quiet_NaN() << " --> "; deallog << is_finite(T(std::numeric_limits::real_type>::quiet_NaN(), 0)) << ' '; deallog << is_finite(T(0,std::numeric_limits::real_type>::quiet_NaN())) << std::endl; @@ -73,7 +73,7 @@ int main () check > (); check > (); - + return 0; } diff --git a/tests/base/log_precision.cc b/tests/base/log_precision.cc index 997d2ebabf..521bc4d529 100644 --- a/tests/base/log_precision.cc +++ b/tests/base/log_precision.cc @@ -40,7 +40,7 @@ int main () // ensure that the precision of the underlying file stream object remained // unchanged deallog.get_file_stream() << numbers::PI << std::endl; - + return 0; } diff --git a/tests/base/log_width.cc b/tests/base/log_width.cc index 4c15faa6f0..c61925a4a9 100644 --- a/tests/base/log_width.cc +++ b/tests/base/log_width.cc @@ -40,7 +40,7 @@ int main () // ensure that the width of the underlying file stream object remained // unchanged deallog.get_file_stream() << numbers::PI*2 << 42 << std::endl; - + return 0; } diff --git a/tests/base/named_data.cc b/tests/base/named_data.cc index 0baac6a222..8c7ad959d6 100644 --- a/tests/base/named_data.cc +++ b/tests/base/named_data.cc @@ -25,31 +25,31 @@ template void -test_const(const NamedData& data) +test_const(const NamedData &data) { NamedData newdata; newdata.merge(data); data.print(deallog); - + deallog << "Const should be true: " << (newdata.is_const() ? "true" : "false") << std::endl; } template void -test_selector(const NamedData& data) +test_selector(const NamedData &data) { NamedSelection select; select.add("P1"); select.add("P6"); - select.add("P5"); + select.add("P5"); select.add("P3"); select.initialize(data); - for (unsigned int i=0;i(new double); data.add(p, "P5"); - for (unsigned int i=0;i void check (const number &x) { deallog << "typeid(x).name() = " << typeid(x).name() - << std::endl; + << std::endl; deallog << "typeid(NumberTraits::real_type).name() = " - << typeid(typename numbers::NumberTraits::real_type).name() - << std::endl; + << typeid(typename numbers::NumberTraits::real_type).name() + << std::endl; deallog << numbers::NumberTraits::conjugate (x) - << std::endl; + << std::endl; deallog << numbers::NumberTraits::abs_square (x) - << std::endl; + << std::endl; deallog << numbers::NumberTraits::abs (x) - << std::endl; -} + << std::endl; +} diff --git a/tests/base/number_traits_real.cc b/tests/base/number_traits_real.cc index 68815cf0ad..84a676308a 100644 --- a/tests/base/number_traits_real.cc +++ b/tests/base/number_traits_real.cc @@ -29,21 +29,21 @@ template void check (const number &x) { deallog << "typeid(x).name() = " << typeid(x).name() - << std::endl; + << std::endl; deallog << "typeid(NumberTraits::real_type).name() = " - << typeid(typename numbers::NumberTraits::real_type).name() - << std::endl; + << typeid(typename numbers::NumberTraits::real_type).name() + << std::endl; deallog << numbers::NumberTraits::conjugate (x) - << std::endl; + << std::endl; deallog << numbers::NumberTraits::abs_square (x) - << std::endl; + << std::endl; deallog << numbers::NumberTraits::abs (x) - << std::endl; -} + << std::endl; +} @@ -62,7 +62,7 @@ int main () check ((double)-1.5); check ((long double)1.5); - check ((long double)-1.5); + check ((long double)-1.5); return 0; } diff --git a/tests/base/parallel_accumulate.cc b/tests/base/parallel_accumulate.cc index c301b47ff4..42a2463283 100644 --- a/tests/base/parallel_accumulate.cc +++ b/tests/base/parallel_accumulate.cc @@ -25,14 +25,14 @@ int sum (const int begin, - const int end) + const int end) { int s=0; for (int i=begin; i void -create_patches(std::vector > & patches) +create_patches(std::vector > &patches) { - for (unsigned int p=0;p& patch = patches[p]; - + DataOutBase::Patch &patch = patches[p]; + const unsigned int nsub = p+1; const unsigned int nsubp = nsub+1; - + patch.n_subdivisions = nsub; - for (unsigned int v=0;v::vertices_per_cell;++v) - for (unsigned int d=0;d=dim) ? v : 0); - + for (unsigned int v=0; v::vertices_per_cell; ++v) + for (unsigned int d=0; d=dim) ? v : 0); + unsigned int n1 = (dim>0) ? nsubp : 1; unsigned int n2 = (dim>1) ? nsubp : 1; unsigned int n3 = (dim>2) ? nsubp : 1; unsigned int n4 = (dim>3) ? nsubp : 1; patch.data.reinit(5, n1*n2*n3*n4); - - for (unsigned int i4=0;i4 > & patches) template void create_continuous_patches( - std::vector > & patches, + std::vector > &patches, unsigned int n_cells, unsigned int n_sub) { @@ -88,39 +88,39 @@ create_continuous_patches( QIterated trapezsub(trapez1d, n_sub); Point midpoint; - for (unsigned int d=0;d function(2., midpoint); - - for (unsigned int i3=0;i3 patch; - patch.n_subdivisions = n_sub; - for (unsigned int k=0;k p = trapez.point(k); - if (dim>=1) p(0) += i1; - if (dim>=2) p(1) += i2; - if (dim>=3) p(2) += i3; - patch.vertices[k] = p; - } - std::vector > points = trapezsub.get_points(); - for (unsigned int k=0;k=1) points[k](0) += i1; - if (dim>=2) points[k](1) += i2; - if (dim>=3) points[k](2) += i3; - } - std::vector values(points.size()); - function.value_list(points, values); - patch.data.reinit(1, points.size()); - for (unsigned int k=0;k patch; + patch.n_subdivisions = n_sub; + for (unsigned int k=0; k p = trapez.point(k); + if (dim>=1) p(0) += i1; + if (dim>=2) p(1) += i2; + if (dim>=3) p(2) += i3; + patch.vertices[k] = p; + } + std::vector > points = trapezsub.get_points(); + for (unsigned int k=0; k=1) points[k](0) += i1; + if (dim>=2) points[k](1) += i2; + if (dim>=3) points[k](2) += i3; + } + std::vector values(points.size()); + function.value_list(points, values); + patch.data.reinit(1, points.size()); + for (unsigned int k=0; k> line; deallog << ' ' << line; diff --git a/tests/base/patterns_01.cc b/tests/base/patterns_01.cc index 96162f0c05..6ab401c317 100644 --- a/tests/base/patterns_01.cc +++ b/tests/base/patterns_01.cc @@ -27,17 +27,17 @@ int main() deallog.depth_console(0); deallog.threshold_double(1.e-10); - // create a pattern and let it - // output its description + // create a pattern and let it + // output its description Patterns::Integer pattern(-1,42); const std::string desc = pattern.description(); - // now let the same class re-create - // a pattern object from the - // description and verify that the - // result is the same as what we - // started out with - Patterns::Integer * pattern2 = Patterns::Integer::create (desc); + // now let the same class re-create + // a pattern object from the + // description and verify that the + // result is the same as what we + // started out with + Patterns::Integer *pattern2 = Patterns::Integer::create (desc); Assert (pattern2 != 0, ExcInternalError()); Assert (desc == pattern2->description(), ExcInternalError()); diff --git a/tests/base/polynomial1d.cc b/tests/base/polynomial1d.cc index bbc0bddfc8..51991db6d7 100644 --- a/tests/base/polynomial1d.cc +++ b/tests/base/polynomial1d.cc @@ -33,14 +33,14 @@ using namespace Polynomials; -double scalar_product (const Polynomial& p1, - const Polynomial& p2) +double scalar_product (const Polynomial &p1, + const Polynomial &p2) { unsigned int degree = (p1.degree() + p2.degree())/2 + 1; QGauss<1> gauss(degree); double sum = 0.; - for (unsigned int i=0;i p1(c1); - + std::vector c2(3); c2[0] = .4; c2[1] = .7; @@ -85,8 +85,8 @@ void polynomial_arithmetic () std::cerr << "*P2" << std::endl; p2 *= p1; p2.print(std::cerr); - - for (unsigned int i=0;i<7;++i) + + for (unsigned int i=0; i<7; ++i) { std::cerr << "derive" << std::endl; p1 = p1.derivative(); @@ -105,88 +105,88 @@ int main () deallog.log_cerr(); polynomial_arithmetic(); - + std::vector > p; std::vector > q; deallog << "Legendre" << std::endl; - - for (unsigned int i=0;i<12;++i) + + for (unsigned int i=0; i<12; ++i) { p.push_back (Legendre(i)); } - - - for (unsigned int i=0;i values (p.size()); @@ -194,15 +194,15 @@ int main () for (unsigned int j=2; j >& polynomials) +void interpolation_conditions(const std::vector > &polynomials) { std::vector values(2); - for (unsigned int i=0;i >& p, - const std::vector >& x) +void check_interpolation (const std::vector > &p, + const std::vector > &x) { - for (unsigned int i=0;i 2.e-10) - deallog << "Error1 lg y=" << std::log10(std::fabs(y-1.)) - << std::endl; - } - else - { - if (std::fabs(y) > 3.e-10) - deallog << "Error0 lg y=" << std::log10(std::fabs(y)) - << std::endl; - } - } + for (unsigned int k=0; k 2.e-10) + deallog << "Error1 lg y=" << std::log10(std::fabs(y-1.)) + << std::endl; + } + else + { + if (std::fabs(y) > 3.e-10) + deallog << "Error0 lg y=" << std::log10(std::fabs(y)) + << std::endl; + } + } deallog << std::endl; } } void -check_poly (const Quadrature<1>& q) +check_poly (const Quadrature<1> &q) { deallog << "Points: " << q.size() << std::endl; std::vector > p = generate_complete_Lagrange_basis(q.get_points()); @@ -72,7 +72,7 @@ check_lge (unsigned int n) std::vector > p = LagrangeEquidistant::generate_complete_basis(n); std::vector > x(n+1); const double h = 1./n; - for (unsigned int i=0;i<=n;++i) + for (unsigned int i=0; i<=n; ++i) x[i](0) = h*i; check_interpolation(p, x); } @@ -85,7 +85,7 @@ int main() deallog.attach(logfile); deallog.depth_console(0); // deallog.threshold_double(1.e-10); - + QTrapez<1> trapez; QSimpson<1> simpson; QIterated<1> equi7(trapez, 6); @@ -103,7 +103,7 @@ int main() QGaussLobatto<1> gl6(6); QGaussLobatto<1> gl7(7); QGaussLobatto<1> gl10(10); - + deallog.push("LagrangeEquidistant"); check_lge(6); check_lge(9); @@ -114,13 +114,13 @@ int main() check_poly(equi7); check_poly(equi10); deallog.pop(); - deallog.push("Gauss"); + deallog.push("Gauss"); check_poly(g2); check_poly(g3); check_poly(g7); check_poly(g10); deallog.pop(); - deallog.push("GaussLobatto"); + deallog.push("GaussLobatto"); check_poly(gl2); check_poly(gl3); check_poly(gl4); diff --git a/tests/base/polynomial_lagrange_ops.cc b/tests/base/polynomial_lagrange_ops.cc index 5083600733..7b67d26f2b 100644 --- a/tests/base/polynomial_lagrange_ops.cc +++ b/tests/base/polynomial_lagrange_ops.cc @@ -43,8 +43,8 @@ void check_scale (const std::vector > &p) double value1 = p[i].value (factor * x); double value2 = q .value (x); if (std::fabs(value1-value2) > std::max(1e-13,1e-13*std::fabs(value1))) - deallog << "Error scale at x=" << x << ": p(t)=" << value1 - << ", q(x)=" << value2 << std::endl; + deallog << "Error scale at x=" << x << ": p(t)=" << value1 + << ", q(x)=" << value2 << std::endl; deallog << "."; } deallog << std::endl; @@ -54,7 +54,7 @@ void check_scale (const std::vector > &p) void check_shift (const std::vector > &p) { - // shift does not work for too high orders + // shift does not work for too high orders if (p.size() > 30) return; @@ -68,8 +68,8 @@ void check_shift (const std::vector > &p) double value1 = p[i].value (x+a); double value2 = q .value (x); if (std::fabs(value1-value2) > std::max(1e-13,1e-13*std::fabs(value1))) - deallog << "Error shift at x=" << x << ": p(t)=" << value1 - << ", q(x)=" << value2 << std::endl; + deallog << "Error shift at x=" << x << ": p(t)=" << value1 + << ", q(x)=" << value2 << std::endl; deallog << "."; } deallog << std::endl; @@ -89,8 +89,8 @@ void check_mult_scalar (const std::vector > &p) double value1 = p[i].value (x) * a; double value2 = q .value (x); if (std::fabs(value1-value2) > std::max(1e-13,1e-13*std::fabs(value1))) - deallog << "Error multiply at x=" << x << ": a*p(x)=" << value1 - << ", q(x)=" << value2 << std::endl; + deallog << "Error multiply at x=" << x << ": a*p(x)=" << value1 + << ", q(x)=" << value2 << std::endl; deallog << "."; } deallog << std::endl; @@ -104,16 +104,16 @@ void check_mult (const std::vector > &p) for (unsigned int i=0; i q = p[i]; - q *= p[j]; - double x = (double)rand()/RAND_MAX; - double value1 = p[i].value (x) * p[j].value(x); - double value2 = q .value (x); - if (std::fabs(value1-value2) > std::max(1e-13,1e-13*std::fabs(value1))) - deallog << "Error multiply at x=" << x << ": p_1(x)*p_2(x)=" << value1 - << ", q(x)=" << value2 << std::endl; - } + { + Polynomial q = p[i]; + q *= p[j]; + double x = (double)rand()/RAND_MAX; + double value1 = p[i].value (x) * p[j].value(x); + double value2 = q .value (x); + if (std::fabs(value1-value2) > std::max(1e-13,1e-13*std::fabs(value1))) + deallog << "Error multiply at x=" << x << ": p_1(x)*p_2(x)=" << value1 + << ", q(x)=" << value2 << std::endl; + } deallog << "."; } deallog << std::endl; @@ -125,15 +125,15 @@ void check_expand (const std::vector > &p) { if (p.size() > 10) return; - // this checks whether the Lagrange product - // form and the usual form with factors for - // different powers does the same - // thing. Realize this by adding the - // polynomial '0' to the current - // polynomial. That destroys the product form - // and triggers the usual form. do not do this - // for higher order because then the standard - // form is unstable + // this checks whether the Lagrange product + // form and the usual form with factors for + // different powers does the same + // thing. Realize this by adding the + // polynomial '0' to the current + // polynomial. That destroys the product form + // and triggers the usual form. do not do this + // for higher order because then the standard + // form is unstable deallog << "Expansion operation"; Monomial zero(0, 0.); for (unsigned int i=0; i > &p) double value1 = p[i].value (x); double value2 = q .value (x); if (std::fabs(value1-value2) > std::max(1e-10,1e-10*std::fabs(value1))) - deallog << "Error expansion at x=" << x << ": p(x)=" << value1 - << ", q(x)=" << value2 << std::endl; + deallog << "Error expansion at x=" << x << ": p(x)=" << value1 + << ", q(x)=" << value2 << std::endl; deallog << "."; } deallog << std::endl; @@ -162,18 +162,18 @@ void check_mult_expand (const std::vector > &p) for (unsigned int i=0; i q = p[i]; - q += zero; - q *= p[j]; - double x = (double)rand()/RAND_MAX; - double value1 = p[i].value (x) * p[j].value(x); - double value2 = q .value (x); - if (std::fabs(value1-value2) > std::max(1e-10,1e-10*std::fabs(value1))) - deallog << "Error multiply at x=" << x - << ": p_"<& q) +check_poly (const Quadrature<1> &q) { deallog << "Points: " << q.size() << std::endl; std::vector > p = generate_complete_Lagrange_basis(q.get_points()); @@ -227,9 +227,9 @@ int main() deallog.pop(); deallog << std::endl; - // Lagrange elements on GL points have good - // conditioning, so test to some very high - // orders + // Lagrange elements on GL points have good + // conditioning, so test to some very high + // orders deallog.push("GaussLobatto"); for (unsigned i=1; i<40; i+=3) check_poly (QGaussLobatto<1>(i+1)); diff --git a/tests/base/polynomial_lagrange_order.cc b/tests/base/polynomial_lagrange_order.cc index 716561fdcb..17982623b0 100644 --- a/tests/base/polynomial_lagrange_order.cc +++ b/tests/base/polynomial_lagrange_order.cc @@ -32,52 +32,52 @@ using namespace Polynomials; -void check_interpolation (const std::vector >& p, - const std::vector >& x) +void check_interpolation (const std::vector > &p, + const std::vector > &x) { - for (unsigned int i=0;i 1e-13) - deallog << "Error1 lg y=" << std::log10(std::fabs(y-1.)) - << std::endl; - } - else - { - if (std::fabs(y) > 1e-13) - deallog << "Error0 lg y=" << std::log10(std::fabs(y)) - << std::endl; - } - } + for (unsigned int k=0; k 1e-13) + deallog << "Error1 lg y=" << std::log10(std::fabs(y-1.)) + << std::endl; + } + else + { + if (std::fabs(y) > 1e-13) + deallog << "Error0 lg y=" << std::log10(std::fabs(y)) + << std::endl; + } + } deallog << std::endl; } } -void check_constant (const std::vector >& p) +void check_constant (const std::vector > &p) { - // check whether the sum of all polynomials in - // the basis gives one for a given point + // check whether the sum of all polynomials in + // the basis gives one for a given point deallog << "Representation of one at random points"; for (unsigned int j=0; j<12; ++j) { double x = (double)rand()/RAND_MAX; double value = 0; - for (unsigned int i=0;i 1e-13) - deallog << "Error1 lg y=" << std::log10(std::fabs(1.-value)) - << std::endl; + deallog << "Error1 lg y=" << std::log10(std::fabs(1.-value)) + << std::endl; } deallog << std::endl; @@ -86,7 +86,7 @@ void check_constant (const std::vector >& p) void -check_poly (const Quadrature<1>& q) +check_poly (const Quadrature<1> &q) { deallog << "Points: " << q.size() << std::endl; std::vector > p = generate_complete_Lagrange_basis(q.get_points()); @@ -104,7 +104,7 @@ check_lge (unsigned int n) std::vector > p = LagrangeEquidistant::generate_complete_basis(n); std::vector > x(n+1); const double h = 1./n; - for (unsigned int i=0;i<=n;++i) + for (unsigned int i=0; i<=n; ++i) x[i](0) = h*i; check_interpolation(p, x); check_constant(p); @@ -127,9 +127,9 @@ int main() deallog.pop(); deallog << std::endl; - // Lagrange elements on GL points have good - // conditioning, so test to some very high - // orders + // Lagrange elements on GL points have good + // conditioning, so test to some very high + // orders deallog.push("GaussLobatto"); for (unsigned i=8; i<40; i+=3) check_poly (QGaussLobatto<1>(i+1)); diff --git a/tests/base/polynomial_lagrange_product.cc b/tests/base/polynomial_lagrange_product.cc index 2a536db168..ed01525b72 100644 --- a/tests/base/polynomial_lagrange_product.cc +++ b/tests/base/polynomial_lagrange_product.cc @@ -31,16 +31,16 @@ using namespace Polynomials; -void check_derivatives (const std::vector >& p, - const unsigned int n_deriv) +void check_derivatives (const std::vector > &p, + const unsigned int n_deriv) { - // check whether the values and derivatives - // are evaluated correctly some randomly - // generated points. compare with a polynomial - // that is not in product form (we get the - // expanded form by adding a dummy polynomial; - // addition of polynomials destroys the - // product form in the current implementation) + // check whether the values and derivatives + // are evaluated correctly some randomly + // generated points. compare with a polynomial + // that is not in product form (we get the + // expanded form by adding a dummy polynomial; + // addition of polynomials destroys the + // product form in the current implementation) deallog << "Representation of derivatives up to order " << n_deriv-1 << std::endl; std::vector values(n_deriv), values_ref(n_deriv); Monomial zero (0,0); @@ -52,15 +52,15 @@ void check_derivatives (const std::vector >& p, q += zero; q.value (x, values_ref); for (unsigned int i=0; i - std::max(1e-11,1e-11*std::fabs(values[i]))) - deallog << "Error deriv" << i << " lg y=" - << std::log10(std::fabs(values[i]-values_ref[i])) - << ", is: " << values[i] << ", should be: " << values_ref[i] - << std::endl; - } + { + deallog << "."; + if (std::fabs (values[i]-values_ref[i]) > + std::max(1e-11,1e-11*std::fabs(values[i]))) + deallog << "Error deriv" << i << " lg y=" + << std::log10(std::fabs(values[i]-values_ref[i])) + << ", is: " << values[i] << ", should be: " << values_ref[i] + << std::endl; + } } deallog << std::endl; @@ -69,7 +69,7 @@ void check_derivatives (const std::vector >& p, void -check_poly (const Quadrature<1>& q) +check_poly (const Quadrature<1> &q) { deallog << "Points: " << q.size() << std::endl; std::vector > p = generate_complete_Lagrange_basis(q.get_points()); @@ -106,9 +106,9 @@ int main() deallog.pop(); deallog << std::endl; - // Lagrange elements on GL points have good - // conditioning, so test to some very high - // orders + // Lagrange elements on GL points have good + // conditioning, so test to some very high + // orders deallog.push("GaussLobatto"); for (unsigned i=1; i<8; i+=2) check_poly (QGaussLobatto<1>(i+1)); diff --git a/tests/base/polynomial_minus_equals.cc b/tests/base/polynomial_minus_equals.cc index acd7fec7f8..843616e124 100644 --- a/tests/base/polynomial_minus_equals.cc +++ b/tests/base/polynomial_minus_equals.cc @@ -33,32 +33,32 @@ using namespace dealii; int main () { - std::ofstream logfile("polynomial_minus_equals/output"); - deallog << std::setprecision(3); - deallog.attach(logfile); - deallog.depth_console(0); + std::ofstream logfile("polynomial_minus_equals/output"); + deallog << std::setprecision(3); + deallog.attach(logfile); + deallog.depth_console(0); - // subtract two equal polynomials up to order p_dim - // the result evaluated at an arbitrary point - // should always be zero + // subtract two equal polynomials up to order p_dim + // the result evaluated at an arbitrary point + // should always be zero - // check polynomials up to order 32 - const unsigned int p_dim = 32; + // check polynomials up to order 32 + const unsigned int p_dim = 32; - std::vector coefficients_a; + std::vector coefficients_a; - // arbitrary point - double evalutation_number = 12.123; + // arbitrary point + double evalutation_number = 12.123; - for (unsigned int pp = 0; pp < p_dim; pp++) - { - coefficients_a.push_back(pp); + for (unsigned int pp = 0; pp < p_dim; pp++) + { + coefficients_a.push_back(pp); - Polynomials::Polynomial test_poly_a(coefficients_a); - Polynomials::Polynomial test_poly_b(coefficients_a); + Polynomials::Polynomial test_poly_a(coefficients_a); + Polynomials::Polynomial test_poly_b(coefficients_a); - test_poly_b -= test_poly_a; + test_poly_b -= test_poly_a; - deallog << test_poly_b.value(evalutation_number) << std::endl; - } + deallog << test_poly_b.value(evalutation_number) << std::endl; + } } diff --git a/tests/base/polynomial_test.cc b/tests/base/polynomial_test.cc index 3cf8e3e331..f9d3772496 100644 --- a/tests/base/polynomial_test.cc +++ b/tests/base/polynomial_test.cc @@ -35,65 +35,65 @@ using namespace Polynomials; template -void check_poly(const Point& x, - const POLY& p) +void check_poly(const Point &x, + const POLY &p) { const unsigned int n = p.n(); std::vector values (n); std::vector > gradients(n); std::vector > second(n); - + p.compute (x, values, gradients, second); - - for (unsigned int k=0;k 5.0E-15) - deallog << 'P' << k << ": values differ " << val << " != " - << values[k] << std::endl; + deallog << 'P' << k << ": values differ " << val << " != " + << values[k] << std::endl; - // Check if compute_grad is ok + // Check if compute_grad is ok Tensor<1,dim> grad = p.compute_grad(k,x); if ((grad-gradients[k]) * (grad-gradients[k]) > 5e-15*5e-15) - deallog << 'P' << k << ": gradients differ " << grad << " != " - << gradients[k] << std::endl; - - // Check if compute_grad_grad is ok + deallog << 'P' << k << ": gradients differ " << grad << " != " + << gradients[k] << std::endl; + + // Check if compute_grad_grad is ok Tensor<2,dim> grad2 = p.compute_grad_grad(k,x); Tensor<2,dim> diff = grad2-second[k]; double s = 0; for (unsigned int i=0; i 5e-15*5e-15) - deallog << 'P' << k << ": second derivatives differ " << grad2 << " != " - << second[k] << std::endl; - - - // finally output values, - // gradients, etc, to make sure - // that they are not only - // consistent, but also - // correct. Multiply them - // somewhat to make them - // significant despite our - // two-post-dot-digits limit + deallog << 'P' << k << ": second derivatives differ " << grad2 << " != " + << second[k] << std::endl; + + + // finally output values, + // gradients, etc, to make sure + // that they are not only + // consistent, but also + // correct. Multiply them + // somewhat to make them + // significant despite our + // two-post-dot-digits limit values[k] *= std::pow(10., dim); gradients[k] *= std::pow(10., dim); - + deallog << 'P' << k << "\t= " << values[k] - << "\tgradient\t"; - for (unsigned int d=0;d& x, template void -check_tensor (const std::vector >& v, - const Point& x) +check_tensor (const std::vector > &v, + const Point &x) { deallog.push("Tensor"); TensorProductPolynomials p(v); @@ -114,8 +114,8 @@ check_tensor (const std::vector >& v, template void -check_poly (const std::vector >& v, - const Point& x) +check_poly (const std::vector > &v, + const Point &x) { deallog.push("Polyno"); PolynomialSpace p(v); @@ -126,7 +126,7 @@ check_poly (const std::vector >& v, void -check_dimensions (const std::vector >& p) +check_dimensions (const std::vector > &p) { deallog.push("1d"); check_tensor(p, Point<1>(.5)); @@ -152,16 +152,16 @@ int main() deallog.push("Lagrange"); std::vector > p; - for (unsigned int i=0;i<3;++i) + for (unsigned int i=0; i<3; ++i) p.push_back (LagrangeEquidistant(3, i)); check_dimensions(p); deallog.pop(); deallog.push("Legendre"); - + p.clear (); - for (unsigned int i=0;i<3;++i) + for (unsigned int i=0; i<3; ++i) p.push_back (Legendre(i)); check_dimensions(p); @@ -170,7 +170,7 @@ int main() deallog.push("Hierarchical"); p.clear (); - for (unsigned int i=0;i<3;++i) + for (unsigned int i=0; i<3; ++i) p.push_back (Hierarchical(i)); check_dimensions(p); diff --git a/tests/base/polynomials_bdm_01.cc b/tests/base/polynomials_bdm_01.cc index 7b39eb8e41..df091692bb 100644 --- a/tests/base/polynomials_bdm_01.cc +++ b/tests/base/polynomials_bdm_01.cc @@ -31,7 +31,7 @@ using namespace std; template -void plot(const PolynomialsBDM& poly) +void plot(const PolynomialsBDM &poly) { QTrapez<1> base_quadrature; QIterated quadrature(base_quadrature, poly.degree()+3); @@ -39,19 +39,19 @@ void plot(const PolynomialsBDM& poly) std::vector > grads; std::vector > grads2; - - for (unsigned int k=0;k' << std::endl; - + deallog << "BDM" << poly.degree() << '<' << dim << '>' << std::endl; + deallog << "BDM" << poly.degree() << '<' << dim << '>' - << '\t' << quadrature.point(k); + << '\t' << quadrature.point(k); poly.compute(quadrature.point(k), values, grads, grads2); - - for (unsigned int i=0;i p20(0); PolynomialsBDM<2> p21(1); PolynomialsBDM<2> p22(2); - + plot(p20); plot(p21); plot(p22); diff --git a/tests/base/polynomials_rt.cc b/tests/base/polynomials_rt.cc index 75206e6e3c..e0992d0ec5 100644 --- a/tests/base/polynomials_rt.cc +++ b/tests/base/polynomials_rt.cc @@ -30,7 +30,7 @@ using namespace std; template -void plot(const PolynomialsRaviartThomas& poly) +void plot(const PolynomialsRaviartThomas &poly) { QTrapez<1> base_quadrature; QIterated quadrature(base_quadrature, poly.degree()+3); @@ -38,19 +38,19 @@ void plot(const PolynomialsRaviartThomas& poly) std::vector > grads; std::vector > grads2; - - for (unsigned int k=0;k' << std::endl; - + deallog << "RT" << poly.degree() << '<' << dim << '>' << std::endl; + deallog << "RT" << poly.degree() << '<' << dim << '>' - << '\t' << quadrature.point(k); + << '\t' << quadrature.point(k); poly.compute(quadrature.point(k), values, grads, grads2); - - for (unsigned int i=0;i -void check_point (const Point& x, - const POLY& p) +void check_point (const Point &x, + const POLY &p) { const unsigned int n = p.n(); std::vector > values(n); @@ -41,17 +41,17 @@ void check_point (const Point& x, std::vector > seconds(0); p.compute(x, values, gradients, seconds); - + deallog << "Point " << x << std::endl; - for (unsigned int i=0;i void check_bdm () { Point x; - + PolynomialsBDM p1(1); PolynomialsBDM p2(2); PolynomialsBDM p3(3); PolynomialsBDM p4(4); - + x(0) = 2.; x(1) = 3.; if (dim>2) x(2) = 4; - + check_point(x, p1); check_point(x, p2); check_point(x, p3); @@ -82,17 +82,17 @@ template void check_rt () { Point x; - + PolynomialsRaviartThomas p0(0); PolynomialsRaviartThomas p1(1); PolynomialsRaviartThomas p2(2); PolynomialsRaviartThomas p3(3); - + x(0) = 2.; x(1) = 3.; if (dim>2) x(2) = 4; - + check_point(x, p0); check_point(x, p1); check_point(x, p2); diff --git a/tests/base/qprojector.cc b/tests/base/qprojector.cc index be55d67aae..180687ab78 100644 --- a/tests/base/qprojector.cc +++ b/tests/base/qprojector.cc @@ -28,7 +28,7 @@ #include template -void check_line(Quadrature<1>& quadrature) +void check_line(Quadrature<1> &quadrature) { Point p1; Point p2; @@ -46,8 +46,8 @@ void check_line(Quadrature<1>& quadrature) } Quadrature q = QProjector::project_to_line(quadrature, p1, p2); double s = 0.; - - for (unsigned int k=0;k& quadrature) } template -void check_face(Quadrature<1>& q1) +void check_face(Quadrature<1> &q1) { deallog << "Checking dim " << dim - << " 1d-points " << q1.size() - << std::endl; - + << " 1d-points " << q1.size() + << std::endl; + Quadrature subquadrature(q1); - for (unsigned int f=0;f::faces_per_cell;++f) + for (unsigned int f=0; f::faces_per_cell; ++f) { deallog << "Face " << f - << std::endl; - + << std::endl; + Quadrature quadrature - = QProjector::project_to_face(subquadrature, f); - for (unsigned int k=0;k::project_to_face(subquadrature, f); + for (unsigned int k=0; k::faces_per_cell;++f) - for (unsigned int s=0;s::max_children_per_face;++s) + for (unsigned int f=0; f::faces_per_cell; ++f) + for (unsigned int s=0; s::max_children_per_face; ++s) { - deallog << "Face " << f << " subface " << s - << std::endl; - - Quadrature quadrature - = QProjector::project_to_face(subquadrature, f); - for (unsigned int k=0;k quadrature + = QProjector::project_to_face(subquadrature, f); + for (unsigned int k=0; k -void check_faces (Quadrature<1>& q1) +void check_faces (Quadrature<1> &q1) { const unsigned int nq = q1.size(); - + deallog << "Checking dim " << dim - << " 1d-points " << nq - << std::endl; + << " 1d-points " << nq + << std::endl; Quadrature subquadrature(q1); const unsigned int nqs = subquadrature.size(); - + Quadrature faces = QProjector::project_to_all_faces(subquadrature); - for (unsigned int f=0;f::faces_per_cell;++f) + for (unsigned int f=0; f::faces_per_cell; ++f) { deallog << "Face " << f - << " orientation false" - << std::endl; + << " orientation false" + << std::endl; unsigned int - offset = QProjector::DataSetDescriptor::face(f, false, false, false, nqs); - - for (unsigned int k=0;k::DataSetDescriptor::face(f, false, false, false, nqs); + + for (unsigned int k=0; k::DataSetDescriptor::face(f, true, false, false, nqs); - - for (unsigned int k=0;k subs = QProjector::project_to_all_subfaces(subquadrature); for (unsigned int f=0;f::faces_per_cell;++f) - for (unsigned int s=0;s::max_children_per_face;++s) - { + for (unsigned int s=0;s::max_children_per_face;++s) + { - deallog << "Face " << f << " subface " << s - << " orientation false" - << std::endl; - - unsigned int - offset = QProjector::DataSetDescriptor::subface(f, s, false, nqs); - - for (unsigned int k=0;k::DataSetDescriptor::subface(f, s, true, nqs); - - for (unsigned int k=0;k::DataSetDescriptor::subface(f, s, false, nqs); + + for (unsigned int k=0;k::DataSetDescriptor::subface(f, s, true, nqs); + + for (unsigned int k=0;k& q) +void check(Quadrature<1> &q) { deallog << std::endl; deallog.push("line"); @@ -181,7 +181,7 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog << std::setprecision(2); - + deallog.threshold_double(1.e-10); Quadrature<1> none(0); @@ -189,10 +189,10 @@ int main() QGauss<1> midpoint(1); check(midpoint); - + QTrapez<1> trapez; check(trapez); - + QSimpson<1> simpson; check(simpson); diff --git a/tests/base/quadrature_selector.cc b/tests/base/quadrature_selector.cc index 8c1cc8250d..2e5f220d7f 100644 --- a/tests/base/quadrature_selector.cc +++ b/tests/base/quadrature_selector.cc @@ -32,12 +32,12 @@ template void check (const std::string &name, - const unsigned int order, - const Quadrature &q) + const unsigned int order, + const Quadrature &q) { Assert (QuadratureSelector(name, order).get_points() == - q.get_points(), - ExcInternalError()); + q.get_points(), + ExcInternalError()); deallog << name << ' ' << order << " ok" << std::endl; } @@ -52,7 +52,7 @@ int main() check ("gauss", 2, QGauss<1>(2)); check ("gauss", 2, QGauss<2>(2)); check ("gauss", 2, QGauss<3>(2)); - + check ("gauss", 2, QGauss<3>(2)); check ("gauss", 6, QGauss<3>(6)); check ("gauss", 10, QGauss<3>(10)); diff --git a/tests/base/quadrature_test.cc b/tests/base/quadrature_test.cc index 57d281eb9d..5a7a1c989c 100644 --- a/tests/base/quadrature_test.cc +++ b/tests/base/quadrature_test.cc @@ -32,20 +32,20 @@ template void -fill_vector (std::vector *>& quadratures) +fill_vector (std::vector *> &quadratures) { quadratures.push_back (new QMidpoint()); quadratures.push_back (new QTrapez()); quadratures.push_back (new QSimpson()); quadratures.push_back (new QMilne()); quadratures.push_back (new QWeddle()); - for (unsigned int i=0;i<9;++i) + for (unsigned int i=0; i<9; ++i) { quadratures.push_back (new QGauss(i)); } QMilne<1> q1d; quadratures.push_back (new Quadrature(q1d)); - for (unsigned int i=2;i<8;++i) + for (unsigned int i=2; i<8; ++i) { quadratures.push_back (new QGaussLobatto(i)); } @@ -53,7 +53,7 @@ fill_vector (std::vector *>& quadratures) template void -check_cells (std::vector*>& quadratures) +check_cells (std::vector*> &quadratures) { Quadrature quadrature; for (unsigned int n=0; n*>& quadratures) double quadrature_int=0; double exact_int=0; double err = 0; - + do - { - ++i; - - quadrature_int=0; - // Check the polynomial x^i*y^i - - for (unsigned int x=0; x(points[x](2)), i*1.0); - case 2: - f *= std::pow(static_cast(points[x](1)), i*1.0); - case 1: - f *= std::pow(static_cast(points[x](0)), i*1.0); - } - quadrature_int+=f*weights[x]; - } - - // the exact integral is 1/(i+1) - exact_int=1./std::pow(static_cast(i+1),dim); - err = std::fabs(quadrature_int-exact_int); - } + { + ++i; + + quadrature_int=0; + // Check the polynomial x^i*y^i + + for (unsigned int x=0; x(points[x](2)), i*1.0); + case 2: + f *= std::pow(static_cast(points[x](1)), i*1.0); + case 1: + f *= std::pow(static_cast(points[x](0)), i*1.0); + } + quadrature_int+=f*weights[x]; + } + + // the exact integral is 1/(i+1) + exact_int=1./std::pow(static_cast(i+1),dim); + err = std::fabs(quadrature_int-exact_int); + } while (err<1e-14); - // Uncomment here for testing + // Uncomment here for testing // deallog << " (Int " << quadrature_int << ',' << exact_int << ")"; deallog << " is exact for polynomials of degree " << i-1 << std::endl; if (dim==1) - { - // check the ordering of - // the quadrature points - bool in_order=true; - for (unsigned int x=1; x*>& quadratures, const bool sub) for (unsigned int n=0; n quadrature (sub == false? - QProjector::project_to_all_faces(*quadratures[n]) : - QProjector::project_to_all_subfaces(*quadratures[n])); + QProjector::project_to_all_faces(*quadratures[n]) : + QProjector::project_to_all_subfaces(*quadratures[n])); const std::vector > &points=quadrature.get_points(); const std::vector &weights=quadrature.get_weights(); @@ -143,49 +143,49 @@ check_faces (const std::vector*>& quadratures, const bool sub) double err = 0; do - { - ++i; - - quadrature_int=0; - // Check the polynomial - // x^i*y^i*z^i - - for (unsigned int x=0; x v(7); - for (unsigned int i=0;i > s(v, 3, 4); - for (unsigned int i=0;i t; t[0][0] = 1; t[1][1] = 2; @@ -38,22 +38,22 @@ int main () Assert (t[0][1] == t[1][0], ExcInternalError()); - // check that if a single element is - // accessed, its transpose element gets the - // same value + // check that if a single element is + // accessed, its transpose element gets the + // same value t[1][0] = 4; Assert (t[0][1] == 4, ExcInternalError()); - // make sure transposition doesn't change - // anything + // make sure transposition doesn't change + // anything Assert (t == transpose(t), ExcInternalError()); - // check norm of tensor + // check norm of tensor Assert (std::fabs(t.norm() - std::sqrt(1.*1+2*2+2*4*4)) < 1e-14, ExcInternalError()); - // make sure norm is induced by scalar - // product + // make sure norm is induced by scalar + // product Assert (std::fabs (t.norm()*t.norm() - t*t) < 1e-14, ExcInternalError()); diff --git a/tests/base/symmetric_tensor_02.cc b/tests/base/symmetric_tensor_02.cc index 7874072d4f..ed0482033b 100644 --- a/tests/base/symmetric_tensor_02.cc +++ b/tests/base/symmetric_tensor_02.cc @@ -30,7 +30,7 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + SymmetricTensor<2,3> t; t[0][0] = 1; t[1][1] = 2; @@ -41,23 +41,23 @@ int main () Assert (t[0][1] == t[1][0], ExcInternalError()); - // check that if a single element is - // accessed, its transpose element gets the - // same value + // check that if a single element is + // accessed, its transpose element gets the + // same value t[1][0] = 14; Assert (t[0][1] == 14, ExcInternalError()); - // make sure transposition doesn't change - // anything + // make sure transposition doesn't change + // anything Assert (t == transpose(t), ExcInternalError()); - // check norm of tensor + // check norm of tensor Assert (std::fabs(t.norm() - std::sqrt(1.*1+2*2+3*3+2*14*14+2*5*5+2*6*6)) < 1e-14, ExcInternalError()); - // make sure norm is induced by scalar - // product + // make sure norm is induced by scalar + // product Assert (std::fabs (t.norm()*t.norm() - t*t) < 1e-14, ExcInternalError()); diff --git a/tests/base/symmetric_tensor_03.cc b/tests/base/symmetric_tensor_03.cc index 23a6dfad9c..0491deab3f 100644 --- a/tests/base/symmetric_tensor_03.cc +++ b/tests/base/symmetric_tensor_03.cc @@ -30,7 +30,7 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + SymmetricTensor<4,2> t; t[0][0][0][0] = 1; t[1][1][1][1] = 2; @@ -38,28 +38,28 @@ int main () Assert (t[0][1][0][1] == t[1][0][1][0], ExcInternalError()); - // check that if a single element is - // accessed, its transpose element gets the - // same value + // check that if a single element is + // accessed, its transpose element gets the + // same value t[1][0][0][1] = 4; Assert (t[0][1][1][0] == 4, ExcInternalError()); - // make sure transposition doesn't change - // anything + // make sure transposition doesn't change + // anything Assert (t == transpose(t), ExcInternalError()); - // check norm of tensor + // check norm of tensor deallog << t.norm() << std::endl; - // make sure norm is induced by scalar - // product + // make sure norm is induced by scalar + // product double norm_sqr = 0; for (unsigned int i=0; i<2; ++i) for (unsigned int j=0; j<2; ++j) for (unsigned int k=0; k<2; ++k) - for (unsigned int l=0; l<2; ++l) - norm_sqr += t[i][j][k][l] * t[i][j][k][l]; - + for (unsigned int l=0; l<2; ++l) + norm_sqr += t[i][j][k][l] * t[i][j][k][l]; + Assert (std::fabs (t.norm()*t.norm() - norm_sqr) < 1e-14, ExcInternalError()); diff --git a/tests/base/symmetric_tensor_04.cc b/tests/base/symmetric_tensor_04.cc index 0e0a659450..73cc4e73ac 100644 --- a/tests/base/symmetric_tensor_04.cc +++ b/tests/base/symmetric_tensor_04.cc @@ -30,7 +30,7 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + SymmetricTensor<4,3> t; t[0][0][0][0] = 1; t[1][1][1][1] = 2; @@ -38,27 +38,27 @@ int main () Assert (t[0][1][0][1] == t[1][0][1][0], ExcInternalError()); - // check that if a single element is - // accessed, its transpose element gets the - // same value + // check that if a single element is + // accessed, its transpose element gets the + // same value t[1][0][0][1] = 4; Assert (t[0][1][1][0] == 4, ExcInternalError()); - // make sure transposition doesn't change - // anything + // make sure transposition doesn't change + // anything Assert (t == transpose(t), ExcInternalError()); - // check norm of tensor + // check norm of tensor deallog << t.norm() << std::endl; - // make sure norm is induced by scalar - // product + // make sure norm is induced by scalar + // product double norm_sqr = 0; for (unsigned int i=0; i<2; ++i) for (unsigned int j=0; j<2; ++j) for (unsigned int k=0; k<2; ++k) - for (unsigned int l=0; l<2; ++l) - norm_sqr += t[i][j][k][l] * t[i][j][k][l]; + for (unsigned int l=0; l<2; ++l) + norm_sqr += t[i][j][k][l] * t[i][j][k][l]; Assert (std::fabs (t.norm()*t.norm() - norm_sqr) < 1e-14, ExcInternalError()); diff --git a/tests/base/symmetric_tensor_05.cc b/tests/base/symmetric_tensor_05.cc index a2ebbcb771..a5e6ae7834 100644 --- a/tests/base/symmetric_tensor_05.cc +++ b/tests/base/symmetric_tensor_05.cc @@ -32,10 +32,10 @@ void test () for (unsigned int i=0; i a, b; a[0][0] = 1; a[1][1] = 2; @@ -44,38 +44,38 @@ void test () for (unsigned int i=0; i (); test<3> (); - + deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_06.cc b/tests/base/symmetric_tensor_06.cc index dc03a3f2f5..494acdc5ca 100644 --- a/tests/base/symmetric_tensor_06.cc +++ b/tests/base/symmetric_tensor_06.cc @@ -30,56 +30,56 @@ template void test () { const double lambda = 5, - mu = 7; + mu = 7; SymmetricTensor<4,dim> ts; Tensor<4,dim> ta; for (unsigned int i=0; i as, bs; Tensor<2,dim> aa, ba; for (unsigned int i=0; i (); test<3> (); - + deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_07.cc b/tests/base/symmetric_tensor_07.cc index 17e762f6f1..f46c0afa9b 100644 --- a/tests/base/symmetric_tensor_07.cc +++ b/tests/base/symmetric_tensor_07.cc @@ -17,7 +17,7 @@ // in symmetric_tensor_06 we have established that contracting with a // symmetric tensor by hand works as with a full tensor that is stored -// in non-symmetric form. here make sure that we can abbreviate the contraction +// in non-symmetric form. here make sure that we can abbreviate the contraction #include "../tests.h" #include @@ -27,28 +27,28 @@ #include - + template void test () { const double lambda = 7, - mu = 5; + mu = 5; SymmetricTensor<4,dim> ts; Tensor<4,dim> ta; for (unsigned int i=0; i as, bs; Tensor<2,dim> aa, ba; @@ -58,28 +58,28 @@ void test () bs = ts * as; double_contract (ba, ta, aa); - + for (unsigned int i=0; i 0, ExcInternalError()); } - + int main () @@ -92,6 +92,6 @@ int main () test<2> (); test<3> (); - + deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_08.cc b/tests/base/symmetric_tensor_08.cc index 77ca51addb..4b9de8bd3a 100644 --- a/tests/base/symmetric_tensor_08.cc +++ b/tests/base/symmetric_tensor_08.cc @@ -27,15 +27,15 @@ inline double value(unsigned int i, - unsigned int j, - unsigned int k, - unsigned int l, - double lambda, - double mu) + unsigned int j, + unsigned int k, + unsigned int l, + double lambda, + double mu) { return ((i==k) && (j==l) ? mu : 0) + - ((i==l) && (j==k) ? mu : 0) + - ((i==j) && (k==l) ? lambda : 0); + ((i==l) && (j==k) ? mu : 0) + + ((i==j) && (k==l) ? lambda : 0); } @@ -44,27 +44,27 @@ template void test () { const double lambda = 1.5, - mu = 1.7; + mu = 1.7; SymmetricTensor<4,dim> t; for (unsigned int i=0; i a; for (unsigned int i=0; i (); test<3> (); - + deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_09.cc b/tests/base/symmetric_tensor_09.cc index 4b4402e857..fa0ec9cb41 100644 --- a/tests/base/symmetric_tensor_09.cc +++ b/tests/base/symmetric_tensor_09.cc @@ -35,11 +35,11 @@ void test () for (unsigned int i=0; i (); test<3> (); - + deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_10.cc b/tests/base/symmetric_tensor_10.cc index 4ffc86623b..c47f81cd44 100644 --- a/tests/base/symmetric_tensor_10.cc +++ b/tests/base/symmetric_tensor_10.cc @@ -28,7 +28,7 @@ template void test () { deallog << "dim=" << dim << std::endl; - + SymmetricTensor<2,dim> t; for (unsigned int i=0; i void test () { deallog << "dim=" << dim << std::endl; - + SymmetricTensor<2,dim> t; for (unsigned int i=0; i void test () { deallog << "dim=" << dim << std::endl; - + SymmetricTensor<2,dim> t; for (unsigned int i=0; i (); test<2> (); test<3> (); - + deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_13.cc b/tests/base/symmetric_tensor_13.cc index 18a63d6ffe..179d28ef3b 100644 --- a/tests/base/symmetric_tensor_13.cc +++ b/tests/base/symmetric_tensor_13.cc @@ -28,7 +28,7 @@ template void test () { deallog << "dim=" << dim << std::endl; - + SymmetricTensor<2,dim> t; for (unsigned int i=0; i (); test<2> (); test<3> (); - + deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_14.cc b/tests/base/symmetric_tensor_14.cc index 9de89b0390..a874a61f7f 100644 --- a/tests/base/symmetric_tensor_14.cc +++ b/tests/base/symmetric_tensor_14.cc @@ -28,7 +28,7 @@ template void test () { deallog << "dim=" << dim << std::endl; - + SymmetricTensor<2,dim> t; for (unsigned int i=0; i (); test<2> (); test<3> (); - + deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_15.cc b/tests/base/symmetric_tensor_15.cc index 8874d1e962..fc157f4d19 100644 --- a/tests/base/symmetric_tensor_15.cc +++ b/tests/base/symmetric_tensor_15.cc @@ -28,21 +28,21 @@ template void test () { deallog << "dim=" << dim << std::endl; - + SymmetricTensor<2,dim> t; for (unsigned int i=0; i T = outer_product (unit_symmetric_tensor(), unit_symmetric_tensor()); - // T*t should yield a diagonal tensor - // where the diagonal elements are the - // traces of t + // T*t should yield a diagonal tensor + // where the diagonal elements are the + // traces of t SymmetricTensor<2,dim> x = T * t; Assert ((x-trace(t)*unit_symmetric_tensor()).norm() < 1e-15*t.norm(), ExcInternalError()); @@ -53,12 +53,12 @@ void test () deallog << i << ' ' << j << ' ' << x[i][j] << std::endl; } - // test 2: check outer product of t with - // itself + // test 2: check outer product of t with + // itself { const SymmetricTensor<4,dim> T = outer_product (t,t); - // T*t should yield norm(t)^2*t + // T*t should yield norm(t)^2*t SymmetricTensor<2,dim> x = T * t; Assert ((x-(t*t)*t).norm() < 1e-15*t.norm(), ExcInternalError()); @@ -68,10 +68,10 @@ void test () for (unsigned int j=0; j (); test<2> (); test<3> (); - + deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_16.cc b/tests/base/symmetric_tensor_16.cc index 07316d051c..462f94dbe1 100644 --- a/tests/base/symmetric_tensor_16.cc +++ b/tests/base/symmetric_tensor_16.cc @@ -30,15 +30,15 @@ void test () deallog << "dim=" << dim << std::endl; const SymmetricTensor<4,dim> - T = (identity_tensor() - - 1./dim * outer_product(unit_symmetric_tensor(), - unit_symmetric_tensor())); + T = (identity_tensor() + - 1./dim * outer_product(unit_symmetric_tensor(), + unit_symmetric_tensor())); Assert ((T-deviator_tensor()).norm() <= 1e-15*T.norm(), ExcInternalError()); } - + int main () @@ -52,6 +52,6 @@ int main () test<1> (); test<2> (); test<3> (); - + deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_17.cc b/tests/base/symmetric_tensor_17.cc index f58f875bfd..228463b091 100644 --- a/tests/base/symmetric_tensor_17.cc +++ b/tests/base/symmetric_tensor_17.cc @@ -30,7 +30,7 @@ template void test () { deallog << "dim=" << dim << std::endl; - + SymmetricTensor<4,dim> t; for (unsigned int i=0; i t_times_1 = t * unit_symmetric_tensor(); - + deallog << "t*1=" << std::endl; for (unsigned int i=0; i()).norm() < 1e-14*t_times_1.norm(), ExcInternalError()); } - + int main () @@ -80,6 +80,6 @@ int main () test<1> (); test<2> (); test<3> (); - + deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_18.cc b/tests/base/symmetric_tensor_18.cc index 2dc06b1ab9..f9bd9970ec 100644 --- a/tests/base/symmetric_tensor_18.cc +++ b/tests/base/symmetric_tensor_18.cc @@ -33,39 +33,39 @@ void test () for (unsigned int i=0; i (); test<2> (); test<3> (); - + deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_19.cc b/tests/base/symmetric_tensor_19.cc index 3edb8fd1cd..ac768a7aee 100644 --- a/tests/base/symmetric_tensor_19.cc +++ b/tests/base/symmetric_tensor_19.cc @@ -32,46 +32,46 @@ void check (const SymmetricTensor<4,dim> &A) { const SymmetricTensor<4,dim> B = invert (A); - // check left inverse + // check left inverse deallog << " checking left inverse" << std::endl; const SymmetricTensor<4,dim> T_left = B*A; for (unsigned int i=0; i()[i][j][k][l]) < 1e-10, - ExcInternalError()); - } + ExcInternalError()); + } - // check left inverse + // check left inverse deallog << " checking right inverse" << std::endl; const SymmetricTensor<4,dim> T_right = A*B; for (unsigned int i=0; i()[i][j][k][l]) < 1e-10, - ExcInternalError()); - } + ExcInternalError()); + } } - + template void test () @@ -81,42 +81,42 @@ void test () deallog << " unit tensor" << std::endl; check (identity_tensor()); - // do something with a more complicated - // tensor. make sure it is not - // rank-deficient, so choose elements by - // hand + // do something with a more complicated + // tensor. make sure it is not + // rank-deficient, so choose elements by + // hand deallog << " complicated tensor" << std::endl; SymmetricTensor<4,dim> A; switch (dim) { - case 1: - A[0][0][0][0] = 2; - break; - - case 2: - A[0][0][0][0] = 2; - A[0][0][1][1] = 4; - A[0][0][0][1] = 8; - A[1][1][0][0] = 4; - A[1][1][1][1] = 6; - A[1][1][0][1] = 10; - A[0][1][0][0] = 6; - A[0][1][1][1] = 10; - A[0][1][0][1] = 16; - break; - - case 3: - // I'm too lazy to code something - // up by hand here - for (unsigned int i=0; i<3; ++i) - for (unsigned int j=0; j<3; ++j) - for (unsigned int k=0; k<3; ++k) - for (unsigned int l=0; l<3; ++l) - A[i][j][k][l] = 1.*rand()/RAND_MAX; - break; - - default: - Assert (false, ExcNotImplemented()); + case 1: + A[0][0][0][0] = 2; + break; + + case 2: + A[0][0][0][0] = 2; + A[0][0][1][1] = 4; + A[0][0][0][1] = 8; + A[1][1][0][0] = 4; + A[1][1][1][1] = 6; + A[1][1][0][1] = 10; + A[0][1][0][0] = 6; + A[0][1][1][1] = 10; + A[0][1][0][1] = 16; + break; + + case 3: + // I'm too lazy to code something + // up by hand here + for (unsigned int i=0; i<3; ++i) + for (unsigned int j=0; j<3; ++j) + for (unsigned int k=0; k<3; ++k) + for (unsigned int l=0; l<3; ++l) + A[i][j][k][l] = 1.*rand()/RAND_MAX; + break; + + default: + Assert (false, ExcNotImplemented()); } check (A); } @@ -134,6 +134,6 @@ int main () test<1> (); test<2> (); test<3> (); - + deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_20.cc b/tests/base/symmetric_tensor_20.cc index 2420986234..94bf6a3d48 100644 --- a/tests/base/symmetric_tensor_20.cc +++ b/tests/base/symmetric_tensor_20.cc @@ -31,7 +31,7 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + const unsigned int dim=3; SymmetricTensor<2,dim> t; t[0][0] = t[1][0] = t[1][1] = t[2][2] = 3; @@ -41,6 +41,6 @@ int main () deallog << t.norm() << std::endl; Assert (t.norm() == 0, ExcInternalError()); - + deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_21.cc b/tests/base/symmetric_tensor_21.cc index 2ad02380a9..19a414dbcc 100644 --- a/tests/base/symmetric_tensor_21.cc +++ b/tests/base/symmetric_tensor_21.cc @@ -31,17 +31,17 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + const unsigned int dim=3; SymmetricTensor<4,dim> t; t[0][0][0][0] = t[1][0][1][0] = t[1][1][1][1] - = t[2][2][2][2] = t[2][0][2][0] = 3; + = t[2][2][2][2] = t[2][0][2][0] = 3; deallog << t.norm() << std::endl; t = 0; deallog << t.norm() << std::endl; Assert (t.norm() == 0, ExcInternalError()); - + deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_22.cc b/tests/base/symmetric_tensor_22.cc index e2f038ebb5..0494b4bc27 100644 --- a/tests/base/symmetric_tensor_22.cc +++ b/tests/base/symmetric_tensor_22.cc @@ -41,15 +41,15 @@ int main () deallog << t << std::endl; } - + { const unsigned int dim=3; SymmetricTensor<4,dim> t; t[0][0][0][0] = t[1][0][1][0] = t[1][1][1][1] - = t[2][2][2][2] = t[2][0][2][0] = 3; + = t[2][2][2][2] = t[2][0][2][0] = 3; deallog << t << std::endl; } - + deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_23.cc b/tests/base/symmetric_tensor_23.cc index 0b85c7ce3c..db774d364c 100644 --- a/tests/base/symmetric_tensor_23.cc +++ b/tests/base/symmetric_tensor_23.cc @@ -38,7 +38,7 @@ int main () double x[1] = { 1 }; Assert ((t == SymmetricTensor<2,1>(x)), - ExcInternalError()); + ExcInternalError()); } { @@ -49,7 +49,7 @@ int main () double x[3] = { 1, 2, 3 }; Assert ((t == SymmetricTensor<2,2>(x)), - ExcInternalError()); + ExcInternalError()); } { @@ -63,8 +63,8 @@ int main () double x[6] = { 1, 2, 3, 4, 5, 6 }; Assert ((t == SymmetricTensor<2,3>(x)), - ExcInternalError()); + ExcInternalError()); } - + deallog << "OK" << std::endl; } diff --git a/tests/base/symmetric_tensor_24.cc b/tests/base/symmetric_tensor_24.cc index d66ffb6558..d5a9051b4e 100644 --- a/tests/base/symmetric_tensor_24.cc +++ b/tests/base/symmetric_tensor_24.cc @@ -33,13 +33,13 @@ void check () for (unsigned int i=0; i S; for (unsigned int i=0; i Td(3,3); @@ -74,7 +75,7 @@ main () }; }; - // a rectangular table + // a rectangular table if (true) { Table<2,double> Td(4,3); @@ -109,37 +110,37 @@ main () }; - // a transposed rectangular table + // a transposed rectangular table if (true) { TransposeTable Td(4,3); TransposeTable Ti(4,3); - // Fill the float matrix in row - // first ordering + // Fill the float matrix in row + // first ordering for (unsigned int i=0; i<12; ++i) { Td(i/3,i%3) = entries[i]; }; - // This fills the integer - // matrix in column first - // ordering + // This fills the integer + // matrix in column first + // ordering Ti.fill(entries); - // Output both matrices... - // They should be different + // Output both matrices... + // They should be different for (unsigned int i=0; i<4; ++i) - { - for (unsigned int j=0; j<3; ++j) - { - deallog << '\t' << Ti(i,j) << '/' << Td(i,j); - } - deallog << std::endl; - } + { + for (unsigned int j=0; j<3; ++j) + { + deallog << '\t' << Ti(i,j) << '/' << Td(i,j); + } + deallog << std::endl; + } } - // a 1d-table + // a 1d-table if (true) { const unsigned int N=10; @@ -162,7 +163,7 @@ main () }; }; - // a 3d-table + // a 3d-table if (true) { const unsigned int I=4, J=3, K=2; @@ -181,21 +182,21 @@ main () for (unsigned int i=0; i(L), - ExcDimensionMismatch(Td[i][j][k].end() - Td[i][j][k].begin(), - static_cast(L))); + for (unsigned int k=0; k(L), + ExcDimensionMismatch(Td[i][j][k].end() - Td[i][j][k].begin(), + static_cast(L))); }; - // 5d-table + // 5d-table if (true) { const unsigned int I=6, J=2, K=3, L=4, M=5; @@ -268,45 +269,45 @@ main () for (unsigned int i=0; i(M), - ExcDimensionMismatch(Td[i][j][k][l].end() - Td[i][j][k][l].begin(), - static_cast(M))); + for (unsigned int k=0; k(M), + ExcDimensionMismatch(Td[i][j][k][l].end() - Td[i][j][k][l].begin(), + static_cast(M))); }; - // a 6d-table + // a 6d-table if (true) { const unsigned int I=6, J=2, K=4, L=3, M=5, N=7; @@ -317,45 +318,45 @@ main () for (unsigned int i=0; i(N), - ExcDimensionMismatch(Td[i][j][k][l][m].end() - Td[i][j][k][l][m].begin(), - static_cast(N))); + for (unsigned int k=0; k(N), + ExcDimensionMismatch(Td[i][j][k][l][m].end() - Td[i][j][k][l][m].begin(), + static_cast(N))); }; } diff --git a/tests/base/table_handler_01.cc b/tests/base/table_handler_01.cc index ba16398962..d6e1fd97ce 100644 --- a/tests/base/table_handler_01.cc +++ b/tests/base/table_handler_01.cc @@ -38,14 +38,14 @@ int main () TableHandler table; for (unsigned int i=1; i<=10; ++i) - { - table.add_value("numbers", i); - table.add_value("squares", i*i); - table.add_value("square roots", sqrt(i)); - } + { + table.add_value("numbers", i); + table.add_value("squares", i*i); + table.add_value("square roots", sqrt(i)); + } table.set_tex_table_caption("This is a caption text with \\LaTeX{} symbols"); - // output + // output table.write_tex(deallog.get_file_stream()); } diff --git a/tests/base/table_handler_02.cc b/tests/base/table_handler_02.cc index 9d2c942349..5cab305dc8 100644 --- a/tests/base/table_handler_02.cc +++ b/tests/base/table_handler_02.cc @@ -38,21 +38,21 @@ int main () TableHandler table; - // have keys that we rotate in each row to - // make sure that individual entries in the - // same column really have different data - // types + // have keys that we rotate in each row to + // make sure that individual entries in the + // same column really have different data + // types std::string keys[4] = { "key1", "key2", "key3", "key4" }; for (unsigned int i=0; i<10; ++i) - { - table.add_value(keys[(0+i)%4], i); - table.add_value(keys[(1+i)%4], sqrt(i)); - table.add_value(keys[(2+i)%4], 'a'+i); - table.add_value(keys[(3+i)%4], std::string("abc-")+"0123456789"[i]); - } - - // output + { + table.add_value(keys[(0+i)%4], i); + table.add_value(keys[(1+i)%4], sqrt(i)); + table.add_value(keys[(2+i)%4], 'a'+i); + table.add_value(keys[(3+i)%4], std::string("abc-")+"0123456789"[i]); + } + + // output table.write_text(deallog.get_file_stream()); } diff --git a/tests/base/table_handler_05.cc b/tests/base/table_handler_05.cc index 9a91ae759d..22bfaa63af 100644 --- a/tests/base/table_handler_05.cc +++ b/tests/base/table_handler_05.cc @@ -42,18 +42,18 @@ int main () std::string keys[3] = { "key1", "key2", "key3" }; - // fill rows 1 and 2 partially + // fill rows 1 and 2 partially table.add_value(keys[0], 0); table.add_value(keys[0], 1); - // now fill row 3 completely + // now fill row 3 completely table.add_value(keys[0], 2); table.add_value(keys[1], 13); table.add_value(keys[2], std::string("a")); - // now again fill row 4 partially + // now again fill row 4 partially table.add_value(keys[0], 1); - // produce output. hope that row 4 is - // completely padded + // produce output. hope that row 4 is + // completely padded table.write_text(deallog.get_file_stream()); } diff --git a/tests/base/table_handler_06.cc b/tests/base/table_handler_06.cc index ffc7d5807c..2863f99d09 100644 --- a/tests/base/table_handler_06.cc +++ b/tests/base/table_handler_06.cc @@ -41,19 +41,19 @@ int main () std::string keys[3] = { "key1", "key2", "key3" }; - // fill rows 1 and 2 partially + // fill rows 1 and 2 partially table.add_value(keys[0], 0); table.add_value(keys[0], 1); - // now fill row 3 completely + // now fill row 3 completely table.add_value(keys[0], 2); table.add_value(keys[1], 13); table.add_value(keys[2], std::string("a")); - // now again fill row 4 partially + // now again fill row 4 partially table.add_value(keys[0], 1); - // produce output. hope that row 4 is - // completely padded + // produce output. hope that row 4 is + // completely padded table.write_text(deallog.get_file_stream(), - TableHandler::table_with_separate_column_description); + TableHandler::table_with_separate_column_description); } diff --git a/tests/base/table_handler_07.cc b/tests/base/table_handler_07.cc index f515b13b29..cfad4e156e 100644 --- a/tests/base/table_handler_07.cc +++ b/tests/base/table_handler_07.cc @@ -36,29 +36,29 @@ int main () deallog.depth_console(0); deallog.threshold_double(1.e-10); -/* Like in _06 */ + /* Like in _06 */ TableHandler table; table.set_auto_fill_mode (true); std::string keys[3] = { "key1", "key2", "key3" }; - // fill rows 1 and 2 partially + // fill rows 1 and 2 partially table.add_value(keys[0], 0); table.add_value(keys[0], 1); - // now fill row 3 completely + // now fill row 3 completely table.add_value(keys[0], 2); table.add_value(keys[1], 13); table.add_value(keys[2], std::string("a")); - // now again fill row 4 partially + // now again fill row 4 partially table.add_value(keys[0], 1); -/* Now copy and write the file from the copy */ + /* Now copy and write the file from the copy */ TableHandler table2; table2 = table; - // produce output. hope that row 4 is - // completely padded + // produce output. hope that row 4 is + // completely padded table2.write_text(deallog.get_file_stream(), - TableHandler::table_with_separate_column_description); + TableHandler::table_with_separate_column_description); } diff --git a/tests/base/table_handler_08.cc b/tests/base/table_handler_08.cc index f9e7b0678b..e3beeb9e35 100644 --- a/tests/base/table_handler_08.cc +++ b/tests/base/table_handler_08.cc @@ -37,28 +37,28 @@ int main () deallog.depth_console(0); deallog.threshold_double(1.e-10); -/* Like in _06 */ + /* Like in _06 */ TableHandler table; table.set_auto_fill_mode (true); std::string keys[3] = { "key1", "key2", "key3" }; - // fill rows 1 and 2 partially + // fill rows 1 and 2 partially table.add_value(keys[0], 0); table.add_value(keys[0], 1); - // now fill row 3 completely + // now fill row 3 completely table.add_value(keys[0], 2); table.add_value(keys[1], 13); table.add_value(keys[2], std::string("a")); - // now again fill row 4 partially + // now again fill row 4 partially table.add_value(keys[0], 1); -/* Now copy and write the file from the copy */ + /* Now copy and write the file from the copy */ TableHandler table2(table); - // produce output. hope that row 4 is - // completely padded + // produce output. hope that row 4 is + // completely padded table2.write_text(deallog.get_file_stream(), - TableHandler::table_with_separate_column_description); + TableHandler::table_with_separate_column_description); } diff --git a/tests/base/table_handler_09.cc b/tests/base/table_handler_09.cc index 845d5202a3..95330167a3 100644 --- a/tests/base/table_handler_09.cc +++ b/tests/base/table_handler_09.cc @@ -41,19 +41,19 @@ int main () std::string keys[3] = { "key1", "key2", "key3" }; - // fill rows 1 and 2 partially + // fill rows 1 and 2 partially table.add_value(keys[0], 0); table.add_value(keys[0], 1); - // now fill row 3 completely + // now fill row 3 completely table.add_value(keys[0], 2); table.add_value(keys[1], 113); table.add_value(keys[2], std::string("a")); - // now again fill row 4 partially + // now again fill row 4 partially table.add_value(keys[0], 1); - // produce output. hope that row 4 is - // completely padded + // produce output. hope that row 4 is + // completely padded table.write_text(deallog.get_file_stream(), - TableHandler::simple_table_with_separate_column_description); + TableHandler::simple_table_with_separate_column_description); } diff --git a/tests/base/table_handler_10.cc b/tests/base/table_handler_10.cc index 8e576a1e3b..e4666b6307 100644 --- a/tests/base/table_handler_10.cc +++ b/tests/base/table_handler_10.cc @@ -41,26 +41,26 @@ int main () std::string keys[3] = { "key1", "key2", "key3" }; - // fill rows 1 and 2 partially + // fill rows 1 and 2 partially table.add_value(keys[0], 0.0); table.add_value(keys[0], 1.0); - // now fill row 3 completely + // now fill row 3 completely table.add_value(keys[0], 2.0); table.add_value(keys[1], 123.456); table.add_value(keys[2], std::string("abc")); - // now again fill row 4 partially + // now again fill row 4 partially table.add_value(keys[0], 1.0); - // produce output. hope that row 4 is - // completely padded + // produce output. hope that row 4 is + // completely padded table.write_text(deallog.get_file_stream(), - TableHandler::table_with_separate_column_description); + TableHandler::table_with_separate_column_description); table.set_scientific(keys[0], true); table.set_precision(keys[1], 1); table.write_text(deallog.get_file_stream(), - TableHandler::table_with_separate_column_description); - + TableHandler::table_with_separate_column_description); + } diff --git a/tests/base/table_handler_11.cc b/tests/base/table_handler_11.cc index 683f4c7416..e735d91ee1 100644 --- a/tests/base/table_handler_11.cc +++ b/tests/base/table_handler_11.cc @@ -47,17 +47,17 @@ int main () table.add_value(keys[2], std::string("abc")); table.add_value(keys[3], std::string("A")); table.add_value(keys[4], 123456789.0); - + table.add_column_to_supercolumn("key1","short"); table.add_column_to_supercolumn("key2","short"); table.add_column_to_supercolumn("key3","very_long_supercolumn"); table.add_column_to_supercolumn("key4","very_long_supercolumn"); table.write_text(deallog.get_file_stream(), - TableHandler::table_with_separate_column_description); - + TableHandler::table_with_separate_column_description); + deallog << std::endl; - + table.write_text(deallog.get_file_stream(), - TableHandler::table_with_headers); + TableHandler::table_with_headers); } diff --git a/tests/base/table_handler_12.cc b/tests/base/table_handler_12.cc index 2e917dd93e..da4066aea5 100644 --- a/tests/base/table_handler_12.cc +++ b/tests/base/table_handler_12.cc @@ -38,20 +38,20 @@ int main () deallog.depth_console(0); deallog.threshold_double(1.e-10); - // set precision on the output - // stream to 4 digits + // set precision on the output + // stream to 4 digits logfile << std::setprecision(4); - // but then set precision on the - // table output to 2 + // but then set precision on the + // table output to 2 TableHandler table; table.add_value("key", 0.123456789); table.set_precision ("key", 2); - // now output the table... + // now output the table... table.write_text(logfile); - // ...and then output some other - // number, hopefully with 4 digits - // of precision + // ...and then output some other + // number, hopefully with 4 digits + // of precision logfile << 0.123456789 << std::endl; } diff --git a/tests/base/task_01.cc b/tests/base/task_01.cc index 809f601018..96c1cd465c 100644 --- a/tests/base/task_01.cc +++ b/tests/base/task_01.cc @@ -27,13 +27,13 @@ #include -void test () +void test () { sleep (3); deallog << "OK" << std::endl; } - + int main() { std::ofstream logfile("task_01/output"); diff --git a/tests/base/task_02.cc b/tests/base/task_02.cc index fab05e2bb2..c7a826c76d 100644 --- a/tests/base/task_02.cc +++ b/tests/base/task_02.cc @@ -25,14 +25,14 @@ #include -int test () +int test () { sleep (3); return 42; } - - + + int main() { diff --git a/tests/base/task_03.cc b/tests/base/task_03.cc index 2ff38f444e..616ee60c1d 100644 --- a/tests/base/task_03.cc +++ b/tests/base/task_03.cc @@ -26,15 +26,15 @@ #include -void test (int i) +void test (int i) { deallog << "Task " << i << " starting..." << std::endl; sleep (1); deallog << "Task " << i << " finished!" << std::endl; } - - + + int main() { @@ -42,7 +42,7 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + Threads::Task<> t1 = Threads::new_task (test, 1); { Threads::Task<> t2 = Threads::new_task (test, 2); @@ -50,6 +50,6 @@ int main() t1.join (); t2.join (); } - + deallog << "OK" << std::endl; } diff --git a/tests/base/task_04.cc b/tests/base/task_04.cc index 297afa3276..3fb1768554 100644 --- a/tests/base/task_04.cc +++ b/tests/base/task_04.cc @@ -25,7 +25,7 @@ #include -void test (int i) +void test (int i) { deallog << "Task " << i << " starting..." << std::endl; @@ -37,13 +37,13 @@ void test (int i) t1.join (); t2.join (); } - + sleep (1); deallog << "Task " << i << " finished!" << std::endl; } - - + + int main() { @@ -51,12 +51,12 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + Threads::Task<> t1 = Threads::new_task (test, 1); Threads::Task<> t2 = Threads::new_task (test, 2); t1.join (); t2.join (); - + deallog << "OK" << std::endl; } diff --git a/tests/base/task_05.cc b/tests/base/task_05.cc index 092fe4269f..a9fc105be4 100644 --- a/tests/base/task_05.cc +++ b/tests/base/task_05.cc @@ -32,7 +32,7 @@ #include -int test (int i) +int test (int i) { int k = 1; for (unsigned int j=0; j<100000000; ++j) @@ -40,8 +40,8 @@ int test (int i) return k; } - - + + int main() { @@ -49,19 +49,21 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + Threads::Task tasks[] = - { Threads::new_task (test, 1), - Threads::new_task (test, 2), - Threads::new_task (test, 3), - Threads::new_task (test, 4), - Threads::new_task (test, 5), - Threads::new_task (test, 6), - Threads::new_task (test, 7), - Threads::new_task (test, 8) }; - + { + Threads::new_task (test, 1), + Threads::new_task (test, 2), + Threads::new_task (test, 3), + Threads::new_task (test, 4), + Threads::new_task (test, 5), + Threads::new_task (test, 6), + Threads::new_task (test, 7), + Threads::new_task (test, 8) + }; + for (unsigned int i=0; i -void test (int i) +void test (int i) { deallog << "Task " << i << " starting..." << std::endl; sleep (1); @@ -37,8 +37,8 @@ void test (int i) deallog << "Task " << i << " finished!" << std::endl; } - - + + int main() { @@ -46,12 +46,12 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + Threads::Thread<> t1 = Threads::new_thread (test, 1); Threads::Thread<> t2 = Threads::new_thread (test, 2); t1.join (); t2.join (); - + deallog << "OK" << std::endl; } diff --git a/tests/base/task_07.cc b/tests/base/task_07.cc index 544bd2afe3..d9f148710f 100644 --- a/tests/base/task_07.cc +++ b/tests/base/task_07.cc @@ -25,15 +25,15 @@ #include -void test (int i) +void test (int i) { deallog << "Task " << i << " starting..." << std::endl; sleep (1); deallog << "Task " << i << " finished!" << std::endl; } - - + + int main() { @@ -41,12 +41,12 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + Threads::TaskGroup<> tg; tg += Threads::new_task (test, 1); tg += Threads::new_task (test, 2); tg.join_all (); - + deallog << "OK" << std::endl; } diff --git a/tests/base/task_08.cc b/tests/base/task_08.cc index a2530d34fa..c7d19964f1 100644 --- a/tests/base/task_08.cc +++ b/tests/base/task_08.cc @@ -27,14 +27,14 @@ #include -void test (int i) +void test (int i) { sleep (1); deallog << "Task " << i << " finished!" << std::endl; } - - + + int main() { @@ -42,8 +42,8 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + Threads::new_task (test, 1); - + deallog << "OK" << std::endl; } diff --git a/tests/base/task_09.cc b/tests/base/task_09.cc index 541aae6022..6e84e4bbe2 100644 --- a/tests/base/task_09.cc +++ b/tests/base/task_09.cc @@ -39,20 +39,20 @@ void test () void outer () { - // wait for some time to make sure - // that really all outer tasks have - // been started, then start a bunch - // of new tasks and wait for them - // to finish. it used to be that - // the join() function used a mutex - // which could only be acquired - // once the spawned task has - // finished, but since we already - // have so many tasks running at - // this point, the children never - // get to run and so never release - // the mutex that we try to acquire - // in join() + // wait for some time to make sure + // that really all outer tasks have + // been started, then start a bunch + // of new tasks and wait for them + // to finish. it used to be that + // the join() function used a mutex + // which could only be acquired + // once the spawned task has + // finished, but since we already + // have so many tasks running at + // this point, the children never + // get to run and so never release + // the mutex that we try to acquire + // in join() sleep (1); Threads::new_task (test).join(); diff --git a/tests/base/tensor.cc b/tests/base/tensor.cc index b3c0a743ed..b3ad0c9561 100644 --- a/tests/base/tensor.cc +++ b/tests/base/tensor.cc @@ -30,10 +30,10 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + double a[3][3] = {{1, 2, 3}, {3, 4, 5}, {6, 7, 8}}; double b[3][3] = {{25,31,37}, {45,57,69}, {75,96,117}}; - + const unsigned int dim=3; Tensor<2,dim> t(a); Tensor<2,dim> tt; @@ -42,10 +42,10 @@ int main () Assert (transpose(transpose(result)) == result, ExcInternalError()); Vector unrolled(9); - + t.unroll(unrolled); deallog << "unrolled:"; - for (unsigned i=0;i<9;i++) + for (unsigned i=0; i<9; i++) deallog << ' ' << unrolled(i); deallog << std::endl; @@ -53,17 +53,17 @@ int main () for (unsigned int i=0; i t(a); @@ -42,6 +42,6 @@ int main () deallog << t.norm() << std::endl; Assert (t.norm() == 0, ExcInternalError()); - + deallog << "OK" << std::endl; } diff --git a/tests/base/tensor_07.cc b/tests/base/tensor_07.cc index c93c9c2457..6ae7f21494 100644 --- a/tests/base/tensor_07.cc +++ b/tests/base/tensor_07.cc @@ -28,11 +28,11 @@ template void test_constant() { Tensor<2,dim> t; - for (unsigned int i=0;i t; unsigned int sum = 0; - for (unsigned int i=0;i s; Tensor<2,dim> t; unsigned int sum = 0; - for (unsigned int i=0;i t; unsigned int k = 0; - for (unsigned int i=0;i u, v; - u[i] = f1; - v[j] = f2; - deallog << '\t' << contract3(u,t,v); + Tensor<1,dim> u, v; + u[i] = f1; + v[j] = f2; + deallog << '\t' << contract3(u,t,v); } deallog << std::endl; } @@ -49,14 +49,14 @@ int main () { std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output"); std::ofstream logfile(logname.c_str()); - deallog.attach(logfile); + deallog.attach(logfile); deallog.depth_console(0); deallog << std::setprecision(3); test_select<2>(1.,1.); test_select<3>(1.,1.); test_select<4>(1.,1.); - + test_select<2>(2.,3.); test_select<3>(2.,3.); test_select<4>(2.,3.); diff --git a/tests/base/tensor_24.cc b/tests/base/tensor_24.cc index 48680a70e4..21f1b43e1b 100644 --- a/tests/base/tensor_24.cc +++ b/tests/base/tensor_24.cc @@ -33,13 +33,13 @@ void check () for (unsigned int i=0; i(i,j,k) - == - T::unrolled_to_component_indices (i*dim*dim+j*dim+k), - ExcInternalError()); - Assert (T::component_to_unrolled_index(TableIndices<3>(i,j,k)) - == - i*dim*dim+j*dim+k, - ExcInternalError()); - Assert (t[TableIndices<3>(i,j,k)] == t[i][j][k], - ExcInternalError()); - } + { + Assert (TableIndices<3>(i,j,k) + == + T::unrolled_to_component_indices (i*dim*dim+j*dim+k), + ExcInternalError()); + Assert (T::component_to_unrolled_index(TableIndices<3>(i,j,k)) + == + i*dim*dim+j*dim+k, + ExcInternalError()); + Assert (t[TableIndices<3>(i,j,k)] == t[i][j][k], + ExcInternalError()); + } deallog << "OK" << std::endl; } diff --git a/tests/base/tensor_complex.cc b/tests/base/tensor_complex.cc index b4b489f875..af2521e2ad 100644 --- a/tests/base/tensor_complex.cc +++ b/tests/base/tensor_complex.cc @@ -35,19 +35,21 @@ int main () deallog.threshold_double(1.e-10); double a_double[3][3][2] = {{{1,-1}, {2,0}, {3,0}}, - {{3,0}, {4,0}, {5,0}}, - {{6,0}, {7,0}, {8,3}}}; + {{3,0}, {4,0}, {5,0}}, + {{6,0}, {7,0}, {8,3}} + }; double b_double[3][3][2] = {{{24,-2}, {31,-2}, {37,6}}, - {{45,-3}, {57,0}, {69,15}}, - {{75,12}, {96,21}, {108,48}}}; + {{45,-3}, {57,0}, {69,15}}, + {{75,12}, {96,21}, {108,48}} + }; const unsigned int dim=3; std::complex a[dim][dim], b[dim][dim]; for (unsigned int d=0; d(a_double[d][e][0],a_double[d][e][1]); - b[d][e] = std::complex(b_double[d][e][0],b_double[d][e][1]); + a[d][e] = std::complex(a_double[d][e][0],a_double[d][e][1]); + b[d][e] = std::complex(b_double[d][e][0],b_double[d][e][1]); } Tensor<2,dim,std::complex > t(a); @@ -58,11 +60,11 @@ int main () Vector > unrolled(9); - // cast result to double to profit from zero - // threshold and so on + // cast result to double to profit from zero + // threshold and so on t.unroll(unrolled); deallog << "unrolled:"; - for (unsigned i=0;i<9;i++) + for (unsigned i=0; i<9; i++) deallog << ' ' << unrolled(i); deallog << std::endl; @@ -70,7 +72,7 @@ int main () for (unsigned int i=0; i > result; cross_product(result,e1,e2); deallog << '\t' << result[0] - << '\t' << result[1] - << '\t' << result[2] << std::endl; + << '\t' << result[1] + << '\t' << result[2] << std::endl; cross_product(result,e2,e3); deallog << '\t' << result[0] - << '\t' << result[1] << '\t' - << result[2] << std::endl; + << '\t' << result[1] << '\t' + << result[2] << std::endl; cross_product(result,e3,e1); deallog << '\t' << result[0] - << '\t' << result[1] - << '\t' << result[2] << std::endl; + << '\t' << result[1] + << '\t' << result[2] << std::endl; deallog.pop(); } diff --git a/tests/base/tensor_float.cc b/tests/base/tensor_float.cc index 2202dc4e7a..c07415e724 100644 --- a/tests/base/tensor_float.cc +++ b/tests/base/tensor_float.cc @@ -44,11 +44,11 @@ int main () Vector unrolled(9); - // cast result to double to profit from zero - // threshold and so on + // cast result to double to profit from zero + // threshold and so on t.unroll(unrolled); deallog << "unrolled:"; - for (unsigned i=0;i<9;i++) + for (unsigned i=0; i<9; i++) deallog << ' ' << static_cast(unrolled(i)); deallog << std::endl; @@ -56,7 +56,7 @@ int main () for (unsigned int i=0; i(t[i][j]) << ' '; + deallog << static_cast(t[i][j]) << ' '; deallog << std::endl; }; @@ -68,7 +68,7 @@ int main () for (unsigned int i=0; i(tt[i][j]) << ' '; + deallog << static_cast(tt[i][j]) << ' '; deallog << std::endl; }; @@ -84,18 +84,18 @@ int main () Tensor<1,3,float> result; cross_product(result,e1,e2); deallog << '\t' << static_cast(result[0]) - << '\t' << static_cast(result[1]) - << '\t' << static_cast(result[2]) << std::endl; + << '\t' << static_cast(result[1]) + << '\t' << static_cast(result[2]) << std::endl; cross_product(result,e2,e3); deallog << '\t' << static_cast(result[0]) - << '\t' << static_cast(result[1]) << '\t' - << static_cast(result[2]) << std::endl; + << '\t' << static_cast(result[1]) << '\t' + << static_cast(result[2]) << std::endl; cross_product(result,e3,e1); deallog << '\t' << static_cast(result[0]) - << '\t' << static_cast(result[1]) - << '\t' << static_cast(result[2]) << std::endl; + << '\t' << static_cast(result[1]) + << '\t' << static_cast(result[2]) << std::endl; deallog.pop(); } diff --git a/tests/base/thread_local_storage_01.cc b/tests/base/thread_local_storage_01.cc index 0cba069247..82e3c039e5 100644 --- a/tests/base/thread_local_storage_01.cc +++ b/tests/base/thread_local_storage_01.cc @@ -27,9 +27,15 @@ struct X { - X () { deallog << "Creating" << std::endl; }; - ~X () { deallog << "Destroying " << std::endl; }; - int i; + X () + { + deallog << "Creating" << std::endl; + }; + ~X () + { + deallog << "Destroying " << std::endl; + }; + int i; }; Threads::ThreadLocalStorage *tls_data; @@ -40,60 +46,60 @@ void execute (int i) { tls_data->get().i = i; - // indicate that the TLS object has been - // accessed + // indicate that the TLS object has been + // accessed static Threads::Mutex m; { Threads::Mutex::ScopedLock l(m); ++counter; } - // wait in order to make sure that the - // thread lives longer than the TLS object + // wait in order to make sure that the + // thread lives longer than the TLS object sleep (5); } -void test () +void test () { - // create a thread local storage object + // create a thread local storage object tls_data = new Threads::ThreadLocalStorage(); - - // create 5 threads and wait for their - // return. the OS will create 5 individual - // thread ids, which means that we will - // create 5 individual thread specific - // storage locations + + // create 5 threads and wait for their + // return. the OS will create 5 individual + // thread ids, which means that we will + // create 5 individual thread specific + // storage locations Threads::ThreadGroup<> tg; for (unsigned int i=10; i<15; ++i) tg += Threads::new_thread (execute, i); - // spin lock until all threads have created - // their objects + // spin lock until all threads have created + // their objects while (counter != 5); - - // delete the TLS object. this should also - // destroy all the objects created so far, - // namely 5 of them; while that happens, we - // should get output into logstream + + // delete the TLS object. this should also + // destroy all the objects created so far, + // namely 5 of them; while that happens, we + // should get output into logstream delete tls_data; - // write something into the output - // file. this also makes sure that the - // output file records the order in which - // this output is generated and in which - // the TLS objects were destroyed. we want - // that these objects are destroyed when - // the TLS object is destroyed, not when - // the threads exit + // write something into the output + // file. this also makes sure that the + // output file records the order in which + // this output is generated and in which + // the TLS objects were destroyed. we want + // that these objects are destroyed when + // the TLS object is destroyed, not when + // the threads exit deallog << "Done." << std::endl; - // now make sure the threads all finish + // now make sure the threads all finish tg.join_all (); } - - + + int main() { diff --git a/tests/base/thread_local_storage_02.cc b/tests/base/thread_local_storage_02.cc index 01ddb7d5af..575b4858ad 100644 --- a/tests/base/thread_local_storage_02.cc +++ b/tests/base/thread_local_storage_02.cc @@ -28,12 +28,24 @@ struct X { - X () { Assert (false, ExcInternalError()); }; - X (int n) { deallog << "Creating" << std::endl; - Assert (n==42, ExcInternalError()); }; - X (const X&) { deallog << "Copying" << std::endl; }; - ~X () { deallog << "Destroying " << std::endl; }; - int i; + X () + { + Assert (false, ExcInternalError()); + }; + X (int n) + { + deallog << "Creating" << std::endl; + Assert (n==42, ExcInternalError()); + }; + X (const X &) + { + deallog << "Copying" << std::endl; + }; + ~X () + { + deallog << "Destroying " << std::endl; + }; + int i; }; Threads::ThreadLocalStorage *tls_data; @@ -44,66 +56,66 @@ void execute (int i) { tls_data->get().i = i; - // indicate that the TLS object has been - // accessed + // indicate that the TLS object has been + // accessed static Threads::Mutex m; { Threads::Mutex::ScopedLock l(m); ++counter; } - // wait in order to make sure that the - // thread lives longer than the TLS object + // wait in order to make sure that the + // thread lives longer than the TLS object sleep (5); } -void test () +void test () { - // create a thread local storage object + // create a thread local storage object X exemplar(42); tls_data = new Threads::ThreadLocalStorage(exemplar); - - // create 5 threads and wait for their - // return. the OS will create 5 individual - // thread ids, which means that we will - // create 5 individual thread specific - // storage locations + + // create 5 threads and wait for their + // return. the OS will create 5 individual + // thread ids, which means that we will + // create 5 individual thread specific + // storage locations Threads::ThreadGroup<> tg; for (unsigned int i=10; i<15; ++i) tg += Threads::new_thread (execute, i); - // spin lock until all threads have created - // their objects + // spin lock until all threads have created + // their objects while (counter != 5); - - // delete the TLS object. this should also - // destroy all the objects created so far, - // namely 5 of them, plus the one copy the - // TLS object stores; while that happens, - // we should get output into logstream + + // delete the TLS object. this should also + // destroy all the objects created so far, + // namely 5 of them, plus the one copy the + // TLS object stores; while that happens, + // we should get output into logstream delete tls_data; - // write something into the output - // file. this also makes sure that the - // output file records the order in which - // this output is generated and in which - // the TLS objects were destroyed. we want - // that these objects are destroyed when - // the TLS object is destroyed, not when - // the threads exit + // write something into the output + // file. this also makes sure that the + // output file records the order in which + // this output is generated and in which + // the TLS objects were destroyed. we want + // that these objects are destroyed when + // the TLS object is destroyed, not when + // the threads exit deallog << "Done." << std::endl; - // now make sure the threads all finish + // now make sure the threads all finish tg.join_all (); - // at this point, the seventh object will - // be destroyed, which is the exemplar - // object local to this function + // at this point, the seventh object will + // be destroyed, which is the exemplar + // object local to this function } - - + + int main() { diff --git a/tests/base/thread_local_storage_03.cc b/tests/base/thread_local_storage_03.cc index 746aa42fca..7433568261 100644 --- a/tests/base/thread_local_storage_03.cc +++ b/tests/base/thread_local_storage_03.cc @@ -27,21 +27,21 @@ struct X { - Threads::ThreadLocalStorage tls_data; - - X () - : - tls_data (42) - {} - - int f () - { - // access TLS data and have it - // converted to the right data type - // without the need to call - // tls_data.get() - return tls_data; - } + Threads::ThreadLocalStorage tls_data; + + X () + : + tls_data (42) + {} + + int f () + { + // access TLS data and have it + // converted to the right data type + // without the need to call + // tls_data.get() + return tls_data; + } }; @@ -52,7 +52,7 @@ void test () t = Threads::new_thread (&X::f, x); Assert (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 e3e27e80b3..60863834c7 100644 --- a/tests/base/thread_local_storage_04.cc +++ b/tests/base/thread_local_storage_04.cc @@ -28,23 +28,23 @@ int counter = 10; struct X { - Threads::ThreadLocalStorage tls_data; - - X () - : - tls_data (42) - {} - - int f () - { - // use TLS::operator= - tls_data = counter++; - // access TLS data and have it - // converted to the right data type - // without the need to call - // tls_data.get() - return tls_data; - } + Threads::ThreadLocalStorage tls_data; + + X () + : + tls_data (42) + {} + + int f () + { + // use TLS::operator= + tls_data = counter++; + // access TLS data and have it + // converted to the right data type + // without the need to call + // tls_data.get() + return tls_data; + } }; @@ -55,13 +55,13 @@ void test () Threads::Thread t; t = Threads::new_thread (&X::f, x); Assert (t.return_value() == 10, - ExcInternalError()); + ExcInternalError()); } { Threads::Thread t; t = Threads::new_thread (&X::f, x); Assert (t.return_value() == 11, - ExcInternalError()); + ExcInternalError()); } Assert (counter == 12, ExcInternalError()); diff --git a/tests/base/thread_validity_01.cc b/tests/base/thread_validity_01.cc index 6e10e0e284..6ce1434ee1 100644 --- a/tests/base/thread_validity_01.cc +++ b/tests/base/thread_validity_01.cc @@ -26,11 +26,11 @@ struct X { - X(int i) : i(i) {} - int i; - private: - X(const X&); - X & operator= (const X&); + X(int i) : i(i) {} + int i; +private: + X(const X &); + X &operator= (const X &); }; @@ -41,15 +41,15 @@ void execute (const X &x) } -void test () +void test () { X x(42); Threads::Thread t = Threads::spawn (&execute)(x); t.join (); } - - + + int main() { diff --git a/tests/base/thread_validity_02.cc b/tests/base/thread_validity_02.cc index e832732490..f0c89f103e 100644 --- a/tests/base/thread_validity_02.cc +++ b/tests/base/thread_validity_02.cc @@ -30,30 +30,30 @@ struct X { - X(int i) : i(i) {} - int i; - private: - X(const X&); - X & operator= (const X&); + X(int i) : i(i) {} + int i; +private: + X(const X &); + X &operator= (const X &); }; void execute (const X &x) { - Assert (x.i == 42, ExcInternalError()); + Assert (x.i == 42, ExcInternalError()); deallog << "OK" << std::endl; } -void test () +void test () { const X x(42); Threads::Thread t = Threads::spawn (&execute)(x); t.join (); } - - + + int main() { diff --git a/tests/base/thread_validity_03.cc b/tests/base/thread_validity_03.cc index 93357d3d4f..1c27a502fa 100644 --- a/tests/base/thread_validity_03.cc +++ b/tests/base/thread_validity_03.cc @@ -29,32 +29,32 @@ struct X { - X(int i) : i(i) {} - int i; - - void execute () - { - Assert (i == 42, ExcInternalError()); - deallog << "OK" << std::endl; - } - - private: - X(const X&); - X & operator= (const X&); + X(int i) : i(i) {} + int i; + + void execute () + { + Assert (i == 42, ExcInternalError()); + deallog << "OK" << std::endl; + } + +private: + X(const X &); + X &operator= (const X &); }; -void test () +void test () { X x(42); Threads::Thread t = Threads::spawn (x, &X::execute)(); t.join (); } - - + + int main() { diff --git a/tests/base/thread_validity_04.cc b/tests/base/thread_validity_04.cc index a982a94828..2b2d72e8ae 100644 --- a/tests/base/thread_validity_04.cc +++ b/tests/base/thread_validity_04.cc @@ -30,32 +30,32 @@ struct X { - X(int i) : i(i) {} - int i; - - void execute () const - { - Assert (i == 42, ExcInternalError()); - deallog << "OK" << std::endl; - } - - private: - X(const X&); - X & operator= (const X&); + X(int i) : i(i) {} + int i; + + void execute () const + { + Assert (i == 42, ExcInternalError()); + deallog << "OK" << std::endl; + } + +private: + X(const X &); + X &operator= (const X &); }; -void test () +void test () { const X x(42); Threads::Thread t = Threads::spawn (x, &X::execute)(); t.join (); } - - + + int main() { diff --git a/tests/base/thread_validity_05.cc b/tests/base/thread_validity_05.cc index ea6b2e3fd9..7746c2d894 100644 --- a/tests/base/thread_validity_05.cc +++ b/tests/base/thread_validity_05.cc @@ -29,27 +29,27 @@ struct X { - X(int i) : i(i) {} - int i; - - void execute () - { - Assert (false, ExcInternalError()); - } - - void execute () const - { - Assert (i == 42, ExcInternalError()); - deallog << "OK" << std::endl; - } - - private: - X(const X&); - X & operator= (const X&); + X(int i) : i(i) {} + int i; + + void execute () + { + Assert (false, ExcInternalError()); + } + + void execute () const + { + Assert (i == 42, ExcInternalError()); + deallog << "OK" << std::endl; + } + +private: + X(const X &); + X &operator= (const X &); }; -void test1 () +void test1 () { const X x(42); Threads::Thread t = Threads::spawn (x, &X::execute)(); @@ -59,35 +59,35 @@ void test1 () struct Y { - Y(int i) : i(i) {} - int i; - - void execute () - { - Assert (i == 42, ExcInternalError()); - deallog << "OK" << std::endl; - } - - void execute () const - { - Assert (false, ExcInternalError()); - } - - private: - Y(const Y&); - Y & operator= (const Y&); + Y(int i) : i(i) {} + int i; + + void execute () + { + Assert (i == 42, ExcInternalError()); + deallog << "OK" << std::endl; + } + + void execute () const + { + Assert (false, ExcInternalError()); + } + +private: + Y(const Y &); + Y &operator= (const Y &); }; -void test2 () +void test2 () { Y y(42); Threads::Thread t = Threads::spawn (y, &Y::execute)(); t.join (); } - - + + int main() { diff --git a/tests/base/thread_validity_06.cc b/tests/base/thread_validity_06.cc index f4be50886f..9c3fc87e4f 100644 --- a/tests/base/thread_validity_06.cc +++ b/tests/base/thread_validity_06.cc @@ -31,10 +31,14 @@ struct X { - X() : i(0) {} - X(const X &x) : i(x.i+1) {} - X & operator= (const X &x) { i = x.i+1; return *this;} - int i; + X() : i(0) {} + X(const X &x) : i(x.i+1) {} + X &operator= (const X &x) + { + i = x.i+1; + return *this; + } + int i; }; @@ -49,12 +53,12 @@ void execute_value (X x) { Assert (x.i > 0, ExcInternalError()); deallog << __PRETTY_FUNCTION__ << ' ' << (x.i>0 ? "OK" : "not OK") - << std::endl; + << std::endl; deallog << "OK" << std::endl; } -void test () +void test () { { X x; @@ -68,8 +72,8 @@ void test () } } - - + + int main() { diff --git a/tests/base/thread_validity_07.cc b/tests/base/thread_validity_07.cc index 4dbf617e02..da1e9180f1 100644 --- a/tests/base/thread_validity_07.cc +++ b/tests/base/thread_validity_07.cc @@ -35,16 +35,16 @@ void worker () Threads::Thread<> worker_thread; -void waiter (int i) +void waiter (int i) { worker_thread.join (); - + deallog << "Waiting thread " << i << " was woken up." - << std::endl; + << std::endl; } - - + + int main() { diff --git a/tests/base/thread_validity_08.cc b/tests/base/thread_validity_08.cc index ffe5776013..e69ef0c4ec 100644 --- a/tests/base/thread_validity_08.cc +++ b/tests/base/thread_validity_08.cc @@ -36,7 +36,7 @@ void worker () spin_lock = 1; } - + int main() { @@ -46,32 +46,32 @@ int main() deallog.threshold_double(1.e-10); mutex.acquire (); - // start and abandon the - // thread. because we hold the - // lock, the started task can not - // proceed to print out "OK" until - // we release the lock which we do - // only after some time to give the - // thread a way to start up - // - // if detachment from threads isn't - // possible, then the worker() - // function will hang because it - // won't be able to acquire the - // mutex + // start and abandon the + // thread. because we hold the + // lock, the started task can not + // proceed to print out "OK" until + // we release the lock which we do + // only after some time to give the + // thread a way to start up + // + // if detachment from threads isn't + // possible, then the worker() + // function will hang because it + // won't be able to acquire the + // mutex { Threads::new_thread (worker); } sleep (1); - // let abandoned thread continue + // let abandoned thread continue mutex.release (); - // wait for thread to finish + // wait for thread to finish while (spin_lock == 0) ; - // release the lock that the thread - // acquired to avoid pthread errors + // release the lock that the thread + // acquired to avoid pthread errors mutex.release (); } diff --git a/tests/base/thread_validity_10.cc b/tests/base/thread_validity_10.cc index ddd3cb6e5c..0f832207bb 100644 --- a/tests/base/thread_validity_10.cc +++ b/tests/base/thread_validity_10.cc @@ -46,15 +46,15 @@ int main() deallog.threshold_double(1.e-10); Threads::Thread t; - // join non-existing thread + // join non-existing thread deallog << (t.valid() ? "true" : "false") - << std::endl; + << std::endl; - // now assign a thread object and - // wait for it + // now assign a thread object and + // wait for it t = Threads::new_thread (worker); deallog << (t.valid() ? "true" : "false") - << std::endl; + << std::endl; deallog << "return value = " << t.return_value() - << std::endl; + << std::endl; } diff --git a/tests/base/thread_validity_11.cc b/tests/base/thread_validity_11.cc index f454d7f807..0f03cb2de9 100644 --- a/tests/base/thread_validity_11.cc +++ b/tests/base/thread_validity_11.cc @@ -30,18 +30,18 @@ void execute () {} -void test () +void test () { Threads::Thread<> t = Threads::spawn (&execute)(); deallog << "Before first join()" << std::endl; t.join (); deallog << "Between join()s" << std::endl; t.join (); - deallog << "After second join()" << std::endl; + deallog << "After second join()" << std::endl; } - - + + int main() { diff --git a/tests/base/thread_validity_12.cc b/tests/base/thread_validity_12.cc index 0ca1b30d21..c202c64139 100644 --- a/tests/base/thread_validity_12.cc +++ b/tests/base/thread_validity_12.cc @@ -28,19 +28,19 @@ void execute () {} -void test () +void test () { - // use a default constructed object + // use a default constructed object Threads::Thread<> t; deallog << "Before first join()" << std::endl; t.join (); deallog << "Between join()s" << std::endl; t.join (); - deallog << "After second join()" << std::endl; + deallog << "After second join()" << std::endl; } - - + + int main() { diff --git a/tests/base/timer.cc b/tests/base/timer.cc index 75396a8865..5b375eae63 100644 --- a/tests/base/timer.cc +++ b/tests/base/timer.cc @@ -31,11 +31,13 @@ void compare (double t1, double t2, double ratio) double r = t2/t1; double d = std::fabs(r-ratio) / ratio; - // relative error < 15%? + // relative error < 15%? if (d <= .15) { deallog << "OK" << std::endl; - } else { + } + else + { deallog << "Ratio " << r << " should be " << ratio << std::endl; } } @@ -48,9 +50,9 @@ void burn (unsigned int n) for (unsigned int i=0 ; i -void test () +void test () { deallog << Utilities::int_to_string (42,4) << std::endl; deallog << Utilities::int_to_string (42) << std::endl; @@ -47,19 +47,19 @@ void test () Assert (Utilities::split_string_list (p).size() == 3, ExcInternalError()); Assert (Utilities::split_string_list (p)[0] == "alpha", - ExcInternalError()); + ExcInternalError()); Assert (Utilities::split_string_list (p)[1] == "beta", ExcInternalError()); Assert (Utilities::split_string_list (p)[2] == "gamma", ExcInternalError()); } - + { const char *p = "alpha; beta; gamma "; Assert (Utilities::split_string_list (p, ';').size() == 3, ExcInternalError()); Assert (Utilities::split_string_list (p, ';')[0] == "alpha", - ExcInternalError()); + ExcInternalError()); Assert (Utilities::split_string_list (p, ';')[1] == "beta", ExcInternalError()); Assert (Utilities::split_string_list (p, ';')[2] == "gamma", @@ -72,8 +72,8 @@ void test () deallog << std::endl; } - - + + int main() { diff --git a/tests/base/utilities_02.cc b/tests/base/utilities_02.cc index b1633f703d..ce9711b769 100644 --- a/tests/base/utilities_02.cc +++ b/tests/base/utilities_02.cc @@ -27,7 +27,7 @@ template -void test () +void test () { deallog << Utilities::fixed_power (2) << std::endl; deallog << Utilities::fixed_power (-2) << std::endl; @@ -36,8 +36,8 @@ void test () deallog << std::endl; } - - + + int main() { diff --git a/tests/base/utilities_04.cc b/tests/base/utilities_04.cc index 7a4d417e86..837e0b3e13 100644 --- a/tests/base/utilities_04.cc +++ b/tests/base/utilities_04.cc @@ -33,7 +33,7 @@ std::vector split_string(const std::string &text, const char delim= std::vector result; std::string word; std::stringstream stream(text); - while( getline(stream, word, delim) ) + while ( getline(stream, word, delim) ) result.push_back(word); return result; @@ -41,9 +41,9 @@ std::vector split_string(const std::string &text, const char delim= void test_function(const std::string &original_text, - const unsigned int width, - const char delimiter, - const std::string &result) + const unsigned int width, + const char delimiter, + const std::string &result) { std::vector res_vec = Utilities::break_text_into_lines (original_text, width, delimiter); @@ -53,10 +53,10 @@ void test_function(const std::string &original_text, Assert(res_vec.size()==should_be_vec.size(), ExcInternalError()); - for (unsigned int i=0;i e = d - b; for (unsigned int i=0; i::epsilon(), - ExcInternalError()); + std::numeric_limits::epsilon(), + ExcInternalError()); deallog << "OK" << std::endl - << "Absolute value: "; + << "Absolute value: "; d = -c; d = std::abs(d); for (unsigned int i=0; i::epsilon(), - ExcInternalError()); + 10.*std::numeric_limits::epsilon(), + ExcInternalError()); deallog << "OK" << std::endl - << "Cosine: "; + << "Cosine: "; e = std::cos(c); for (unsigned int i=0; i::epsilon(), - ExcInternalError()); + 10.*std::numeric_limits::epsilon(), + ExcInternalError()); deallog << "OK" << std::endl - << "Tangent: "; + << "Tangent: "; d = std::tan(e); for (unsigned int i=0; i::epsilon(), - ExcInternalError()); + 10.*std::numeric_limits::epsilon(), + ExcInternalError()); deallog << "OK" << std::endl - << "Exponential: "; + << "Exponential: "; d = std::exp(c-a); for (unsigned int i=0; i::epsilon(), - ExcInternalError()); + 10.*std::numeric_limits::epsilon(), + ExcInternalError()); deallog << "OK" << std::endl - << "Logarithm: "; + << "Logarithm: "; e = std::log(d); for (unsigned int i=0; i::epsilon(), - ExcInternalError()); + 10.*std::numeric_limits::epsilon(), + ExcInternalError()); deallog << "OK" << std::endl; } @@ -162,9 +162,9 @@ int main() test (); deallog.pop(); - // test long double: in that case, the default - // path of VectorizedArray is taken no matter - // what was done for double or float + // test long double: in that case, the default + // path of VectorizedArray is taken no matter + // what was done for double or float deallog.push("long double"); test (); deallog.pop(); diff --git a/tests/base/work_stream_01.cc b/tests/base/work_stream_01.cc index 1d65088958..2ac20ab9fd 100644 --- a/tests/base/work_stream_01.cc +++ b/tests/base/work_stream_01.cc @@ -32,40 +32,40 @@ struct ScratchData struct CopyData { - unsigned int computed; + unsigned int computed; }; struct X { - void worker (const std::vector::iterator &i, - ScratchData &, - CopyData &ad) - { - ad.computed = *i * 2; - } - - void copier (const CopyData &ad) - { - deallog << ad.computed << std::endl; - } + void worker (const std::vector::iterator &i, + ScratchData &, + CopyData &ad) + { + ad.computed = *i * 2; + } + + void copier (const CopyData &ad) + { + deallog << ad.computed << std::endl; + } }; -void test () +void test () { std::vector v; for (unsigned int i=0; i<20; ++i) v.push_back (i); - + X x; WorkStream::run (v.begin(), v.end(), x, &X::worker, &X::copier, - ScratchData(), - CopyData()); + ScratchData(), + CopyData()); } - - + + int main() { diff --git a/tests/base/work_stream_02.cc b/tests/base/work_stream_02.cc index 6209d42883..54bcd752ae 100644 --- a/tests/base/work_stream_02.cc +++ b/tests/base/work_stream_02.cc @@ -32,13 +32,13 @@ struct ScratchData struct CopyData { - unsigned int computed; + unsigned int computed; }; void worker (const std::vector::iterator &i, - ScratchData &, - CopyData &ad) + ScratchData &, + CopyData &ad) { ad.computed = *i * 2; } @@ -49,19 +49,19 @@ void copier (const CopyData &ad) } -void test () +void test () { std::vector v; for (unsigned int i=0; i<20; ++i) v.push_back (i); - + WorkStream::run (v.begin(), v.end(), &worker, &copier, - ScratchData(), - CopyData()); + ScratchData(), + CopyData()); } - - + + int main() { diff --git a/tests/base/work_stream_03.cc b/tests/base/work_stream_03.cc index 7dc97e1bc7..70760f9502 100644 --- a/tests/base/work_stream_03.cc +++ b/tests/base/work_stream_03.cc @@ -41,43 +41,43 @@ char logname[] = "work_stream_03/output"; template - double - value(const Point &p) - { - double val = 0; - for (unsigned int d = 0; d < dim; ++d) - for (unsigned int i = 0; i <= 1; ++i) - val += std::pow(p[d], 1. * i); - return val; - } +double +value(const Point &p) +{ + double val = 0; + for (unsigned int d = 0; d < dim; ++d) + for (unsigned int i = 0; i <= 1; ++i) + val += std::pow(p[d], 1. * i); + return val; +} namespace { template - struct Scratch + struct Scratch + { + Scratch(const FiniteElement &fe, const Quadrature &quadrature) : + fe_collection(fe), quadrature_collection(quadrature), x_fe_values( + fe_collection, quadrature_collection, update_q_points), rhs_values( + quadrature_collection.size()) { - Scratch(const FiniteElement &fe, const Quadrature &quadrature) : - fe_collection(fe), quadrature_collection(quadrature), x_fe_values( - fe_collection, quadrature_collection, update_q_points), rhs_values( - quadrature_collection.size()) - { - } + } - Scratch(const Scratch &data) : - fe_collection(data.fe_collection), quadrature_collection( - data.quadrature_collection), x_fe_values(fe_collection, - quadrature_collection, update_q_points), rhs_values( - data.rhs_values) - { - } + Scratch(const Scratch &data) : + fe_collection(data.fe_collection), quadrature_collection( + data.quadrature_collection), x_fe_values(fe_collection, + quadrature_collection, update_q_points), rhs_values( + data.rhs_values) + { + } - const FiniteElement &fe_collection; - const Quadrature &quadrature_collection; + const FiniteElement &fe_collection; + const Quadrature &quadrature_collection; - FEValues x_fe_values; + FEValues x_fe_values; - std::vector rhs_values; - }; + std::vector rhs_values; + }; struct CopyData { @@ -87,7 +87,7 @@ namespace void zero_subrange(const unsigned int begin, const unsigned int end, - std::vector &dst) + std::vector &dst) { for (unsigned int i = begin; i < end; ++i) dst[i] = 0; @@ -96,7 +96,7 @@ zero_subrange(const unsigned int begin, const unsigned int end, void zero_element(std::vector &dst, - const unsigned int i) + const unsigned int i) { dst[i] = 0; } @@ -104,24 +104,24 @@ zero_element(std::vector &dst, template void - mass_assembler(const typename Triangulation::active_cell_iterator &cell, - Scratch &data, CopyData ©_data) - { - data.x_fe_values.reinit(cell); +mass_assembler(const typename Triangulation::active_cell_iterator &cell, + Scratch &data, CopyData ©_data) +{ + data.x_fe_values.reinit(cell); - const Point q = data.x_fe_values.quadrature_point(0); + const Point q = data.x_fe_values.quadrature_point(0); - // this appears to be the key: the following two ways both overwrite some - // of the memory in which we store the quadrature point location. - parallel::apply_to_subranges(0U, copy_data.cell_rhs.size(), - std_cxx1x::bind(&zero_subrange, std_cxx1x::_1, std_cxx1x::_2, - std_cxx1x::ref(copy_data.cell_rhs)), 1); + // this appears to be the key: the following two ways both overwrite some + // of the memory in which we store the quadrature point location. + parallel::apply_to_subranges(0U, copy_data.cell_rhs.size(), + std_cxx1x::bind(&zero_subrange, std_cxx1x::_1, std_cxx1x::_2, + std_cxx1x::ref(copy_data.cell_rhs)), 1); - Assert(q == data.x_fe_values.quadrature_point(0), - ExcInternalError()); + Assert(q == data.x_fe_values.quadrature_point(0), + ExcInternalError()); - copy_data.cell_rhs[0] = value(data.x_fe_values.quadrature_point(0)); - } + copy_data.cell_rhs[0] = value(data.x_fe_values.quadrature_point(0)); +} void @@ -152,9 +152,9 @@ do_project() CopyData copy_data; copy_data.cell_rhs.resize(8); WorkStream::run(triangulation.begin_active(), triangulation.end(), - &mass_assembler, - std_cxx1x::bind(©_local_to_global, std_cxx1x::_1, &sum), - assembler_data, copy_data, 8, 1); + &mass_assembler, + std_cxx1x::bind(©_local_to_global, std_cxx1x::_1, &sum), + assembler_data, copy_data, 8, 1); Assert (std::fabs(sum-288.) < 1e-12, ExcInternalError()); deallog << sum << std::endl; diff --git a/tests/benchmarks/gettimes/get_times.cc b/tests/benchmarks/gettimes/get_times.cc index 988d470776..03e2c0e06b 100644 --- a/tests/benchmarks/gettimes/get_times.cc +++ b/tests/benchmarks/gettimes/get_times.cc @@ -25,138 +25,143 @@ using namespace std; -int main(int argc, char *argv[]) { - - ifstream input; - stringstream ss; - const int IGNORE_LINES = 3; //Number of initial lines to ignore - const string DELIM = "*"; //String to divide test data - - input.open("temp.txt"); - - vector names; - vector times; - - //If no revision number, retrieve column names - if(argc <= 1) - { - string curr_line; - - //Ignore first n lines + delimeter- they don't hold any useful data - for(int i = 0; i < IGNORE_LINES + 1; i++) - { - getline(input, curr_line); - } - - while(!input.eof()) { - - getline(input, curr_line); - if(curr_line == "") - continue; - if(curr_line == DELIM) - break; - - ////cout << "curr line: " << curr_line << endl; - //Looking for the string after the '|' and ' ' - int first_char = 0; - if(curr_line[0] == '|') - first_char++; - if (curr_line[1] == ' ') - first_char++; - - - ////cout << "first char at pos: " << first_char << endl; - - //Find end of string - int num_chars = 0; - while(curr_line[first_char + num_chars] != '|') - num_chars++; - - num_chars--; - - while(curr_line[first_char + num_chars] == ' ') - num_chars--; - - names.push_back(curr_line.substr(first_char, num_chars+1)); - } - } - - else //Else, extract execution time from each line - { - - int time_index = 0; - - while(!input.eof()) - { - - string curr_line = ""; - - //Read in line - getline(input,curr_line); - - //Check for delimeter - if(curr_line == DELIM) - { - ////cout << "Delimeter detected" << endl; - time_index = 0; - //Ignore first n lines- they don't hold any useful data - for(int i = 0; i < IGNORE_LINES; i++) - { - string dummy; - getline(input, dummy); - ////cout << "Skipping: " << dummy << endl; - } - continue; - } - - ////cout << "Reading: " << curr_line << endl; - - if(curr_line == "" && DELIM != "") - continue; - - - //Looking for a number that ends with 's' - int last_s = curr_line.rfind('s'); - //In case 's' is not used in the future - assert(isdigit(curr_line[last_s - 1])); // Test: s preceded by number - - //Find time string and convert to double - int num_start = last_s - 1; - while(curr_line[num_start] != ' ') - num_start--; - string timestr = curr_line.substr(num_start+1, last_s - num_start); - double time = (double)atof(timestr.substr(0,timestr.size()-1).c_str()); - - assert(times.size() >= time_index); - // first addition of times to vector; each loop, times.size() should be one less than time_index - if(times.size() == time_index) - times.push_back(time); - else - times[time_index] = (time < times[time_index]) ? time : times[time_index]; //else, determines minimum time and stores it - time_index++; - - } - } - - - //Output individual names - if(argc <= 1) { - for(int i = 0; i < names.size(); i++) { - cout << names[i]; - if(i < names.size() - 1) - cout << endl; - } - } - - //Output individual times - if(argc > 1) { - cout << argv[1]; - for(int i = 0; i < times.size(); i++) - cout << " " << times[i]; - } - - cout << endl; - - - return 0; +int main(int argc, char *argv[]) +{ + + ifstream input; + stringstream ss; + const int IGNORE_LINES = 3; //Number of initial lines to ignore + const string DELIM = "*"; //String to divide test data + + input.open("temp.txt"); + + vector names; + vector times; + + //If no revision number, retrieve column names + if (argc <= 1) + { + string curr_line; + + //Ignore first n lines + delimeter- they don't hold any useful data + for (int i = 0; i < IGNORE_LINES + 1; i++) + { + getline(input, curr_line); + } + + while (!input.eof()) + { + + getline(input, curr_line); + if (curr_line == "") + continue; + if (curr_line == DELIM) + break; + + ////cout << "curr line: " << curr_line << endl; + //Looking for the string after the '|' and ' ' + int first_char = 0; + if (curr_line[0] == '|') + first_char++; + if (curr_line[1] == ' ') + first_char++; + + + ////cout << "first char at pos: " << first_char << endl; + + //Find end of string + int num_chars = 0; + while (curr_line[first_char + num_chars] != '|') + num_chars++; + + num_chars--; + + while (curr_line[first_char + num_chars] == ' ') + num_chars--; + + names.push_back(curr_line.substr(first_char, num_chars+1)); + } + } + + else //Else, extract execution time from each line + { + + int time_index = 0; + + while (!input.eof()) + { + + string curr_line = ""; + + //Read in line + getline(input,curr_line); + + //Check for delimeter + if (curr_line == DELIM) + { + ////cout << "Delimeter detected" << endl; + time_index = 0; + //Ignore first n lines- they don't hold any useful data + for (int i = 0; i < IGNORE_LINES; i++) + { + string dummy; + getline(input, dummy); + ////cout << "Skipping: " << dummy << endl; + } + continue; + } + + ////cout << "Reading: " << curr_line << endl; + + if (curr_line == "" && DELIM != "") + continue; + + + //Looking for a number that ends with 's' + int last_s = curr_line.rfind('s'); + //In case 's' is not used in the future + assert(isdigit(curr_line[last_s - 1])); // Test: s preceded by number + + //Find time string and convert to double + int num_start = last_s - 1; + while (curr_line[num_start] != ' ') + num_start--; + string timestr = curr_line.substr(num_start+1, last_s - num_start); + double time = (double)atof(timestr.substr(0,timestr.size()-1).c_str()); + + assert(times.size() >= time_index); + // first addition of times to vector; each loop, times.size() should be one less than time_index + if (times.size() == time_index) + times.push_back(time); + else + times[time_index] = (time < times[time_index]) ? time : times[time_index]; //else, determines minimum time and stores it + time_index++; + + } + } + + + //Output individual names + if (argc <= 1) + { + for (int i = 0; i < names.size(); i++) + { + cout << names[i]; + if (i < names.size() - 1) + cout << endl; + } + } + + //Output individual times + if (argc > 1) + { + cout << argv[1]; + for (int i = 0; i < times.size(); i++) + cout << " " << times[i]; + } + + cout << endl; + + + return 0; } diff --git a/tests/benchmarks/old/benchmark.cc b/tests/benchmarks/old/benchmark.cc index fcc503f382..03c9f4472a 100644 --- a/tests/benchmarks/old/benchmark.cc +++ b/tests/benchmarks/old/benchmark.cc @@ -42,29 +42,29 @@ int main() deallog << "size = " << nx << " dim = " << dim << std::endl; start = clock(); - for (unsigned int i=0;i A(nx,nx); start = clock(); - for (unsigned int i=0;i -void check_dofs(DOF& dof) +void check_dofs(DOF &dof) { FE_Q q1(1); FE_Q q3(3); @@ -42,28 +42,28 @@ void check_dofs(DOF& dof) dof.distribute_dofs(q1); deallog << "Dofs Q1 " << std::setw(12) << dof.n_dofs() - << " memory " << std::setw(12) << dof.memory_consumption() - << " quotient " << (1./dof.n_dofs()*dof.memory_consumption()) - << std::endl; - + << " memory " << std::setw(12) << dof.memory_consumption() + << " quotient " << (1./dof.n_dofs()*dof.memory_consumption()) + << std::endl; + dof.distribute_dofs(q3); deallog << "Dofs Q3 " << std::setw(12) << dof.n_dofs() - << " memory " << std::setw(12) << dof.memory_consumption() - << " quotient " << (1./dof.n_dofs()*dof.memory_consumption()) - << std::endl; - + << " memory " << std::setw(12) << dof.memory_consumption() + << " quotient " << (1./dof.n_dofs()*dof.memory_consumption()) + << std::endl; + dof.distribute_dofs(sys1); deallog << "Dofs Sys1 " << std::setw(12) << dof.n_dofs() - << " memory " << std::setw(12) << dof.memory_consumption() - << " quotient " << (1./dof.n_dofs()*dof.memory_consumption()) - << std::endl; - + << " memory " << std::setw(12) << dof.memory_consumption() + << " quotient " << (1./dof.n_dofs()*dof.memory_consumption()) + << std::endl; + dof.distribute_dofs(sys2); deallog << "Dofs Sys2 " << std::setw(12) << dof.n_dofs() - << " memory " << std::setw(12) << dof.memory_consumption() - << " quotient " << (1./dof.n_dofs()*dof.memory_consumption()) - << std::endl; - + << " memory " << std::setw(12) << dof.memory_consumption() + << " quotient " << (1./dof.n_dofs()*dof.memory_consumption()) + << std::endl; + dof.clear(); } @@ -76,21 +76,21 @@ void check (bool local) GridGenerator::hyper_cube(tr); if (local) - for (unsigned int i=0;i<99/dim;++i) + for (unsigned int i=0; i<99/dim; ++i) { - tr.last_active()->set_refine_flag(); - tr.execute_coarsening_and_refinement(); + tr.last_active()->set_refine_flag(); + tr.execute_coarsening_and_refinement(); } else tr.refine_global(18/dim); - + deallog << "Levels " << tr.n_levels() << "Cells "<< tr.n_cells() - << std::endl - << " active " << std::setw(12) << tr.n_active_cells() - << " memory " << std::setw(12) << tr.memory_consumption() - << " quotient " << (1./tr.n_cells()*tr.memory_consumption()) - << std::endl; - + << std::endl + << " active " << std::setw(12) << tr.n_active_cells() + << " memory " << std::setw(12) << tr.memory_consumption() + << " quotient " << (1./tr.n_cells()*tr.memory_consumption()) + << std::endl; + FE_Q q1(1); FE_Q q3(3); FESystem sys1(q3, 1); @@ -113,7 +113,7 @@ int main() check<2>(true); check<3>(true); deallog.pop(); - deallog.push("global"); + deallog.push("global"); check<2>(false); check<3>(false); deallog.pop(); diff --git a/tests/benchmarks/old/dof_handler_timing.cc b/tests/benchmarks/old/dof_handler_timing.cc index 04dbdccf7d..9c28496264 100644 --- a/tests/benchmarks/old/dof_handler_timing.cc +++ b/tests/benchmarks/old/dof_handler_timing.cc @@ -41,54 +41,54 @@ using namespace dealii; template -void indices (const DoFHandler& dof, unsigned int repeat) +void indices (const DoFHandler &dof, unsigned int repeat) { typedef typename DoFHandler::active_cell_iterator I; - + std::vector dofs(dof.get_fe().dofs_per_cell); const I end = dof.end(); - for (unsigned int k=0;kget_dof_indices(dofs); } template -void fevalues (const DoFHandler& dof, - UpdateFlags updates) +void fevalues (const DoFHandler &dof, + UpdateFlags updates) { typedef typename DoFHandler::active_cell_iterator I; const I end = dof.end(); - + QGauss quadrature(5); MappingQ1 mapping; FEValues fe(mapping, dof.get_fe(), quadrature, updates); - - for (I i=dof.begin_active(); i!=end;++i) + + for (I i=dof.begin_active(); i!=end; ++i) fe.reinit(i); } template -void fefacevalues (const DoFHandler& dof, - UpdateFlags updates) +void fefacevalues (const DoFHandler &dof, + UpdateFlags updates) { typedef typename DoFHandler::active_cell_iterator I; const I end = dof.end(); - + QGauss quadrature(5); MappingQ1 mapping; FEFaceValues fe(mapping, dof.get_fe(), quadrature, updates); - - for (I i=dof.begin_active(); i!=end;++i) - for (unsigned int f=0;f::faces_per_cell;++f) + + for (I i=dof.begin_active(); i!=end; ++i) + for (unsigned int f=0; f::faces_per_cell; ++f) fe.reinit(i, f); } template -void check_mapping (const DoFHandler& dof) +void check_mapping (const DoFHandler &dof) { deallog.push("cell"); fevalues(dof, update_q_points); @@ -98,7 +98,7 @@ void check_mapping (const DoFHandler& dof) fevalues(dof, update_q_points | update_JxW_values); deallog << "qpoints|JxW" << std::endl; deallog.pop(); - + deallog.push("face"); fefacevalues(dof, update_quadrature_points); deallog << "qpoints" << std::endl; @@ -109,12 +109,12 @@ void check_mapping (const DoFHandler& dof) fefacevalues(dof, update_q_points | update_JxW_values | update_normal_vectors); deallog << "qpoints|JxW|normals" << std::endl; deallog.pop(); - + } template -void check_values (const DoFHandler& dof) +void check_values (const DoFHandler &dof) { indices(dof, 100); deallog << "Index*100" << std::endl; @@ -126,13 +126,13 @@ void check_values (const DoFHandler& dof) fevalues(dof, update_values | update_JxW_values); deallog << "values|JxW" << std::endl; fevalues(dof, update_values | update_gradients - | update_q_points | update_JxW_values); + | update_q_points | update_JxW_values); deallog << "values|gradients|qpoints|JxW" << std::endl; // fevalues(dof, update_values | update_gradients | update_second_derivatives -// | update_q_points | update_JxW_values); +// | update_q_points | update_JxW_values); // deallog << "values|gradients|2nds|qpoints|JxW" << std::endl; deallog.pop(); - + deallog.push("face"); fefacevalues(dof, update_values); deallog << "values" << std::endl; @@ -141,12 +141,12 @@ void check_values (const DoFHandler& dof) fefacevalues(dof, update_values | update_JxW_values); deallog << "values|JxW" << std::endl; fefacevalues(dof, update_values | update_gradients - | update_q_points | update_JxW_values | update_normal_vectors); + | update_q_points | update_JxW_values | update_normal_vectors); deallog << "values|gradients|qpoints|JxW|normals" << std::endl; // fefacevalues(dof, update_values | update_gradients | update_second_derivatives -// | update_q_points | update_JxW_values); +// | update_q_points | update_JxW_values); // deallog << "values|gradients|2nds|qpoints|JxW" << std::endl; - deallog.pop(); + deallog.pop(); } @@ -157,8 +157,8 @@ void check_q () Triangulation tr; GridGenerator::hyper_cube(tr); tr.refine_global(REF/dim); - - for (unsigned int i=1;i<5;++i) + + for (unsigned int i=1; i<5; ++i) { FE_Q q(i); deallog.push(q.get_name()); @@ -166,9 +166,9 @@ void check_q () DoFHandler dof(tr); dof.distribute_dofs(q); deallog << "Dofs " << dof.n_dofs() << std::endl; - + if (i==1) - check_mapping(dof); + check_mapping(dof); check_values(dof); deallog.pop(); } @@ -185,7 +185,7 @@ void check_sys () FE_Q q(1); - for (unsigned int i=1;i<5;++i) + for (unsigned int i=1; i<5; ++i) { FESystem fe(q,1< dof(tr); dof.distribute_dofs(fe); deallog << "Dofs " << dof.n_dofs() << std::endl; - + if (i==1) - check_mapping(dof); + check_mapping(dof); check_values(dof); deallog.pop(); } diff --git a/tests/benchmarks/old/dof_handler_timing_01.cc b/tests/benchmarks/old/dof_handler_timing_01.cc index 9a29a14d3f..47f4070d62 100644 --- a/tests/benchmarks/old/dof_handler_timing_01.cc +++ b/tests/benchmarks/old/dof_handler_timing_01.cc @@ -33,27 +33,27 @@ using namespace dealii; // Fill dof handlers for different elements and see how large they get. template -void check_dofs(DOF& dof, unsigned int repeat) +void check_dofs(DOF &dof, unsigned int repeat) { FE_Q q1(1); - + deallog << "Start" << std::endl; - for (unsigned int i=1;i<6;++i) + for (unsigned int i=1; i<6; ++i) { FE_Q fe(i); - for (unsigned int i=0;i fe(q1, 1 << i); - for (unsigned int i=0;iset_refine_flag(); - tr.execute_coarsening_and_refinement(); + tr.last_active()->set_refine_flag(); + tr.execute_coarsening_and_refinement(); } else tr.refine_global(21/dim); - + deallog << "Levels " << tr.n_levels() << " Cells "<< tr.n_cells() - << std::endl - << "active " << tr.n_active_cells() - << " memory " << tr.memory_consumption()/1.e6 - << std::endl; - + << std::endl + << "active " << tr.n_active_cells() + << " memory " << tr.memory_consumption()/1.e6 + << std::endl; + deallog.push("DoF"); DoFHandler dof(tr); check_dofs(dof, (local ? 100 : 10)); diff --git a/tests/benchmarks/old/performance.cc b/tests/benchmarks/old/performance.cc index da19885f5e..e56604d028 100644 --- a/tests/benchmarks/old/performance.cc +++ b/tests/benchmarks/old/performance.cc @@ -36,26 +36,26 @@ template -void performance (Triangulation& tr, - const Mapping& mapping, - const FiniteElement& fe, - const Quadrature& quadrature, - UpdateFlags flags) +void performance (Triangulation &tr, + const Mapping &mapping, + const FiniteElement &fe, + const Quadrature &quadrature, + UpdateFlags flags) { deallog << "Create dofs" << std::endl; DoFHandler dof (tr); dof.distribute_dofs (fe); deallog << "Create FEValues" << std::endl; - + FEValues val (mapping, fe, quadrature, flags); DoFHandler::active_cell_iterator cell = dof.begin_active(); DoFHandler::active_cell_iterator end = dof.end(); deallog << "Loop" << std::endl; - - for (;cell != end ; ++cell) + + for (; cell != end ; ++cell) val.reinit(cell); deallog << "End" << std::endl; @@ -63,53 +63,53 @@ void performance (Triangulation& tr, template void loop (std::vector *> elements, - const Mapping& mapping, - Triangulation& tr) + const Mapping &mapping, + Triangulation &tr) { QGauss gauss (4); - + typename std::vector *>::iterator elementp = elements.begin (); typename std::vector *>::iterator end = elements.end (); - for (;elementp != end; ++elementp) + for (; elementp != end; ++elementp) { - const FiniteElement& element = **elementp; + const FiniteElement &element = **elementp; char dofs[20]; std::ostrstream ost (dofs, 19); ost << element.n_dofs_per_cell() << std::ends; - + deallog.push(dofs); - + deallog.push("points"); performance (tr, mapping, element, gauss, update_q_points); deallog.pop(); - + deallog.push("values"); performance (tr, mapping, element, gauss, update_values); deallog.pop(); - + deallog.push("grads-"); performance (tr, mapping, element, gauss, update_gradients); deallog.pop(); - + deallog.push("2nd---"); performance (tr, mapping, element, gauss, update_second_derivatives); deallog.pop(); - + deallog.push("matrix"); performance (tr, mapping, element, gauss, update_q_points - | update_JxW_values - | update_values - | update_gradients); + | update_JxW_values + | update_values + | update_gradients); deallog.pop(); deallog.push("all---"); performance (tr, mapping, element, gauss, update_q_points - | update_JxW_values - | update_values - | update_gradients - | update_second_derivatives); + | update_JxW_values + | update_values + | update_gradients + | update_second_derivatives); deallog.pop(); deallog.pop(); } @@ -124,7 +124,7 @@ int main () Triangulation<2> tr; GridGenerator::hyper_ball (tr); tr.refine_global (8); - + MappingCartesian<2> cartesian; MappingQ1<2> mapping; MappingQ<2> mappingq1(1); diff --git a/tests/benchmarks/old/spec2006-447.dealII.cc b/tests/benchmarks/old/spec2006-447.dealII.cc index bc21491249..e827739fc6 100644 --- a/tests/benchmarks/old/spec2006-447.dealII.cc +++ b/tests/benchmarks/old/spec2006-447.dealII.cc @@ -77,73 +77,73 @@ unsigned int n_steps = 0; */ unsigned int step; - /** - * Declare the coefficient in front - * of the Laplace operator of the - * equation. - */ +/** + * Declare the coefficient in front + * of the Laplace operator of the + * equation. + */ template class LaplaceCoefficient : public Function { - public: - virtual double value (const Point &p, - const unsigned int) const - { - return 1.+p*p; - } +public: + virtual double value (const Point &p, + const unsigned int) const + { + return 1.+p*p; + } }; - /** - * Same for the coefficient in front - * of the mass term. - */ +/** + * Same for the coefficient in front + * of the mass term. + */ template class MassCoefficient : public Function { - public: - virtual double value (const Point &p, - const unsigned int) const - { - double factor = 1; - for (unsigned int d=0; d &p, + const unsigned int) const + { + double factor = 1; + for (unsigned int d=0; d class EvaluationBase { - public: - virtual ~EvaluationBase (); + public: + virtual ~EvaluationBase (); - void set_refinement_cycle (const unsigned int refinement_cycle); + void set_refinement_cycle (const unsigned int refinement_cycle); - virtual void operator () (const DoFHandler &dof_handler, - const Vector &solution) const = 0; + virtual void operator () (const DoFHandler &dof_handler, + const Vector &solution) const = 0; - unsigned int refinement_cycle; + unsigned int refinement_cycle; }; @@ -161,30 +161,30 @@ namespace Evaluation } - // @sect4{The PointValueEvaluation class} + // @sect4{The PointValueEvaluation class} template class PointValueEvaluation : public EvaluationBase { - public: - PointValueEvaluation (const Point &evaluation_point); + public: + PointValueEvaluation (const Point &evaluation_point); - virtual void operator () (const DoFHandler &dof_handler, - const Vector &solution) const; + virtual void operator () (const DoFHandler &dof_handler, + const Vector &solution) const; - DeclException1 (ExcEvaluationPointNotFound, - Point, - << "The evaluation point " << arg1 - << " was not found among the vertices of the present grid."); + DeclException1 (ExcEvaluationPointNotFound, + Point, + << "The evaluation point " << arg1 + << " was not found among the vertices of the present grid."); - const Point evaluation_point; + const Point evaluation_point; }; template PointValueEvaluation:: PointValueEvaluation (const Point &evaluation_point) - : - evaluation_point (evaluation_point) + : + evaluation_point (evaluation_point) {} @@ -193,298 +193,298 @@ namespace Evaluation void PointValueEvaluation:: operator () (const DoFHandler &dof_handler, - const Vector &solution) const + const Vector &solution) const { double point_value = 1e20; typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(), - endc = dof_handler.end(); + cell = dof_handler.begin_active(), + endc = dof_handler.end(); bool evaluation_point_found = false; for (; (cell!=endc) && !evaluation_point_found; ++cell) for (unsigned int vertex=0; - vertex::vertices_per_cell; - ++vertex) - if (cell->vertex(vertex).distance (evaluation_point) - < - cell->diameter() * 1e-8) - { - point_value = solution(cell->vertex_dof_index(vertex,0)); - - evaluation_point_found = true; - break; - }; + vertex::vertices_per_cell; + ++vertex) + if (cell->vertex(vertex).distance (evaluation_point) + < + cell->diameter() * 1e-8) + { + point_value = solution(cell->vertex_dof_index(vertex,0)); + + evaluation_point_found = true; + break; + }; AssertThrow (evaluation_point_found, - ExcEvaluationPointNotFound(evaluation_point)); + ExcEvaluationPointNotFound(evaluation_point)); std::cout << " Point value=" << point_value - << std::endl; + << std::endl; } - // @sect4{The PointXDerivativeEvaluation class} - - // Besides the class implementing - // the evaluation of the solution - // at one point, we here provide - // one which evaluates the gradient - // at a grid point. Since in - // general the gradient of a finite - // element function is not - // continuous at a vertex, we have - // to be a little bit more careful - // here. What we do is to loop over - // all cells, even if we have found - // the point already on one cell, - // and use the mean value of the - // gradient at the vertex taken - // from all adjacent cells. - // - // Given the interface of the - // ``PointValueEvaluation'' class, - // the declaration of this class - // provides little surprise, and - // neither does the constructor: + // @sect4{The PointXDerivativeEvaluation class} + + // Besides the class implementing + // the evaluation of the solution + // at one point, we here provide + // one which evaluates the gradient + // at a grid point. Since in + // general the gradient of a finite + // element function is not + // continuous at a vertex, we have + // to be a little bit more careful + // here. What we do is to loop over + // all cells, even if we have found + // the point already on one cell, + // and use the mean value of the + // gradient at the vertex taken + // from all adjacent cells. + // + // Given the interface of the + // ``PointValueEvaluation'' class, + // the declaration of this class + // provides little surprise, and + // neither does the constructor: template class PointXDerivativeEvaluation : public EvaluationBase { - public: - PointXDerivativeEvaluation (const Point &evaluation_point); + public: + PointXDerivativeEvaluation (const Point &evaluation_point); - virtual void operator () (const DoFHandler &dof_handler, - const Vector &solution) const; + virtual void operator () (const DoFHandler &dof_handler, + const Vector &solution) const; - DeclException1 (ExcEvaluationPointNotFound, - Point, - << "The evaluation point " << arg1 - << " was not found among the vertices of the present grid."); + DeclException1 (ExcEvaluationPointNotFound, + Point, + << "The evaluation point " << arg1 + << " was not found among the vertices of the present grid."); - const Point evaluation_point; + const Point evaluation_point; }; template PointXDerivativeEvaluation:: PointXDerivativeEvaluation (const Point &evaluation_point) - : - evaluation_point (evaluation_point) + : + evaluation_point (evaluation_point) {} - // The more interesting things - // happen inside the function doing - // the actual evaluation: + // The more interesting things + // happen inside the function doing + // the actual evaluation: template void PointXDerivativeEvaluation:: operator () (const DoFHandler &dof_handler, - const Vector &solution) const + const Vector &solution) const { - // This time initialize the - // return value with something - // useful, since we will have to - // add up a number of - // contributions and take the - // mean value afterwards... + // This time initialize the + // return value with something + // useful, since we will have to + // add up a number of + // contributions and take the + // mean value afterwards... double point_derivative = 0; - // ...then have some objects of - // which the meaning wil become - // clear below... + // ...then have some objects of + // which the meaning wil become + // clear below... QTrapez vertex_quadrature; MappingQ mapping (4); FEValues fe_values (mapping, dof_handler.get_fe(), - vertex_quadrature, - update_gradients | update_q_points); + vertex_quadrature, + update_gradients | update_q_points); std::vector > - solution_gradients (vertex_quadrature.n_quadrature_points); + solution_gradients (vertex_quadrature.n_quadrature_points); - // ...and next loop over all cells - // and their vertices, and count - // how often the vertex has been - // found: + // ...and next loop over all cells + // and their vertices, and count + // how often the vertex has been + // found: typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(), - endc = dof_handler.end(); + cell = dof_handler.begin_active(), + endc = dof_handler.end(); unsigned int evaluation_point_hits = 0; for (; cell!=endc; ++cell) for (unsigned int vertex=0; - vertex::vertices_per_cell; - ++vertex) - if (cell->vertex(vertex) == evaluation_point) - { - // Things are now no more - // as simple, since we - // can't get the gradient - // of the finite element - // field as before, where - // we simply had to pick - // one degree of freedom - // at a vertex. - // - // Rather, we have to - // evaluate the finite - // element field on this - // cell, and at a certain - // point. As you know, - // evaluating finite - // element fields at - // certain points is done - // through the - // ``FEValues'' class, so - // we use that. The - // question is: the - // ``FEValues'' object - // needs to be a given a - // quadrature formula and - // can then compute the - // values of finite - // element quantities at - // the quadrature - // points. Here, we don't - // want to do quadrature, - // we simply want to - // specify some points! - // - // Nevertheless, the same - // way is chosen: use a - // special quadrature - // rule with points at - // the vertices, since - // these are what we are - // interested in. The - // appropriate rule is - // the trapezoidal rule, - // so that is the reason - // why we used that one - // above. - // - // Thus: initialize the - // ``FEValues'' object on - // this cell, - fe_values.reinit (cell); - // and extract the - // gradients of the - // solution vector at the - // vertices: - fe_values.get_function_grads (solution, - solution_gradients); - - // Now we have the - // gradients at all - // vertices, so pick out - // that one which belongs - // to the evaluation - // point (note that the - // order of vertices is - // not necessarily the - // same as that of the - // quadrature points): - unsigned int q_point = 0; - for (; q_point::vertices_per_cell; + ++vertex) + if (cell->vertex(vertex) == evaluation_point) + { + // Things are now no more + // as simple, since we + // can't get the gradient + // of the finite element + // field as before, where + // we simply had to pick + // one degree of freedom + // at a vertex. + // + // Rather, we have to + // evaluate the finite + // element field on this + // cell, and at a certain + // point. As you know, + // evaluating finite + // element fields at + // certain points is done + // through the + // ``FEValues'' class, so + // we use that. The + // question is: the + // ``FEValues'' object + // needs to be a given a + // quadrature formula and + // can then compute the + // values of finite + // element quantities at + // the quadrature + // points. Here, we don't + // want to do quadrature, + // we simply want to + // specify some points! + // + // Nevertheless, the same + // way is chosen: use a + // special quadrature + // rule with points at + // the vertices, since + // these are what we are + // interested in. The + // appropriate rule is + // the trapezoidal rule, + // so that is the reason + // why we used that one + // above. + // + // Thus: initialize the + // ``FEValues'' object on + // this cell, + fe_values.reinit (cell); + // and extract the + // gradients of the + // solution vector at the + // vertices: + fe_values.get_function_grads (solution, + solution_gradients); + + // Now we have the + // gradients at all + // vertices, so pick out + // that one which belongs + // to the evaluation + // point (note that the + // order of vertices is + // not necessarily the + // same as that of the + // quadrature points): + unsigned int q_point = 0; + for (; q_point 0, - ExcEvaluationPointNotFound(evaluation_point)); + ExcEvaluationPointNotFound(evaluation_point)); - // We have simply summed up the - // contributions of all adjacent - // cells, so we still have to - // compute the mean value. Once - // this is done, report the status: + // We have simply summed up the + // contributions of all adjacent + // cells, so we still have to + // compute the mean value. Once + // this is done, report the status: point_derivative /= evaluation_point_hits; std::cout << " Point x-derivative=" << point_derivative - << std::endl; + << std::endl; } - // @sect4{The GridOutput class} - - // Since this program has a more - // difficult structure (it computed - // a dual solution in addition to a - // primal one), writing out the - // solution is no more done by an - // evaluation object since we want - // to write both solutions at once - // into one file, and that requires - // some more information than - // available to the evaluation - // classes. - // - // However, we also want to look at - // the grids generated. This again - // can be done with one such - // class. Its structure is analog - // to the ``SolutionOutput'' class - // of the previous example program, - // so we do not discuss it here in - // more detail. Furthermore, - // everything that is used here has - // already been used in previous - // example programs. + // @sect4{The GridOutput class} + + // Since this program has a more + // difficult structure (it computed + // a dual solution in addition to a + // primal one), writing out the + // solution is no more done by an + // evaluation object since we want + // to write both solutions at once + // into one file, and that requires + // some more information than + // available to the evaluation + // classes. + // + // However, we also want to look at + // the grids generated. This again + // can be done with one such + // class. Its structure is analog + // to the ``SolutionOutput'' class + // of the previous example program, + // so we do not discuss it here in + // more detail. Furthermore, + // everything that is used here has + // already been used in previous + // example programs. template class GridOutput : public EvaluationBase { - public: - GridOutput (const std::string &output_name_base); + public: + GridOutput (const std::string &output_name_base); - virtual void operator () (const DoFHandler &dof_handler, - const Vector &solution) const; + virtual void operator () (const DoFHandler &dof_handler, + const Vector &solution) const; - const std::string output_name_base; + const std::string output_name_base; }; template GridOutput:: GridOutput (const std::string &output_name_base) - : - output_name_base (output_name_base) + : + output_name_base (output_name_base) {} template void GridOutput::operator () (const DoFHandler &dof_handler, - const Vector &/*solution*/) const + const Vector &/*solution*/) const { #ifdef HAVE_STD_STRINGSTREAM std::ostringstream filename; @@ -492,10 +492,10 @@ namespace Evaluation std::ostrstream filename; #endif filename << "spec2006-447.dealII/" - << output_name_base << "-" - << this->refinement_cycle - << ".eps" - << std::ends; + << output_name_base << "-" + << this->refinement_cycle + << ".eps" + << std::ends; #ifdef HAVE_STD_STRINGSTREAM std::ofstream out (filename.str().c_str()); #else @@ -507,68 +507,68 @@ namespace Evaluation } - // @sect3{The Laplace solver classes} +// @sect3{The Laplace solver classes} - // Next are the actual solver - // classes. Again, we discuss only - // the differences to the previous - // program. +// Next are the actual solver +// classes. Again, we discuss only +// the differences to the previous +// program. namespace LaplaceSolver { - // Before everything else, - // forward-declare one class that - // we will have later, since we - // will want to make it a friend of - // some of the classes that follow, - // which requires the class to be - // known: + // Before everything else, + // forward-declare one class that + // we will have later, since we + // will want to make it a friend of + // some of the classes that follow, + // which requires the class to be + // known: template class WeightedResidual; - // @sect4{The Laplace solver base class} - - // This class is almost unchanged, - // with the exception that it - // declares two more functions: - // ``output_solution'' will be used - // to generate output files from - // the actual solutions computed by - // derived classes, and the - // ``set_refinement_cycle'' - // function by which the testing - // framework sets the number of the - // refinement cycle to a local - // variable in this class; this - // number is later used to generate - // filenames for the solution - // output. + // @sect4{The Laplace solver base class} + + // This class is almost unchanged, + // with the exception that it + // declares two more functions: + // ``output_solution'' will be used + // to generate output files from + // the actual solutions computed by + // derived classes, and the + // ``set_refinement_cycle'' + // function by which the testing + // framework sets the number of the + // refinement cycle to a local + // variable in this class; this + // number is later used to generate + // filenames for the solution + // output. template class Base { - public: - Base (Triangulation &coarse_grid); - virtual ~Base (); + public: + Base (Triangulation &coarse_grid); + virtual ~Base (); - virtual void solve_problem () = 0; - virtual void postprocess (const Evaluation::EvaluationBase &postprocessor) const = 0; - virtual void refine_grid () = 0; - virtual unsigned int n_dofs () const = 0; + virtual void solve_problem () = 0; + virtual void postprocess (const Evaluation::EvaluationBase &postprocessor) const = 0; + virtual void refine_grid () = 0; + virtual unsigned int n_dofs () const = 0; - virtual void set_refinement_cycle (const unsigned int cycle); + virtual void set_refinement_cycle (const unsigned int cycle); - virtual void output_solution () const = 0; + virtual void output_solution () const = 0; - const SmartPointer > triangulation; + const SmartPointer > triangulation; - unsigned int refinement_cycle; + unsigned int refinement_cycle; }; template Base::Base (Triangulation &coarse_grid) - : - triangulation (&coarse_grid) + : + triangulation (&coarse_grid) {} @@ -586,83 +586,83 @@ namespace LaplaceSolver } - // @sect4{The Laplace Solver class} + // @sect4{The Laplace Solver class} - // Likewise, the ``Solver'' class - // is entirely unchanged and will - // thus not be discussed. + // Likewise, the ``Solver'' class + // is entirely unchanged and will + // thus not be discussed. template class Solver : public virtual Base { - public: - Solver (Triangulation &triangulation, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &boundary_values); - virtual - ~Solver (); + public: + Solver (Triangulation &triangulation, + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &boundary_values); + virtual + ~Solver (); - virtual - void - solve_problem (); + virtual + void + solve_problem (); - virtual - void - postprocess (const Evaluation::EvaluationBase &postprocessor) const; + virtual + void + postprocess (const Evaluation::EvaluationBase &postprocessor) const; - virtual - unsigned int - n_dofs () const; + virtual + unsigned int + n_dofs () const; - const SmartPointer > fe; - const SmartPointer > quadrature; - const SmartPointer > face_quadrature; - DoFHandler dof_handler; - Vector solution; - const SmartPointer > boundary_values; + const SmartPointer > fe; + const SmartPointer > quadrature; + const SmartPointer > face_quadrature; + DoFHandler dof_handler; + Vector solution; + const SmartPointer > boundary_values; - virtual void assemble_rhs (Vector &rhs) const = 0; + virtual void assemble_rhs (Vector &rhs) const = 0; - struct LinearSystem - { - LinearSystem (const DoFHandler &dof_handler); + struct LinearSystem + { + LinearSystem (const DoFHandler &dof_handler); - void solve (Vector &solution) const; + void solve (Vector &solution) const; - ConstraintMatrix hanging_node_constraints; - SparsityPattern sparsity_pattern; - SparseMatrix matrix; - Vector rhs; - }; + ConstraintMatrix hanging_node_constraints; + SparsityPattern sparsity_pattern; + SparseMatrix matrix; + Vector rhs; + }; - void - assemble_linear_system (LinearSystem &linear_system); + void + assemble_linear_system (LinearSystem &linear_system); - void - assemble_matrix (LinearSystem &linear_system, - const typename DoFHandler::active_cell_iterator &begin_cell, - const typename DoFHandler::active_cell_iterator &end_cell, - Threads::ThreadMutex &mutex) const; + void + assemble_matrix (LinearSystem &linear_system, + const typename DoFHandler::active_cell_iterator &begin_cell, + const typename DoFHandler::active_cell_iterator &end_cell, + Threads::ThreadMutex &mutex) const; }; template Solver::Solver (Triangulation &triangulation, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &boundary_values) - : - Base (triangulation), - fe (&fe), - quadrature (&quadrature), - face_quadrature (&face_quadrature), - dof_handler (triangulation), - boundary_values (&boundary_values) + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &boundary_values) + : + Base (triangulation), + fe (&fe), + quadrature (&quadrature), + face_quadrature (&face_quadrature), + dof_handler (triangulation), + boundary_values (&boundary_values) {} @@ -708,15 +708,15 @@ namespace LaplaceSolver Solver::assemble_linear_system (LinearSystem &linear_system) { typedef - typename DoFHandler::active_cell_iterator - active_cell_iterator; + typename DoFHandler::active_cell_iterator + active_cell_iterator; const unsigned int n_threads = multithread_info.n_default_threads; std::vector > - thread_ranges + thread_ranges = Threads::split_range (dof_handler.begin_active (), - dof_handler.end (), - n_threads); + dof_handler.end (), + n_threads); Threads::ThreadMutex mutex; Threads::ThreadGroup<> threads; @@ -732,32 +732,32 @@ namespace LaplaceSolver std::map boundary_value_map; VectorTools::interpolate_boundary_values (dof_handler, - 0, - *boundary_values, - boundary_value_map); + 0, + *boundary_values, + boundary_value_map); threads.join_all (); linear_system.hanging_node_constraints.condense (linear_system.matrix); MatrixTools::apply_boundary_values (boundary_value_map, - linear_system.matrix, - solution, - linear_system.rhs); + linear_system.matrix, + solution, + linear_system.rhs); } template void Solver::assemble_matrix (LinearSystem &linear_system, - const typename DoFHandler::active_cell_iterator &begin_cell, - const typename DoFHandler::active_cell_iterator &end_cell, - Threads::ThreadMutex &mutex) const + const typename DoFHandler::active_cell_iterator &begin_cell, + const typename DoFHandler::active_cell_iterator &end_cell, + Threads::ThreadMutex &mutex) const { MappingQ mapping (4); FEValues fe_values (mapping, *fe, *quadrature, - UpdateFlags(update_gradients | update_values | - update_q_points | - update_JxW_values)); + UpdateFlags(update_gradients | update_values | + update_q_points | + update_JxW_values)); const unsigned int dofs_per_cell = fe->dofs_per_cell; const unsigned int n_q_points = quadrature->n_quadrature_points; @@ -771,39 +771,39 @@ namespace LaplaceSolver for (typename DoFHandler::active_cell_iterator cell=begin_cell; - cell!=end_cell; ++cell) + cell!=end_cell; ++cell) { - cell_matrix = 0; - - fe_values.reinit (cell); - - LaplaceCoefficient().value_list (fe_values.get_quadrature_points(), - laplace_coefficients); - MassCoefficient().value_list (fe_values.get_quadrature_points(), - mass_coefficients); - - - for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); - Threads::ThreadMutex::ScopedLock lock (mutex); - for (unsigned int i=0; i().value_list (fe_values.get_quadrature_points(), + laplace_coefficients); + MassCoefficient().value_list (fe_values.get_quadrature_points(), + mass_coefficients); + + + for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); + Threads::ThreadMutex::ScopedLock lock (mutex); + for (unsigned int i=0; i &, - ConstraintMatrix &) + ConstraintMatrix &) = &DoFTools::make_hanging_node_constraints; Threads::Thread<> - mhnc_thread = Threads::spawn (mhnc_p)(dof_handler, hanging_node_constraints); - - // make sparsity pattern. since - // in 3d the usual way just blows - // the roof w.r.t. memory - // consumption, use the detour - // via a compressed sparsity - // pattern that we later copy - // over + mhnc_thread = Threads::spawn (mhnc_p)(dof_handler, hanging_node_constraints); + + // make sparsity pattern. since + // in 3d the usual way just blows + // the roof w.r.t. memory + // consumption, use the detour + // via a compressed sparsity + // pattern that we later copy + // over CompressedSparsityPattern csp(dof_handler.n_dofs(), - dof_handler.n_dofs()); + dof_handler.n_dofs()); DoFTools::make_sparsity_pattern (dof_handler, csp); mhnc_thread.join (); @@ -862,122 +862,122 @@ namespace LaplaceSolver - // @sect4{The PrimalSolver class} - - // The ``PrimalSolver'' class is - // also mostly unchanged except for - // overloading the functions - // ``solve_problem'', ``n_dofs'', - // and ``postprocess'' of the base - // class, and implementing the - // ``output_solution'' - // function. These overloaded - // functions do nothing particular - // besides calling the functions of - // the base class -- that seems - // superfluous, but works around a - // bug in a popular compiler which - // requires us to write such - // functions for the following - // scenario: Besides the - // ``PrimalSolver'' class, we will - // have a ``DualSolver'', both - // derived from ``Solver''. We will - // then have a final classes which - // derived from these two, which - // will then have two instances of - // the ``Solver'' class as its base - // classes. If we want, for - // example, the number of degrees - // of freedom of the primal solver, - // we would have to indicate this - // like so: - // ``PrimalSolver::n_dofs()''. - // However, the compiler does not - // accept this since the ``n_dofs'' - // function is actually from a base - // class of the ``PrimalSolver'' - // class, so we have to inject the - // name from the base to the - // derived class using these - // additional functions. - // - // Regarding the implementation of - // the ``output_solution'' - // function, we keep the - // ``GlobalRefinement'' and - // ``RefinementKelly'' classes in - // this program, and they can then - // rely on the default - // implementation of this function - // which simply outputs the primal - // solution. The class implementing - // dual weighted error estimators - // will overload this function - // itself, to also output the dual - // solution. - // - // Except for this, the class is - // unchanged with respect to the - // previous example. + // @sect4{The PrimalSolver class} + + // The ``PrimalSolver'' class is + // also mostly unchanged except for + // overloading the functions + // ``solve_problem'', ``n_dofs'', + // and ``postprocess'' of the base + // class, and implementing the + // ``output_solution'' + // function. These overloaded + // functions do nothing particular + // besides calling the functions of + // the base class -- that seems + // superfluous, but works around a + // bug in a popular compiler which + // requires us to write such + // functions for the following + // scenario: Besides the + // ``PrimalSolver'' class, we will + // have a ``DualSolver'', both + // derived from ``Solver''. We will + // then have a final classes which + // derived from these two, which + // will then have two instances of + // the ``Solver'' class as its base + // classes. If we want, for + // example, the number of degrees + // of freedom of the primal solver, + // we would have to indicate this + // like so: + // ``PrimalSolver::n_dofs()''. + // However, the compiler does not + // accept this since the ``n_dofs'' + // function is actually from a base + // class of the ``PrimalSolver'' + // class, so we have to inject the + // name from the base to the + // derived class using these + // additional functions. + // + // Regarding the implementation of + // the ``output_solution'' + // function, we keep the + // ``GlobalRefinement'' and + // ``RefinementKelly'' classes in + // this program, and they can then + // rely on the default + // implementation of this function + // which simply outputs the primal + // solution. The class implementing + // dual weighted error estimators + // will overload this function + // itself, to also output the dual + // solution. + // + // Except for this, the class is + // unchanged with respect to the + // previous example. template class PrimalSolver : public Solver { - public: - PrimalSolver (Triangulation &triangulation, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &rhs_function, - const Function &boundary_values); - - virtual - void solve_problem (); - - virtual - unsigned int n_dofs () const; - - virtual - void postprocess (const Evaluation::EvaluationBase &postprocessor) const; - - virtual - void output_solution () const; - - - const SmartPointer > rhs_function; - virtual void assemble_rhs (Vector &rhs) const; - - // Now, in order to work around - // some problems in one of the - // compilers this library can - // be compiled with, we will - // have to use some - // workarounds. This will - // require that we declare a - // class that is actually - // derived from the present - // one, as a friend (strange as - // that seems). The full - // rationale will be explained - // below. - friend class WeightedResidual; + public: + PrimalSolver (Triangulation &triangulation, + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &boundary_values); + + virtual + void solve_problem (); + + virtual + unsigned int n_dofs () const; + + virtual + void postprocess (const Evaluation::EvaluationBase &postprocessor) const; + + virtual + void output_solution () const; + + + const SmartPointer > rhs_function; + virtual void assemble_rhs (Vector &rhs) const; + + // Now, in order to work around + // some problems in one of the + // compilers this library can + // be compiled with, we will + // have to use some + // workarounds. This will + // require that we declare a + // class that is actually + // derived from the present + // one, as a friend (strange as + // that seems). The full + // rationale will be explained + // below. + friend class WeightedResidual; }; template PrimalSolver:: PrimalSolver (Triangulation &triangulation, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &rhs_function, - const Function &boundary_values) - : - Base (triangulation), - Solver (triangulation, fe, - quadrature, face_quadrature, - boundary_values), - rhs_function (&rhs_function) + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &boundary_values) + : + Base (triangulation), + Solver (triangulation, fe, + quadrature, face_quadrature, + boundary_values), + rhs_function (&rhs_function) {} @@ -1023,9 +1023,9 @@ namespace LaplaceSolver { MappingQ mapping (4); FEValues fe_values (mapping, *this->fe, *this->quadrature, - UpdateFlags(update_values | - update_q_points | - update_JxW_values)); + UpdateFlags(update_values | + update_q_points | + update_JxW_values)); const unsigned int dofs_per_cell = this->fe->dofs_per_cell; const unsigned int n_q_points = this->quadrature->n_quadrature_points; @@ -1035,48 +1035,48 @@ namespace LaplaceSolver std::vector local_dof_indices (dofs_per_cell); typename DoFHandler::active_cell_iterator - cell = this->dof_handler.begin_active(), - endc = this->dof_handler.end(); + cell = this->dof_handler.begin_active(), + endc = this->dof_handler.end(); for (; cell!=endc; ++cell) { - cell_rhs = 0; + cell_rhs = 0; - fe_values.reinit (cell); + fe_values.reinit (cell); - rhs_function->value_list (fe_values.get_quadrature_points(), - rhs_values); + rhs_function->value_list (fe_values.get_quadrature_points(), + rhs_values); - for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); - for (unsigned int i=0; iget_dof_indices (local_dof_indices); + for (unsigned int i=0; i class RefinementGlobal : public PrimalSolver { - public: - RefinementGlobal (Triangulation &coarse_grid, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &rhs_function, - const Function &boundary_values); - - virtual void refine_grid (); + public: + RefinementGlobal (Triangulation &coarse_grid, + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &boundary_values); + + virtual void refine_grid (); }; @@ -1084,16 +1084,16 @@ namespace LaplaceSolver template RefinementGlobal:: RefinementGlobal (Triangulation &coarse_grid, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &rhs_function, - const Function &boundary_values) - : - Base (coarse_grid), - PrimalSolver (coarse_grid, fe, quadrature, - face_quadrature, rhs_function, - boundary_values) + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &boundary_values) + : + Base (coarse_grid), + PrimalSolver (coarse_grid, fe, quadrature, + face_quadrature, rhs_function, + boundary_values) {} @@ -1110,15 +1110,15 @@ namespace LaplaceSolver template class RefinementKelly : public PrimalSolver { - public: - RefinementKelly (Triangulation &coarse_grid, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &rhs_function, - const Function &boundary_values); - - virtual void refine_grid (); + public: + RefinementKelly (Triangulation &coarse_grid, + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &boundary_values); + + virtual void refine_grid (); }; @@ -1126,16 +1126,16 @@ namespace LaplaceSolver template RefinementKelly:: RefinementKelly (Triangulation &coarse_grid, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &rhs_function, - const Function &boundary_values) - : - Base (coarse_grid), - PrimalSolver (coarse_grid, fe, quadrature, - face_quadrature, - rhs_function, boundary_values) + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &boundary_values) + : + Base (coarse_grid), + PrimalSolver (coarse_grid, fe, quadrature, + face_quadrature, + rhs_function, boundary_values) {} @@ -1146,58 +1146,58 @@ namespace LaplaceSolver { Vector estimated_error_per_cell (this->triangulation->n_active_cells()); KellyErrorEstimator::estimate (this->dof_handler, - QGauss(3), - typename FunctionMap::type(), - this->solution, - estimated_error_per_cell); + QGauss(3), + typename FunctionMap::type(), + this->solution, + estimated_error_per_cell); GridRefinement::refine_and_coarsen_fixed_number (*this->triangulation, - estimated_error_per_cell, - 0.2, 0.02); + estimated_error_per_cell, + 0.2, 0.02); this->triangulation->execute_coarsening_and_refinement (); } - // @sect4{The RefinementWeightedKelly class} - - // This class is a variant of the - // previous one, in that it allows - // to weight the refinement - // indicators we get from the - // library's Kelly indicator by - // some function. We include this - // class since the goal of this - // example program is to - // demonstrate automatic refinement - // criteria even for complex output - // quantities such as point values - // or stresses. If we did not solve - // a dual problem and compute the - // weights thereof, we would - // probably be tempted to give a - // hand-crafted weighting to the - // indicators to account for the - // fact that we are going to - // evaluate these quantities. This - // class accepts such a weighting - // function as argument to its - // constructor: + // @sect4{The RefinementWeightedKelly class} + + // This class is a variant of the + // previous one, in that it allows + // to weight the refinement + // indicators we get from the + // library's Kelly indicator by + // some function. We include this + // class since the goal of this + // example program is to + // demonstrate automatic refinement + // criteria even for complex output + // quantities such as point values + // or stresses. If we did not solve + // a dual problem and compute the + // weights thereof, we would + // probably be tempted to give a + // hand-crafted weighting to the + // indicators to account for the + // fact that we are going to + // evaluate these quantities. This + // class accepts such a weighting + // function as argument to its + // constructor: template class RefinementWeightedKelly : public PrimalSolver { - public: - RefinementWeightedKelly (Triangulation &coarse_grid, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &rhs_function, - const Function &boundary_values, - const Function &weighting_function); + public: + RefinementWeightedKelly (Triangulation &coarse_grid, + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &boundary_values, + const Function &weighting_function); - virtual void refine_grid (); + virtual void refine_grid (); - const SmartPointer > weighting_function; + const SmartPointer > weighting_function; }; @@ -1205,262 +1205,262 @@ namespace LaplaceSolver template RefinementWeightedKelly:: RefinementWeightedKelly (Triangulation &coarse_grid, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &rhs_function, - const Function &boundary_values, - const Function &weighting_function) - : - Base (coarse_grid), - PrimalSolver (coarse_grid, fe, quadrature, - face_quadrature, - rhs_function, boundary_values), - weighting_function (&weighting_function) + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &boundary_values, + const Function &weighting_function) + : + Base (coarse_grid), + PrimalSolver (coarse_grid, fe, quadrature, + face_quadrature, + rhs_function, boundary_values), + weighting_function (&weighting_function) {} - // Now, here comes the main - // function, including the - // weighting: + // Now, here comes the main + // function, including the + // weighting: template void RefinementWeightedKelly::refine_grid () { - // First compute some residual - // based error indicators for all - // cells by a method already - // implemented in the - // library. What exactly is - // computed can be read in the - // documentation of that class. + // First compute some residual + // based error indicators for all + // cells by a method already + // implemented in the + // library. What exactly is + // computed can be read in the + // documentation of that class. Vector estimated_error (this->triangulation->n_active_cells()); KellyErrorEstimator::estimate (this->dof_handler, - *this->face_quadrature, - typename FunctionMap::type(), - this->solution, - estimated_error); - - // Now we are going to weight - // these indicators by the value - // of the function given to the - // constructor: + *this->face_quadrature, + typename FunctionMap::type(), + this->solution, + estimated_error); + + // Now we are going to weight + // these indicators by the value + // of the function given to the + // constructor: typename DoFHandler::active_cell_iterator - cell = this->dof_handler.begin_active(), - endc = this->dof_handler.end(); + cell = this->dof_handler.begin_active(), + endc = this->dof_handler.end(); for (unsigned int cell_index=0; cell!=endc; ++cell, ++cell_index) estimated_error(cell_index) - *= weighting_function->value (cell->center()); + *= weighting_function->value (cell->center()); GridRefinement::refine_and_coarsen_fixed_number (*this->triangulation, - estimated_error, - 0.2, 0.02); + estimated_error, + 0.2, 0.02); this->triangulation->execute_coarsening_and_refinement (); } } - // @sect3{Equation data} - // - // In this example program, we work - // with the same data sets as in the - // previous one, but as it may so - // happen that someone wants to run - // the program with different - // boundary values and right hand side - // functions, or on a different grid, - // we show a simple technique to do - // exactly that. For more clarity, we - // furthermore pack everything that - // has to do with equation data into - // a namespace of its own. - // - // The underlying assumption is that - // this is a research program, and - // that there we often have a number - // of test cases that consist of a - // domain, a right hand side, - // boundary values, possibly a - // specified coefficient, and a - // number of other parameters. They - // often vary all at the same time - // when shifting from one example to - // another. To make handling such - // sets of problem description - // parameters simple is the goal of - // the following. - // - // Basically, the idea is this: let - // us have a structure for each set - // of data, in which we pack - // everything that describes a test - // case: here, these are two - // subclasses, one called - // ``BoundaryValues'' for the - // boundary values of the exact - // solution, and one called - // ``RightHandSide'', and then a way - // to generate the coarse grid. Since - // the solution of the previous - // example program looked like curved - // ridges, we use this name here for - // the enclosing class. Note that the - // names of the two inner classes - // have to be the same for all - // enclosing test case classes, and - // also that we have attached the - // dimension template argument to the - // enclosing class rather than to the - // inner ones, to make further - // processing simpler. (From a - // language viewpoint, a namespace - // would be better to encapsulate - // these inner classes, rather than a - // structure. However, namespaces - // cannot be given as template - // arguments, so we use a structure - // to allow a second object to select - // from within its given - // argument. The enclosing structure, - // of course, has no member variables - // apart from the classes it - // declares, and a static function to - // generate the coarse mesh; it will - // in general never be instantiated.) - // - // The idea is then the following - // (this is the right time to also - // take a brief look at the code - // below): we can generate objects - // for boundary values and - // right hand side by simply giving - // the name of the outer class as a - // template argument to a class which - // we call here ``Data::SetUp'', and - // it then creates objects for the - // inner classes. In this case, to - // get all that characterizes the - // curved ridge solution, we would - // simply generate an instance of - // ``Data::SetUp'', - // and everything we need to know - // about the solution would be static - // member variables and functions of - // that object. - // - // This approach might seem like - // overkill in this case, but will - // become very handy once a certain - // set up is not only characterized - // by Dirichlet boundary values and a - // right hand side function, but in - // addition by material properties, - // Neumann values, different boundary - // descriptors, etc. In that case, - // the ``SetUp'' class might consist - // of a dozen or more objects, and - // each descriptor class (like the - // ``CurvedRidges'' class below) - // would have to provide them. Then, - // you will be happy to be able to - // change from one set of data to - // another by only changing the - // template argument to the ``SetUp'' - // class at one place, rather than at - // many. - // - // With this framework for different - // test cases, we are almost - // finished, but one thing remains: - // by now we can select statically, - // by changing one template argument, - // which data set to choose. In order - // to be able to do that dynamically, - // i.e. at run time, we need a base - // class. This we provide in the - // obvious way, see below, with - // virtual abstract functions. It - // forces us to introduce a second - // template parameter ``dim'' which - // we need for the base class (which - // could be avoided using some - // template magic, but we omit that), - // but that's all. - // - // Adding new testcases is now - // simple, you don't have to touch - // the framework classes, only a - // structure like the - // ``CurvedRidges'' one is needed. +// @sect3{Equation data} +// +// In this example program, we work +// with the same data sets as in the +// previous one, but as it may so +// happen that someone wants to run +// the program with different +// boundary values and right hand side +// functions, or on a different grid, +// we show a simple technique to do +// exactly that. For more clarity, we +// furthermore pack everything that +// has to do with equation data into +// a namespace of its own. +// +// The underlying assumption is that +// this is a research program, and +// that there we often have a number +// of test cases that consist of a +// domain, a right hand side, +// boundary values, possibly a +// specified coefficient, and a +// number of other parameters. They +// often vary all at the same time +// when shifting from one example to +// another. To make handling such +// sets of problem description +// parameters simple is the goal of +// the following. +// +// Basically, the idea is this: let +// us have a structure for each set +// of data, in which we pack +// everything that describes a test +// case: here, these are two +// subclasses, one called +// ``BoundaryValues'' for the +// boundary values of the exact +// solution, and one called +// ``RightHandSide'', and then a way +// to generate the coarse grid. Since +// the solution of the previous +// example program looked like curved +// ridges, we use this name here for +// the enclosing class. Note that the +// names of the two inner classes +// have to be the same for all +// enclosing test case classes, and +// also that we have attached the +// dimension template argument to the +// enclosing class rather than to the +// inner ones, to make further +// processing simpler. (From a +// language viewpoint, a namespace +// would be better to encapsulate +// these inner classes, rather than a +// structure. However, namespaces +// cannot be given as template +// arguments, so we use a structure +// to allow a second object to select +// from within its given +// argument. The enclosing structure, +// of course, has no member variables +// apart from the classes it +// declares, and a static function to +// generate the coarse mesh; it will +// in general never be instantiated.) +// +// The idea is then the following +// (this is the right time to also +// take a brief look at the code +// below): we can generate objects +// for boundary values and +// right hand side by simply giving +// the name of the outer class as a +// template argument to a class which +// we call here ``Data::SetUp'', and +// it then creates objects for the +// inner classes. In this case, to +// get all that characterizes the +// curved ridge solution, we would +// simply generate an instance of +// ``Data::SetUp'', +// and everything we need to know +// about the solution would be static +// member variables and functions of +// that object. +// +// This approach might seem like +// overkill in this case, but will +// become very handy once a certain +// set up is not only characterized +// by Dirichlet boundary values and a +// right hand side function, but in +// addition by material properties, +// Neumann values, different boundary +// descriptors, etc. In that case, +// the ``SetUp'' class might consist +// of a dozen or more objects, and +// each descriptor class (like the +// ``CurvedRidges'' class below) +// would have to provide them. Then, +// you will be happy to be able to +// change from one set of data to +// another by only changing the +// template argument to the ``SetUp'' +// class at one place, rather than at +// many. +// +// With this framework for different +// test cases, we are almost +// finished, but one thing remains: +// by now we can select statically, +// by changing one template argument, +// which data set to choose. In order +// to be able to do that dynamically, +// i.e. at run time, we need a base +// class. This we provide in the +// obvious way, see below, with +// virtual abstract functions. It +// forces us to introduce a second +// template parameter ``dim'' which +// we need for the base class (which +// could be avoided using some +// template magic, but we omit that), +// but that's all. +// +// Adding new testcases is now +// simple, you don't have to touch +// the framework classes, only a +// structure like the +// ``CurvedRidges'' one is needed. namespace Data { - // @sect4{The SetUpBase and SetUp classes} - - // Based on the above description, - // the ``SetUpBase'' class then - // looks as follows. To allow using - // the ``SmartPointer'' class with - // this class, we derived from the - // ``Subscriptor'' class. + // @sect4{The SetUpBase and SetUp classes} + + // Based on the above description, + // the ``SetUpBase'' class then + // looks as follows. To allow using + // the ``SmartPointer'' class with + // this class, we derived from the + // ``Subscriptor'' class. template struct SetUpBase : public Subscriptor { - virtual - const Function & get_boundary_values () const = 0; + virtual + const Function &get_boundary_values () const = 0; - virtual - const Function & get_right_hand_side () const = 0; + virtual + const Function &get_right_hand_side () const = 0; - virtual - void create_coarse_grid (Triangulation &coarse_grid) const = 0; + virtual + void create_coarse_grid (Triangulation &coarse_grid) const = 0; }; - // And now for the derived class - // that takes the template argument - // as explained above. For some - // reason, C++ requires us to - // define a constructor (which - // maybe empty), as otherwise a - // warning is generated that some - // data is not initialized. - // - // Here we pack the data elements - // into private variables, and - // allow access to them through the - // methods of the base class. + // And now for the derived class + // that takes the template argument + // as explained above. For some + // reason, C++ requires us to + // define a constructor (which + // maybe empty), as otherwise a + // warning is generated that some + // data is not initialized. + // + // Here we pack the data elements + // into private variables, and + // allow access to them through the + // methods of the base class. template struct SetUp : public SetUpBase { - SetUp () {}; + SetUp () {}; - virtual - const Function & get_boundary_values () const; + virtual + const Function &get_boundary_values () const; - virtual - const Function & get_right_hand_side () const; + virtual + const Function &get_right_hand_side () const; - virtual - void create_coarse_grid (Triangulation &coarse_grid) const; + virtual + void create_coarse_grid (Triangulation &coarse_grid) const; - static const typename Traits::BoundaryValues boundary_values; - static const typename Traits::RightHandSide right_hand_side; + static const typename Traits::BoundaryValues boundary_values; + static const typename Traits::RightHandSide right_hand_side; }; - // We have to provide definitions - // for the static member variables - // of the above class: + // We have to provide definitions + // for the static member variables + // of the above class: template const typename Traits::BoundaryValues SetUp::boundary_values; template const typename Traits::RightHandSide SetUp::right_hand_side; - // And definitions of the member - // functions: + // And definitions of the member + // functions: template const Function & SetUp::get_boundary_values () const @@ -1486,39 +1486,39 @@ namespace Data } - // @sect4{The CurvedRidges class} + // @sect4{The CurvedRidges class} - // The class that is used to - // describe the boundary values and - // right hand side of the ``curved - // ridge'' problem already used in - // the step-13 example program is - // then like so: + // The class that is used to + // describe the boundary values and + // right hand side of the ``curved + // ridge'' problem already used in + // the step-13 example program is + // then like so: template struct CurvedRidges { - class BoundaryValues : public Function - { - public: - BoundaryValues () : Function () {}; + class BoundaryValues : public Function + { + public: + BoundaryValues () : Function () {}; - virtual double value (const Point &p, - const unsigned int component) const; - }; + virtual double value (const Point &p, + const unsigned int component) const; + }; - class RightHandSide : public Function - { - public: - RightHandSide () : Function () {}; + class RightHandSide : public Function + { + public: + RightHandSide () : Function () {}; - virtual double value (const Point &p, - const unsigned int component) const; - }; + virtual double value (const Point &p, + const unsigned int component) const; + }; - static - void - create_coarse_grid (Triangulation &coarse_grid); + static + void + create_coarse_grid (Triangulation &coarse_grid); }; @@ -1526,7 +1526,7 @@ namespace Data double CurvedRidges::BoundaryValues:: value (const Point &p, - const unsigned int /*component*/) const + const unsigned int /*component*/) const { double q = p(0); for (unsigned int i=1; i double CurvedRidges::RightHandSide::value (const Point &p, - const unsigned int /*component*/) const + const unsigned int /*component*/) const { double q = p(0); for (unsigned int i=1; i struct Exercise_2_3 { - // We need a class to denote - // the boundary values of the - // problem. In this case, this - // is simple: it's the zero - // function, so don't even - // declare a class, just a - // typedef: - typedef ZeroFunction BoundaryValues; - - // Second, a class that denotes - // the right hand side. Since - // they are constant, just - // subclass the corresponding - // class of the library and be - // done: - class RightHandSide : public ConstantFunction - { - public: - RightHandSide () : ConstantFunction (1.) {}; - }; + // We need a class to denote + // the boundary values of the + // problem. In this case, this + // is simple: it's the zero + // function, so don't even + // declare a class, just a + // typedef: + typedef ZeroFunction BoundaryValues; + + // Second, a class that denotes + // the right hand side. Since + // they are constant, just + // subclass the corresponding + // class of the library and be + // done: + class RightHandSide : public ConstantFunction + { + public: + RightHandSide () : ConstantFunction (1.) {}; + }; - // Finally a function to - // generate the coarse - // grid. This is somewhat more - // complicated here, see - // immediately below. - static - void - create_coarse_grid (Triangulation &coarse_grid); + // Finally a function to + // generate the coarse + // grid. This is somewhat more + // complicated here, see + // immediately below. + static + void + create_coarse_grid (Triangulation &coarse_grid); }; - // As stated above, the grid for - // this example is the square - // [-1,1]^2 with the square - // [-1/2,1/2]^2 as hole in it. We - // create the coarse grid as 4 - // times 4 cells with the middle - // four ones missing. - // - // Of course, the example has an - // extension to 3d, but since this - // function cannot be written in a - // dimension independent way we - // choose not to implement this - // here, but rather only specialize - // the template for dim=2. If you - // compile the program for 3d, - // you'll get a message from the - // linker that this function is not - // implemented for 3d, and needs to - // be provided. - // - // For the creation of this - // geometry, the library has no - // predefined method. In this case, - // the geometry is still simple - // enough to do the creation by - // hand, rather than using a mesh - // generator. -/* - template <> - void - Exercise_2_3<2>:: - create_coarse_grid (Triangulation<2> &coarse_grid) - { - // First define the space - // dimension, to allow those - // parts of the function that are - // actually dimension independent - // to use this variable. That - // makes it simpler if you later - // takes this as a starting point - // to implement the 3d version. - const unsigned int dim = 2; - - // Then have a list of - // vertices. Here, they are 24 (5 - // times 5, with the middle one - // omitted). It is probably best - // to draw a sketch here. Note - // that we leave the number of - // vertices open at first, but - // then let the compiler compute - // this number afterwards. This - // reduces the possibility of - // having the dimension to large - // and leaving the last ones - // uninitialized. - static const Point<2> vertices_1[] - = { Point<2> (-1., -1.), - Point<2> (-1./2, -1.), - Point<2> (0., -1.), - Point<2> (+1./2, -1.), - Point<2> (+1, -1.), - - Point<2> (-1., -1./2.), - Point<2> (-1./2, -1./2.), - Point<2> (0., -1./2.), - Point<2> (+1./2, -1./2.), - Point<2> (+1, -1./2.), - - Point<2> (-1., 0.), - Point<2> (-1./2, 0.), - Point<2> (+1./2, 0.), - Point<2> (+1, 0.), - - Point<2> (-1., 1./2.), - Point<2> (-1./2, 1./2.), - Point<2> (0., 1./2.), - Point<2> (+1./2, 1./2.), - Point<2> (+1, 1./2.), - - Point<2> (-1., 1.), - Point<2> (-1./2, 1.), - Point<2> (0., 1.), - Point<2> (+1./2, 1.), - Point<2> (+1, 1.) }; - const unsigned int - n_vertices = sizeof(vertices_1) / sizeof(vertices_1[0]); - - // From this static list of - // vertices, we generate an STL - // vector of the vertices, as - // this is the data type the - // library wants to see. - const std::vector > vertices (&vertices_1[0], - &vertices_1[n_vertices]); - - // Next, we have to define the - // cells and the vertices they - // contain. Here, we have 8 - // vertices, but leave the number - // open and let it be computed - // afterwards: - static const int cell_vertices[][GeometryInfo::vertices_per_cell] - = {{0, 1, 6,5}, - {1, 2, 7, 6}, - {2, 3, 8, 7}, - {3, 4, 9, 8}, - {5, 6, 11, 10}, - {8, 9, 13, 12}, - {10, 11, 15, 14}, - {12, 13, 18, 17}, - {14, 15, 20, 19}, - {15, 16, 21, 20}, - {16, 17, 22, 21}, - {17, 18, 23, 22}}; - const unsigned int - n_cells = sizeof(cell_vertices) / sizeof(cell_vertices[0]); - - // Again, we generate a C++ - // vector type from this, but - // this time by looping over the - // cells (yes, this is - // boring). Additionally, we set - // the material indicator to zero - // for all the cells: - std::vector > cells (n_cells, CellData()); - for (unsigned int i=0; i::vertices_per_cell; - ++j) - cells[i].vertices[j] = cell_vertices[i][j]; - cells[i].material_id = 0; - }; - - // Finally pass all this - // information to the library to - // generate a triangulation. The - // last parameter may be used to - // pass information about - // non-zero boundary indicators - // at certain faces of the - // triangulation to the library, - // but we don't want that here, - // so we give an empty object: - coarse_grid.create_triangulation (vertices, - cells, - SubCellData()); - - // And since we want that the - // evaluation point (3/4,3/4) in - // this example is a grid point, - // we refine once globally: - coarse_grid.refine_global (1); - } -*/ + // As stated above, the grid for + // this example is the square + // [-1,1]^2 with the square + // [-1/2,1/2]^2 as hole in it. We + // create the coarse grid as 4 + // times 4 cells with the middle + // four ones missing. + // + // Of course, the example has an + // extension to 3d, but since this + // function cannot be written in a + // dimension independent way we + // choose not to implement this + // here, but rather only specialize + // the template for dim=2. If you + // compile the program for 3d, + // you'll get a message from the + // linker that this function is not + // implemented for 3d, and needs to + // be provided. + // + // For the creation of this + // geometry, the library has no + // predefined method. In this case, + // the geometry is still simple + // enough to do the creation by + // hand, rather than using a mesh + // generator. + /* + template <> + void + Exercise_2_3<2>:: + create_coarse_grid (Triangulation<2> &coarse_grid) + { + // First define the space + // dimension, to allow those + // parts of the function that are + // actually dimension independent + // to use this variable. That + // makes it simpler if you later + // takes this as a starting point + // to implement the 3d version. + const unsigned int dim = 2; + + // Then have a list of + // vertices. Here, they are 24 (5 + // times 5, with the middle one + // omitted). It is probably best + // to draw a sketch here. Note + // that we leave the number of + // vertices open at first, but + // then let the compiler compute + // this number afterwards. This + // reduces the possibility of + // having the dimension to large + // and leaving the last ones + // uninitialized. + static const Point<2> vertices_1[] + = { Point<2> (-1., -1.), + Point<2> (-1./2, -1.), + Point<2> (0., -1.), + Point<2> (+1./2, -1.), + Point<2> (+1, -1.), + + Point<2> (-1., -1./2.), + Point<2> (-1./2, -1./2.), + Point<2> (0., -1./2.), + Point<2> (+1./2, -1./2.), + Point<2> (+1, -1./2.), + + Point<2> (-1., 0.), + Point<2> (-1./2, 0.), + Point<2> (+1./2, 0.), + Point<2> (+1, 0.), + + Point<2> (-1., 1./2.), + Point<2> (-1./2, 1./2.), + Point<2> (0., 1./2.), + Point<2> (+1./2, 1./2.), + Point<2> (+1, 1./2.), + + Point<2> (-1., 1.), + Point<2> (-1./2, 1.), + Point<2> (0., 1.), + Point<2> (+1./2, 1.), + Point<2> (+1, 1.) }; + const unsigned int + n_vertices = sizeof(vertices_1) / sizeof(vertices_1[0]); + + // From this static list of + // vertices, we generate an STL + // vector of the vertices, as + // this is the data type the + // library wants to see. + const std::vector > vertices (&vertices_1[0], + &vertices_1[n_vertices]); + + // Next, we have to define the + // cells and the vertices they + // contain. Here, we have 8 + // vertices, but leave the number + // open and let it be computed + // afterwards: + static const int cell_vertices[][GeometryInfo::vertices_per_cell] + = {{0, 1, 6,5}, + {1, 2, 7, 6}, + {2, 3, 8, 7}, + {3, 4, 9, 8}, + {5, 6, 11, 10}, + {8, 9, 13, 12}, + {10, 11, 15, 14}, + {12, 13, 18, 17}, + {14, 15, 20, 19}, + {15, 16, 21, 20}, + {16, 17, 22, 21}, + {17, 18, 23, 22}}; + const unsigned int + n_cells = sizeof(cell_vertices) / sizeof(cell_vertices[0]); + + // Again, we generate a C++ + // vector type from this, but + // this time by looping over the + // cells (yes, this is + // boring). Additionally, we set + // the material indicator to zero + // for all the cells: + std::vector > cells (n_cells, CellData()); + for (unsigned int i=0; i::vertices_per_cell; + ++j) + cells[i].vertices[j] = cell_vertices[i][j]; + cells[i].material_id = 0; + }; + + // Finally pass all this + // information to the library to + // generate a triangulation. The + // last parameter may be used to + // pass information about + // non-zero boundary indicators + // at certain faces of the + // triangulation to the library, + // but we don't want that here, + // so we give an empty object: + coarse_grid.create_triangulation (vertices, + cells, + SubCellData()); + + // And since we want that the + // evaluation point (3/4,3/4) in + // this example is a grid point, + // we refine once globally: + coarse_grid.refine_global (1); + } + */ template <> @@ -1800,426 +1800,426 @@ namespace Data } - // @sect4{Discussion} - // - // As you have now read through this - // framework, you may be wondering - // why we have not chosen to - // implement the classes implementing - // a certain setup (like the - // ``CurvedRidges'' class) directly - // as classes derived from - // ``Data::SetUpBase''. Indeed, we - // could have done very well so. The - // only reason is that then we would - // have to have member variables for - // the solution and right hand side - // classes in the ``CurvedRidges'' - // class, as well as member functions - // overloading the abstract functions - // of the base class giving access to - // these member variables. The - // ``SetUp'' class has the sole - // reason to relieve us from the need - // to reiterate these member - // variables and functions that would - // be necessary in all such - // classes. In some way, the template - // mechanism here only provides a way - // to have default implementations - // for a number of functions that - // depend on external quantities and - // can thus not be provided using - // normal virtual functions, at least - // not without the help of templates. - // - // However, there might be good - // reasons to actually implement - // classes derived from - // ``Data::SetUpBase'', for example - // if the solution or right hand side - // classes require constructors that - // take arguments, which the - // ``Data::SetUpBase'' class cannot - // provide. In that case, subclassing - // is a worthwhile strategy. Other - // possibilities for special cases - // are to derive from - // ``Data::SetUp'' where - // ``SomeSetUp'' denotes a class, or - // even to explicitly specialize - // ``Data::SetUp''. The - // latter allows to transparently use - // the way the ``SetUp'' class is - // used for other set-ups, but with - // special actions taken for special - // arguments. - // - // A final observation favoring the - // approach taken here is the - // following: we have found numerous - // times that when starting a - // project, the number of parameters - // (usually boundary values, right - // hand side, coarse grid, just as - // here) was small, and the number of - // test cases was small as well. One - // then starts out by handcoding them - // into a number of ``switch'' - // statements. Over time, projects - // grow, and so does the number of - // test cases. The number of - // ``switch'' statements grows with - // that, and their length as well, - // and one starts to find ways to - // consider impossible examples where - // domains, boundary values, and - // right hand sides do not fit - // together any more, and starts - // loosing the overview over the - // whole structure. Encapsulating - // everything belonging to a certain - // test case into a structure of its - // own has proven worthwhile for - // this, as it keeps everything that - // belongs to one test case in one - // place. Furthermore, it allows to - // put these things all in one or - // more files that are only devoted - // to test cases and their data, - // without having to bring their - // actual implementation into contact - // with the rest of the program. - - - // @sect3{Dual functionals} - - // As with the other components of - // the program, we put everything we - // need to describe dual functionals - // into a namespace of its own, and - // define an abstract base class that - // provides the interface the class - // solving the dual problem needs for - // its work. - // - // We will then implement two such - // classes, for the evaluation of a - // point value and of the derivative - // of the solution at that point. For - // these functionals we already have - // the corresponding evaluation - // objects, so they are comlementary. +// @sect4{Discussion} +// +// As you have now read through this +// framework, you may be wondering +// why we have not chosen to +// implement the classes implementing +// a certain setup (like the +// ``CurvedRidges'' class) directly +// as classes derived from +// ``Data::SetUpBase''. Indeed, we +// could have done very well so. The +// only reason is that then we would +// have to have member variables for +// the solution and right hand side +// classes in the ``CurvedRidges'' +// class, as well as member functions +// overloading the abstract functions +// of the base class giving access to +// these member variables. The +// ``SetUp'' class has the sole +// reason to relieve us from the need +// to reiterate these member +// variables and functions that would +// be necessary in all such +// classes. In some way, the template +// mechanism here only provides a way +// to have default implementations +// for a number of functions that +// depend on external quantities and +// can thus not be provided using +// normal virtual functions, at least +// not without the help of templates. +// +// However, there might be good +// reasons to actually implement +// classes derived from +// ``Data::SetUpBase'', for example +// if the solution or right hand side +// classes require constructors that +// take arguments, which the +// ``Data::SetUpBase'' class cannot +// provide. In that case, subclassing +// is a worthwhile strategy. Other +// possibilities for special cases +// are to derive from +// ``Data::SetUp'' where +// ``SomeSetUp'' denotes a class, or +// even to explicitly specialize +// ``Data::SetUp''. The +// latter allows to transparently use +// the way the ``SetUp'' class is +// used for other set-ups, but with +// special actions taken for special +// arguments. +// +// A final observation favoring the +// approach taken here is the +// following: we have found numerous +// times that when starting a +// project, the number of parameters +// (usually boundary values, right +// hand side, coarse grid, just as +// here) was small, and the number of +// test cases was small as well. One +// then starts out by handcoding them +// into a number of ``switch'' +// statements. Over time, projects +// grow, and so does the number of +// test cases. The number of +// ``switch'' statements grows with +// that, and their length as well, +// and one starts to find ways to +// consider impossible examples where +// domains, boundary values, and +// right hand sides do not fit +// together any more, and starts +// loosing the overview over the +// whole structure. Encapsulating +// everything belonging to a certain +// test case into a structure of its +// own has proven worthwhile for +// this, as it keeps everything that +// belongs to one test case in one +// place. Furthermore, it allows to +// put these things all in one or +// more files that are only devoted +// to test cases and their data, +// without having to bring their +// actual implementation into contact +// with the rest of the program. + + +// @sect3{Dual functionals} + +// As with the other components of +// the program, we put everything we +// need to describe dual functionals +// into a namespace of its own, and +// define an abstract base class that +// provides the interface the class +// solving the dual problem needs for +// its work. +// +// We will then implement two such +// classes, for the evaluation of a +// point value and of the derivative +// of the solution at that point. For +// these functionals we already have +// the corresponding evaluation +// objects, so they are comlementary. namespace DualFunctional { - // @sect4{The DualFunctionalBase class} - - // First start with the base class - // for dual functionals. Since for - // linear problems the - // characteristics of the dual - // problem play a role only in the - // right hand side, we only need to - // provide for a function that - // assembles the right hand side - // for a given discretization: + // @sect4{The DualFunctionalBase class} + + // First start with the base class + // for dual functionals. Since for + // linear problems the + // characteristics of the dual + // problem play a role only in the + // right hand side, we only need to + // provide for a function that + // assembles the right hand side + // for a given discretization: template class DualFunctionalBase : public Subscriptor { - public: - virtual - void - assemble_rhs (const DoFHandler &dof_handler, - Vector &rhs) const = 0; + public: + virtual + void + assemble_rhs (const DoFHandler &dof_handler, + Vector &rhs) const = 0; }; - // @sect4{The PointValueEvaluation class} + // @sect4{The PointValueEvaluation class} - // As a first application, we - // consider the functional - // corresponding to the evaluation - // of the solution's value at a - // given point which again we - // assume to be a vertex. Apart - // from the constructor that takes - // and stores the evaluation point, - // this class consists only of the - // function that implements - // assembling the right hand side. + // As a first application, we + // consider the functional + // corresponding to the evaluation + // of the solution's value at a + // given point which again we + // assume to be a vertex. Apart + // from the constructor that takes + // and stores the evaluation point, + // this class consists only of the + // function that implements + // assembling the right hand side. template class PointValueEvaluation : public DualFunctionalBase { - public: - PointValueEvaluation (const Point &evaluation_point); + public: + PointValueEvaluation (const Point &evaluation_point); - virtual - void - assemble_rhs (const DoFHandler &dof_handler, - Vector &rhs) const; + virtual + void + assemble_rhs (const DoFHandler &dof_handler, + Vector &rhs) const; - DeclException1 (ExcEvaluationPointNotFound, - Point, - << "The evaluation point " << arg1 - << " was not found among the vertices of the present grid."); + DeclException1 (ExcEvaluationPointNotFound, + Point, + << "The evaluation point " << arg1 + << " was not found among the vertices of the present grid."); - const Point evaluation_point; + const Point evaluation_point; }; template PointValueEvaluation:: PointValueEvaluation (const Point &evaluation_point) - : - evaluation_point (evaluation_point) + : + evaluation_point (evaluation_point) {} - // As for doing the main purpose of - // the class, assembling the right - // hand side, let us first consider - // what is necessary: The right - // hand side of the dual problem is - // a vector of values J(phi_i), - // where J is the error functional, - // and phi_i is the i-th shape - // function. Here, J is the - // evaluation at the point x0, - // i.e. J(phi_i)=phi_i(x0). - // - // Now, we have assumed that the - // evaluation point is a - // vertex. Thus, for the usual - // finite elements we might be - // using in this program, we can - // take for granted that at such a - // point exactly one shape function - // is nonzero, and in particular - // has the value one. Thus, we set - // the right hand side vector to - // all-zeros, then seek for the - // shape function associated with - // that point and set the - // corresponding value of the right - // hand side vector to one: + // As for doing the main purpose of + // the class, assembling the right + // hand side, let us first consider + // what is necessary: The right + // hand side of the dual problem is + // a vector of values J(phi_i), + // where J is the error functional, + // and phi_i is the i-th shape + // function. Here, J is the + // evaluation at the point x0, + // i.e. J(phi_i)=phi_i(x0). + // + // Now, we have assumed that the + // evaluation point is a + // vertex. Thus, for the usual + // finite elements we might be + // using in this program, we can + // take for granted that at such a + // point exactly one shape function + // is nonzero, and in particular + // has the value one. Thus, we set + // the right hand side vector to + // all-zeros, then seek for the + // shape function associated with + // that point and set the + // corresponding value of the right + // hand side vector to one: template void PointValueEvaluation:: assemble_rhs (const DoFHandler &dof_handler, - Vector &rhs) const + Vector &rhs) const { - // So, first set everything to - // zeros... + // So, first set everything to + // zeros... rhs.reinit (dof_handler.n_dofs()); - // ...then loop over cells and - // find the evaluation point - // among the vertices (or very - // close to a vertex, which may - // happen due to floating point - // round-off): + // ...then loop over cells and + // find the evaluation point + // among the vertices (or very + // close to a vertex, which may + // happen due to floating point + // round-off): 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) for (unsigned int vertex=0; - vertex::vertices_per_cell; - ++vertex) - if (cell->vertex(vertex).distance(evaluation_point) - < cell->diameter()*1e-8) - { - // Ok, found, so set - // corresponding entry, - // and leave function - // since we are finished: - rhs(cell->vertex_dof_index(vertex,0)) = 1; - return; - }; - - // Finally, a sanity check: if we - // somehow got here, then we must - // have missed the evaluation - // point, so raise an exception - // unconditionally: + vertex::vertices_per_cell; + ++vertex) + if (cell->vertex(vertex).distance(evaluation_point) + < cell->diameter()*1e-8) + { + // Ok, found, so set + // corresponding entry, + // and leave function + // since we are finished: + rhs(cell->vertex_dof_index(vertex,0)) = 1; + return; + }; + + // Finally, a sanity check: if we + // somehow got here, then we must + // have missed the evaluation + // point, so raise an exception + // unconditionally: AssertThrow (false, ExcEvaluationPointNotFound(evaluation_point)); } - // @sect4{The PointXDerivativeEvaluation class} + // @sect4{The PointXDerivativeEvaluation class} - // As second application, we again - // consider the evaluation of the - // x-derivative of the solution at - // one point. Again, the - // declaration of the class, and - // the implementation of its - // constructor is not too - // interesting: + // As second application, we again + // consider the evaluation of the + // x-derivative of the solution at + // one point. Again, the + // declaration of the class, and + // the implementation of its + // constructor is not too + // interesting: template class PointXDerivativeEvaluation : public DualFunctionalBase { - public: - PointXDerivativeEvaluation (const Point &evaluation_point); + public: + PointXDerivativeEvaluation (const Point &evaluation_point); - virtual - void - assemble_rhs (const DoFHandler &dof_handler, - Vector &rhs) const; + virtual + void + assemble_rhs (const DoFHandler &dof_handler, + Vector &rhs) const; - DeclException1 (ExcEvaluationPointNotFound, - Point, - << "The evaluation point " << arg1 - << " was not found among the vertices of the present grid."); + DeclException1 (ExcEvaluationPointNotFound, + Point, + << "The evaluation point " << arg1 + << " was not found among the vertices of the present grid."); - const Point evaluation_point; + const Point evaluation_point; }; template PointXDerivativeEvaluation:: PointXDerivativeEvaluation (const Point &evaluation_point) - : - evaluation_point (evaluation_point) + : + evaluation_point (evaluation_point) {} - // What is interesting is the - // implementation of this - // functional: here, - // J(phi_i)=d/dx phi_i(x0). - // - // We could, as in the - // implementation of the respective - // evaluation object take the - // average of the gradients of each - // shape function phi_i at this - // evaluation point. However, we - // take a slightly different - // approach: we simply take the - // average over all cells that - // surround this point. The - // question which cells - // ``surrounds'' the evaluation - // point is made dependent on the - // mesh width by including those - // cells for which the distance of - // the cell's midpoint to the - // evaluation point is less than - // the cell's diameter. - // - // Taking the average of the - // gradient over the area/volume of - // these cells leads to a dual - // solution which is very close to - // the one which would result from - // the point evaluation of the - // gradient. It is simple to - // justify theoretically that this - // does not change the method - // significantly. + // What is interesting is the + // implementation of this + // functional: here, + // J(phi_i)=d/dx phi_i(x0). + // + // We could, as in the + // implementation of the respective + // evaluation object take the + // average of the gradients of each + // shape function phi_i at this + // evaluation point. However, we + // take a slightly different + // approach: we simply take the + // average over all cells that + // surround this point. The + // question which cells + // ``surrounds'' the evaluation + // point is made dependent on the + // mesh width by including those + // cells for which the distance of + // the cell's midpoint to the + // evaluation point is less than + // the cell's diameter. + // + // Taking the average of the + // gradient over the area/volume of + // these cells leads to a dual + // solution which is very close to + // the one which would result from + // the point evaluation of the + // gradient. It is simple to + // justify theoretically that this + // does not change the method + // significantly. template void PointXDerivativeEvaluation:: assemble_rhs (const DoFHandler &dof_handler, - Vector &rhs) const + Vector &rhs) const { - // Again, first set all entries - // to zero: + // Again, first set all entries + // to zero: rhs.reinit (dof_handler.n_dofs()); - // Initialize a ``FEValues'' - // object with a quadrature - // formula, have abbreviations - // for the number of quadrature - // points and shape functions... + // Initialize a ``FEValues'' + // object with a quadrature + // formula, have abbreviations + // for the number of quadrature + // points and shape functions... QGauss quadrature(4); MappingQ mapping (4); FEValues fe_values (mapping, dof_handler.get_fe(), quadrature, - update_gradients | - update_q_points | - update_JxW_values); + update_gradients | + update_q_points | + update_JxW_values); const unsigned int n_q_points = fe_values.n_quadrature_points; const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell; - // ...and have two objects that - // are used to store the global - // indices of the degrees of - // freedom on a cell, and the - // values of the gradients of the - // shape functions at the - // quadrature points: + // ...and have two objects that + // are used to store the global + // indices of the degrees of + // freedom on a cell, and the + // values of the gradients of the + // shape functions at the + // quadrature points: Vector cell_rhs (dofs_per_cell); std::vector local_dof_indices (dofs_per_cell); - // Finally have a variable in - // which we will sum up the - // area/volume of the cells over - // which we integrate, by - // integrating the unit functions - // on these cells: + // Finally have a variable in + // which we will sum up the + // area/volume of the cells over + // which we integrate, by + // integrating the unit functions + // on these cells: double total_volume = 0; - // Then start the loop over all - // cells, and select those cells - // which are close enough to the - // evaluation point: + // Then start the loop over all + // cells, and select those cells + // which are close enough to the + // evaluation point: 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) if (cell->center().distance(evaluation_point) <= - cell->diameter()) - { - // If we have found such a - // cell, then initialize - // the ``FEValues'' object - // and integrate the - // x-component of the - // gradient of each shape - // function, as well as the - // unit function for the - // total area/volume. - fe_values.reinit (cell); - cell_rhs = 0; - - for (unsigned int q=0; qget_dof_indices (local_dof_indices); - for (unsigned int i=0; idiameter()) + { + // If we have found such a + // cell, then initialize + // the ``FEValues'' object + // and integrate the + // x-component of the + // gradient of each shape + // function, as well as the + // unit function for the + // total area/volume. + fe_values.reinit (cell); + cell_rhs = 0; + + for (unsigned int q=0; qget_dof_indices (local_dof_indices); + for (unsigned int i=0; i 0, - ExcEvaluationPointNotFound(evaluation_point)); - - // Finally, we have by now only - // integrated the gradients of - // the shape functions, not - // taking their mean value. We - // fix this by dividing by the - // measure of the volume over - // which we have integrated: + ExcEvaluationPointNotFound(evaluation_point)); + + // Finally, we have by now only + // integrated the gradients of + // the shape functions, not + // taking their mean value. We + // fix this by dividing by the + // measure of the volume over + // which we have integrated: rhs.scale (1./total_volume); } @@ -2227,79 +2227,79 @@ namespace DualFunctional } - // @sect3{Extending the LaplaceSolver namespace} +// @sect3{Extending the LaplaceSolver namespace} namespace LaplaceSolver { - // @sect4{The DualSolver class} - - // In the same way as the - // ``PrimalSolver'' class above, we - // now implement a - // ``DualSolver''. It has all the - // same features, the only - // difference is that it does not - // take a function object denoting - // a right hand side object, but - // now takes a - // ``DualFunctionalBase'' object - // that will assemble the right - // hand side vector of the dual - // problem. The rest of the class - // is rather trivial. - // - // Since both primal and dual - // solver will use the same - // triangulation, but different - // discretizations, it now becomes - // clear why we have made the - // ``Base'' class a virtual one: - // since the final class will be - // derived from both - // ``PrimalSolver'' as well as - // ``DualSolver'', it would have - // two ``Base'' instances, would we - // not have marked the inheritance - // as virtual. Since in many - // applications the base class - // would store much more - // information than just the - // triangulation which needs to be - // shared between primal and dual - // solvers, we do not usually want - // to use two such base classes. + // @sect4{The DualSolver class} + + // In the same way as the + // ``PrimalSolver'' class above, we + // now implement a + // ``DualSolver''. It has all the + // same features, the only + // difference is that it does not + // take a function object denoting + // a right hand side object, but + // now takes a + // ``DualFunctionalBase'' object + // that will assemble the right + // hand side vector of the dual + // problem. The rest of the class + // is rather trivial. + // + // Since both primal and dual + // solver will use the same + // triangulation, but different + // discretizations, it now becomes + // clear why we have made the + // ``Base'' class a virtual one: + // since the final class will be + // derived from both + // ``PrimalSolver'' as well as + // ``DualSolver'', it would have + // two ``Base'' instances, would we + // not have marked the inheritance + // as virtual. Since in many + // applications the base class + // would store much more + // information than just the + // triangulation which needs to be + // shared between primal and dual + // solvers, we do not usually want + // to use two such base classes. template class DualSolver : public Solver { - public: - DualSolver (Triangulation &triangulation, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const DualFunctional::DualFunctionalBase &dual_functional); + public: + DualSolver (Triangulation &triangulation, + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const DualFunctional::DualFunctionalBase &dual_functional); - virtual - void - solve_problem (); + virtual + void + solve_problem (); - virtual - unsigned int - n_dofs () const; + virtual + unsigned int + n_dofs () const; - virtual - void - postprocess (const Evaluation::EvaluationBase &postprocessor) const; + virtual + void + postprocess (const Evaluation::EvaluationBase &postprocessor) const; - const SmartPointer > dual_functional; - virtual void assemble_rhs (Vector &rhs) const; + const SmartPointer > dual_functional; + virtual void assemble_rhs (Vector &rhs) const; - static const ZeroFunction boundary_values; + static const ZeroFunction boundary_values; - // Same as above -- make a - // derived class a friend of - // this one: - friend class WeightedResidual; + // Same as above -- make a + // derived class a friend of + // this one: + friend class WeightedResidual; }; template @@ -2308,16 +2308,16 @@ namespace LaplaceSolver template DualSolver:: DualSolver (Triangulation &triangulation, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const DualFunctional::DualFunctionalBase &dual_functional) - : - Base (triangulation), - Solver (triangulation, fe, - quadrature, face_quadrature, - boundary_values), - dual_functional (&dual_functional) + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const DualFunctional::DualFunctionalBase &dual_functional) + : + Base (triangulation), + Solver (triangulation, fe, + quadrature, face_quadrature, + boundary_values), + dual_functional (&dual_functional) {} @@ -2357,306 +2357,306 @@ namespace LaplaceSolver } - // @sect4{The WeightedResidual class} - - // Here finally comes the main - // class of this program, the one - // that implements the dual - // weighted residual error - // estimator. It joins the primal - // and dual solver classes to use - // them for the computation of - // primal and dual solutions, and - // implements the error - // representation formula for use - // as error estimate and mesh - // refinement. - // - // The first few of the functions - // of this class are mostly - // overriders of the respective - // functions of the base class: + // @sect4{The WeightedResidual class} + + // Here finally comes the main + // class of this program, the one + // that implements the dual + // weighted residual error + // estimator. It joins the primal + // and dual solver classes to use + // them for the computation of + // primal and dual solutions, and + // implements the error + // representation formula for use + // as error estimate and mesh + // refinement. + // + // The first few of the functions + // of this class are mostly + // overriders of the respective + // functions of the base class: template class WeightedResidual : public PrimalSolver, - public DualSolver + public DualSolver { - public: - WeightedResidual (Triangulation &coarse_grid, - const FiniteElement &primal_fe, - const FiniteElement &dual_fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &rhs_function, - const Function &boundary_values, - const DualFunctional::DualFunctionalBase &dual_functional); - - virtual - void - solve_problem (); - - virtual - void - postprocess (const Evaluation::EvaluationBase &postprocessor) const; - - virtual - unsigned int - n_dofs () const; - - virtual void refine_grid (); - - virtual - void - output_solution () const; - - - // In the private section, we - // have two functions that are - // used to call the - // ``solve_problem'' functions - // of the primal and dual base - // classes. These two functions - // will be called in parallel - // by the ``solve_problem'' - // function of this class. - void solve_primal_problem (); - void solve_dual_problem (); - // Then declare abbreviations - // for active cell iterators, - // to avoid that we have to - // write this lengthy name - // over and over again: - - typedef - typename DoFHandler::active_cell_iterator - active_cell_iterator; - - // Next, declare a data type - // that we will us to store the - // contribution of faces to the - // error estimator. The idea is - // that we can compute the face - // terms from each of the two - // cells to this face, as they - // are the same when viewed - // from both sides. What we - // will do is to compute them - // only once, based on some - // rules explained below which - // of the two adjacent cells - // will be in charge to do - // so. We then store the - // contribution of each face in - // a map mapping faces to their - // values, and only collect the - // contributions for each cell - // by looping over the cells a - // second time and grabbing the - // values from the map. - // - // The data type of this map is - // declared here: - typedef - typename std::map::face_iterator,double> - FaceIntegrals; - - // In the computation of the - // error estimates on cells and - // faces, we need a number of - // helper objects, such as - // ``FEValues'' and - // ``FEFaceValues'' functions, - // but also temporary objects - // storing the values and - // gradients of primal and dual - // solutions, for - // example. These fields are - // needed in the three - // functions that do the - // integration on cells, and - // regular and irregular faces, - // respectively. - // - // There are three reasonable - // ways to provide these - // fields: first, as local - // variables in the function - // that needs them; second, as - // member variables of this - // class; third, as arguments - // passed to that function. - // - // These three alternatives all - // have drawbacks: the third - // that their number is not - // neglectable and would make - // calling these functions a - // lengthy enterprise. The - // second has the drawback that - // it disallows - // parallelization, since the - // threads that will compute - // the error estimate have to - // have their own copies of - // these variables each, so - // member variables of the - // enclosing class will not - // work. The first approach, - // although straightforward, - // has a subtle but important - // drawback: we will call these - // functions over and over - // again, many thousand times - // maybe; it has now turned out - // that allocating vectors and - // other objects that need - // memory from the heap is an - // expensive business in terms - // of run-time, since memory - // allocation is expensive when - // several threads are - // involved. In our experience, - // more than 20 per cent of the - // total run time of error - // estimation functions are due - // to memory allocation, if - // done on a per-call level. It - // is thus significantly better - // to allocate the memory only - // once, and recycle the - // objects as often as - // possible. - // - // What to do? Our answer is to - // use a variant of the third - // strategy, namely generating - // these variables once in the - // main function of each - // thread, and passing them - // down to the functions that - // do the actual work. To avoid - // that we have to give these - // functions a dozen or so - // arguments, we pack all these - // variables into two - // structures, one which is - // used for the computations on - // cells, the other doing them - // on the faces. Instead of - // many individual objects, we - // will then only pass one such - // object to these functions, - // making their calling - // sequence simpler. - struct CellData - { - MappingQ mapping; - FEValues fe_values; - const SmartPointer > right_hand_side; - - std::vector cell_residual; - std::vector rhs_values; - std::vector dual_weights; - typename std::vector > cell_grad_grads; - CellData (const FiniteElement &fe, - const Quadrature &quadrature, - const Function &right_hand_side); - }; + public: + WeightedResidual (Triangulation &coarse_grid, + const FiniteElement &primal_fe, + const FiniteElement &dual_fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &boundary_values, + const DualFunctional::DualFunctionalBase &dual_functional); + + virtual + void + solve_problem (); + + virtual + void + postprocess (const Evaluation::EvaluationBase &postprocessor) const; + + virtual + unsigned int + n_dofs () const; + + virtual void refine_grid (); + + virtual + void + output_solution () const; + + + // In the private section, we + // have two functions that are + // used to call the + // ``solve_problem'' functions + // of the primal and dual base + // classes. These two functions + // will be called in parallel + // by the ``solve_problem'' + // function of this class. + void solve_primal_problem (); + void solve_dual_problem (); + // Then declare abbreviations + // for active cell iterators, + // to avoid that we have to + // write this lengthy name + // over and over again: - struct FaceData - { - MappingQ mapping; - FEFaceValues fe_face_values_cell; - FEFaceValues fe_face_values_neighbor; - FESubfaceValues fe_subface_values_cell; - - std::vector jump_residual; - std::vector dual_weights; - typename std::vector > cell_grads; - typename std::vector > neighbor_grads; - FaceData (const FiniteElement &fe, - const Quadrature &face_quadrature); - }; + typedef + typename DoFHandler::active_cell_iterator + active_cell_iterator; + + // Next, declare a data type + // that we will us to store the + // contribution of faces to the + // error estimator. The idea is + // that we can compute the face + // terms from each of the two + // cells to this face, as they + // are the same when viewed + // from both sides. What we + // will do is to compute them + // only once, based on some + // rules explained below which + // of the two adjacent cells + // will be in charge to do + // so. We then store the + // contribution of each face in + // a map mapping faces to their + // values, and only collect the + // contributions for each cell + // by looping over the cells a + // second time and grabbing the + // values from the map. + // + // The data type of this map is + // declared here: + typedef + typename std::map::face_iterator,double> + FaceIntegrals; + + // In the computation of the + // error estimates on cells and + // faces, we need a number of + // helper objects, such as + // ``FEValues'' and + // ``FEFaceValues'' functions, + // but also temporary objects + // storing the values and + // gradients of primal and dual + // solutions, for + // example. These fields are + // needed in the three + // functions that do the + // integration on cells, and + // regular and irregular faces, + // respectively. + // + // There are three reasonable + // ways to provide these + // fields: first, as local + // variables in the function + // that needs them; second, as + // member variables of this + // class; third, as arguments + // passed to that function. + // + // These three alternatives all + // have drawbacks: the third + // that their number is not + // neglectable and would make + // calling these functions a + // lengthy enterprise. The + // second has the drawback that + // it disallows + // parallelization, since the + // threads that will compute + // the error estimate have to + // have their own copies of + // these variables each, so + // member variables of the + // enclosing class will not + // work. The first approach, + // although straightforward, + // has a subtle but important + // drawback: we will call these + // functions over and over + // again, many thousand times + // maybe; it has now turned out + // that allocating vectors and + // other objects that need + // memory from the heap is an + // expensive business in terms + // of run-time, since memory + // allocation is expensive when + // several threads are + // involved. In our experience, + // more than 20 per cent of the + // total run time of error + // estimation functions are due + // to memory allocation, if + // done on a per-call level. It + // is thus significantly better + // to allocate the memory only + // once, and recycle the + // objects as often as + // possible. + // + // What to do? Our answer is to + // use a variant of the third + // strategy, namely generating + // these variables once in the + // main function of each + // thread, and passing them + // down to the functions that + // do the actual work. To avoid + // that we have to give these + // functions a dozen or so + // arguments, we pack all these + // variables into two + // structures, one which is + // used for the computations on + // cells, the other doing them + // on the faces. Instead of + // many individual objects, we + // will then only pass one such + // object to these functions, + // making their calling + // sequence simpler. + struct CellData + { + MappingQ mapping; + FEValues fe_values; + const SmartPointer > right_hand_side; + + std::vector cell_residual; + std::vector rhs_values; + std::vector dual_weights; + typename std::vector > cell_grad_grads; + CellData (const FiniteElement &fe, + const Quadrature &quadrature, + const Function &right_hand_side); + }; + + struct FaceData + { + MappingQ mapping; + FEFaceValues fe_face_values_cell; + FEFaceValues fe_face_values_neighbor; + FESubfaceValues fe_subface_values_cell; + + std::vector jump_residual; + std::vector dual_weights; + typename std::vector > cell_grads; + typename std::vector > neighbor_grads; + FaceData (const FiniteElement &fe, + const Quadrature &face_quadrature); + }; - // Regarding the evaluation of - // the error estimator, we have - // two driver functions that do - // this: the first is called to - // generate the cell-wise - // estimates, and splits up the - // task in a number of threads - // each of which work on a - // subset of the cells. The - // first function will run the - // second for each of these - // threads: - void estimate_error (Vector &error_indicators) const; - - void estimate_some (const Vector &primal_solution, - const Vector &dual_weights, - const unsigned int n_threads, - const unsigned int this_thread, - Vector &error_indicators, - FaceIntegrals &face_integrals) const; - - // Then we have functions that - // do the actual integration of - // the error representation - // formula. They will treat the - // terms on the cell interiors, - // on those faces that have no - // hanging nodes, and on those - // faces with hanging nodes, - // respectively: - void - integrate_over_cell (const active_cell_iterator &cell, - const unsigned int cell_index, - const Vector &primal_solution, - const Vector &dual_weights, - CellData &cell_data, - Vector &error_indicators) const; - - void - integrate_over_regular_face (const active_cell_iterator &cell, - const unsigned int face_no, - const Vector &primal_solution, - const Vector &dual_weights, - FaceData &face_data, - FaceIntegrals &face_integrals) const; - void - integrate_over_irregular_face (const active_cell_iterator &cell, - const unsigned int face_no, - const Vector &primal_solution, - const Vector &dual_weights, - FaceData &face_data, - FaceIntegrals &face_integrals) const; + // Regarding the evaluation of + // the error estimator, we have + // two driver functions that do + // this: the first is called to + // generate the cell-wise + // estimates, and splits up the + // task in a number of threads + // each of which work on a + // subset of the cells. The + // first function will run the + // second for each of these + // threads: + void estimate_error (Vector &error_indicators) const; + + void estimate_some (const Vector &primal_solution, + const Vector &dual_weights, + const unsigned int n_threads, + const unsigned int this_thread, + Vector &error_indicators, + FaceIntegrals &face_integrals) const; + + // Then we have functions that + // do the actual integration of + // the error representation + // formula. They will treat the + // terms on the cell interiors, + // on those faces that have no + // hanging nodes, and on those + // faces with hanging nodes, + // respectively: + void + integrate_over_cell (const active_cell_iterator &cell, + const unsigned int cell_index, + const Vector &primal_solution, + const Vector &dual_weights, + CellData &cell_data, + Vector &error_indicators) const; + + void + integrate_over_regular_face (const active_cell_iterator &cell, + const unsigned int face_no, + const Vector &primal_solution, + const Vector &dual_weights, + FaceData &face_data, + FaceIntegrals &face_integrals) const; + void + integrate_over_irregular_face (const active_cell_iterator &cell, + const unsigned int face_no, + const Vector &primal_solution, + const Vector &dual_weights, + FaceData &face_data, + FaceIntegrals &face_integrals) const; }; - // In the implementation of this - // class, we first have the - // constructors of the ``CellData'' - // and ``FaceData'' member classes, - // and the ``WeightedResidual'' - // constructor. They only - // initialize fields to their - // correct lengths, so we do not - // have to discuss them to length. + // In the implementation of this + // class, we first have the + // constructors of the ``CellData'' + // and ``FaceData'' member classes, + // and the ``WeightedResidual'' + // constructor. They only + // initialize fields to their + // correct lengths, so we do not + // have to discuss them to length. template WeightedResidual::CellData:: CellData (const FiniteElement &fe, - const Quadrature &quadrature, - const Function &right_hand_side) - : - mapping (4), - fe_values (mapping, fe, quadrature, - update_values | - update_second_derivatives | - update_q_points | - update_JxW_values), - right_hand_side (&right_hand_side) + const Quadrature &quadrature, + const Function &right_hand_side) + : + mapping (4), + fe_values (mapping, fe, quadrature, + update_values | + update_second_derivatives | + update_q_points | + update_JxW_values), + right_hand_side (&right_hand_side) { const unsigned int n_q_points = quadrature.n_quadrature_points; @@ -2672,21 +2672,21 @@ namespace LaplaceSolver template WeightedResidual::FaceData:: FaceData (const FiniteElement &fe, - const Quadrature &face_quadrature) - : - mapping (4), - fe_face_values_cell (mapping, fe, face_quadrature, - update_values | - update_gradients | - update_JxW_values | - update_normal_vectors), - fe_face_values_neighbor (mapping, fe, face_quadrature, - update_values | - update_gradients | - update_JxW_values | - update_normal_vectors), - fe_subface_values_cell (mapping, fe, face_quadrature, - update_gradients) + const Quadrature &face_quadrature) + : + mapping (4), + fe_face_values_cell (mapping, fe, face_quadrature, + update_values | + update_gradients | + update_JxW_values | + update_normal_vectors), + fe_face_values_neighbor (mapping, fe, face_quadrature, + update_values | + update_gradients | + update_JxW_values | + update_normal_vectors), + fe_subface_values_cell (mapping, fe, face_quadrature, + update_gradients) { const unsigned int n_face_q_points = face_quadrature.n_quadrature_points; @@ -2703,33 +2703,33 @@ namespace LaplaceSolver template WeightedResidual:: WeightedResidual (Triangulation &coarse_grid, - const FiniteElement &primal_fe, - const FiniteElement &dual_fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &rhs_function, - const Function &bv, - const DualFunctional::DualFunctionalBase &dual_functional) - : - Base (coarse_grid), - PrimalSolver (coarse_grid, primal_fe, - quadrature, face_quadrature, - rhs_function, bv), - DualSolver (coarse_grid, dual_fe, - quadrature, face_quadrature, - dual_functional) + const FiniteElement &primal_fe, + const FiniteElement &dual_fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &bv, + const DualFunctional::DualFunctionalBase &dual_functional) + : + Base (coarse_grid), + PrimalSolver (coarse_grid, primal_fe, + quadrature, face_quadrature, + rhs_function, bv), + DualSolver (coarse_grid, dual_fe, + quadrature, face_quadrature, + dual_functional) {} - // The next five functions are - // boring, as they simply relay - // their work to the base - // classes. The first calls the - // primal and dual solvers in - // parallel, while postprocessing - // the solution and retrieving the - // number of degrees of freedom is - // done by the primal class. + // The next five functions are + // boring, as they simply relay + // their work to the base + // classes. The first calls the + // primal and dual solvers in + // parallel, while postprocessing + // the solution and retrieving the + // number of degrees of freedom is + // done by the primal class. template void WeightedResidual::solve_problem () @@ -2774,136 +2774,136 @@ namespace LaplaceSolver - // Now, it is becoming more - // interesting: the ``refine_grid'' - // function asks the error - // estimator to compute the - // cell-wise error indicators, then - // uses their absolute values for - // mesh refinement. + // Now, it is becoming more + // interesting: the ``refine_grid'' + // function asks the error + // estimator to compute the + // cell-wise error indicators, then + // uses their absolute values for + // mesh refinement. template void WeightedResidual::refine_grid () { - // First call the function that - // computes the cell-wise and - // global error: + // First call the function that + // computes the cell-wise and + // global error: Vector error_indicators (this->triangulation->n_active_cells()); estimate_error (error_indicators); - // Then note that marking cells - // for refinement or coarsening - // only works if all indicators - // are positive, to allow their - // comparison. Thus, drop the - // signs on all these indicators: + // Then note that marking cells + // for refinement or coarsening + // only works if all indicators + // are positive, to allow their + // comparison. Thus, drop the + // signs on all these indicators: for (Vector::iterator i=error_indicators.begin(); - i != error_indicators.end(); ++i) + i != error_indicators.end(); ++i) *i = std::fabs (*i); - // Finally, we can select between - // different strategies for - // refinement. The default here - // is to refine those cells with - // the largest error indicators - // that make up for a total of 80 - // per cent of the error, while - // we coarsen those with the - // smallest indicators that make - // up for the bottom 2 per cent - // of the error. + // Finally, we can select between + // different strategies for + // refinement. The default here + // is to refine those cells with + // the largest error indicators + // that make up for a total of 80 + // per cent of the error, while + // we coarsen those with the + // smallest indicators that make + // up for the bottom 2 per cent + // of the error. GridRefinement::refine_and_coarsen_fixed_fraction (*this->triangulation, - error_indicators, - 0.5/std::sqrt(1.+step), - 0.2/std::sqrt(1.+step)); + error_indicators, + 0.5/std::sqrt(1.+step), + 0.2/std::sqrt(1.+step)); this->triangulation->execute_coarsening_and_refinement (); } - // Since we want to output both the - // primal and the dual solution, we - // overload the ``output_solution'' - // function. The only interesting - // feature of this function is that - // the primal and dual solutions - // are defined on different finite - // element spaces, which is not the - // format the ``DataOut'' class - // expects. Thus, we have to - // transfer them to a common finite - // element space. Since we want the - // solutions only to see them - // qualitatively, we contend - // ourselves with interpolating the - // dual solution to the (smaller) - // primal space. For the - // interpolation, there is a - // library function, that takes a - // ``ConstraintMatrix'' object - // including the hanging node - // constraints. The rest is - // standard. - // - // There is, however, one - // work-around worth mentioning: in - // this function, as in a couple of - // following ones, we have to - // access the ``DoFHandler'' - // objects and solutions of both - // the primal as well as of the - // dual solver. Since these are - // members of the ``Solver'' base - // class which exists twice in the - // class hierarchy leading to the - // present class (once as base - // class of the ``PrimalSolver'' - // class, once as base class of the - // ``DualSolver'' class), we have - // to disambiguate accesses to them - // by telling the compiler a member - // of which of these two instances - // we want to access. The way to do - // this would be identify the - // member by pointing a path - // through the class hierarchy - // which disambiguates the base - // class, for example writing - // ``PrimalSolver::dof_handler'' to - // denote the member variable - // ``dof_handler'' from the - // ``Solver'' base class of the - // ``PrimalSolver'' - // class. Unfortunately, this - // confuses gcc's version 2.96 (a - // version that was intended as a - // development snapshot, but - // delivered as system compiler by - // Red Hat in their 7.x releases) - // so much that it bails out and - // refuses to compile the code. - // - // Thus, we have to work around - // this problem. We do this by - // introducing references to the - // ``PrimalSolver'' and - // ``DualSolver'' components of the - // ``WeightedResidual'' object at - // the beginning of the - // function. Since each of these - // has an unambiguous base class - // ``Solver'', we can access the - // member variables we want through - // these references. However, we - // are now accessing protected - // member variables of these - // classes through a pointer other - // than the ``this'' pointer (in - // fact, this is of course the - // ``this'' pointer, but not - // explicitly). This finally is the - // reason why we had to declare the - // present class a friend of the - // classes we so access. + // Since we want to output both the + // primal and the dual solution, we + // overload the ``output_solution'' + // function. The only interesting + // feature of this function is that + // the primal and dual solutions + // are defined on different finite + // element spaces, which is not the + // format the ``DataOut'' class + // expects. Thus, we have to + // transfer them to a common finite + // element space. Since we want the + // solutions only to see them + // qualitatively, we contend + // ourselves with interpolating the + // dual solution to the (smaller) + // primal space. For the + // interpolation, there is a + // library function, that takes a + // ``ConstraintMatrix'' object + // including the hanging node + // constraints. The rest is + // standard. + // + // There is, however, one + // work-around worth mentioning: in + // this function, as in a couple of + // following ones, we have to + // access the ``DoFHandler'' + // objects and solutions of both + // the primal as well as of the + // dual solver. Since these are + // members of the ``Solver'' base + // class which exists twice in the + // class hierarchy leading to the + // present class (once as base + // class of the ``PrimalSolver'' + // class, once as base class of the + // ``DualSolver'' class), we have + // to disambiguate accesses to them + // by telling the compiler a member + // of which of these two instances + // we want to access. The way to do + // this would be identify the + // member by pointing a path + // through the class hierarchy + // which disambiguates the base + // class, for example writing + // ``PrimalSolver::dof_handler'' to + // denote the member variable + // ``dof_handler'' from the + // ``Solver'' base class of the + // ``PrimalSolver'' + // class. Unfortunately, this + // confuses gcc's version 2.96 (a + // version that was intended as a + // development snapshot, but + // delivered as system compiler by + // Red Hat in their 7.x releases) + // so much that it bails out and + // refuses to compile the code. + // + // Thus, we have to work around + // this problem. We do this by + // introducing references to the + // ``PrimalSolver'' and + // ``DualSolver'' components of the + // ``WeightedResidual'' object at + // the beginning of the + // function. Since each of these + // has an unambiguous base class + // ``Solver'', we can access the + // member variables we want through + // these references. However, we + // are now accessing protected + // member variables of these + // classes through a pointer other + // than the ``this'' pointer (in + // fact, this is of course the + // ``this'' pointer, but not + // explicitly). This finally is the + // reason why we had to declare the + // present class a friend of the + // classes we so access. template void WeightedResidual::output_solution () const @@ -2913,81 +2913,81 @@ namespace LaplaceSolver ConstraintMatrix primal_hanging_node_constraints; DoFTools::make_hanging_node_constraints (primal_solver.dof_handler, - primal_hanging_node_constraints); + primal_hanging_node_constraints); primal_hanging_node_constraints.close(); Vector dual_solution (primal_solver.dof_handler.n_dofs()); FETools::interpolate (dual_solver.dof_handler, - dual_solver.solution, - primal_solver.dof_handler, - primal_hanging_node_constraints, - dual_solution); - - // approximate error, gradient, - // and second derivative - // information as cell information + dual_solver.solution, + primal_solver.dof_handler, + primal_hanging_node_constraints, + dual_solution); + + // approximate error, gradient, + // and second derivative + // information as cell information Vector error_indicators (this->triangulation->n_active_cells()); Vector gradient_indicators (this->triangulation->n_active_cells()); Vector second_indicators (this->triangulation->n_active_cells()); { MappingQ mapping(4); KellyErrorEstimator::estimate (mapping, primal_solver.dof_handler, - QGauss(3), - typename FunctionMap::type(), - primal_solver.solution, - error_indicators); + QGauss(3), + typename FunctionMap::type(), + primal_solver.solution, + error_indicators); DerivativeApproximation:: - approximate_gradient (mapping, - primal_solver.dof_handler, - primal_solver.solution, - gradient_indicators); + approximate_gradient (mapping, + primal_solver.dof_handler, + primal_solver.solution, + gradient_indicators); DerivativeApproximation:: - approximate_second_derivative (mapping, - primal_solver.dof_handler, - primal_solver.solution, - second_indicators); + approximate_second_derivative (mapping, + primal_solver.dof_handler, + primal_solver.solution, + second_indicators); } - // distribute cell to dof vectors + // distribute cell to dof vectors Vector x_error_indicators (primal_solver.dof_handler.n_dofs()); Vector x_gradient_indicators (primal_solver.dof_handler.n_dofs()); Vector x_second_indicators (primal_solver.dof_handler.n_dofs()); DoFTools::distribute_cell_to_dof_vector (primal_solver.dof_handler, - error_indicators, - x_error_indicators); + error_indicators, + x_error_indicators); DoFTools::distribute_cell_to_dof_vector (primal_solver.dof_handler, - gradient_indicators, - x_gradient_indicators); + gradient_indicators, + x_gradient_indicators); DoFTools::distribute_cell_to_dof_vector (primal_solver.dof_handler, - second_indicators, - x_second_indicators); + second_indicators, + x_second_indicators); - // we generate too much output in - // 3d. instead of doing it that - // way, simply generate a coarser - // mesh and output from there + // we generate too much output in + // 3d. instead of doing it that + // way, simply generate a coarser + // mesh and output from there Triangulation coarser_mesh; coarser_mesh.copy_triangulation (*this->triangulation); for (typename Triangulation::active_cell_iterator - cell = coarser_mesh.begin_active(); - cell != coarser_mesh.end(); ++cell) + cell = coarser_mesh.begin_active(); + cell != coarser_mesh.end(); ++cell) cell->set_coarsen_flag(); coarser_mesh.execute_coarsening_and_refinement (); - // next generate a DoF handler on - // that mesh and a map fron one - // to the other mesh + // next generate a DoF handler on + // that mesh and a map fron one + // to the other mesh DoFHandler coarser_dof_handler (coarser_mesh); coarser_dof_handler.distribute_dofs (primal_solver.dof_handler.get_fe()); InterGridMap > coarse_to_fine_map; coarse_to_fine_map.make_mapping (coarser_dof_handler, - primal_solver.dof_handler); + primal_solver.dof_handler); - // finally we have to transfer - // the data vectors + // finally we have to transfer + // the data vectors Vector coarse_primal_solution (coarser_dof_handler.n_dofs()); Vector coarse_dual_solution (coarser_dof_handler.n_dofs()); Vector coarse_error_indicators (coarser_dof_handler.n_dofs()); @@ -2996,23 +2996,23 @@ namespace LaplaceSolver Vector tmp (coarser_dof_handler.get_fe().dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = coarser_dof_handler.begin_active(); - cell != coarser_dof_handler.end(); ++cell) + cell = coarser_dof_handler.begin_active(); + cell != coarser_dof_handler.end(); ++cell) { - coarse_to_fine_map[cell]->get_interpolated_dof_values (primal_solver.solution,tmp); - cell->set_dof_values (tmp, coarse_primal_solution); + coarse_to_fine_map[cell]->get_interpolated_dof_values (primal_solver.solution,tmp); + cell->set_dof_values (tmp, coarse_primal_solution); - coarse_to_fine_map[cell]->get_interpolated_dof_values (dual_solution,tmp); - cell->set_dof_values (tmp, coarse_dual_solution); + coarse_to_fine_map[cell]->get_interpolated_dof_values (dual_solution,tmp); + cell->set_dof_values (tmp, coarse_dual_solution); - coarse_to_fine_map[cell]->get_interpolated_dof_values (x_error_indicators,tmp); - cell->set_dof_values (tmp, coarse_error_indicators); + coarse_to_fine_map[cell]->get_interpolated_dof_values (x_error_indicators,tmp); + cell->set_dof_values (tmp, coarse_error_indicators); - coarse_to_fine_map[cell]->get_interpolated_dof_values (x_gradient_indicators,tmp); - cell->set_dof_values (tmp, coarse_gradient_indicators); + coarse_to_fine_map[cell]->get_interpolated_dof_values (x_gradient_indicators,tmp); + cell->set_dof_values (tmp, coarse_gradient_indicators); - coarse_to_fine_map[cell]->get_interpolated_dof_values (x_second_indicators,tmp); - cell->set_dof_values (tmp, coarse_second_indicators); + coarse_to_fine_map[cell]->get_interpolated_dof_values (x_second_indicators,tmp); + cell->set_dof_values (tmp, coarse_second_indicators); } { @@ -3031,10 +3031,10 @@ namespace LaplaceSolver std::ostrstream filename; #endif filename << "spec2006-447.dealII/" - << "solution-" - << this->refinement_cycle - << ".gmv" - << std::ends; + << "solution-" + << this->refinement_cycle + << ".gmv" + << std::ends; #ifdef HAVE_STD_STRINGSTREAM std::ofstream out (filename.str().c_str()); #else @@ -3047,17 +3047,17 @@ namespace LaplaceSolver } - // @sect3{Estimating errors} + // @sect3{Estimating errors} - // @sect4{Error estimation driver functions} - // - // As for the actual computation of - // error estimates, let's start - // with the function that drives - // all this, i.e. calls those - // functions that actually do the - // work, and finally collects the - // results. + // @sect4{Error estimation driver functions} + // + // As for the actual computation of + // error estimates, let's start + // with the function that drives + // all this, i.e. calls those + // functions that actually do the + // work, and finally collects the + // results. template void @@ -3067,141 +3067,141 @@ namespace LaplaceSolver const PrimalSolver &primal_solver = *this; const DualSolver &dual_solver = *this; - // The first task in computing - // the error is to set up vectors - // that denote the primal - // solution, and the weights - // (z-z_h)=(z-I_hz), both in the - // finite element space for which - // we have computed the dual - // solution. For this, we have to - // interpolate the primal - // solution to the dual finite - // element space, and to subtract - // the interpolation of the - // computed dual solution to the - // primal finite element - // space. Fortunately, the - // library provides functions for - // the interpolation into larger - // or smaller finite element - // spaces, so this is mostly - // obvious. - // - // First, let's do that for the - // primal solution: it is - // cell-wise interpolated into - // the finite element space in - // which we have solved the dual - // problem: But, again as in the - // ``WeightedResidual::output_solution'' - // function we first need to - // create a ConstraintMatrix - // including the hanging node - // constraints, but this time of - // the dual finite element space. + // The first task in computing + // the error is to set up vectors + // that denote the primal + // solution, and the weights + // (z-z_h)=(z-I_hz), both in the + // finite element space for which + // we have computed the dual + // solution. For this, we have to + // interpolate the primal + // solution to the dual finite + // element space, and to subtract + // the interpolation of the + // computed dual solution to the + // primal finite element + // space. Fortunately, the + // library provides functions for + // the interpolation into larger + // or smaller finite element + // spaces, so this is mostly + // obvious. + // + // First, let's do that for the + // primal solution: it is + // cell-wise interpolated into + // the finite element space in + // which we have solved the dual + // problem: But, again as in the + // ``WeightedResidual::output_solution'' + // function we first need to + // create a ConstraintMatrix + // including the hanging node + // constraints, but this time of + // the dual finite element space. ConstraintMatrix dual_hanging_node_constraints; DoFTools::make_hanging_node_constraints (dual_solver.dof_handler, - dual_hanging_node_constraints); + dual_hanging_node_constraints); dual_hanging_node_constraints.close(); Vector primal_solution (dual_solver.dof_handler.n_dofs()); FETools::interpolate (primal_solver.dof_handler, - primal_solver.solution, - dual_solver.dof_handler, - dual_hanging_node_constraints, - primal_solution); - - // Then for computing the - // interpolation of the - // numerically approximated dual - // solution z into the finite - // element space of the primal - // solution and subtracting it - // from z: use the - // ``interpolate_difference'' - // function, that gives (z-I_hz) - // in the element space of the - // dual solution. + primal_solver.solution, + dual_solver.dof_handler, + dual_hanging_node_constraints, + primal_solution); + + // Then for computing the + // interpolation of the + // numerically approximated dual + // solution z into the finite + // element space of the primal + // solution and subtracting it + // from z: use the + // ``interpolate_difference'' + // function, that gives (z-I_hz) + // in the element space of the + // dual solution. ConstraintMatrix primal_hanging_node_constraints; DoFTools::make_hanging_node_constraints (primal_solver.dof_handler, - primal_hanging_node_constraints); + primal_hanging_node_constraints); primal_hanging_node_constraints.close(); Vector dual_weights (dual_solver.dof_handler.n_dofs()); FETools::interpolation_difference (dual_solver.dof_handler, - dual_hanging_node_constraints, - dual_solver.solution, - primal_solver.dof_handler, - primal_hanging_node_constraints, - dual_weights); - - // Note that this could probably - // have been more efficient since - // those constraints have been - // used previously when - // assembling matrix and right - // hand side for the primal - // problem and writing out the - // dual solution. We leave the - // optimization of the program in - // this respect as an exercise. - - // Having computed the dual - // weights we now proceed with - // computing the cell and face - // residuals of the primal - // solution. First we set up a - // map between face iterators and - // their jump term contributions - // of faces to the error - // estimator. The reason is that - // we compute the jump terms only - // once, from one side of the - // face, and want to collect them - // only afterwards when looping - // over all cells a second time. - // - // We initialize this map already - // with a value of -1e20 for all - // faces, since this value will - // strike in the results if - // something should go wrong and - // we fail to compute the value - // for a face for some - // reason. Secondly, we - // initialize the map once before - // we branch to different threads - // since this way the map's - // structure is no more modified - // by the individual threads, - // only existing entries are set - // to new values. This relieves - // us from the necessity to - // synchronise the threads - // through a mutex each time they - // write to (and modify the - // structure of) this map. + dual_hanging_node_constraints, + dual_solver.solution, + primal_solver.dof_handler, + primal_hanging_node_constraints, + dual_weights); + + // Note that this could probably + // have been more efficient since + // those constraints have been + // used previously when + // assembling matrix and right + // hand side for the primal + // problem and writing out the + // dual solution. We leave the + // optimization of the program in + // this respect as an exercise. + + // Having computed the dual + // weights we now proceed with + // computing the cell and face + // residuals of the primal + // solution. First we set up a + // map between face iterators and + // their jump term contributions + // of faces to the error + // estimator. The reason is that + // we compute the jump terms only + // once, from one side of the + // face, and want to collect them + // only afterwards when looping + // over all cells a second time. + // + // We initialize this map already + // with a value of -1e20 for all + // faces, since this value will + // strike in the results if + // something should go wrong and + // we fail to compute the value + // for a face for some + // reason. Secondly, we + // initialize the map once before + // we branch to different threads + // since this way the map's + // structure is no more modified + // by the individual threads, + // only existing entries are set + // to new values. This relieves + // us from the necessity to + // synchronise the threads + // through a mutex each time they + // write to (and modify the + // structure of) this map. FaceIntegrals face_integrals; for (active_cell_iterator cell=dual_solver.dof_handler.begin_active(); - cell!=dual_solver.dof_handler.end(); - ++cell) + cell!=dual_solver.dof_handler.end(); + ++cell) for (unsigned int face_no=0; - face_no::faces_per_cell; - ++face_no) - face_integrals[cell->face(face_no)] = -1e20; - - // Then set up a vector with - // error indicators. Reserve one - // slot for each cell and set it - // to zero. + face_no::faces_per_cell; + ++face_no) + face_integrals[cell->face(face_no)] = -1e20; + + // Then set up a vector with + // error indicators. Reserve one + // slot for each cell and set it + // to zero. error_indicators.reinit (dual_solver.dof_handler - .get_tria().n_active_cells()); - - // Now start a number of threads - // which compute the error - // formula on parts of all the - // cells, and once they are all - // started wait until they have - // all finished: + .get_tria().n_active_cells()); + + // Now start a number of threads + // which compute the error + // formula on parts of all the + // cells, and once they are all + // started wait until they have + // all finished: const unsigned int n_threads = multithread_info.n_default_threads; Threads::ThreadGroup<> threads; for (unsigned int i=0; i::faces_per_cell; - ++face_no) - { - Assert(face_integrals.find(cell->face(face_no)) != - face_integrals.end(), - ExcInternalError()); - error_indicators(present_cell) - -= 0.5*face_integrals[cell->face(face_no)]; - }; + ++face_no) + { + Assert(face_integrals.find(cell->face(face_no)) != + face_integrals.end(), + ExcInternalError()); + error_indicators(present_cell) + -= 0.5*face_integrals[cell->face(face_no)]; + }; std::cout << " Estimated error=" - << std::accumulate (error_indicators.begin(), - error_indicators.end(), 0.) - << std::endl; + << std::accumulate (error_indicators.begin(), + error_indicators.end(), 0.) + << std::endl; } - // @sect4{Estimating on a subset of cells} + // @sect4{Estimating on a subset of cells} - // Next we have the function that - // is called to estimate the error - // on a subset of cells. The - // function may be called multiply - // if the library was configured to - // use multi-threading. Here it - // goes: + // Next we have the function that + // is called to estimate the error + // on a subset of cells. The + // function may be called multiply + // if the library was configured to + // use multi-threading. Here it + // goes: template void WeightedResidual:: estimate_some (const Vector &primal_solution, - const Vector &dual_weights, - const unsigned int n_threads, - const unsigned int this_thread, - Vector &error_indicators, - FaceIntegrals &face_integrals) const + const Vector &dual_weights, + const unsigned int n_threads, + const unsigned int this_thread, + Vector &error_indicators, + FaceIntegrals &face_integrals) const { const PrimalSolver &primal_solver = *this; const DualSolver &dual_solver = *this; - // At the beginning, we - // initialize two variables for - // each thread which may be - // running this function. The - // reason for these functions was - // discussed above, when the - // respective classes were - // discussed, so we here only - // point out that since they are - // local to the function that is - // spawned when running more than - // one thread, the data of these - // objects exists actually once - // per thread, so we don't have - // to take care about - // synchronising access to them. + // At the beginning, we + // initialize two variables for + // each thread which may be + // running this function. The + // reason for these functions was + // discussed above, when the + // respective classes were + // discussed, so we here only + // point out that since they are + // local to the function that is + // spawned when running more than + // one thread, the data of these + // objects exists actually once + // per thread, so we don't have + // to take care about + // synchronising access to them. CellData cell_data (*dual_solver.fe, - *dual_solver.quadrature, - *primal_solver.rhs_function); + *dual_solver.quadrature, + *primal_solver.rhs_function); FaceData face_data (*dual_solver.fe, - *dual_solver.face_quadrature); - - // Then calculate the start cell - // for this thread. We let the - // different threads run on - // interleaved cells, i.e. for - // example if we have 4 threads, - // then the first thread treates - // cells 0, 4, 8, etc, while the - // second threads works on cells 1, - // 5, 9, and so on. The reason is - // that it takes vastly more time - // to work on cells with hanging - // nodes than on regular cells, but - // such cells are not evenly - // distributed across the range of - // cell iterators, so in order to - // have the different threads do - // approximately the same amount of - // work, we have to let them work - // interleaved to the effect of a - // pseudorandom distribution of the - // `hard' cells to the different - // threads. + *dual_solver.face_quadrature); + + // Then calculate the start cell + // for this thread. We let the + // different threads run on + // interleaved cells, i.e. for + // example if we have 4 threads, + // then the first thread treates + // cells 0, 4, 8, etc, while the + // second threads works on cells 1, + // 5, 9, and so on. The reason is + // that it takes vastly more time + // to work on cells with hanging + // nodes than on regular cells, but + // such cells are not evenly + // distributed across the range of + // cell iterators, so in order to + // have the different threads do + // approximately the same amount of + // work, we have to let them work + // interleaved to the effect of a + // pseudorandom distribution of the + // `hard' cells to the different + // threads. active_cell_iterator cell=dual_solver.dof_handler.begin_active(); for (unsigned int t=0; - (t::faces_per_cell; - ++face_no) - { - // First, if this face is - // part of the boundary, - // then there is nothing - // to do. However, to - // make things easier - // when summing up the - // contributions of the - // faces of cells, we - // enter this face into - // the list of faces with - // a zero contribution to - // the error. - if (cell->face(face_no)->at_boundary()) - { - face_integrals[cell->face(face_no)] = 0; - continue; - }; - - // Next, note that since - // we want to compute the - // jump terms on each - // face only once - // although we access it - // twice (if it is not at - // the boundary), we have - // to define some rules - // who is responsible for - // computing on a face: - // - // First, if the - // neighboring cell is on - // the same level as this - // one, i.e. neither - // further refined not - // coarser, then the one - // with the lower index - // within this level does - // the work. In other - // words: if the other - // one has a lower index, - // then skip work on this - // face: - if ((cell->neighbor(face_no)->has_children() == false) && - (cell->neighbor(face_no)->level() == cell->level()) && - (cell->neighbor(face_no)->index() < cell->index())) - continue; - - // Likewise, we always - // work from the coarser - // cell if this and its - // neighbor differ in - // refinement. Thus, if - // the neighboring cell - // is less refined than - // the present one, then - // do nothing since we - // integrate over the - // subfaces when we visit - // the coarse cell. - if (cell->at_boundary(face_no) == false) - if (cell->neighbor(face_no)->level() < cell->level()) - continue; - - - // Now we know that we - // are in charge here, so - // actually compute the - // face jump terms. If - // the face is a regular - // one, i.e. the other - // side's cell is neither - // coarser not finer than - // this cell, then call - // one function, and if - // the cell on the other - // side is further - // refined, then use - // another function. Note - // that the case that the - // cell on the other side - // is coarser cannot - // happen since we have - // decided above that we - // handle this case when - // we pass over that - // other cell. - if (cell->face(face_no)->has_children() == false) - integrate_over_regular_face (cell, face_no, - primal_solution, - dual_weights, - face_data, - face_integrals); - else - integrate_over_irregular_face (cell, face_no, - primal_solution, - dual_weights, - face_data, - face_integrals); - }; - - // After computing the cell - // contributions and looping - // over the faces, go to the - // next cell for this - // thread. Note again that - // the cells for each of the - // threads are interleaved. - // If we are at the end of - // our workload, jump out - // of the loop. - for (unsigned int t=0; - ((t::faces_per_cell; + ++face_no) + { + // First, if this face is + // part of the boundary, + // then there is nothing + // to do. However, to + // make things easier + // when summing up the + // contributions of the + // faces of cells, we + // enter this face into + // the list of faces with + // a zero contribution to + // the error. + if (cell->face(face_no)->at_boundary()) + { + face_integrals[cell->face(face_no)] = 0; + continue; + }; + + // Next, note that since + // we want to compute the + // jump terms on each + // face only once + // although we access it + // twice (if it is not at + // the boundary), we have + // to define some rules + // who is responsible for + // computing on a face: + // + // First, if the + // neighboring cell is on + // the same level as this + // one, i.e. neither + // further refined not + // coarser, then the one + // with the lower index + // within this level does + // the work. In other + // words: if the other + // one has a lower index, + // then skip work on this + // face: + if ((cell->neighbor(face_no)->has_children() == false) && + (cell->neighbor(face_no)->level() == cell->level()) && + (cell->neighbor(face_no)->index() < cell->index())) + continue; + + // Likewise, we always + // work from the coarser + // cell if this and its + // neighbor differ in + // refinement. Thus, if + // the neighboring cell + // is less refined than + // the present one, then + // do nothing since we + // integrate over the + // subfaces when we visit + // the coarse cell. + if (cell->at_boundary(face_no) == false) + if (cell->neighbor(face_no)->level() < cell->level()) + continue; + + + // Now we know that we + // are in charge here, so + // actually compute the + // face jump terms. If + // the face is a regular + // one, i.e. the other + // side's cell is neither + // coarser not finer than + // this cell, then call + // one function, and if + // the cell on the other + // side is further + // refined, then use + // another function. Note + // that the case that the + // cell on the other side + // is coarser cannot + // happen since we have + // decided above that we + // handle this case when + // we pass over that + // other cell. + if (cell->face(face_no)->has_children() == false) + integrate_over_regular_face (cell, face_no, + primal_solution, + dual_weights, + face_data, + face_integrals); + else + integrate_over_irregular_face (cell, face_no, + primal_solution, + dual_weights, + face_data, + face_integrals); + }; + + // After computing the cell + // contributions and looping + // over the faces, go to the + // next cell for this + // thread. Note again that + // the cells for each of the + // threads are interleaved. + // If we are at the end of + // our workload, jump out + // of the loop. + for (unsigned int t=0; + ((t void WeightedResidual:: integrate_over_cell (const active_cell_iterator &cell, - const unsigned int cell_index, - const Vector &primal_solution, - const Vector &dual_weights, - CellData &cell_data, - Vector &error_indicators) const + const unsigned int cell_index, + const Vector &primal_solution, + const Vector &dual_weights, + CellData &cell_data, + Vector &error_indicators) const { - // The tasks to be done are what - // appears natural from looking - // at the error estimation - // formula: first compute the the - // right hand side and the - // Laplacian of the numerical - // solution at the quadrature - // points for the cell residual, + // The tasks to be done are what + // appears natural from looking + // at the error estimation + // formula: first compute the the + // right hand side and the + // Laplacian of the numerical + // solution at the quadrature + // points for the cell residual, cell_data.fe_values.reinit (cell); cell_data.right_hand_side - ->value_list (cell_data.fe_values.get_quadrature_points(), - cell_data.rhs_values); + ->value_list (cell_data.fe_values.get_quadrature_points(), + cell_data.rhs_values); cell_data.fe_values.get_function_2nd_derivatives (primal_solution, - cell_data.cell_grad_grads); + cell_data.cell_grad_grads); - // ...then get the dual weights... + // ...then get the dual weights... cell_data.fe_values.get_function_values (dual_weights, - cell_data.dual_weights); + cell_data.dual_weights); - // ...and finally build the sum - // over all quadrature points and - // store it with the present - // cell: + // ...and finally build the sum + // over all quadrature points and + // store it with the present + // cell: double sum = 0; for (unsigned int p=0; p void WeightedResidual:: integrate_over_regular_face (const active_cell_iterator &cell, - const unsigned int face_no, - const Vector &primal_solution, - const Vector &dual_weights, - FaceData &face_data, - FaceIntegrals &face_integrals) const + const unsigned int face_no, + const Vector &primal_solution, + const Vector &dual_weights, + FaceData &face_data, + FaceIntegrals &face_integrals) const { const unsigned int - n_q_points = face_data.fe_face_values_cell.n_quadrature_points; - - // The first step is to get the - // values of the gradients at the - // quadrature points of the - // finite element field on the - // present cell. For this, - // initialize the - // ``FEFaceValues'' object - // corresponding to this side of - // the face, and extract the - // gradients using that - // object. + n_q_points = face_data.fe_face_values_cell.n_quadrature_points; + + // The first step is to get the + // values of the gradients at the + // quadrature points of the + // finite element field on the + // present cell. For this, + // initialize the + // ``FEFaceValues'' object + // corresponding to this side of + // the face, and extract the + // gradients using that + // object. face_data.fe_face_values_cell.reinit (cell, face_no); face_data.fe_face_values_cell.get_function_grads (primal_solution, - face_data.cell_grads); - - // The second step is then to - // extract the gradients of the - // finite element solution at the - // quadrature points on the other - // side of the face, i.e. from - // the neighboring cell. - // - // For this, do a sanity check - // before: make sure that the - // neigbor actually exists (yes, - // we should not have come here - // if the neighbor did not exist, - // but in complicated software - // there are bugs, so better - // check this), and if this is - // not the case throw an error. + face_data.cell_grads); + + // The second step is then to + // extract the gradients of the + // finite element solution at the + // quadrature points on the other + // side of the face, i.e. from + // the neighboring cell. + // + // For this, do a sanity check + // before: make sure that the + // neigbor actually exists (yes, + // we should not have come here + // if the neighbor did not exist, + // but in complicated software + // there are bugs, so better + // check this), and if this is + // not the case throw an error. Assert (cell->neighbor(face_no).state() == IteratorState::valid, - ExcInternalError()); - // If we have that, then we need - // to find out with which face of - // the neighboring cell we have - // to work, i.e. the - // ``home-many''the neighbor the - // present cell is of the cell - // behind the present face. For - // this, there is a function, and - // we put the result into a - // variable with the name - // ``neighbor_neighbor'': + ExcInternalError()); + // If we have that, then we need + // to find out with which face of + // the neighboring cell we have + // to work, i.e. the + // ``home-many''the neighbor the + // present cell is of the cell + // behind the present face. For + // this, there is a function, and + // we put the result into a + // variable with the name + // ``neighbor_neighbor'': const unsigned int - neighbor_neighbor = cell->neighbor_of_neighbor (face_no); - // Then define an abbreviation - // for the neigbor cell, - // initialize the - // ``FEFaceValues'' object on - // that cell, and extract the - // gradients on that cell: + neighbor_neighbor = cell->neighbor_of_neighbor (face_no); + // Then define an abbreviation + // for the neigbor cell, + // initialize the + // ``FEFaceValues'' object on + // that cell, and extract the + // gradients on that cell: 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_grads (primal_solution, - face_data.neighbor_grads); - - // Now that we have the gradients - // on this and the neighboring - // cell, compute the jump - // residual by multiplying the - // jump in the gradient with the - // normal vector: + face_data.neighbor_grads); + + // Now that we have the gradients + // on this and the neighboring + // cell, compute the jump + // residual by multiplying the + // jump in the gradient with the + // normal vector: for (unsigned int p=0; pface(face_no)) != face_integrals.end(), - ExcInternalError()); + ExcInternalError()); Assert (face_integrals[cell->face(face_no)] == -1e20, - ExcInternalError()); - - // ...then store computed value - // at assigned location. Note - // that the stored value does not - // contain the factor 1/2 that - // appears in the error - // representation. The reason is - // that the term actually does - // not have this factor if we - // loop over all faces in the - // triangulation, but only - // appears if we write it as a - // sum over all cells and all - // faces of each cell; we thus - // visit the same face twice. We - // take account of this by using - // this factor -1/2 later, when we - // sum up the contributions for - // each cell individually. + ExcInternalError()); + + // ...then store computed value + // at assigned location. Note + // that the stored value does not + // contain the factor 1/2 that + // appears in the error + // representation. The reason is + // that the term actually does + // not have this factor if we + // loop over all faces in the + // triangulation, but only + // appears if we write it as a + // sum over all cells and all + // faces of each cell; we thus + // visit the same face twice. We + // take account of this by using + // this factor -1/2 later, when we + // sum up the contributions for + // each cell individually. face_integrals[cell->face(face_no)] = face_integral; } - // @sect4{Computing edge term error contributions - 2} + // @sect4{Computing edge term error contributions - 2} - // We are still missing the case of - // faces with hanging nodes. This - // is what is covered in this - // function: + // We are still missing the case of + // faces with hanging nodes. This + // is what is covered in this + // function: template void WeightedResidual:: integrate_over_irregular_face (const active_cell_iterator &cell, - const unsigned int face_no, - const Vector &primal_solution, - const Vector &dual_weights, - FaceData &face_data, - FaceIntegrals &face_integrals) const + const unsigned int face_no, + const Vector &primal_solution, + const Vector &dual_weights, + FaceData &face_data, + FaceIntegrals &face_integrals) const { - // First again two abbreviations, - // and some consistency checks - // whether the function is called - // only on faces for which it is - // supposed to be called: + // First again two abbreviations, + // and some consistency checks + // whether the function is called + // only on faces for which it is + // supposed to be called: const unsigned int - n_q_points = face_data.fe_face_values_cell.n_quadrature_points; + n_q_points = face_data.fe_face_values_cell.n_quadrature_points; const typename DoFHandler::cell_iterator - neighbor = cell->neighbor(face_no); + neighbor = cell->neighbor(face_no); Assert (neighbor.state() == IteratorState::valid, - ExcInternalError()); + ExcInternalError()); Assert (neighbor->has_children(), - ExcInternalError()); - - // Then find out which neighbor - // the present cell is of the - // adjacent cell. Note that we - // will operator on the children - // of this adjacent cell, but - // that their orientation is the - // same as that of their mother, - // i.e. the neigbor direction is - // the same. + ExcInternalError()); + + // Then find out which neighbor + // the present cell is of the + // adjacent cell. Note that we + // will operator on the children + // of this adjacent cell, but + // that their orientation is the + // same as that of their mother, + // i.e. the neigbor direction is + // the same. const unsigned int - neighbor_neighbor = cell->neighbor_of_neighbor (face_no); + neighbor_neighbor = cell->neighbor_of_neighbor (face_no); - // Then simply do everything we - // did in the previous function - // for one face for all the - // sub-faces now: + // Then simply do everything we + // did in the previous function + // for one face for all the + // sub-faces now: for (unsigned int subface_no=0; - subface_no::subfaces_per_face; - ++subface_no) + subface_no::subfaces_per_face; + ++subface_no) { - const active_cell_iterator neighbor_child + const active_cell_iterator neighbor_child = cell->neighbor_child_on_subface (face_no, subface_no); - // Now start the work by - // again getting the gradient - // of the solution first at - // this side of the - // interface, - face_data.fe_subface_values_cell.reinit (cell, face_no, subface_no); - face_data.fe_subface_values_cell.get_function_grads (primal_solution, - face_data.cell_grads); - // then at the other side, - face_data.fe_face_values_neighbor.reinit (neighbor_child, - neighbor_neighbor); - face_data.fe_face_values_neighbor.get_function_grads (primal_solution, - face_data.neighbor_grads); - - // and finally building the - // jump residuals. Since we - // take the normal vector - // from the other cell this - // time, revert the sign of - // the first term compared to - // the other function: - for (unsigned int p=0; pface(neighbor_neighbor)] - = face_integral; + // Now start the work by + // again getting the gradient + // of the solution first at + // this side of the + // interface, + face_data.fe_subface_values_cell.reinit (cell, face_no, subface_no); + face_data.fe_subface_values_cell.get_function_grads (primal_solution, + face_data.cell_grads); + // then at the other side, + face_data.fe_face_values_neighbor.reinit (neighbor_child, + neighbor_neighbor); + face_data.fe_face_values_neighbor.get_function_grads (primal_solution, + face_data.neighbor_grads); + + // and finally building the + // jump residuals. Since we + // take the normal vector + // from the other cell this + // time, revert the sign of + // the first term compared to + // the other function: + for (unsigned int p=0; pface(neighbor_neighbor)] + = face_integral; }; - // Once the contributions of all - // sub-faces are computed, loop - // over all sub-faces to collect - // and store them with the mother - // face for simple use when later - // collecting the error terms of - // cells. Again make safety - // checks that the entries for - // the sub-faces have been - // computed and do not carry an - // invalid value. + // Once the contributions of all + // sub-faces are computed, loop + // over all sub-faces to collect + // and store them with the mother + // face for simple use when later + // collecting the error terms of + // cells. Again make safety + // checks that the entries for + // the sub-faces have been + // computed and do not carry an + // invalid value. double sum = 0; typename DoFHandler::face_iterator face = cell->face(face_no); for (unsigned int subface_no=0; - subface_no::subfaces_per_face; - ++subface_no) + subface_no::subfaces_per_face; + ++subface_no) { - Assert (face_integrals.find(face->child(subface_no)) != - face_integrals.end(), - ExcInternalError()); - Assert (face_integrals[face->child(subface_no)] != -1e20, - ExcInternalError()); + Assert (face_integrals.find(face->child(subface_no)) != + face_integrals.end(), + ExcInternalError()); + Assert (face_integrals[face->child(subface_no)] != -1e20, + ExcInternalError()); - sum += face_integrals[face->child(subface_no)]; + sum += face_integrals[face->child(subface_no)]; }; - // Finally store the value with - // the parent face. + // Finally store the value with + // the parent face. face_integrals[face] = sum; } } - // @sect3{A simulation framework} - - // In the previous example program, - // we have had two functions that - // were used to drive the process of - // solving on subsequently finer - // grids. We extend this here to - // allow for a number of parameters - // to be passed to these functions, - // and put all of that into framework - // class. - // - // You will have noted that this - // program is built up of a number of - // small parts (evaluation functions, - // solver classes implementing - // various refinement methods, - // different dual functionals, - // different problem and data - // descriptions), which makes the - // program relatively simple to - // extend, but also allows to solve a - // large number of different problems - // by replacing one part by - // another. We reflect this - // flexibility by declaring a - // structure in the following - // framework class that holds a - // number of parameters that may be - // set to test various combinations - // of the parts of this program, and - // which can be used to test it at - // various problems and - // discretizations in a simple way. +// @sect3{A simulation framework} + +// In the previous example program, +// we have had two functions that +// were used to drive the process of +// solving on subsequently finer +// grids. We extend this here to +// allow for a number of parameters +// to be passed to these functions, +// and put all of that into framework +// class. +// +// You will have noted that this +// program is built up of a number of +// small parts (evaluation functions, +// solver classes implementing +// various refinement methods, +// different dual functionals, +// different problem and data +// descriptions), which makes the +// program relatively simple to +// extend, but also allows to solve a +// large number of different problems +// by replacing one part by +// another. We reflect this +// flexibility by declaring a +// structure in the following +// framework class that holds a +// number of parameters that may be +// set to test various combinations +// of the parts of this program, and +// which can be used to test it at +// various problems and +// discretizations in a simple way. template struct Framework { - public: - // First, we declare two - // abbreviations for simple use - // of the respective data types: - typedef Evaluation::EvaluationBase Evaluator; - typedef std::list EvaluatorList; - - - // Then we have the structure - // which declares all the - // parameters that may be set. In - // the default constructor of the - // structure, these values are - // all set to default values, for - // simple use. - struct ProblemDescription +public: + // First, we declare two + // abbreviations for simple use + // of the respective data types: + typedef Evaluation::EvaluationBase Evaluator; + typedef std::list EvaluatorList; + + + // Then we have the structure + // which declares all the + // parameters that may be set. In + // the default constructor of the + // structure, these values are + // all set to default values, for + // simple use. + struct ProblemDescription + { + // First allow for the + // degrees of the piecewise + // polynomials by which the + // primal and dual problems + // will be discretized. They + // default to (bi-, + // tri-)linear ansatz + // functions for the primal, + // and (bi-, tri-)quadratic + // ones for the dual + // problem. If a refinement + // criterion is chosen that + // does not need the solution + // of a dual problem, the + // value of the dual finite + // element degree is of + // course ignored. + unsigned int primal_fe_degree; + unsigned int dual_fe_degree; + + // Then have an object that + // describes the problem + // type, i.e. right hand + // side, domain, boundary + // values, etc. The pointer + // needed here defaults to + // the Null pointer, i.e. you + // will have to set it in + // actual instances of this + // object to make it useful. + SmartPointer > data; + + // Since we allow to use + // different refinement + // criteria (global + // refinement, refinement by + // the Kelly error indicator, + // possibly with a weight, + // and using the dual + // estimator), define a + // number of enumeration + // values, and subsequently a + // variable of that type. It + // will default to + // ``dual_weighted_error_estimator''. + enum RefinementCriterion { - // First allow for the - // degrees of the piecewise - // polynomials by which the - // primal and dual problems - // will be discretized. They - // default to (bi-, - // tri-)linear ansatz - // functions for the primal, - // and (bi-, tri-)quadratic - // ones for the dual - // problem. If a refinement - // criterion is chosen that - // does not need the solution - // of a dual problem, the - // value of the dual finite - // element degree is of - // course ignored. - unsigned int primal_fe_degree; - unsigned int dual_fe_degree; - - // Then have an object that - // describes the problem - // type, i.e. right hand - // side, domain, boundary - // values, etc. The pointer - // needed here defaults to - // the Null pointer, i.e. you - // will have to set it in - // actual instances of this - // object to make it useful. - SmartPointer > data; - - // Since we allow to use - // different refinement - // criteria (global - // refinement, refinement by - // the Kelly error indicator, - // possibly with a weight, - // and using the dual - // estimator), define a - // number of enumeration - // values, and subsequently a - // variable of that type. It - // will default to - // ``dual_weighted_error_estimator''. - enum RefinementCriterion { - dual_weighted_error_estimator, - global_refinement, - kelly_indicator, - weighted_kelly_indicator - }; - - RefinementCriterion refinement_criterion; - - // Next, an object that - // describes the dual - // functional. It is only - // needed if the dual - // weighted residual - // refinement is chosen, and - // also defaults to a Null - // pointer. - SmartPointer > dual_functional; - - // Then a list of evaluation - // objects. Its default value - // is empty, i.e. no - // evaluation objects. - EvaluatorList evaluator_list; - - // Next to last, a function - // that is used as a weight - // to the - // ``RefinementWeightedKelly'' - // class. The default value - // of this pointer is zero, - // but you have to set it to - // some other value if you - // want to use the - // ``weighted_kelly_indicator'' - // refinement criterion. - SmartPointer > kelly_weight; - - // Finally, we have a - // variable that denotes the - // maximum number of degrees - // of freedom we allow for - // the (primal) - // discretization. If it is - // exceeded, we stop the - // process of solving and - // intermittend mesh - // refinement. Its default - // value is 20,000. - unsigned int max_degrees_of_freedom; - - // Finally the default - // constructor of this class: - ProblemDescription (); + dual_weighted_error_estimator, + global_refinement, + kelly_indicator, + weighted_kelly_indicator }; - // The driver framework class - // only has one method which - // calls solver and mesh - // refinement intermittently, and - // does some other small tasks in - // between. Since it does not - // need data besides the - // parameters given to it, we - // make it static: - static void run (const ProblemDescription &descriptor); + RefinementCriterion refinement_criterion; + + // Next, an object that + // describes the dual + // functional. It is only + // needed if the dual + // weighted residual + // refinement is chosen, and + // also defaults to a Null + // pointer. + SmartPointer > dual_functional; + + // Then a list of evaluation + // objects. Its default value + // is empty, i.e. no + // evaluation objects. + EvaluatorList evaluator_list; + + // Next to last, a function + // that is used as a weight + // to the + // ``RefinementWeightedKelly'' + // class. The default value + // of this pointer is zero, + // but you have to set it to + // some other value if you + // want to use the + // ``weighted_kelly_indicator'' + // refinement criterion. + SmartPointer > kelly_weight; + + // Finally, we have a + // variable that denotes the + // maximum number of degrees + // of freedom we allow for + // the (primal) + // discretization. If it is + // exceeded, we stop the + // process of solving and + // intermittend mesh + // refinement. Its default + // value is 20,000. + unsigned int max_degrees_of_freedom; + + // Finally the default + // constructor of this class: + ProblemDescription (); + }; + + // The driver framework class + // only has one method which + // calls solver and mesh + // refinement intermittently, and + // does some other small tasks in + // between. Since it does not + // need data besides the + // parameters given to it, we + // make it static: + static void run (const ProblemDescription &descriptor); }; - // As for the implementation, first - // the constructor of the parameter - // object, setting all values to - // their defaults: +// As for the implementation, first +// the constructor of the parameter +// object, setting all values to +// their defaults: template Framework::ProblemDescription::ProblemDescription () - : - primal_fe_degree (1), - dual_fe_degree (2), - refinement_criterion (dual_weighted_error_estimator), - max_degrees_of_freedom (1000) + : + primal_fe_degree (1), + dual_fe_degree (2), + refinement_criterion (dual_weighted_error_estimator), + max_degrees_of_freedom (1000) {} - // Then the function which drives the - // whole process: +// Then the function which drives the +// whole process: template void Framework::run (const ProblemDescription &descriptor) { - // First create a triangulation - // from the given data object, + // First create a triangulation + // from the given data object, Triangulation - triangulation (Triangulation::smoothing_on_refinement); + triangulation (Triangulation::smoothing_on_refinement); descriptor.data->create_coarse_grid (triangulation); - // then a set of finite elements - // and appropriate quadrature - // formula: + // then a set of finite elements + // and appropriate quadrature + // formula: const FE_Q primal_fe(descriptor.primal_fe_degree); const FE_Q dual_fe(descriptor.dual_fe_degree); const QGauss quadrature(descriptor.dual_fe_degree+1); const QGauss face_quadrature(descriptor.dual_fe_degree+1); - // Next, select one of the classes - // implementing different - // refinement criteria. - LaplaceSolver::Base * solver = 0; + // Next, select one of the classes + // implementing different + // refinement criteria. + LaplaceSolver::Base *solver = 0; switch (descriptor.refinement_criterion) { - case ProblemDescription::dual_weighted_error_estimator: - { - solver - = new LaplaceSolver::WeightedResidual (triangulation, - primal_fe, - dual_fe, - quadrature, - face_quadrature, - descriptor.data->get_right_hand_side(), - descriptor.data->get_boundary_values(), - *descriptor.dual_functional); - break; - }; + case ProblemDescription::dual_weighted_error_estimator: + { + solver + = new LaplaceSolver::WeightedResidual (triangulation, + primal_fe, + dual_fe, + quadrature, + face_quadrature, + descriptor.data->get_right_hand_side(), + descriptor.data->get_boundary_values(), + *descriptor.dual_functional); + break; + }; - case ProblemDescription::global_refinement: - { - solver - = new LaplaceSolver::RefinementGlobal (triangulation, - primal_fe, - quadrature, - face_quadrature, - descriptor.data->get_right_hand_side(), - descriptor.data->get_boundary_values()); - break; - }; + case ProblemDescription::global_refinement: + { + solver + = new LaplaceSolver::RefinementGlobal (triangulation, + primal_fe, + quadrature, + face_quadrature, + descriptor.data->get_right_hand_side(), + descriptor.data->get_boundary_values()); + break; + }; - case ProblemDescription::kelly_indicator: - { - solver - = new LaplaceSolver::RefinementKelly (triangulation, - primal_fe, - quadrature, - face_quadrature, - descriptor.data->get_right_hand_side(), - descriptor.data->get_boundary_values()); - break; - }; + case ProblemDescription::kelly_indicator: + { + solver + = new LaplaceSolver::RefinementKelly (triangulation, + primal_fe, + quadrature, + face_quadrature, + descriptor.data->get_right_hand_side(), + descriptor.data->get_boundary_values()); + break; + }; - case ProblemDescription::weighted_kelly_indicator: - { - solver - = new LaplaceSolver::RefinementWeightedKelly (triangulation, - primal_fe, - quadrature, - face_quadrature, - descriptor.data->get_right_hand_side(), - descriptor.data->get_boundary_values(), - *descriptor.kelly_weight); - break; - }; + case ProblemDescription::weighted_kelly_indicator: + { + solver + = new LaplaceSolver::RefinementWeightedKelly (triangulation, + primal_fe, + quadrature, + face_quadrature, + descriptor.data->get_right_hand_side(), + descriptor.data->get_boundary_values(), + *descriptor.kelly_weight); + break; + }; - default: - AssertThrow (false, ExcInternalError()); + default: + AssertThrow (false, ExcInternalError()); }; - // Now that all objects are in - // place, run the main loop. The - // stopping criterion is - // implemented at the bottom of the - // loop. - // - // In the loop, first set the new - // cycle number, then solve the - // problem, output its solution(s), - // apply the evaluation objects to - // it, then decide whether we want - // to refine the mesh further and - // solve again on this mesh, or - // jump out of the loop. + // Now that all objects are in + // place, run the main loop. The + // stopping criterion is + // implemented at the bottom of the + // loop. + // + // In the loop, first set the new + // cycle number, then solve the + // problem, output its solution(s), + // apply the evaluation objects to + // it, then decide whether we want + // to refine the mesh further and + // solve again on this mesh, or + // jump out of the loop. for (step=0; step<=n_steps; ++step) { - std::cout << "Refinement cycle: " << step - << std::endl; + std::cout << "Refinement cycle: " << step + << std::endl; solver->set_refinement_cycle (step); solver->solve_problem (); solver->output_solution (); std::cout << " Number of degrees of freedom=" - << solver->n_dofs() << std::endl; + << solver->n_dofs() << std::endl; for (typename EvaluatorList::const_iterator - e = descriptor.evaluator_list.begin(); - e != descriptor.evaluator_list.end(); ++e) - { - (*e)->set_refinement_cycle (step); - solver->postprocess (**e); - }; + e = descriptor.evaluator_list.begin(); + e != descriptor.evaluator_list.end(); ++e) + { + (*e)->set_refinement_cycle (step); + solver->postprocess (**e); + }; if (solver->n_dofs() < descriptor.max_degrees_of_freedom) - solver->refine_grid (); + solver->refine_grid (); else - break; + break; }; - // After the loop has run, clean up - // the screen, and delete objects - // no more needed: + // After the loop has run, clean up + // the screen, and delete objects + // no more needed: std::cout << std::endl; delete solver; solver = 0; @@ -4105,40 +4106,39 @@ void Framework::run (const ProblemDescription &descriptor) - // @sect3{The main function} +// @sect3{The main function} - // Here finally comes the main - // function. It drives the whole - // process by specifying a set of - // parameters to be used for the - // simulation (polynomial degrees, - // evaluation and dual functionals, - // etc), and passes them packed into - // a structure to the frame work - // class above. +// Here finally comes the main +// function. It drives the whole +// process by specifying a set of +// parameters to be used for the +// simulation (polynomial degrees, +// evaluation and dual functionals, +// etc), and passes them packed into +// a structure to the frame work +// class above. int main (int argc, char **argv) { - // if no argument is given, then do 18 - // iterations + // if no argument is given, then do 18 + // iterations if (argc == 1) n_steps = 18; + else if (argc == 2) + { + n_steps = atoi(argv[1]); + if ((n_steps==0) || (n_steps>100)) + { + std::cout << "Please call this program with an argument in the range 1..100" + << std::endl; + exit (1); + } + } else - if (argc == 2) - { - n_steps = atoi(argv[1]); - if ((n_steps==0) || (n_steps>100)) - { - std::cout << "Please call this program with an argument in the range 1..100" - << std::endl; - exit (1); - } - } - else - { - std::cout << "Please call this program with a single argument in the range 1..100" - << std::endl; - exit (1); - } + { + std::cout << "Please call this program with a single argument in the range 1..100" + << std::endl; + exit (1); + } @@ -4146,133 +4146,133 @@ int main (int argc, char **argv) deallog.depth_console (0); try { - // Describe the problem we want - // to solve here by passing a - // descriptor object to the - // function doing the rest of - // the work: + // Describe the problem we want + // to solve here by passing a + // descriptor object to the + // function doing the rest of + // the work: const unsigned int dim = 3; Framework::ProblemDescription descriptor; - // First set the refinement - // criterion we wish to use: + // First set the refinement + // criterion we wish to use: descriptor.refinement_criterion - = Framework::ProblemDescription::dual_weighted_error_estimator; - // Here, we could as well have - // used ``global_refinement'' - // or - // ``weighted_kelly_indicator''. Note - // that the information given - // about dual finite elements, - // dual functional, etc is only - // important for the given - // choice of refinement - // criterion, and is ignored - // otherwise. - - // Then set the polynomial - // degrees of primal and dual - // problem. We choose here - // bi-linear and bi-quadratic - // ones: + = Framework::ProblemDescription::dual_weighted_error_estimator; + // Here, we could as well have + // used ``global_refinement'' + // or + // ``weighted_kelly_indicator''. Note + // that the information given + // about dual finite elements, + // dual functional, etc is only + // important for the given + // choice of refinement + // criterion, and is ignored + // otherwise. + + // Then set the polynomial + // degrees of primal and dual + // problem. We choose here + // bi-linear and bi-quadratic + // ones: descriptor.primal_fe_degree = 1; descriptor.dual_fe_degree = 2; - // Then set the description of - // the test case, i.e. domain, - // boundary values, and right - // hand side. These are - // prepackaged in classes. We - // take here the description of - // ``Exercise_2_3'', but you - // can also use - // ``CurvedRidges'': + // Then set the description of + // the test case, i.e. domain, + // boundary values, and right + // hand side. These are + // prepackaged in classes. We + // take here the description of + // ``Exercise_2_3'', but you + // can also use + // ``CurvedRidges'': descriptor.data = new Data::SetUp,dim> (); - // Next set first a dual - // functional, then a list of - // evaluation objects. We - // choose as default the - // evaluation of the - // value at an - // evaluation point, - // represented by the classes - // ``PointValueEvaluation'' - // in the namespaces of - // evaluation and dual - // functional classes. You can - // also set the - // ``PointXDerivativeEvaluation'' - // classes for the x-derivative - // instead of the value - // at the evaluation point. - // - // Note that dual functional - // and evaluation objects - // should match. However, you - // can give as many evaluation - // functionals as you want, so - // you can have both point - // value and derivative - // evaluated after each step. - // One such additional - // evaluation is to output the - // grid in each step. + // Next set first a dual + // functional, then a list of + // evaluation objects. We + // choose as default the + // evaluation of the + // value at an + // evaluation point, + // represented by the classes + // ``PointValueEvaluation'' + // in the namespaces of + // evaluation and dual + // functional classes. You can + // also set the + // ``PointXDerivativeEvaluation'' + // classes for the x-derivative + // instead of the value + // at the evaluation point. + // + // Note that dual functional + // and evaluation objects + // should match. However, you + // can give as many evaluation + // functionals as you want, so + // you can have both point + // value and derivative + // evaluated after each step. + // One such additional + // evaluation is to output the + // grid in each step. const Point evaluation_point (0., 0., 0.); descriptor.dual_functional - = new DualFunctional::PointValueEvaluation (evaluation_point); + = new DualFunctional::PointValueEvaluation (evaluation_point); Evaluation::PointValueEvaluation - postprocessor1 (evaluation_point); + postprocessor1 (evaluation_point); Evaluation::GridOutput - postprocessor2 ("grid"); + postprocessor2 ("grid"); descriptor.evaluator_list.push_back (&postprocessor1); descriptor.evaluator_list.push_back (&postprocessor2); - // Set the maximal number of - // degrees of freedom after - // which we want the program to - // stop refining the mesh - // further: + // Set the maximal number of + // degrees of freedom after + // which we want the program to + // stop refining the mesh + // further: #if defined(SPEC_CPU) - // raise from 20000 to 30000. (jfk p6f) + // raise from 20000 to 30000. (jfk p6f) descriptor.max_degrees_of_freedom = 30000; #else descriptor.max_degrees_of_freedom = 20000; #endif - // Finally pass the descriptor - // object to a function that - // runs the entire solution - // with it: + // Finally pass the descriptor + // object to a function that + // runs the entire solution + // with it: Framework::run (descriptor); } - // Catch exceptions to give - // information about things that - // failed: + // Catch exceptions to give + // information about things that + // failed: catch (std::exception &exc) { std::cerr << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; std::cerr << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } catch (...) { std::cerr << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; std::cerr << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; diff --git a/tests/benchmarks/step-22/step-22.cc b/tests/benchmarks/step-22/step-22.cc index 76eea21a70..e0b0298afe 100644 --- a/tests/benchmarks/step-22/step-22.cc +++ b/tests/benchmarks/step-22/step-22.cc @@ -18,10 +18,10 @@ * step-22.cc */ - // @sect3{Include files} +// @sect3{Include files} - // As usual, we start by including - // some well-known files: +// As usual, we start by including +// some well-known files: #include #include #include @@ -56,178 +56,178 @@ #include #include - // Then we need to include the header file - // for the sparse direct solver UMFPACK: +// Then we need to include the header file +// for the sparse direct solver UMFPACK: #include #include - // This includes the library for the - // incomplete LU factorization that will - // be used as a preconditioner in 3D: +// This includes the library for the +// incomplete LU factorization that will +// be used as a preconditioner in 3D: #include - // This is C++: +// This is C++: #include #include - // As in all programs, the namespace dealii - // is included: +// As in all programs, the namespace dealii +// is included: namespace Step22 { using namespace dealii; - // @sect3{Defining the inner preconditioner type} - - // As explained in the introduction, we are - // going to use different preconditioners for - // two and three space dimensions, - // respectively. We distinguish between - // them by the use of the spatial dimension - // as a template parameter. See step-4 for - // details on templates. We are not going to - // create any preconditioner object here, all - // we do is to create class that holds a - // local typedef determining the - // preconditioner class so we can write our - // program in a dimension-independent way. + // @sect3{Defining the inner preconditioner type} + + // As explained in the introduction, we are + // going to use different preconditioners for + // two and three space dimensions, + // respectively. We distinguish between + // them by the use of the spatial dimension + // as a template parameter. See step-4 for + // details on templates. We are not going to + // create any preconditioner object here, all + // we do is to create class that holds a + // local typedef determining the + // preconditioner class so we can write our + // program in a dimension-independent way. template struct InnerPreconditioner; - // In 2D, we are going to use a sparse direct - // solver as preconditioner: + // In 2D, we are going to use a sparse direct + // solver as preconditioner: template <> struct InnerPreconditioner<2> { - typedef SparseILU type; + typedef SparseILU type; // typedef SparseDirectUMFPACK type; }; - // And the ILU preconditioning in 3D, called - // by SparseILU: + // And the ILU preconditioning in 3D, called + // by SparseILU: template <> struct InnerPreconditioner<3> { - typedef SparseILU type; + typedef SparseILU type; }; - // @sect3{The StokesProblem class template} - - // This is an adaptation of step-20, so the - // main class and the data types are the - // same as used there. In this example we - // also use adaptive grid refinement, which - // is handled in analogy to - // step-6. According to the discussion in - // the introduction, we are also going to - // use the ConstraintMatrix for - // implementing Dirichlet boundary - // conditions. Hence, we change the name - // hanging_node_constraints - // into constraints. + // @sect3{The StokesProblem class template} + + // This is an adaptation of step-20, so the + // main class and the data types are the + // same as used there. In this example we + // also use adaptive grid refinement, which + // is handled in analogy to + // step-6. According to the discussion in + // the introduction, we are also going to + // use the ConstraintMatrix for + // implementing Dirichlet boundary + // conditions. Hence, we change the name + // hanging_node_constraints + // into constraints. template class StokesProblem { - public: - StokesProblem (const unsigned int degree); - void run (); - - private: - void setup_dofs (); - void assemble_system (); - void solve (); - void output_results (const unsigned int refinement_cycle) const; - void refine_mesh (); - - const unsigned int degree; - - Triangulation triangulation; - FESystem fe; - DoFHandler dof_handler; - - ConstraintMatrix constraints; - - BlockSparsityPattern sparsity_pattern; - BlockSparseMatrix system_matrix; - - BlockVector solution; - BlockVector system_rhs; - - // This one is new: We shall use a - // so-called shared pointer structure to - // access the preconditioner. Shared - // pointers are essentially just a - // convenient form of pointers. Several - // shared pointers can point to the same - // object (just like regular pointers), - // but when the last shared pointer - // object to point to a preconditioner - // object is deleted (for example if a - // shared pointer object goes out of - // scope, if the class of which it is a - // member is destroyed, or if the pointer - // is assigned a different preconditioner - // object) then the preconditioner object - // pointed to is also destroyed. This - // ensures that we don't have to manually - // track in how many places a - // preconditioner object is still - // referenced, it can never create a - // memory leak, and can never produce a - // dangling pointer to an already - // destroyed object: - std_cxx1x::shared_ptr::type> A_preconditioner; - - TimerOutput timer; + public: + StokesProblem (const unsigned int degree); + void run (); + + private: + void setup_dofs (); + void assemble_system (); + void solve (); + void output_results (const unsigned int refinement_cycle) const; + void refine_mesh (); + + const unsigned int degree; + + Triangulation triangulation; + FESystem fe; + DoFHandler dof_handler; + + ConstraintMatrix constraints; + + BlockSparsityPattern sparsity_pattern; + BlockSparseMatrix system_matrix; + + BlockVector solution; + BlockVector system_rhs; + + // This one is new: We shall use a + // so-called shared pointer structure to + // access the preconditioner. Shared + // pointers are essentially just a + // convenient form of pointers. Several + // shared pointers can point to the same + // object (just like regular pointers), + // but when the last shared pointer + // object to point to a preconditioner + // object is deleted (for example if a + // shared pointer object goes out of + // scope, if the class of which it is a + // member is destroyed, or if the pointer + // is assigned a different preconditioner + // object) then the preconditioner object + // pointed to is also destroyed. This + // ensures that we don't have to manually + // track in how many places a + // preconditioner object is still + // referenced, it can never create a + // memory leak, and can never produce a + // dangling pointer to an already + // destroyed object: + std_cxx1x::shared_ptr::type> A_preconditioner; + + TimerOutput timer; }; - // @sect3{Boundary values and right hand side} - - // As in step-20 and most other - // example programs, the next task is - // to define the data for the PDE: - // For the Stokes problem, we are - // going to use natural boundary - // values on parts of the boundary - // (i.e. homogenous Neumann-type) for - // which we won't have to do anything - // special (the homogeneity implies - // that the corresponding terms in - // the weak form are simply zero), - // and boundary conditions on the - // velocity (Dirichlet-type) on the - // rest of the boundary, as described - // in the introduction. - // - // In order to enforce the Dirichlet - // boundary values on the velocity, - // we will use the - // VectorTools::interpolate_boundary_values - // function as usual which requires - // us to write a function object with - // as many components as the finite - // element has. In other words, we - // have to define the function on the - // $(u,p)$-space, but we are going to - // filter out the pressure component - // when interpolating the boundary - // values. - - // The following function object is a - // representation of the boundary - // values described in the - // introduction: + // @sect3{Boundary values and right hand side} + + // As in step-20 and most other + // example programs, the next task is + // to define the data for the PDE: + // For the Stokes problem, we are + // going to use natural boundary + // values on parts of the boundary + // (i.e. homogenous Neumann-type) for + // which we won't have to do anything + // special (the homogeneity implies + // that the corresponding terms in + // the weak form are simply zero), + // and boundary conditions on the + // velocity (Dirichlet-type) on the + // rest of the boundary, as described + // in the introduction. + // + // In order to enforce the Dirichlet + // boundary values on the velocity, + // we will use the + // VectorTools::interpolate_boundary_values + // function as usual which requires + // us to write a function object with + // as many components as the finite + // element has. In other words, we + // have to define the function on the + // $(u,p)$-space, but we are going to + // filter out the pressure component + // when interpolating the boundary + // values. + + // The following function object is a + // representation of the boundary + // values described in the + // introduction: template class BoundaryValues : public Function { - public: - BoundaryValues () : Function(dim+1) {} + public: + BoundaryValues () : Function(dim+1) {} - virtual double value (const Point &p, - const unsigned int component = 0) const; + virtual double value (const Point &p, + const unsigned int component = 0) const; - virtual void vector_value (const Point &p, - Vector &value) const; + virtual void vector_value (const Point &p, + Vector &value) const; }; @@ -256,20 +256,20 @@ namespace Step22 - // We implement similar functions for - // the right hand side which for the - // current example is simply zero: + // We implement similar functions for + // the right hand side which for the + // current example is simply zero: template class RightHandSide : public Function { - public: - RightHandSide () : Function(dim+1) {} + public: + RightHandSide () : Function(dim+1) {} - virtual double value (const Point &p, - const unsigned int component = 0) const; + virtual double value (const Point &p, + const unsigned int component = 0) const; - virtual void vector_value (const Point &p, - Vector &value) const; + virtual void vector_value (const Point &p, + Vector &value) const; }; @@ -293,82 +293,82 @@ namespace Step22 } - // @sect3{Linear solvers and preconditioners} - - // The linear solvers and preconditioners are - // discussed extensively in the - // introduction. Here, we create the - // respective objects that will be used. - - // @sect4{The InverseMatrix class template} - - // The InverseMatrix - // class represents the data - // structure for an inverse - // matrix. It is derived from the one - // in step-20. The only difference is - // that we now do include a - // preconditioner to the matrix since - // we will apply this class to - // different kinds of matrices that - // will require different - // preconditioners (in step-20 we did - // not use a preconditioner in this - // class at all). The types of matrix - // and preconditioner are passed to - // this class via template - // parameters, and matrix and - // preconditioner objects of these - // types will then be passed to the - // constructor when an - // InverseMatrix object - // is created. The member function - // vmult is, as in - // step-20, a multiplication with a - // vector, obtained by solving a - // linear system: + // @sect3{Linear solvers and preconditioners} + + // The linear solvers and preconditioners are + // discussed extensively in the + // introduction. Here, we create the + // respective objects that will be used. + + // @sect4{The InverseMatrix class template} + + // The InverseMatrix + // class represents the data + // structure for an inverse + // matrix. It is derived from the one + // in step-20. The only difference is + // that we now do include a + // preconditioner to the matrix since + // we will apply this class to + // different kinds of matrices that + // will require different + // preconditioners (in step-20 we did + // not use a preconditioner in this + // class at all). The types of matrix + // and preconditioner are passed to + // this class via template + // parameters, and matrix and + // preconditioner objects of these + // types will then be passed to the + // constructor when an + // InverseMatrix object + // is created. The member function + // vmult is, as in + // step-20, a multiplication with a + // vector, obtained by solving a + // linear system: template class InverseMatrix : public Subscriptor { - public: - InverseMatrix (const Matrix &m, - const Preconditioner &preconditioner); + public: + InverseMatrix (const Matrix &m, + const Preconditioner &preconditioner); - void vmult (Vector &dst, - const Vector &src) const; + void vmult (Vector &dst, + const Vector &src) const; - private: - const SmartPointer matrix; - const SmartPointer preconditioner; + private: + const SmartPointer matrix; + const SmartPointer preconditioner; }; template InverseMatrix::InverseMatrix (const Matrix &m, const Preconditioner &preconditioner) - : - matrix (&m), - preconditioner (&preconditioner) + : + matrix (&m), + preconditioner (&preconditioner) {} - // This is the implementation of the - // vmult function. - - // In this class we use a rather large - // tolerance for the solver control. The - // reason for this is that the function is - // used very frequently, and hence, any - // additional effort to make the residual - // in the CG solve smaller makes the - // solution more expensive. Note that we do - // not only use this class as a - // preconditioner for the Schur complement, - // but also when forming the inverse of the - // Laplace matrix – which is hence - // directly responsible for the accuracy of - // the solution itself, so we can't choose - // a too large tolerance, either. + // This is the implementation of the + // vmult function. + + // In this class we use a rather large + // tolerance for the solver control. The + // reason for this is that the function is + // used very frequently, and hence, any + // additional effort to make the residual + // in the CG solve smaller makes the + // solution more expensive. Note that we do + // not only use this class as a + // preconditioner for the Schur complement, + // but also when forming the inverse of the + // Laplace matrix – which is hence + // directly responsible for the accuracy of + // the solution itself, so we can't choose + // a too large tolerance, either. template void InverseMatrix::vmult (Vector &dst, const Vector &src) const @@ -382,36 +382,36 @@ namespace Step22 } - // @sect4{The SchurComplement class template} - - // This class implements the Schur complement - // discussed in the introduction. It is in - // analogy to step-20. Though, we now call - // it with a template parameter - // Preconditioner in order to - // access that when specifying the respective - // type of the inverse matrix class. As a - // consequence of the definition above, the - // declaration InverseMatrix now - // contains the second template parameter - // for a preconditioner class as above, which - // affects the SmartPointer - // object m_inverse as well. + // @sect4{The SchurComplement class template} + + // This class implements the Schur complement + // discussed in the introduction. It is in + // analogy to step-20. Though, we now call + // it with a template parameter + // Preconditioner in order to + // access that when specifying the respective + // type of the inverse matrix class. As a + // consequence of the definition above, the + // declaration InverseMatrix now + // contains the second template parameter + // for a preconditioner class as above, which + // affects the SmartPointer + // object m_inverse as well. template class SchurComplement : public Subscriptor { - public: - SchurComplement (const BlockSparseMatrix &system_matrix, - const InverseMatrix, Preconditioner> &A_inverse); + public: + SchurComplement (const BlockSparseMatrix &system_matrix, + const InverseMatrix, Preconditioner> &A_inverse); - void vmult (Vector &dst, - const Vector &src) const; + void vmult (Vector &dst, + const Vector &src) const; - private: - const SmartPointer > system_matrix; - const SmartPointer, Preconditioner> > A_inverse; + private: + const SmartPointer > system_matrix; + const SmartPointer, Preconditioner> > A_inverse; - mutable Vector tmp1, tmp2; + mutable Vector tmp1, tmp2; }; @@ -420,11 +420,11 @@ namespace Step22 SchurComplement:: SchurComplement (const BlockSparseMatrix &system_matrix, const InverseMatrix,Preconditioner> &A_inverse) - : - system_matrix (&system_matrix), - A_inverse (&A_inverse), - tmp1 (system_matrix.block(0,0).m()), - tmp2 (system_matrix.block(0,0).m()) + : + system_matrix (&system_matrix), + A_inverse (&A_inverse), + tmp1 (system_matrix.block(0,0).m()), + tmp2 (system_matrix.block(0,0).m()) {} @@ -438,138 +438,138 @@ namespace Step22 } - // @sect3{StokesProblem class implementation} - - // @sect4{StokesProblem::StokesProblem} - - // The constructor of this class - // looks very similar to the one of - // step-20. The constructor - // initializes the variables for the - // polynomial degree, triangulation, - // finite element system and the dof - // handler. The underlying polynomial - // functions are of order - // degree+1 for the - // vector-valued velocity components - // and of order degree - // for the pressure. This gives the - // LBB-stable element pair - // $Q_{degree+1}^d\times Q_{degree}$, - // often referred to as the - // Taylor-Hood element. - // - // Note that we initialize the triangulation - // with a MeshSmoothing argument, which - // ensures that the refinement of cells is - // done in a way that the approximation of - // the PDE solution remains well-behaved - // (problems arise if grids are too - // unstructered), see the documentation of - // Triangulation::MeshSmoothing - // for details. + // @sect3{StokesProblem class implementation} + + // @sect4{StokesProblem::StokesProblem} + + // The constructor of this class + // looks very similar to the one of + // step-20. The constructor + // initializes the variables for the + // polynomial degree, triangulation, + // finite element system and the dof + // handler. The underlying polynomial + // functions are of order + // degree+1 for the + // vector-valued velocity components + // and of order degree + // for the pressure. This gives the + // LBB-stable element pair + // $Q_{degree+1}^d\times Q_{degree}$, + // often referred to as the + // Taylor-Hood element. + // + // Note that we initialize the triangulation + // with a MeshSmoothing argument, which + // ensures that the refinement of cells is + // done in a way that the approximation of + // the PDE solution remains well-behaved + // (problems arise if grids are too + // unstructered), see the documentation of + // Triangulation::MeshSmoothing + // for details. template StokesProblem::StokesProblem (const unsigned int degree) - : - degree (degree), - triangulation (Triangulation::maximum_smoothing), - fe (FE_Q(degree+1), dim, - FE_Q(degree), 1), - dof_handler (triangulation), - timer (std::cout, TimerOutput::summary, TimerOutput::cpu_times) + : + degree (degree), + triangulation (Triangulation::maximum_smoothing), + fe (FE_Q(degree+1), dim, + FE_Q(degree), 1), + dof_handler (triangulation), + timer (std::cout, TimerOutput::summary, TimerOutput::cpu_times) {} - // @sect4{StokesProblem::setup_dofs} - - // Given a mesh, this function - // associates the degrees of freedom - // with it and creates the - // corresponding matrices and - // vectors. At the beginning it also - // releases the pointer to the - // preconditioner object (if the - // shared pointer pointed at anything - // at all at this point) since it - // will definitely not be needed any - // more after this point and will - // have to be re-computed after - // assembling the matrix, and unties - // the sparse matrix from its - // sparsity pattern object. - // - // We then proceed with distributing - // degrees of freedom and renumbering - // them: In order to make the ILU - // preconditioner (in 3D) work - // efficiently, it is important to - // enumerate the degrees of freedom - // in such a way that it reduces the - // bandwidth of the matrix, or maybe - // more importantly: in such a way - // that the ILU is as close as - // possible to a real LU - // decomposition. On the other hand, - // we need to preserve the block - // structure of velocity and pressure - // already seen in in step-20 and - // step-21. This is done in two - // steps: First, all dofs are - // renumbered to improve the ILU and - // then we renumber once again by - // components. Since - // DoFRenumbering::component_wise - // does not touch the renumbering - // within the individual blocks, the - // basic renumbering from the first - // step remains. As for how the - // renumber degrees of freedom to - // improve the ILU: deal.II has a - // number of algorithms that attempt - // to find orderings to improve ILUs, - // or reduce the bandwidth of - // matrices, or optimize some other - // aspect. The DoFRenumbering - // namespace shows a comparison of - // the results we obtain with several - // of these algorithms based on the - // testcase discussed here in this - // tutorial program. Here, we will - // use the traditional Cuthill-McKee - // algorithm already used in some of - // the previous tutorial programs. - // In the - // section on improved ILU - // we're going to discuss this issue - // in more detail. - - // There is one more change compared - // to previous tutorial programs: - // There is no reason in sorting the - // dim velocity - // components individually. In fact, - // rather than first enumerating all - // $x$-velocities, then all - // $y$-velocities, etc, we would like - // to keep all velocities at the same - // location together and only - // separate between velocities (all - // components) and pressures. By - // default, this is not what the - // DoFRenumbering::component_wise - // function does: it treats each - // vector component separately; what - // we have to do is group several - // components into "blocks" and pass - // this block structure to that - // function. Consequently, we - // allocate a vector - // block_component with - // as many elements as there are - // components and describe all - // velocity components to correspond - // to block 0, while the pressure - // component will form block 1: + // @sect4{StokesProblem::setup_dofs} + + // Given a mesh, this function + // associates the degrees of freedom + // with it and creates the + // corresponding matrices and + // vectors. At the beginning it also + // releases the pointer to the + // preconditioner object (if the + // shared pointer pointed at anything + // at all at this point) since it + // will definitely not be needed any + // more after this point and will + // have to be re-computed after + // assembling the matrix, and unties + // the sparse matrix from its + // sparsity pattern object. + // + // We then proceed with distributing + // degrees of freedom and renumbering + // them: In order to make the ILU + // preconditioner (in 3D) work + // efficiently, it is important to + // enumerate the degrees of freedom + // in such a way that it reduces the + // bandwidth of the matrix, or maybe + // more importantly: in such a way + // that the ILU is as close as + // possible to a real LU + // decomposition. On the other hand, + // we need to preserve the block + // structure of velocity and pressure + // already seen in in step-20 and + // step-21. This is done in two + // steps: First, all dofs are + // renumbered to improve the ILU and + // then we renumber once again by + // components. Since + // DoFRenumbering::component_wise + // does not touch the renumbering + // within the individual blocks, the + // basic renumbering from the first + // step remains. As for how the + // renumber degrees of freedom to + // improve the ILU: deal.II has a + // number of algorithms that attempt + // to find orderings to improve ILUs, + // or reduce the bandwidth of + // matrices, or optimize some other + // aspect. The DoFRenumbering + // namespace shows a comparison of + // the results we obtain with several + // of these algorithms based on the + // testcase discussed here in this + // tutorial program. Here, we will + // use the traditional Cuthill-McKee + // algorithm already used in some of + // the previous tutorial programs. + // In the + // section on improved ILU + // we're going to discuss this issue + // in more detail. + + // There is one more change compared + // to previous tutorial programs: + // There is no reason in sorting the + // dim velocity + // components individually. In fact, + // rather than first enumerating all + // $x$-velocities, then all + // $y$-velocities, etc, we would like + // to keep all velocities at the same + // location together and only + // separate between velocities (all + // components) and pressures. By + // default, this is not what the + // DoFRenumbering::component_wise + // function does: it treats each + // vector component separately; what + // we have to do is group several + // components into "blocks" and pass + // this block structure to that + // function. Consequently, we + // allocate a vector + // block_component with + // as many elements as there are + // components and describe all + // velocity components to correspond + // to block 0, while the pressure + // component will form block 1: template void StokesProblem::setup_dofs () { @@ -583,44 +583,44 @@ namespace Step22 block_component[dim] = 1; DoFRenumbering::component_wise (dof_handler, block_component); - // Now comes the implementation of - // Dirichlet boundary conditions, which - // should be evident after the discussion - // in the introduction. All that changed is - // that the function already appears in the - // setup functions, whereas we were used to - // see it in some assembly routine. Further - // down below where we set up the mesh, we - // will associate the top boundary where we - // impose Dirichlet boundary conditions - // with boundary indicator 1. We will have - // to pass this boundary indicator as - // second argument to the function below - // interpolating boundary values. There is - // one more thing, though. The function - // describing the Dirichlet conditions was - // defined for all components, both - // velocity and pressure. However, the - // Dirichlet conditions are to be set for - // the velocity only. To this end, we use - // a component_mask that - // filters out the pressure component, so - // that the condensation is performed on - // velocity degrees of freedom only. Since - // we use adaptively refined grids the - // constraint matrix needs to be first - // filled with hanging node constraints - // generated from the DoF handler. Note the - // order of the two functions — we - // first compute the hanging node - // constraints, and then insert the - // boundary values into the constraint - // matrix. This makes sure that we respect - // H1 conformity on boundaries - // with hanging nodes (in three space - // dimensions), where the hanging node - // needs to dominate the Dirichlet boundary - // values. + // Now comes the implementation of + // Dirichlet boundary conditions, which + // should be evident after the discussion + // in the introduction. All that changed is + // that the function already appears in the + // setup functions, whereas we were used to + // see it in some assembly routine. Further + // down below where we set up the mesh, we + // will associate the top boundary where we + // impose Dirichlet boundary conditions + // with boundary indicator 1. We will have + // to pass this boundary indicator as + // second argument to the function below + // interpolating boundary values. There is + // one more thing, though. The function + // describing the Dirichlet conditions was + // defined for all components, both + // velocity and pressure. However, the + // Dirichlet conditions are to be set for + // the velocity only. To this end, we use + // a component_mask that + // filters out the pressure component, so + // that the condensation is performed on + // velocity degrees of freedom only. Since + // we use adaptively refined grids the + // constraint matrix needs to be first + // filled with hanging node constraints + // generated from the DoF handler. Note the + // order of the two functions — we + // first compute the hanging node + // constraints, and then insert the + // boundary values into the constraint + // matrix. This makes sure that we respect + // H1 conformity on boundaries + // with hanging nodes (in three space + // dimensions), where the hanging node + // needs to dominate the Dirichlet boundary + // values. { constraints.clear (); std::vector component_mask (dim+1, true); @@ -636,17 +636,17 @@ namespace Step22 constraints.close (); - // In analogy to step-20, we count the dofs - // in the individual components. We could - // do this in the same way as there, but we - // want to operate on the block structure - // we used already for the renumbering: The - // function - // DoFTools::count_dofs_per_block - // does the same as - // DoFTools::count_dofs_per_component, - // but now grouped as velocity and pressure - // block via block_component. + // In analogy to step-20, we count the dofs + // in the individual components. We could + // do this in the same way as there, but we + // want to operate on the block structure + // we used already for the renumbering: The + // function + // DoFTools::count_dofs_per_block + // does the same as + // DoFTools::count_dofs_per_component, + // but now grouped as velocity and pressure + // block via block_component. std::vector dofs_per_block (2); DoFTools::count_dofs_per_block (dof_handler, dofs_per_block, block_component); const unsigned int n_u = dofs_per_block[0], @@ -660,84 +660,84 @@ namespace Step22 << " (" << n_u << '+' << n_p << ')' << std::endl; - // The next task is to allocate a - // sparsity pattern for the system matrix - // we will create. We could do this in - // the same way as in step-20, - // i.e. directly build an object of type - // SparsityPattern through - // DoFTools::make_sparsity_pattern. However, - // there is a major reason not to do so: - // In 3D, the function - // DoFTools::max_couplings_between_dofs - // yields a conservative but rather large - // number for the coupling between the - // individual dofs, so that the memory - // initially provided for the creation of - // the sparsity pattern of the matrix is - // far too much -- so much actually that - // the initial sparsity pattern won't - // even fit into the physical memory of - // most systems already for - // moderately-sized 3D problems, see also - // the discussion in step-18. Instead, - // we first build a temporary object that - // uses a different data structure that - // doesn't require allocating more memory - // than necessary but isn't suitable for - // use as a basis of SparseMatrix or - // BlockSparseMatrix objects; in a second - // step we then copy this object into an - // object of BlockSparsityPattern. This - // is entirely analgous to what we - // already did in step-11 and step-18. - // - // There is one snag again here, though: - // it turns out that using the - // CompressedSparsityPattern (or the - // block version - // BlockCompressedSparsityPattern we - // would use here) has a bottleneck that - // makes the algorithm to build the - // sparsity pattern be quadratic in the - // number of degrees of freedom. This - // doesn't become noticeable until we get - // well into the range of several 100,000 - // degrees of freedom, but eventually - // dominates the setup of the linear - // system when we get to more than a - // million degrees of freedom. This is - // due to the data structures used in the - // CompressedSparsityPattern class, - // nothing that can easily be - // changed. Fortunately, there is an easy - // solution: the - // CompressedSimpleSparsityPattern class - // (and its block variant - // BlockCompressedSimpleSparsityPattern) - // has exactly the same interface, uses a - // different %internal data structure and - // is linear in the number of degrees of - // freedom and therefore much more - // efficient for large problems. As - // another alternative, we could also - // have chosen the class - // BlockCompressedSetSparsityPattern that - // uses yet another strategy for %internal - // memory management. Though, that class - // turns out to be more memory-demanding - // than - // BlockCompressedSimpleSparsityPattern - // for this example. - // - // Consequently, this is the class that - // we will use for our intermediate - // sparsity representation. All this is - // done inside a new scope, which means - // that the memory of csp - // will be released once the information - // has been copied to - // sparsity_pattern. + // The next task is to allocate a + // sparsity pattern for the system matrix + // we will create. We could do this in + // the same way as in step-20, + // i.e. directly build an object of type + // SparsityPattern through + // DoFTools::make_sparsity_pattern. However, + // there is a major reason not to do so: + // In 3D, the function + // DoFTools::max_couplings_between_dofs + // yields a conservative but rather large + // number for the coupling between the + // individual dofs, so that the memory + // initially provided for the creation of + // the sparsity pattern of the matrix is + // far too much -- so much actually that + // the initial sparsity pattern won't + // even fit into the physical memory of + // most systems already for + // moderately-sized 3D problems, see also + // the discussion in step-18. Instead, + // we first build a temporary object that + // uses a different data structure that + // doesn't require allocating more memory + // than necessary but isn't suitable for + // use as a basis of SparseMatrix or + // BlockSparseMatrix objects; in a second + // step we then copy this object into an + // object of BlockSparsityPattern. This + // is entirely analgous to what we + // already did in step-11 and step-18. + // + // There is one snag again here, though: + // it turns out that using the + // CompressedSparsityPattern (or the + // block version + // BlockCompressedSparsityPattern we + // would use here) has a bottleneck that + // makes the algorithm to build the + // sparsity pattern be quadratic in the + // number of degrees of freedom. This + // doesn't become noticeable until we get + // well into the range of several 100,000 + // degrees of freedom, but eventually + // dominates the setup of the linear + // system when we get to more than a + // million degrees of freedom. This is + // due to the data structures used in the + // CompressedSparsityPattern class, + // nothing that can easily be + // changed. Fortunately, there is an easy + // solution: the + // CompressedSimpleSparsityPattern class + // (and its block variant + // BlockCompressedSimpleSparsityPattern) + // has exactly the same interface, uses a + // different %internal data structure and + // is linear in the number of degrees of + // freedom and therefore much more + // efficient for large problems. As + // another alternative, we could also + // have chosen the class + // BlockCompressedSetSparsityPattern that + // uses yet another strategy for %internal + // memory management. Though, that class + // turns out to be more memory-demanding + // than + // BlockCompressedSimpleSparsityPattern + // for this example. + // + // Consequently, this is the class that + // we will use for our intermediate + // sparsity representation. All this is + // done inside a new scope, which means + // that the memory of csp + // will be released once the information + // has been copied to + // sparsity_pattern. { BlockCompressedSimpleSparsityPattern csp (2,2); @@ -752,10 +752,10 @@ namespace Step22 sparsity_pattern.copy_from (csp); } - // Finally, the system matrix, - // solution and right hand side are - // created from the block - // structure as in step-20: + // Finally, the system matrix, + // solution and right hand side are + // created from the block + // structure as in step-20: system_matrix.reinit (sparsity_pattern); solution.reinit (2); @@ -770,16 +770,16 @@ namespace Step22 } - // @sect4{StokesProblem::assemble_system} + // @sect4{StokesProblem::assemble_system} - // The assembly process follows the - // discussion in step-20 and in the - // introduction. We use the well-known - // abbreviations for the data structures - // that hold the local matrix, right - // hand side, and global - // numbering of the degrees of freedom - // for the present cell. + // The assembly process follows the + // discussion in step-20 and in the + // introduction. We use the well-known + // abbreviations for the data structures + // that hold the local matrix, right + // hand side, and global + // numbering of the degrees of freedom + // for the present cell. template void StokesProblem::assemble_system () { @@ -807,70 +807,70 @@ namespace Step22 std::vector > rhs_values (n_q_points, Vector(dim+1)); - // Next, we need two objects that work as - // extractors for the FEValues - // object. Their use is explained in detail - // in the report on @ref vector_valued : + // Next, we need two objects that work as + // extractors for the FEValues + // object. Their use is explained in detail + // in the report on @ref vector_valued : const FEValuesExtractors::Vector velocities (0); const FEValuesExtractors::Scalar pressure (dim); - // As an extension over step-20 and - // step-21, we include a few - // optimizations that make assembly - // much faster for this particular - // problem. The improvements are - // based on the observation that we - // do a few calculations too many - // times when we do as in step-20: - // The symmetric gradient actually - // has dofs_per_cell - // different values per quadrature - // point, but we extract it - // dofs_per_cell*dofs_per_cell - // times from the FEValues object - - // for both the loop over - // i and the inner - // loop over j. In 3d, - // that means evaluating it - // $89^2=7921$ instead of $89$ - // times, a not insignificant - // difference. - // - // So what we're - // going to do here is to avoid - // such repeated calculations by - // getting a vector of rank-2 - // tensors (and similarly for - // the divergence and the basis - // function value on pressure) - // at the quadrature point prior - // to starting the loop over the - // dofs on the cell. First, we - // create the respective objects - // that will hold these - // values. Then, we start the - // loop over all cells and the loop - // over the quadrature points, - // where we first extract these - // values. There is one more - // optimization we implement here: - // the local matrix (as well as - // the global one) is going to - // be symmetric, since all - // the operations involved are - // symmetric with respect to $i$ - // and $j$. This is implemented by - // simply running the inner loop - // not to dofs_per_cell, - // but only up to i, - // the index of the outer loop. + // As an extension over step-20 and + // step-21, we include a few + // optimizations that make assembly + // much faster for this particular + // problem. The improvements are + // based on the observation that we + // do a few calculations too many + // times when we do as in step-20: + // The symmetric gradient actually + // has dofs_per_cell + // different values per quadrature + // point, but we extract it + // dofs_per_cell*dofs_per_cell + // times from the FEValues object - + // for both the loop over + // i and the inner + // loop over j. In 3d, + // that means evaluating it + // $89^2=7921$ instead of $89$ + // times, a not insignificant + // difference. + // + // So what we're + // going to do here is to avoid + // such repeated calculations by + // getting a vector of rank-2 + // tensors (and similarly for + // the divergence and the basis + // function value on pressure) + // at the quadrature point prior + // to starting the loop over the + // dofs on the cell. First, we + // create the respective objects + // that will hold these + // values. Then, we start the + // loop over all cells and the loop + // over the quadrature points, + // where we first extract these + // values. There is one more + // optimization we implement here: + // the local matrix (as well as + // the global one) is going to + // be symmetric, since all + // the operations involved are + // symmetric with respect to $i$ + // and $j$. This is implemented by + // simply running the inner loop + // not to dofs_per_cell, + // but only up to i, + // the index of the outer loop. std::vector > symgrad_phi_u (dofs_per_cell); std::vector div_phi_u (dofs_per_cell); std::vector phi_p (dofs_per_cell); 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) { fe_values.reinit (cell); @@ -909,47 +909,47 @@ namespace Step22 } } - // Note that in the above computation - // of the local matrix contribution - // we added the term phi_p[i] * - // phi_p[j] , yielding a - // pressure mass matrix in the - // $(1,1)$ block of the matrix as - // discussed in the - // introduction. That this term only - // ends up in the $(1,1)$ block stems - // from the fact that both of the - // factors in phi_p[i] * - // phi_p[j] are only non-zero - // when all the other terms vanish - // (and the other way around). - // - // Note also that operator* is - // overloaded for symmetric - // tensors, yielding the scalar - // product between the two - // tensors in the first line of - // the local matrix - // contribution. - - // Before we can write the local data - // into the global matrix (and - // simultaneously use the - // ConstraintMatrix object to apply - // Dirichlet boundary conditions and - // eliminate hanging node - // constraints, as we discussed in - // the introduction), we have to be - // careful about one thing, - // though. We have only build up half - // of the local matrix because of - // symmetry, but we're going to save - // the full system matrix in order to - // use the standard functions for - // solution. This is done by flipping - // the indices in case we are - // pointing into the empty part of - // the local matrix. + // Note that in the above computation + // of the local matrix contribution + // we added the term phi_p[i] * + // phi_p[j] , yielding a + // pressure mass matrix in the + // $(1,1)$ block of the matrix as + // discussed in the + // introduction. That this term only + // ends up in the $(1,1)$ block stems + // from the fact that both of the + // factors in phi_p[i] * + // phi_p[j] are only non-zero + // when all the other terms vanish + // (and the other way around). + // + // Note also that operator* is + // overloaded for symmetric + // tensors, yielding the scalar + // product between the two + // tensors in the first line of + // the local matrix + // contribution. + + // Before we can write the local data + // into the global matrix (and + // simultaneously use the + // ConstraintMatrix object to apply + // Dirichlet boundary conditions and + // eliminate hanging node + // constraints, as we discussed in + // the introduction), we have to be + // careful about one thing, + // though. We have only build up half + // of the local matrix because of + // symmetry, but we're going to save + // the full system matrix in order to + // use the standard functions for + // solution. This is done by flipping + // the indices in case we are + // pointing into the empty part of + // the local matrix. for (unsigned int i=0; iblock(0,0) in the - // system matrix. As mentioned - // above, this depends on the - // spatial dimension. Since the two - // classes described by the - // InnerPreconditioner::type - // typedef have the same interface, - // we do not have to do anything - // different whether we want to use - // a sparse direct solver or an - // ILU: + // Before we're going to solve this + // linear system, we generate a + // preconditioner for the + // velocity-velocity matrix, i.e., + // block(0,0) in the + // system matrix. As mentioned + // above, this depends on the + // spatial dimension. Since the two + // classes described by the + // InnerPreconditioner::type + // typedef have the same interface, + // we do not have to do anything + // different whether we want to use + // a sparse direct solver or an + // ILU: std::cout << " Computing preconditioner..." << std::endl << std::flush; A_preconditioner @@ -986,37 +986,37 @@ namespace Step22 - // @sect4{StokesProblem::solve} + // @sect4{StokesProblem::solve} - // After the discussion in the introduction - // and the definition of the respective - // classes above, the implementation of the - // solve function is rather - // straigt-forward and done in a similar way - // as in step-20. To start with, we need an - // object of the InverseMatrix - // class that represents the inverse of the - // matrix A. As described in the - // introduction, the inverse is generated - // with the help of an inner preconditioner - // of type - // InnerPreconditioner::type. + // After the discussion in the introduction + // and the definition of the respective + // classes above, the implementation of the + // solve function is rather + // straigt-forward and done in a similar way + // as in step-20. To start with, we need an + // object of the InverseMatrix + // class that represents the inverse of the + // matrix A. As described in the + // introduction, the inverse is generated + // with the help of an inner preconditioner + // of type + // InnerPreconditioner::type. template void StokesProblem::solve () { const InverseMatrix, - typename InnerPreconditioner::type> - A_inverse (system_matrix.block(0,0), *A_preconditioner); + typename InnerPreconditioner::type> + A_inverse (system_matrix.block(0,0), *A_preconditioner); Vector tmp (solution.block(0).size()); - // This is as in step-20. We generate the - // right hand side $B A^{-1} F - G$ for the - // Schur complement and an object that - // represents the respective linear - // operation $B A^{-1} B^T$, now with a - // template parameter indicating the - // preconditioner - in accordance with the - // definition of the class. + // This is as in step-20. We generate the + // right hand side $B A^{-1} F - G$ for the + // Schur complement and an object that + // represents the respective linear + // operation $B A^{-1} B^T$, now with a + // template parameter indicating the + // preconditioner - in accordance with the + // definition of the class. { Vector schur_rhs (solution.block(1).size()); A_inverse.vmult (tmp, system_rhs.block(0)); @@ -1024,79 +1024,79 @@ namespace Step22 schur_rhs -= system_rhs.block(1); SchurComplement::type> - schur_complement (system_matrix, A_inverse); + schur_complement (system_matrix, A_inverse); - // The usual control structures for - // the solver call are created... + // The usual control structures for + // the solver call are created... SolverControl solver_control (solution.block(1).size(), 1e-6*schur_rhs.l2_norm()); SolverCG<> cg (solver_control); - // Now to the preconditioner to the - // Schur complement. As explained in - // the introduction, the - // preconditioning is done by a mass - // matrix in the pressure variable. It - // is stored in the $(1,1)$ block of - // the system matrix (that is not used - // anywhere else but in - // preconditioning). - // - // Actually, the solver needs to have - // the preconditioner in the form - // $P^{-1}$, so we need to create an - // inverse operation. Once again, we - // use an object of the class - // InverseMatrix, which - // implements the vmult - // operation that is needed by the - // solver. In this case, we have to - // invert the pressure mass matrix. As - // it already turned out in earlier - // tutorial programs, the inversion of - // a mass matrix is a rather cheap and - // straight-forward operation (compared - // to, e.g., a Laplace matrix). The CG - // method with ILU preconditioning - // converges in 5-10 steps, - // independently on the mesh size. - // This is precisely what we do here: - // We choose another ILU preconditioner - // and take it along to the - // InverseMatrix object via the - // corresponding template parameter. A - // CG solver is then called within the - // vmult operation of the inverse - // matrix. - // - // An alternative that is cheaper to - // build, but needs more iterations - // afterwards, would be to choose a - // SSOR preconditioner with factor - // 1.2. It needs about twice the number - // of iterations, but the costs for its - // generation are almost neglible. + // Now to the preconditioner to the + // Schur complement. As explained in + // the introduction, the + // preconditioning is done by a mass + // matrix in the pressure variable. It + // is stored in the $(1,1)$ block of + // the system matrix (that is not used + // anywhere else but in + // preconditioning). + // + // Actually, the solver needs to have + // the preconditioner in the form + // $P^{-1}$, so we need to create an + // inverse operation. Once again, we + // use an object of the class + // InverseMatrix, which + // implements the vmult + // operation that is needed by the + // solver. In this case, we have to + // invert the pressure mass matrix. As + // it already turned out in earlier + // tutorial programs, the inversion of + // a mass matrix is a rather cheap and + // straight-forward operation (compared + // to, e.g., a Laplace matrix). The CG + // method with ILU preconditioning + // converges in 5-10 steps, + // independently on the mesh size. + // This is precisely what we do here: + // We choose another ILU preconditioner + // and take it along to the + // InverseMatrix object via the + // corresponding template parameter. A + // CG solver is then called within the + // vmult operation of the inverse + // matrix. + // + // An alternative that is cheaper to + // build, but needs more iterations + // afterwards, would be to choose a + // SSOR preconditioner with factor + // 1.2. It needs about twice the number + // of iterations, but the costs for its + // generation are almost neglible. SparseILU preconditioner; preconditioner.initialize (system_matrix.block(1,1), SparseILU::AdditionalData()); InverseMatrix,SparseILU > - m_inverse (system_matrix.block(1,1), preconditioner); - - // With the Schur complement and an - // efficient preconditioner at hand, we - // can solve the respective equation - // for the pressure (i.e. block 0 in - // the solution vector) in the usual - // way: + m_inverse (system_matrix.block(1,1), preconditioner); + + // With the Schur complement and an + // efficient preconditioner at hand, we + // can solve the respective equation + // for the pressure (i.e. block 0 in + // the solution vector) in the usual + // way: cg.solve (schur_complement, solution.block(1), schur_rhs, m_inverse); - // After this first solution step, the - // hanging node constraints have to be - // distributed to the solution in order - // to achieve a consistent pressure - // field. + // After this first solution step, the + // hanging node constraints have to be + // distributed to the solution in order + // to achieve a consistent pressure + // field. constraints.distribute (solution); std::cout << " " @@ -1105,17 +1105,17 @@ namespace Step22 << std::endl; } - // As in step-20, we finally need to - // solve for the velocity equation where - // we plug in the solution to the - // pressure equation. This involves only - // objects we already know - so we simply - // multiply $p$ by $B^T$, subtract the - // right hand side and multiply by the - // inverse of $A$. At the end, we need to - // distribute the constraints from - // hanging nodes in order to obtain a - // constistent flow field: + // As in step-20, we finally need to + // solve for the velocity equation where + // we plug in the solution to the + // pressure equation. This involves only + // objects we already know - so we simply + // multiply $p$ by $B^T$, subtract the + // right hand side and multiply by the + // inverse of $A$. At the end, we need to + // distribute the constraints from + // hanging nodes in order to obtain a + // constistent flow field: { system_matrix.block(0,1).vmult (tmp, solution.block(1)); tmp *= -1; @@ -1128,48 +1128,48 @@ namespace Step22 } - // @sect4{StokesProblem::output_results} - - // The next function generates graphical - // output. In this example, we are going to - // use the VTK file format. We attach - // names to the individual variables in the - // problem: velocity to the - // dim components of velocity - // and pressure to the - // pressure. - // - // Not all visualization programs have the - // ability to group individual vector - // components into a vector to provide - // vector plots; in particular, this holds - // for some VTK-based visualization - // programs. In this case, the logical - // grouping of components into vectors - // should already be described in the file - // containing the data. In other words, - // what we need to do is provide our output - // writers with a way to know which of the - // components of the finite element - // logically form a vector (with $d$ - // components in $d$ space dimensions) - // rather than letting them assume that we - // simply have a bunch of scalar fields. - // This is achieved using the members of - // the - // DataComponentInterpretation - // namespace: as with the filename, we - // create a vector in which the first - // dim components refer to the - // velocities and are given the tag - // DataComponentInterpretation::component_is_part_of_vector; - // we finally push one tag - // DataComponentInterpretation::component_is_scalar - // to describe the grouping of the pressure - // variable. - - // The rest of the function is then - // the same as in step-20. + // @sect4{StokesProblem::output_results} + + // The next function generates graphical + // output. In this example, we are going to + // use the VTK file format. We attach + // names to the individual variables in the + // problem: velocity to the + // dim components of velocity + // and pressure to the + // pressure. + // + // Not all visualization programs have the + // ability to group individual vector + // components into a vector to provide + // vector plots; in particular, this holds + // for some VTK-based visualization + // programs. In this case, the logical + // grouping of components into vectors + // should already be described in the file + // containing the data. In other words, + // what we need to do is provide our output + // writers with a way to know which of the + // components of the finite element + // logically form a vector (with $d$ + // components in $d$ space dimensions) + // rather than letting them assume that we + // simply have a bunch of scalar fields. + // This is achieved using the members of + // the + // DataComponentInterpretation + // namespace: as with the filename, we + // create a vector in which the first + // dim components refer to the + // velocities and are given the tag + // DataComponentInterpretation::component_is_part_of_vector; + // we finally push one tag + // DataComponentInterpretation::component_is_scalar + // to describe the grouping of the pressure + // variable. + + // The rest of the function is then + // the same as in step-20. template void StokesProblem::output_results (const unsigned int refinement_cycle) const @@ -1178,10 +1178,10 @@ namespace Step22 solution_names.push_back ("pressure"); std::vector - data_component_interpretation - (dim, DataComponentInterpretation::component_is_part_of_vector); data_component_interpretation - .push_back (DataComponentInterpretation::component_is_scalar); + (dim, DataComponentInterpretation::component_is_part_of_vector); + data_component_interpretation + .push_back (DataComponentInterpretation::component_is_scalar); DataOut data_out; data_out.attach_dof_handler (dof_handler); @@ -1200,20 +1200,20 @@ namespace Step22 } - // @sect4{StokesProblem::refine_mesh} - - // This is the last interesting function of - // the StokesProblem class. - // As indicated by its name, it takes the - // solution to the problem and refines the - // mesh where this is needed. The procedure - // is the same as in the respective step in - // step-6, with the exception that we base - // the refinement only on the change in - // pressure, i.e., we call the Kelly error - // estimator with a mask - // object. Additionally, we do not coarsen - // the grid again: + // @sect4{StokesProblem::refine_mesh} + + // This is the last interesting function of + // the StokesProblem class. + // As indicated by its name, it takes the + // solution to the problem and refines the + // mesh where this is needed. The procedure + // is the same as in the respective step in + // step-6, with the exception that we base + // the refinement only on the change in + // pressure, i.e., we call the Kelly error + // estimator with a mask + // object. Additionally, we do not coarsen + // the grid again: template void StokesProblem::refine_mesh () @@ -1236,27 +1236,27 @@ namespace Step22 } - // @sect4{StokesProblem::run} - - // The last step in the Stokes class is, as - // usual, the function that generates the - // initial grid and calls the other - // functions in the respective order. - // - // We start off with a rectangle of size $4 - // \times 1$ (in 2d) or $4 \times 1 \times - // 1$ (in 3d), placed in $R^2/R^3$ as - // $(-2,2)\times(-1,0)$ or - // $(-2,2)\times(0,1)\times(-1,0)$, - // respectively. It is natural to start - // with equal mesh size in each direction, - // so we subdivide the initial rectangle - // four times in the first coordinate - // direction. To limit the scope of the - // variables involved in the creation of - // the mesh to the range where we actually - // need them, we put the entire block - // between a pair of braces: + // @sect4{StokesProblem::run} + + // The last step in the Stokes class is, as + // usual, the function that generates the + // initial grid and calls the other + // functions in the respective order. + // + // We start off with a rectangle of size $4 + // \times 1$ (in 2d) or $4 \times 1 \times + // 1$ (in 3d), placed in $R^2/R^3$ as + // $(-2,2)\times(-1,0)$ or + // $(-2,2)\times(0,1)\times(-1,0)$, + // respectively. It is natural to start + // with equal mesh size in each direction, + // so we subdivide the initial rectangle + // four times in the first coordinate + // direction. To limit the scope of the + // variables involved in the creation of + // the mesh to the range where we actually + // need them, we put the entire block + // between a pair of braces: template void StokesProblem::run () { @@ -1277,61 +1277,61 @@ namespace Step22 top_right); } - // A boundary indicator of 1 is set to all - // boundaries that are subject to Dirichlet - // boundary conditions, i.e. to faces that - // are located at 0 in the last coordinate - // direction. See the example description - // above for details. + // A boundary indicator of 1 is set to all + // boundaries that are subject to Dirichlet + // boundary conditions, i.e. to faces that + // are located at 0 in the last coordinate + // direction. See the example description + // above for details. for (typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + cell = triangulation.begin_active(); cell != triangulation.end(); ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->face(f)->center()[dim-1] == 0) cell->face(f)->set_all_boundary_indicators(1); - // We then apply an initial refinement - // before solving for the first time. In - // 3D, there are going to be more degrees - // of freedom, so we refine less there: + // We then apply an initial refinement + // before solving for the first time. In + // 3D, there are going to be more degrees + // of freedom, so we refine less there: triangulation.refine_global (4-dim); - // As first seen in step-6, we cycle over - // the different refinement levels and - // refine (except for the first cycle), - // setup the degrees of freedom and - // matrices, assemble, solve and create - // output: + // As first seen in step-6, we cycle over + // the different refinement levels and + // refine (except for the first cycle), + // setup the degrees of freedom and + // matrices, assemble, solve and create + // output: for (unsigned int refinement_cycle = 0; refinement_cycle<6; ++refinement_cycle) { std::cout << "Refinement cycle " << refinement_cycle << std::endl; if (refinement_cycle > 0) - { - timer.enter_section("refine"); - refine_mesh (); - timer.exit_section("refine"); - } + { + timer.enter_section("refine"); + refine_mesh (); + timer.exit_section("refine"); + } - timer.enter_section("setup"); + timer.enter_section("setup"); setup_dofs (); - timer.exit_section("setup"); + timer.exit_section("setup"); std::cout << " Assembling..." << std::endl << std::flush; - timer.enter_section("assembly"); + timer.enter_section("assembly"); assemble_system (); - timer.exit_section("assembly"); + timer.exit_section("assembly"); std::cout << " Solving..." << std::flush; - timer.enter_section("solver"); + timer.enter_section("solver"); solve (); - timer.exit_section("solver"); + timer.exit_section("solver"); - timer.enter_section("results"); + timer.enter_section("results"); output_results (refinement_cycle); - timer.exit_section("results"); + timer.exit_section("results"); std::cout << std::endl; } @@ -1340,12 +1340,12 @@ namespace Step22 } - // @sect3{The main function} +// @sect3{The main function} - // The main function is the same as in - // step-20. We pass the element degree as a - // parameter and choose the space dimension - // at the well-known template slot. +// The main function is the same as in +// step-20. We pass the element degree as a +// parameter and choose the space dimension +// at the well-known template slot. int main () { try diff --git a/tests/benchmarks/tablehandler/table_handler.cc b/tests/benchmarks/tablehandler/table_handler.cc index 2505998a3c..0cc347de45 100644 --- a/tests/benchmarks/tablehandler/table_handler.cc +++ b/tests/benchmarks/tablehandler/table_handler.cc @@ -45,20 +45,20 @@ int main () unsigned int n_keys = 15; unsigned int n_rows = 40000; - for (unsigned int j=0;j #include #include @@ -57,178 +57,178 @@ #include #include - // Then we need to include the header file - // for the sparse direct solver UMFPACK: +// Then we need to include the header file +// for the sparse direct solver UMFPACK: #include #include - // This includes the library for the - // incomplete LU factorization that will - // be used as a preconditioner in 3D: +// This includes the library for the +// incomplete LU factorization that will +// be used as a preconditioner in 3D: #include - // This is C++: +// This is C++: #include #include - // As in all programs, the namespace dealii - // is included: +// As in all programs, the namespace dealii +// is included: namespace Step22 { using namespace dealii; - // @sect3{Defining the inner preconditioner type} - - // As explained in the introduction, we are - // going to use different preconditioners for - // two and three space dimensions, - // respectively. We distinguish between - // them by the use of the spatial dimension - // as a template parameter. See step-4 for - // details on templates. We are not going to - // create any preconditioner object here, all - // we do is to create class that holds a - // local typedef determining the - // preconditioner class so we can write our - // program in a dimension-independent way. + // @sect3{Defining the inner preconditioner type} + + // As explained in the introduction, we are + // going to use different preconditioners for + // two and three space dimensions, + // respectively. We distinguish between + // them by the use of the spatial dimension + // as a template parameter. See step-4 for + // details on templates. We are not going to + // create any preconditioner object here, all + // we do is to create class that holds a + // local typedef determining the + // preconditioner class so we can write our + // program in a dimension-independent way. template struct InnerPreconditioner; - // In 2D, we are going to use a sparse direct - // solver as preconditioner: + // In 2D, we are going to use a sparse direct + // solver as preconditioner: template <> struct InnerPreconditioner<2> { - typedef SparseILU type; + typedef SparseILU type; // typedef SparseDirectUMFPACK type; }; - // And the ILU preconditioning in 3D, called - // by SparseILU: + // And the ILU preconditioning in 3D, called + // by SparseILU: template <> struct InnerPreconditioner<3> { - typedef SparseILU type; + typedef SparseILU type; }; - // @sect3{The StokesProblem class template} - - // This is an adaptation of step-20, so the - // main class and the data types are the - // same as used there. In this example we - // also use adaptive grid refinement, which - // is handled in analogy to - // step-6. According to the discussion in - // the introduction, we are also going to - // use the ConstraintMatrix for - // implementing Dirichlet boundary - // conditions. Hence, we change the name - // hanging_node_constraints - // into constraints. + // @sect3{The StokesProblem class template} + + // This is an adaptation of step-20, so the + // main class and the data types are the + // same as used there. In this example we + // also use adaptive grid refinement, which + // is handled in analogy to + // step-6. According to the discussion in + // the introduction, we are also going to + // use the ConstraintMatrix for + // implementing Dirichlet boundary + // conditions. Hence, we change the name + // hanging_node_constraints + // into constraints. template class StokesProblem { - public: - StokesProblem (const unsigned int degree); - void run (); - - private: - void setup_dofs (); - void assemble_system (); - void solve (); - void output_results (const unsigned int refinement_cycle) const; - void refine_mesh (); - - const unsigned int degree; - - Triangulation triangulation; - FESystem fe; - DoFHandler dof_handler; - - ConstraintMatrix constraints; - - BlockSparsityPattern sparsity_pattern; - BlockSparseMatrix system_matrix; - - BlockVector solution; - BlockVector system_rhs; - - // This one is new: We shall use a - // so-called shared pointer structure to - // access the preconditioner. Shared - // pointers are essentially just a - // convenient form of pointers. Several - // shared pointers can point to the same - // object (just like regular pointers), - // but when the last shared pointer - // object to point to a preconditioner - // object is deleted (for example if a - // shared pointer object goes out of - // scope, if the class of which it is a - // member is destroyed, or if the pointer - // is assigned a different preconditioner - // object) then the preconditioner object - // pointed to is also destroyed. This - // ensures that we don't have to manually - // track in how many places a - // preconditioner object is still - // referenced, it can never create a - // memory leak, and can never produce a - // dangling pointer to an already - // destroyed object: - std_cxx1x::shared_ptr::type> A_preconditioner; - - TimerOutput timer; + public: + StokesProblem (const unsigned int degree); + void run (); + + private: + void setup_dofs (); + void assemble_system (); + void solve (); + void output_results (const unsigned int refinement_cycle) const; + void refine_mesh (); + + const unsigned int degree; + + Triangulation triangulation; + FESystem fe; + DoFHandler dof_handler; + + ConstraintMatrix constraints; + + BlockSparsityPattern sparsity_pattern; + BlockSparseMatrix system_matrix; + + BlockVector solution; + BlockVector system_rhs; + + // This one is new: We shall use a + // so-called shared pointer structure to + // access the preconditioner. Shared + // pointers are essentially just a + // convenient form of pointers. Several + // shared pointers can point to the same + // object (just like regular pointers), + // but when the last shared pointer + // object to point to a preconditioner + // object is deleted (for example if a + // shared pointer object goes out of + // scope, if the class of which it is a + // member is destroyed, or if the pointer + // is assigned a different preconditioner + // object) then the preconditioner object + // pointed to is also destroyed. This + // ensures that we don't have to manually + // track in how many places a + // preconditioner object is still + // referenced, it can never create a + // memory leak, and can never produce a + // dangling pointer to an already + // destroyed object: + std_cxx1x::shared_ptr::type> A_preconditioner; + + TimerOutput timer; }; - // @sect3{Boundary values and right hand side} - - // As in step-20 and most other - // example programs, the next task is - // to define the data for the PDE: - // For the Stokes problem, we are - // going to use natural boundary - // values on parts of the boundary - // (i.e. homogenous Neumann-type) for - // which we won't have to do anything - // special (the homogeneity implies - // that the corresponding terms in - // the weak form are simply zero), - // and boundary conditions on the - // velocity (Dirichlet-type) on the - // rest of the boundary, as described - // in the introduction. - // - // In order to enforce the Dirichlet - // boundary values on the velocity, - // we will use the - // VectorTools::interpolate_boundary_values - // function as usual which requires - // us to write a function object with - // as many components as the finite - // element has. In other words, we - // have to define the function on the - // $(u,p)$-space, but we are going to - // filter out the pressure component - // when interpolating the boundary - // values. - - // The following function object is a - // representation of the boundary - // values described in the - // introduction: + // @sect3{Boundary values and right hand side} + + // As in step-20 and most other + // example programs, the next task is + // to define the data for the PDE: + // For the Stokes problem, we are + // going to use natural boundary + // values on parts of the boundary + // (i.e. homogenous Neumann-type) for + // which we won't have to do anything + // special (the homogeneity implies + // that the corresponding terms in + // the weak form are simply zero), + // and boundary conditions on the + // velocity (Dirichlet-type) on the + // rest of the boundary, as described + // in the introduction. + // + // In order to enforce the Dirichlet + // boundary values on the velocity, + // we will use the + // VectorTools::interpolate_boundary_values + // function as usual which requires + // us to write a function object with + // as many components as the finite + // element has. In other words, we + // have to define the function on the + // $(u,p)$-space, but we are going to + // filter out the pressure component + // when interpolating the boundary + // values. + + // The following function object is a + // representation of the boundary + // values described in the + // introduction: template class BoundaryValues : public Function { - public: - BoundaryValues () : Function(dim+1) {} + public: + BoundaryValues () : Function(dim+1) {} - virtual double value (const Point &p, - const unsigned int component = 0) const; + virtual double value (const Point &p, + const unsigned int component = 0) const; - virtual void vector_value (const Point &p, - Vector &value) const; + virtual void vector_value (const Point &p, + Vector &value) const; }; @@ -257,20 +257,20 @@ namespace Step22 - // We implement similar functions for - // the right hand side which for the - // current example is simply zero: + // We implement similar functions for + // the right hand side which for the + // current example is simply zero: template class RightHandSide : public Function { - public: - RightHandSide () : Function(dim+1) {} + public: + RightHandSide () : Function(dim+1) {} - virtual double value (const Point &p, - const unsigned int component = 0) const; + virtual double value (const Point &p, + const unsigned int component = 0) const; - virtual void vector_value (const Point &p, - Vector &value) const; + virtual void vector_value (const Point &p, + Vector &value) const; }; @@ -294,82 +294,82 @@ namespace Step22 } - // @sect3{Linear solvers and preconditioners} - - // The linear solvers and preconditioners are - // discussed extensively in the - // introduction. Here, we create the - // respective objects that will be used. - - // @sect4{The InverseMatrix class template} - - // The InverseMatrix - // class represents the data - // structure for an inverse - // matrix. It is derived from the one - // in step-20. The only difference is - // that we now do include a - // preconditioner to the matrix since - // we will apply this class to - // different kinds of matrices that - // will require different - // preconditioners (in step-20 we did - // not use a preconditioner in this - // class at all). The types of matrix - // and preconditioner are passed to - // this class via template - // parameters, and matrix and - // preconditioner objects of these - // types will then be passed to the - // constructor when an - // InverseMatrix object - // is created. The member function - // vmult is, as in - // step-20, a multiplication with a - // vector, obtained by solving a - // linear system: + // @sect3{Linear solvers and preconditioners} + + // The linear solvers and preconditioners are + // discussed extensively in the + // introduction. Here, we create the + // respective objects that will be used. + + // @sect4{The InverseMatrix class template} + + // The InverseMatrix + // class represents the data + // structure for an inverse + // matrix. It is derived from the one + // in step-20. The only difference is + // that we now do include a + // preconditioner to the matrix since + // we will apply this class to + // different kinds of matrices that + // will require different + // preconditioners (in step-20 we did + // not use a preconditioner in this + // class at all). The types of matrix + // and preconditioner are passed to + // this class via template + // parameters, and matrix and + // preconditioner objects of these + // types will then be passed to the + // constructor when an + // InverseMatrix object + // is created. The member function + // vmult is, as in + // step-20, a multiplication with a + // vector, obtained by solving a + // linear system: template class InverseMatrix : public Subscriptor { - public: - InverseMatrix (const Matrix &m, - const Preconditioner &preconditioner); + public: + InverseMatrix (const Matrix &m, + const Preconditioner &preconditioner); - void vmult (Vector &dst, - const Vector &src) const; + void vmult (Vector &dst, + const Vector &src) const; - private: - const SmartPointer matrix; - const SmartPointer preconditioner; + private: + const SmartPointer matrix; + const SmartPointer preconditioner; }; template InverseMatrix::InverseMatrix (const Matrix &m, const Preconditioner &preconditioner) - : - matrix (&m), - preconditioner (&preconditioner) + : + matrix (&m), + preconditioner (&preconditioner) {} - // This is the implementation of the - // vmult function. - - // In this class we use a rather large - // tolerance for the solver control. The - // reason for this is that the function is - // used very frequently, and hence, any - // additional effort to make the residual - // in the CG solve smaller makes the - // solution more expensive. Note that we do - // not only use this class as a - // preconditioner for the Schur complement, - // but also when forming the inverse of the - // Laplace matrix – which is hence - // directly responsible for the accuracy of - // the solution itself, so we can't choose - // a too large tolerance, either. + // This is the implementation of the + // vmult function. + + // In this class we use a rather large + // tolerance for the solver control. The + // reason for this is that the function is + // used very frequently, and hence, any + // additional effort to make the residual + // in the CG solve smaller makes the + // solution more expensive. Note that we do + // not only use this class as a + // preconditioner for the Schur complement, + // but also when forming the inverse of the + // Laplace matrix – which is hence + // directly responsible for the accuracy of + // the solution itself, so we can't choose + // a too large tolerance, either. template void InverseMatrix::vmult (Vector &dst, const Vector &src) const @@ -383,36 +383,36 @@ namespace Step22 } - // @sect4{The SchurComplement class template} - - // This class implements the Schur complement - // discussed in the introduction. It is in - // analogy to step-20. Though, we now call - // it with a template parameter - // Preconditioner in order to - // access that when specifying the respective - // type of the inverse matrix class. As a - // consequence of the definition above, the - // declaration InverseMatrix now - // contains the second template parameter - // for a preconditioner class as above, which - // affects the SmartPointer - // object m_inverse as well. + // @sect4{The SchurComplement class template} + + // This class implements the Schur complement + // discussed in the introduction. It is in + // analogy to step-20. Though, we now call + // it with a template parameter + // Preconditioner in order to + // access that when specifying the respective + // type of the inverse matrix class. As a + // consequence of the definition above, the + // declaration InverseMatrix now + // contains the second template parameter + // for a preconditioner class as above, which + // affects the SmartPointer + // object m_inverse as well. template class SchurComplement : public Subscriptor { - public: - SchurComplement (const BlockSparseMatrix &system_matrix, - const InverseMatrix, Preconditioner> &A_inverse); + public: + SchurComplement (const BlockSparseMatrix &system_matrix, + const InverseMatrix, Preconditioner> &A_inverse); - void vmult (Vector &dst, - const Vector &src) const; + void vmult (Vector &dst, + const Vector &src) const; - private: - const SmartPointer > system_matrix; - const SmartPointer, Preconditioner> > A_inverse; + private: + const SmartPointer > system_matrix; + const SmartPointer, Preconditioner> > A_inverse; - mutable Vector tmp1, tmp2; + mutable Vector tmp1, tmp2; }; @@ -421,11 +421,11 @@ namespace Step22 SchurComplement:: SchurComplement (const BlockSparseMatrix &system_matrix, const InverseMatrix,Preconditioner> &A_inverse) - : - system_matrix (&system_matrix), - A_inverse (&A_inverse), - tmp1 (system_matrix.block(0,0).m()), - tmp2 (system_matrix.block(0,0).m()) + : + system_matrix (&system_matrix), + A_inverse (&A_inverse), + tmp1 (system_matrix.block(0,0).m()), + tmp2 (system_matrix.block(0,0).m()) {} @@ -439,138 +439,138 @@ namespace Step22 } - // @sect3{StokesProblem class implementation} - - // @sect4{StokesProblem::StokesProblem} - - // The constructor of this class - // looks very similar to the one of - // step-20. The constructor - // initializes the variables for the - // polynomial degree, triangulation, - // finite element system and the dof - // handler. The underlying polynomial - // functions are of order - // degree+1 for the - // vector-valued velocity components - // and of order degree - // for the pressure. This gives the - // LBB-stable element pair - // $Q_{degree+1}^d\times Q_{degree}$, - // often referred to as the - // Taylor-Hood element. - // - // Note that we initialize the triangulation - // with a MeshSmoothing argument, which - // ensures that the refinement of cells is - // done in a way that the approximation of - // the PDE solution remains well-behaved - // (problems arise if grids are too - // unstructered), see the documentation of - // Triangulation::MeshSmoothing - // for details. + // @sect3{StokesProblem class implementation} + + // @sect4{StokesProblem::StokesProblem} + + // The constructor of this class + // looks very similar to the one of + // step-20. The constructor + // initializes the variables for the + // polynomial degree, triangulation, + // finite element system and the dof + // handler. The underlying polynomial + // functions are of order + // degree+1 for the + // vector-valued velocity components + // and of order degree + // for the pressure. This gives the + // LBB-stable element pair + // $Q_{degree+1}^d\times Q_{degree}$, + // often referred to as the + // Taylor-Hood element. + // + // Note that we initialize the triangulation + // with a MeshSmoothing argument, which + // ensures that the refinement of cells is + // done in a way that the approximation of + // the PDE solution remains well-behaved + // (problems arise if grids are too + // unstructered), see the documentation of + // Triangulation::MeshSmoothing + // for details. template StokesProblem::StokesProblem (const unsigned int degree) - : - degree (degree), - triangulation (Triangulation::maximum_smoothing), - fe (FE_Q(degree+1), dim, - FE_Q(degree), 1), - dof_handler (triangulation), - timer (std::cout, TimerOutput::summary, TimerOutput::cpu_times) + : + degree (degree), + triangulation (Triangulation::maximum_smoothing), + fe (FE_Q(degree+1), dim, + FE_Q(degree), 1), + dof_handler (triangulation), + timer (std::cout, TimerOutput::summary, TimerOutput::cpu_times) {} - // @sect4{StokesProblem::setup_dofs} - - // Given a mesh, this function - // associates the degrees of freedom - // with it and creates the - // corresponding matrices and - // vectors. At the beginning it also - // releases the pointer to the - // preconditioner object (if the - // shared pointer pointed at anything - // at all at this point) since it - // will definitely not be needed any - // more after this point and will - // have to be re-computed after - // assembling the matrix, and unties - // the sparse matrix from its - // sparsity pattern object. - // - // We then proceed with distributing - // degrees of freedom and renumbering - // them: In order to make the ILU - // preconditioner (in 3D) work - // efficiently, it is important to - // enumerate the degrees of freedom - // in such a way that it reduces the - // bandwidth of the matrix, or maybe - // more importantly: in such a way - // that the ILU is as close as - // possible to a real LU - // decomposition. On the other hand, - // we need to preserve the block - // structure of velocity and pressure - // already seen in in step-20 and - // step-21. This is done in two - // steps: First, all dofs are - // renumbered to improve the ILU and - // then we renumber once again by - // components. Since - // DoFRenumbering::component_wise - // does not touch the renumbering - // within the individual blocks, the - // basic renumbering from the first - // step remains. As for how the - // renumber degrees of freedom to - // improve the ILU: deal.II has a - // number of algorithms that attempt - // to find orderings to improve ILUs, - // or reduce the bandwidth of - // matrices, or optimize some other - // aspect. The DoFRenumbering - // namespace shows a comparison of - // the results we obtain with several - // of these algorithms based on the - // testcase discussed here in this - // tutorial program. Here, we will - // use the traditional Cuthill-McKee - // algorithm already used in some of - // the previous tutorial programs. - // In the - // section on improved ILU - // we're going to discuss this issue - // in more detail. - - // There is one more change compared - // to previous tutorial programs: - // There is no reason in sorting the - // dim velocity - // components individually. In fact, - // rather than first enumerating all - // $x$-velocities, then all - // $y$-velocities, etc, we would like - // to keep all velocities at the same - // location together and only - // separate between velocities (all - // components) and pressures. By - // default, this is not what the - // DoFRenumbering::component_wise - // function does: it treats each - // vector component separately; what - // we have to do is group several - // components into "blocks" and pass - // this block structure to that - // function. Consequently, we - // allocate a vector - // block_component with - // as many elements as there are - // components and describe all - // velocity components to correspond - // to block 0, while the pressure - // component will form block 1: + // @sect4{StokesProblem::setup_dofs} + + // Given a mesh, this function + // associates the degrees of freedom + // with it and creates the + // corresponding matrices and + // vectors. At the beginning it also + // releases the pointer to the + // preconditioner object (if the + // shared pointer pointed at anything + // at all at this point) since it + // will definitely not be needed any + // more after this point and will + // have to be re-computed after + // assembling the matrix, and unties + // the sparse matrix from its + // sparsity pattern object. + // + // We then proceed with distributing + // degrees of freedom and renumbering + // them: In order to make the ILU + // preconditioner (in 3D) work + // efficiently, it is important to + // enumerate the degrees of freedom + // in such a way that it reduces the + // bandwidth of the matrix, or maybe + // more importantly: in such a way + // that the ILU is as close as + // possible to a real LU + // decomposition. On the other hand, + // we need to preserve the block + // structure of velocity and pressure + // already seen in in step-20 and + // step-21. This is done in two + // steps: First, all dofs are + // renumbered to improve the ILU and + // then we renumber once again by + // components. Since + // DoFRenumbering::component_wise + // does not touch the renumbering + // within the individual blocks, the + // basic renumbering from the first + // step remains. As for how the + // renumber degrees of freedom to + // improve the ILU: deal.II has a + // number of algorithms that attempt + // to find orderings to improve ILUs, + // or reduce the bandwidth of + // matrices, or optimize some other + // aspect. The DoFRenumbering + // namespace shows a comparison of + // the results we obtain with several + // of these algorithms based on the + // testcase discussed here in this + // tutorial program. Here, we will + // use the traditional Cuthill-McKee + // algorithm already used in some of + // the previous tutorial programs. + // In the + // section on improved ILU + // we're going to discuss this issue + // in more detail. + + // There is one more change compared + // to previous tutorial programs: + // There is no reason in sorting the + // dim velocity + // components individually. In fact, + // rather than first enumerating all + // $x$-velocities, then all + // $y$-velocities, etc, we would like + // to keep all velocities at the same + // location together and only + // separate between velocities (all + // components) and pressures. By + // default, this is not what the + // DoFRenumbering::component_wise + // function does: it treats each + // vector component separately; what + // we have to do is group several + // components into "blocks" and pass + // this block structure to that + // function. Consequently, we + // allocate a vector + // block_component with + // as many elements as there are + // components and describe all + // velocity components to correspond + // to block 0, while the pressure + // component will form block 1: template void StokesProblem::setup_dofs () { @@ -606,17 +606,17 @@ namespace Step22 constraints.close (); timer.exit_section("setup constraints"); - // In analogy to step-20, we count the dofs - // in the individual components. We could - // do this in the same way as there, but we - // want to operate on the block structure - // we used already for the renumbering: The - // function - // DoFTools::count_dofs_per_block - // does the same as - // DoFTools::count_dofs_per_component, - // but now grouped as velocity and pressure - // block via block_component. + // In analogy to step-20, we count the dofs + // in the individual components. We could + // do this in the same way as there, but we + // want to operate on the block structure + // we used already for the renumbering: The + // function + // DoFTools::count_dofs_per_block + // does the same as + // DoFTools::count_dofs_per_component, + // but now grouped as velocity and pressure + // block via block_component. std::vector dofs_per_block (2); DoFTools::count_dofs_per_block (dof_handler, dofs_per_block, block_component); const unsigned int n_u = dofs_per_block[0], @@ -630,88 +630,88 @@ namespace Step22 << " (" << n_u << '+' << n_p << ')' << std::endl; - // The next task is to allocate a - // sparsity pattern for the system matrix - // we will create. We could do this in - // the same way as in step-20, - // i.e. directly build an object of type - // SparsityPattern through - // DoFTools::make_sparsity_pattern. However, - // there is a major reason not to do so: - // In 3D, the function - // DoFTools::max_couplings_between_dofs - // yields a conservative but rather large - // number for the coupling between the - // individual dofs, so that the memory - // initially provided for the creation of - // the sparsity pattern of the matrix is - // far too much -- so much actually that - // the initial sparsity pattern won't - // even fit into the physical memory of - // most systems already for - // moderately-sized 3D problems, see also - // the discussion in step-18. Instead, - // we first build a temporary object that - // uses a different data structure that - // doesn't require allocating more memory - // than necessary but isn't suitable for - // use as a basis of SparseMatrix or - // BlockSparseMatrix objects; in a second - // step we then copy this object into an - // object of BlockSparsityPattern. This - // is entirely analgous to what we - // already did in step-11 and step-18. - // - // There is one snag again here, though: - // it turns out that using the - // CompressedSparsityPattern (or the - // block version - // BlockCompressedSparsityPattern we - // would use here) has a bottleneck that - // makes the algorithm to build the - // sparsity pattern be quadratic in the - // number of degrees of freedom. This - // doesn't become noticeable until we get - // well into the range of several 100,000 - // degrees of freedom, but eventually - // dominates the setup of the linear - // system when we get to more than a - // million degrees of freedom. This is - // due to the data structures used in the - // CompressedSparsityPattern class, - // nothing that can easily be - // changed. Fortunately, there is an easy - // solution: the - // CompressedSimpleSparsityPattern class - // (and its block variant - // BlockCompressedSimpleSparsityPattern) - // has exactly the same interface, uses a - // different %internal data structure and - // is linear in the number of degrees of - // freedom and therefore much more - // efficient for large problems. As - // another alternative, we could also - // have chosen the class - // BlockCompressedSetSparsityPattern that - // uses yet another strategy for %internal - // memory management. Though, that class - // turns out to be more memory-demanding - // than - // BlockCompressedSimpleSparsityPattern - // for this example. - // - // Consequently, this is the class that - // we will use for our intermediate - // sparsity representation. All this is - // done inside a new scope, which means - // that the memory of csp - // will be released once the information - // has been copied to - // sparsity_pattern. + // The next task is to allocate a + // sparsity pattern for the system matrix + // we will create. We could do this in + // the same way as in step-20, + // i.e. directly build an object of type + // SparsityPattern through + // DoFTools::make_sparsity_pattern. However, + // there is a major reason not to do so: + // In 3D, the function + // DoFTools::max_couplings_between_dofs + // yields a conservative but rather large + // number for the coupling between the + // individual dofs, so that the memory + // initially provided for the creation of + // the sparsity pattern of the matrix is + // far too much -- so much actually that + // the initial sparsity pattern won't + // even fit into the physical memory of + // most systems already for + // moderately-sized 3D problems, see also + // the discussion in step-18. Instead, + // we first build a temporary object that + // uses a different data structure that + // doesn't require allocating more memory + // than necessary but isn't suitable for + // use as a basis of SparseMatrix or + // BlockSparseMatrix objects; in a second + // step we then copy this object into an + // object of BlockSparsityPattern. This + // is entirely analgous to what we + // already did in step-11 and step-18. + // + // There is one snag again here, though: + // it turns out that using the + // CompressedSparsityPattern (or the + // block version + // BlockCompressedSparsityPattern we + // would use here) has a bottleneck that + // makes the algorithm to build the + // sparsity pattern be quadratic in the + // number of degrees of freedom. This + // doesn't become noticeable until we get + // well into the range of several 100,000 + // degrees of freedom, but eventually + // dominates the setup of the linear + // system when we get to more than a + // million degrees of freedom. This is + // due to the data structures used in the + // CompressedSparsityPattern class, + // nothing that can easily be + // changed. Fortunately, there is an easy + // solution: the + // CompressedSimpleSparsityPattern class + // (and its block variant + // BlockCompressedSimpleSparsityPattern) + // has exactly the same interface, uses a + // different %internal data structure and + // is linear in the number of degrees of + // freedom and therefore much more + // efficient for large problems. As + // another alternative, we could also + // have chosen the class + // BlockCompressedSetSparsityPattern that + // uses yet another strategy for %internal + // memory management. Though, that class + // turns out to be more memory-demanding + // than + // BlockCompressedSimpleSparsityPattern + // for this example. + // + // Consequently, this is the class that + // we will use for our intermediate + // sparsity representation. All this is + // done inside a new scope, which means + // that the memory of csp + // will be released once the information + // has been copied to + // sparsity_pattern. { timer.enter_section("make csp"); BlockCompressedSimpleSparsityPattern csp (2,2); - + csp.block(0,0).reinit (n_u, n_u); csp.block(1,0).reinit (n_p, n_u); csp.block(0,1).reinit (n_u, n_p); @@ -726,10 +726,10 @@ namespace Step22 timer.exit_section("copy sp"); } - // Finally, the system matrix, - // solution and right hand side are - // created from the block - // structure as in step-20: + // Finally, the system matrix, + // solution and right hand side are + // created from the block + // structure as in step-20: timer.enter_section("create matrix and vectors"); system_matrix.reinit (sparsity_pattern); @@ -746,16 +746,16 @@ namespace Step22 } - // @sect4{StokesProblem::assemble_system} + // @sect4{StokesProblem::assemble_system} - // The assembly process follows the - // discussion in step-20 and in the - // introduction. We use the well-known - // abbreviations for the data structures - // that hold the local matrix, right - // hand side, and global - // numbering of the degrees of freedom - // for the present cell. + // The assembly process follows the + // discussion in step-20 and in the + // introduction. We use the well-known + // abbreviations for the data structures + // that hold the local matrix, right + // hand side, and global + // numbering of the degrees of freedom + // for the present cell. template void StokesProblem::assemble_system () { @@ -783,70 +783,70 @@ namespace Step22 std::vector > rhs_values (n_q_points, Vector(dim+1)); - // Next, we need two objects that work as - // extractors for the FEValues - // object. Their use is explained in detail - // in the report on @ref vector_valued : + // Next, we need two objects that work as + // extractors for the FEValues + // object. Their use is explained in detail + // in the report on @ref vector_valued : const FEValuesExtractors::Vector velocities (0); const FEValuesExtractors::Scalar pressure (dim); - // As an extension over step-20 and - // step-21, we include a few - // optimizations that make assembly - // much faster for this particular - // problem. The improvements are - // based on the observation that we - // do a few calculations too many - // times when we do as in step-20: - // The symmetric gradient actually - // has dofs_per_cell - // different values per quadrature - // point, but we extract it - // dofs_per_cell*dofs_per_cell - // times from the FEValues object - - // for both the loop over - // i and the inner - // loop over j. In 3d, - // that means evaluating it - // $89^2=7921$ instead of $89$ - // times, a not insignificant - // difference. - // - // So what we're - // going to do here is to avoid - // such repeated calculations by - // getting a vector of rank-2 - // tensors (and similarly for - // the divergence and the basis - // function value on pressure) - // at the quadrature point prior - // to starting the loop over the - // dofs on the cell. First, we - // create the respective objects - // that will hold these - // values. Then, we start the - // loop over all cells and the loop - // over the quadrature points, - // where we first extract these - // values. There is one more - // optimization we implement here: - // the local matrix (as well as - // the global one) is going to - // be symmetric, since all - // the operations involved are - // symmetric with respect to $i$ - // and $j$. This is implemented by - // simply running the inner loop - // not to dofs_per_cell, - // but only up to i, - // the index of the outer loop. + // As an extension over step-20 and + // step-21, we include a few + // optimizations that make assembly + // much faster for this particular + // problem. The improvements are + // based on the observation that we + // do a few calculations too many + // times when we do as in step-20: + // The symmetric gradient actually + // has dofs_per_cell + // different values per quadrature + // point, but we extract it + // dofs_per_cell*dofs_per_cell + // times from the FEValues object - + // for both the loop over + // i and the inner + // loop over j. In 3d, + // that means evaluating it + // $89^2=7921$ instead of $89$ + // times, a not insignificant + // difference. + // + // So what we're + // going to do here is to avoid + // such repeated calculations by + // getting a vector of rank-2 + // tensors (and similarly for + // the divergence and the basis + // function value on pressure) + // at the quadrature point prior + // to starting the loop over the + // dofs on the cell. First, we + // create the respective objects + // that will hold these + // values. Then, we start the + // loop over all cells and the loop + // over the quadrature points, + // where we first extract these + // values. There is one more + // optimization we implement here: + // the local matrix (as well as + // the global one) is going to + // be symmetric, since all + // the operations involved are + // symmetric with respect to $i$ + // and $j$. This is implemented by + // simply running the inner loop + // not to dofs_per_cell, + // but only up to i, + // the index of the outer loop. std::vector > symgrad_phi_u (dofs_per_cell); std::vector div_phi_u (dofs_per_cell); std::vector phi_p (dofs_per_cell); 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) { fe_values.reinit (cell); @@ -885,47 +885,47 @@ namespace Step22 } } - // Note that in the above computation - // of the local matrix contribution - // we added the term phi_p[i] * - // phi_p[j] , yielding a - // pressure mass matrix in the - // $(1,1)$ block of the matrix as - // discussed in the - // introduction. That this term only - // ends up in the $(1,1)$ block stems - // from the fact that both of the - // factors in phi_p[i] * - // phi_p[j] are only non-zero - // when all the other terms vanish - // (and the other way around). - // - // Note also that operator* is - // overloaded for symmetric - // tensors, yielding the scalar - // product between the two - // tensors in the first line of - // the local matrix - // contribution. - - // Before we can write the local data - // into the global matrix (and - // simultaneously use the - // ConstraintMatrix object to apply - // Dirichlet boundary conditions and - // eliminate hanging node - // constraints, as we discussed in - // the introduction), we have to be - // careful about one thing, - // though. We have only build up half - // of the local matrix because of - // symmetry, but we're going to save - // the full system matrix in order to - // use the standard functions for - // solution. This is done by flipping - // the indices in case we are - // pointing into the empty part of - // the local matrix. + // Note that in the above computation + // of the local matrix contribution + // we added the term phi_p[i] * + // phi_p[j] , yielding a + // pressure mass matrix in the + // $(1,1)$ block of the matrix as + // discussed in the + // introduction. That this term only + // ends up in the $(1,1)$ block stems + // from the fact that both of the + // factors in phi_p[i] * + // phi_p[j] are only non-zero + // when all the other terms vanish + // (and the other way around). + // + // Note also that operator* is + // overloaded for symmetric + // tensors, yielding the scalar + // product between the two + // tensors in the first line of + // the local matrix + // contribution. + + // Before we can write the local data + // into the global matrix (and + // simultaneously use the + // ConstraintMatrix object to apply + // Dirichlet boundary conditions and + // eliminate hanging node + // constraints, as we discussed in + // the introduction), we have to be + // careful about one thing, + // though. We have only build up half + // of the local matrix because of + // symmetry, but we're going to save + // the full system matrix in order to + // use the standard functions for + // solution. This is done by flipping + // the indices in case we are + // pointing into the empty part of + // the local matrix. for (unsigned int i=0; iblock(0,0) in the - // system matrix. As mentioned - // above, this depends on the - // spatial dimension. Since the two - // classes described by the - // InnerPreconditioner::type - // typedef have the same interface, - // we do not have to do anything - // different whether we want to use - // a sparse direct solver or an - // ILU: + // Before we're going to solve this + // linear system, we generate a + // preconditioner for the + // velocity-velocity matrix, i.e., + // block(0,0) in the + // system matrix. As mentioned + // above, this depends on the + // spatial dimension. Since the two + // classes described by the + // InnerPreconditioner::type + // typedef have the same interface, + // we do not have to do anything + // different whether we want to use + // a sparse direct solver or an + // ILU: std::cout << " Computing preconditioner..." << std::endl << std::flush; A_preconditioner @@ -962,37 +962,37 @@ namespace Step22 - // @sect4{StokesProblem::solve} + // @sect4{StokesProblem::solve} - // After the discussion in the introduction - // and the definition of the respective - // classes above, the implementation of the - // solve function is rather - // straigt-forward and done in a similar way - // as in step-20. To start with, we need an - // object of the InverseMatrix - // class that represents the inverse of the - // matrix A. As described in the - // introduction, the inverse is generated - // with the help of an inner preconditioner - // of type - // InnerPreconditioner::type. + // After the discussion in the introduction + // and the definition of the respective + // classes above, the implementation of the + // solve function is rather + // straigt-forward and done in a similar way + // as in step-20. To start with, we need an + // object of the InverseMatrix + // class that represents the inverse of the + // matrix A. As described in the + // introduction, the inverse is generated + // with the help of an inner preconditioner + // of type + // InnerPreconditioner::type. template void StokesProblem::solve () { const InverseMatrix, - typename InnerPreconditioner::type> - A_inverse (system_matrix.block(0,0), *A_preconditioner); + typename InnerPreconditioner::type> + A_inverse (system_matrix.block(0,0), *A_preconditioner); Vector tmp (solution.block(0).size()); - // This is as in step-20. We generate the - // right hand side $B A^{-1} F - G$ for the - // Schur complement and an object that - // represents the respective linear - // operation $B A^{-1} B^T$, now with a - // template parameter indicating the - // preconditioner - in accordance with the - // definition of the class. + // This is as in step-20. We generate the + // right hand side $B A^{-1} F - G$ for the + // Schur complement and an object that + // represents the respective linear + // operation $B A^{-1} B^T$, now with a + // template parameter indicating the + // preconditioner - in accordance with the + // definition of the class. { Vector schur_rhs (solution.block(1).size()); A_inverse.vmult (tmp, system_rhs.block(0)); @@ -1000,79 +1000,79 @@ namespace Step22 schur_rhs -= system_rhs.block(1); SchurComplement::type> - schur_complement (system_matrix, A_inverse); + schur_complement (system_matrix, A_inverse); - // The usual control structures for - // the solver call are created... + // The usual control structures for + // the solver call are created... SolverControl solver_control (solution.block(1).size(), 1e-6*schur_rhs.l2_norm()); SolverCG<> cg (solver_control); - // Now to the preconditioner to the - // Schur complement. As explained in - // the introduction, the - // preconditioning is done by a mass - // matrix in the pressure variable. It - // is stored in the $(1,1)$ block of - // the system matrix (that is not used - // anywhere else but in - // preconditioning). - // - // Actually, the solver needs to have - // the preconditioner in the form - // $P^{-1}$, so we need to create an - // inverse operation. Once again, we - // use an object of the class - // InverseMatrix, which - // implements the vmult - // operation that is needed by the - // solver. In this case, we have to - // invert the pressure mass matrix. As - // it already turned out in earlier - // tutorial programs, the inversion of - // a mass matrix is a rather cheap and - // straight-forward operation (compared - // to, e.g., a Laplace matrix). The CG - // method with ILU preconditioning - // converges in 5-10 steps, - // independently on the mesh size. - // This is precisely what we do here: - // We choose another ILU preconditioner - // and take it along to the - // InverseMatrix object via the - // corresponding template parameter. A - // CG solver is then called within the - // vmult operation of the inverse - // matrix. - // - // An alternative that is cheaper to - // build, but needs more iterations - // afterwards, would be to choose a - // SSOR preconditioner with factor - // 1.2. It needs about twice the number - // of iterations, but the costs for its - // generation are almost neglible. + // Now to the preconditioner to the + // Schur complement. As explained in + // the introduction, the + // preconditioning is done by a mass + // matrix in the pressure variable. It + // is stored in the $(1,1)$ block of + // the system matrix (that is not used + // anywhere else but in + // preconditioning). + // + // Actually, the solver needs to have + // the preconditioner in the form + // $P^{-1}$, so we need to create an + // inverse operation. Once again, we + // use an object of the class + // InverseMatrix, which + // implements the vmult + // operation that is needed by the + // solver. In this case, we have to + // invert the pressure mass matrix. As + // it already turned out in earlier + // tutorial programs, the inversion of + // a mass matrix is a rather cheap and + // straight-forward operation (compared + // to, e.g., a Laplace matrix). The CG + // method with ILU preconditioning + // converges in 5-10 steps, + // independently on the mesh size. + // This is precisely what we do here: + // We choose another ILU preconditioner + // and take it along to the + // InverseMatrix object via the + // corresponding template parameter. A + // CG solver is then called within the + // vmult operation of the inverse + // matrix. + // + // An alternative that is cheaper to + // build, but needs more iterations + // afterwards, would be to choose a + // SSOR preconditioner with factor + // 1.2. It needs about twice the number + // of iterations, but the costs for its + // generation are almost neglible. SparseILU preconditioner; preconditioner.initialize (system_matrix.block(1,1), SparseILU::AdditionalData()); InverseMatrix,SparseILU > - m_inverse (system_matrix.block(1,1), preconditioner); - - // With the Schur complement and an - // efficient preconditioner at hand, we - // can solve the respective equation - // for the pressure (i.e. block 0 in - // the solution vector) in the usual - // way: + m_inverse (system_matrix.block(1,1), preconditioner); + + // With the Schur complement and an + // efficient preconditioner at hand, we + // can solve the respective equation + // for the pressure (i.e. block 0 in + // the solution vector) in the usual + // way: cg.solve (schur_complement, solution.block(1), schur_rhs, m_inverse); - // After this first solution step, the - // hanging node constraints have to be - // distributed to the solution in order - // to achieve a consistent pressure - // field. + // After this first solution step, the + // hanging node constraints have to be + // distributed to the solution in order + // to achieve a consistent pressure + // field. constraints.distribute (solution); std::cout << " " @@ -1081,17 +1081,17 @@ namespace Step22 << std::endl; } - // As in step-20, we finally need to - // solve for the velocity equation where - // we plug in the solution to the - // pressure equation. This involves only - // objects we already know - so we simply - // multiply $p$ by $B^T$, subtract the - // right hand side and multiply by the - // inverse of $A$. At the end, we need to - // distribute the constraints from - // hanging nodes in order to obtain a - // constistent flow field: + // As in step-20, we finally need to + // solve for the velocity equation where + // we plug in the solution to the + // pressure equation. This involves only + // objects we already know - so we simply + // multiply $p$ by $B^T$, subtract the + // right hand side and multiply by the + // inverse of $A$. At the end, we need to + // distribute the constraints from + // hanging nodes in order to obtain a + // constistent flow field: { system_matrix.block(0,1).vmult (tmp, solution.block(1)); tmp *= -1; @@ -1104,48 +1104,48 @@ namespace Step22 } - // @sect4{StokesProblem::output_results} - - // The next function generates graphical - // output. In this example, we are going to - // use the VTK file format. We attach - // names to the individual variables in the - // problem: velocity to the - // dim components of velocity - // and pressure to the - // pressure. - // - // Not all visualization programs have the - // ability to group individual vector - // components into a vector to provide - // vector plots; in particular, this holds - // for some VTK-based visualization - // programs. In this case, the logical - // grouping of components into vectors - // should already be described in the file - // containing the data. In other words, - // what we need to do is provide our output - // writers with a way to know which of the - // components of the finite element - // logically form a vector (with $d$ - // components in $d$ space dimensions) - // rather than letting them assume that we - // simply have a bunch of scalar fields. - // This is achieved using the members of - // the - // DataComponentInterpretation - // namespace: as with the filename, we - // create a vector in which the first - // dim components refer to the - // velocities and are given the tag - // DataComponentInterpretation::component_is_part_of_vector; - // we finally push one tag - // DataComponentInterpretation::component_is_scalar - // to describe the grouping of the pressure - // variable. - - // The rest of the function is then - // the same as in step-20. + // @sect4{StokesProblem::output_results} + + // The next function generates graphical + // output. In this example, we are going to + // use the VTK file format. We attach + // names to the individual variables in the + // problem: velocity to the + // dim components of velocity + // and pressure to the + // pressure. + // + // Not all visualization programs have the + // ability to group individual vector + // components into a vector to provide + // vector plots; in particular, this holds + // for some VTK-based visualization + // programs. In this case, the logical + // grouping of components into vectors + // should already be described in the file + // containing the data. In other words, + // what we need to do is provide our output + // writers with a way to know which of the + // components of the finite element + // logically form a vector (with $d$ + // components in $d$ space dimensions) + // rather than letting them assume that we + // simply have a bunch of scalar fields. + // This is achieved using the members of + // the + // DataComponentInterpretation + // namespace: as with the filename, we + // create a vector in which the first + // dim components refer to the + // velocities and are given the tag + // DataComponentInterpretation::component_is_part_of_vector; + // we finally push one tag + // DataComponentInterpretation::component_is_scalar + // to describe the grouping of the pressure + // variable. + + // The rest of the function is then + // the same as in step-20. template void StokesProblem::output_results (const unsigned int refinement_cycle) const @@ -1154,10 +1154,10 @@ namespace Step22 solution_names.push_back ("pressure"); std::vector - data_component_interpretation - (dim, DataComponentInterpretation::component_is_part_of_vector); data_component_interpretation - .push_back (DataComponentInterpretation::component_is_scalar); + (dim, DataComponentInterpretation::component_is_part_of_vector); + data_component_interpretation + .push_back (DataComponentInterpretation::component_is_scalar); DataOut data_out; data_out.attach_dof_handler (dof_handler); @@ -1176,38 +1176,38 @@ namespace Step22 } - // @sect4{StokesProblem::refine_mesh} - - // This is the last interesting function of - // the StokesProblem class. - // As indicated by its name, it takes the - // solution to the problem and refines the - // mesh where this is needed. The procedure - // is the same as in the respective step in - // step-6, with the exception that we base - // the refinement only on the change in - // pressure, i.e., we call the Kelly error - // estimator with a mask - // object. Additionally, we do not coarsen - // the grid again: + // @sect4{StokesProblem::refine_mesh} + + // This is the last interesting function of + // the StokesProblem class. + // As indicated by its name, it takes the + // solution to the problem and refines the + // mesh where this is needed. The procedure + // is the same as in the respective step in + // step-6, with the exception that we base + // the refinement only on the change in + // pressure, i.e., we call the Kelly error + // estimator with a mask + // object. Additionally, we do not coarsen + // the grid again: template void StokesProblem::refine_mesh () { Vector estimated_error_per_cell (triangulation.n_active_cells()); srand (0); - for (unsigned int i=0;i component_mask (dim+1, false); - component_mask[dim] = true; - KellyErrorEstimator::estimate (dof_handler, - QGauss(degree+1), - typename FunctionMap::type(), - solution, - estimated_error_per_cell, - component_mask); -*/ + /* + std::vector component_mask (dim+1, false); + component_mask[dim] = true; + KellyErrorEstimator::estimate (dof_handler, + QGauss(degree+1), + typename FunctionMap::type(), + solution, + estimated_error_per_cell, + component_mask); + */ GridRefinement::refine_and_coarsen_fixed_number (triangulation, estimated_error_per_cell, 0.3, 0.0); @@ -1215,27 +1215,27 @@ namespace Step22 } - // @sect4{StokesProblem::run} - - // The last step in the Stokes class is, as - // usual, the function that generates the - // initial grid and calls the other - // functions in the respective order. - // - // We start off with a rectangle of size $4 - // \times 1$ (in 2d) or $4 \times 1 \times - // 1$ (in 3d), placed in $R^2/R^3$ as - // $(-2,2)\times(-1,0)$ or - // $(-2,2)\times(0,1)\times(-1,0)$, - // respectively. It is natural to start - // with equal mesh size in each direction, - // so we subdivide the initial rectangle - // four times in the first coordinate - // direction. To limit the scope of the - // variables involved in the creation of - // the mesh to the range where we actually - // need them, we put the entire block - // between a pair of braces: + // @sect4{StokesProblem::run} + + // The last step in the Stokes class is, as + // usual, the function that generates the + // initial grid and calls the other + // functions in the respective order. + // + // We start off with a rectangle of size $4 + // \times 1$ (in 2d) or $4 \times 1 \times + // 1$ (in 3d), placed in $R^2/R^3$ as + // $(-2,2)\times(-1,0)$ or + // $(-2,2)\times(0,1)\times(-1,0)$, + // respectively. It is natural to start + // with equal mesh size in each direction, + // so we subdivide the initial rectangle + // four times in the first coordinate + // direction. To limit the scope of the + // variables involved in the creation of + // the mesh to the range where we actually + // need them, we put the entire block + // between a pair of braces: template void StokesProblem::run () { @@ -1256,64 +1256,64 @@ namespace Step22 top_right); } - // A boundary indicator of 1 is set to all - // boundaries that are subject to Dirichlet - // boundary conditions, i.e. to faces that - // are located at 0 in the last coordinate - // direction. See the example description - // above for details. + // A boundary indicator of 1 is set to all + // boundaries that are subject to Dirichlet + // boundary conditions, i.e. to faces that + // are located at 0 in the last coordinate + // direction. See the example description + // above for details. for (typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + cell = triangulation.begin_active(); cell != triangulation.end(); ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->face(f)->center()[dim-1] == 0) cell->face(f)->set_all_boundary_indicators(1); - // We then apply an initial refinement - // before solving for the first time. In - // 3D, there are going to be more degrees - // of freedom, so we refine less there: + // We then apply an initial refinement + // before solving for the first time. In + // 3D, there are going to be more degrees + // of freedom, so we refine less there: triangulation.refine_global (8-dim); - // As first seen in step-6, we cycle over - // the different refinement levels and - // refine (except for the first cycle), - // setup the degrees of freedom and - // matrices, assemble, solve and create - // output: + // As first seen in step-6, we cycle over + // the different refinement levels and + // refine (except for the first cycle), + // setup the degrees of freedom and + // matrices, assemble, solve and create + // output: for (unsigned int refinement_cycle = 0; refinement_cycle<1; ++refinement_cycle) { std::cout << "Refinement cycle " << refinement_cycle << std::endl; - //if (refinement_cycle > 0) - { - timer.enter_section("refine"); - refine_mesh (); - refine_mesh (); - refine_mesh (); - //triangulation.refine_global(1); - timer.exit_section("refine"); - } - - //timer.enter_section("setup"); + //if (refinement_cycle > 0) + { + timer.enter_section("refine"); + refine_mesh (); + refine_mesh (); + refine_mesh (); + //triangulation.refine_global(1); + timer.exit_section("refine"); + } + + //timer.enter_section("setup"); setup_dofs (); - //timer.exit_section("setup"); + //timer.exit_section("setup"); std::cout << " Assembling..." << std::endl << std::flush; - timer.enter_section("assembly"); + timer.enter_section("assembly"); assemble_system (); - timer.exit_section("assembly"); + timer.exit_section("assembly"); std::cout << " Solving..." << std::flush; - //timer.enter_section("solver"); - //solve (); - //timer.exit_section("solver"); + //timer.enter_section("solver"); + //solve (); + //timer.exit_section("solver"); - //timer.enter_section("results"); - //output_results (refinement_cycle); - //timer.exit_section("results"); + //timer.enter_section("results"); + //output_results (refinement_cycle); + //timer.exit_section("results"); std::cout << std::endl; } @@ -1322,12 +1322,12 @@ namespace Step22 } - // @sect3{The main function} +// @sect3{The main function} - // The main function is the same as in - // step-20. We pass the element degree as a - // parameter and choose the space dimension - // at the well-known template slot. +// The main function is the same as in +// step-20. We pass the element degree as a +// parameter and choose the space dimension +// at the well-known template slot. int main () { try diff --git a/tests/benchmarks/test_poisson/poisson.cc b/tests/benchmarks/test_poisson/poisson.cc index f8fcb9842f..b9448adf95 100644 --- a/tests/benchmarks/test_poisson/poisson.cc +++ b/tests/benchmarks/test_poisson/poisson.cc @@ -123,7 +123,7 @@ template void HelmholtzProblem::assemble_system () { timer.enter_subsection("write into matrix"); - + QGauss quadrature_formula(fe.degree+1); const unsigned int n_q_points = quadrature_formula.size(); @@ -160,11 +160,11 @@ void HelmholtzProblem::assemble_system () fe_values.JxW(q_point)); } - cell->get_dof_indices (local_dof_indices); - hanging_node_constraints.distribute_local_to_global (cell_matrix, - local_dof_indices, - system_matrix); - } + cell->get_dof_indices (local_dof_indices); + hanging_node_constraints.distribute_local_to_global (cell_matrix, + local_dof_indices, + system_matrix); + } timer.leave_subsection(); } diff --git a/tests/bits/accessor_equality.cc b/tests/bits/accessor_equality.cc index f2c0382795..302781a952 100644 --- a/tests/bits/accessor_equality.cc +++ b/tests/bits/accessor_equality.cc @@ -35,66 +35,66 @@ template void test () { deallog << dim << 'd' << std::endl; - - Triangulation tria; + + Triangulation tria; GridGenerator::hyper_cube (tria,0,1); tria.refine_global (1); deallog << tria.begin_active() << std::endl; - // test a few comparison operators + // test a few comparison operators { const typename Triangulation::active_cell_iterator - cell = tria.begin_active(); + cell = tria.begin_active(); Assert (cell == cell, ExcInternalError()); Assert (! (cell != cell), ExcInternalError()); Assert (! (cell < cell), ExcInternalError()); } - // same with non-active iterators + // same with non-active iterators { const typename Triangulation::cell_iterator - cell = tria.begin(); + cell = tria.begin(); Assert (cell == cell, ExcInternalError()); Assert (! (cell != cell), ExcInternalError()); Assert (! (cell < cell), ExcInternalError()); } - + FE_Q fe (1); DoFHandler dof_handler (tria); dof_handler.distribute_dofs (fe); - // now do the same tests with the - // DoFHandler iterators + // now do the same tests with the + // DoFHandler iterators { const typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); Assert (cell == cell, ExcInternalError()); Assert (! (cell != cell), ExcInternalError()); Assert (! (cell < cell), ExcInternalError()); } { const typename DoFHandler::cell_iterator - cell = dof_handler.begin(); + cell = dof_handler.begin(); Assert (cell == cell, ExcInternalError()); Assert (! (cell != cell), ExcInternalError()); Assert (! (cell < cell), ExcInternalError()); } - // finally check that two iterators - // pointing into different DoFHandlers - // can't be the same - // - // this test accidentally failed before a - // fix was checked in on 2005-08-08 that - // completely forbids comparing iterators - // into different DoFHandlers at all + // finally check that two iterators + // pointing into different DoFHandlers + // can't be the same + // + // this test accidentally failed before a + // fix was checked in on 2005-08-08 that + // completely forbids comparing iterators + // into different DoFHandlers at all { DoFHandler dof_handler2 (tria); dof_handler2.distribute_dofs (fe); - try + try { - (dof_handler.begin_active() != dof_handler2.begin_active()); + (dof_handler.begin_active() != dof_handler2.begin_active()); } catch (ExceptionBase &e) { diff --git a/tests/bits/anna_1.cc b/tests/bits/anna_1.cc index 33f4478bac..baf5ccf410 100644 --- a/tests/bits/anna_1.cc +++ b/tests/bits/anna_1.cc @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include @@ -44,59 +44,59 @@ template -class SystemTest +class SystemTest { - public: - SystemTest (); - void run (); - - private: - void make_grid_and_dofs (); - void shape_to_components (); - void check_numbering (); - - - Triangulation triangulation; - FESystem fe; - DoFHandler dof_handler; - - +public: + SystemTest (); + void run (); + +private: + void make_grid_and_dofs (); + void shape_to_components (); + void check_numbering (); + + + Triangulation triangulation; + FESystem fe; + DoFHandler dof_handler; + + }; template SystemTest::SystemTest () : - fe (FE_Nedelec(0), 2, - FE_Q(1), 1), - dof_handler (triangulation) + fe (FE_Nedelec(0), 2, + FE_Q(1), 1), + dof_handler (triangulation) {} template void SystemTest::make_grid_and_dofs () { - + GridGenerator::hyper_cube (triangulation, -1, 1); triangulation.refine_global (0); deallog << "Number of active cells: " << triangulation.n_active_cells() << std::endl; deallog << "Total number of cells: " << triangulation.n_cells() << std::endl; - + dof_handler.distribute_dofs (fe); deallog << "Number of degrees of freedom: " << dof_handler.n_dofs() << std::endl; - + } template -void SystemTest::shape_to_components () +void SystemTest::shape_to_components () { - // testing, if the shape function - // with index i is of type Nedelec: - // (i.e. the first component of the FESystem) - // 1 for yes, 0 for no. - - for(unsigned int i = 0; i::shape_to_components () template -void SystemTest::check_numbering () +void SystemTest::check_numbering () { typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(), - endc = dof_handler.end(); - std::vector local_dof_indices(fe.dofs_per_cell); - + cell = dof_handler.begin_active(), + endc = dof_handler.end(); + std::vector local_dof_indices(fe.dofs_per_cell); + for (; cell!=endc; ++cell) { cell->get_dof_indices (local_dof_indices); for (unsigned int i=0; iget_dof_indices (local_dof_indices); - for(unsigned int i=0; i::check_numbering () template -void SystemTest::run () +void SystemTest::run () { make_grid_and_dofs (); shape_to_components (); check_numbering(); } - -int main () + +int main () { std::ofstream logfile("anna_1/output"); deallog.attach(logfile); @@ -163,6 +163,6 @@ int main () deallog.threshold_double(1.e-10); SystemTest<2>().run(); - SystemTest<3>().run(); + SystemTest<3>().run(); return 0; } diff --git a/tests/bits/anna_2.cc b/tests/bits/anna_2.cc index 65509ea54c..e4e2c7b579 100644 --- a/tests/bits/anna_2.cc +++ b/tests/bits/anna_2.cc @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include @@ -48,56 +48,56 @@ template -class SystemTest +class SystemTest { - public: - SystemTest (); - void run (); - - private: - void make_grid_and_dofs (); - void shape_to_components (); - void check_numbering (); - - - Triangulation triangulation; - FESystem fe; - DoFHandler dof_handler; +public: + SystemTest (); + void run (); + +private: + void make_grid_and_dofs (); + void shape_to_components (); + void check_numbering (); + + + Triangulation triangulation; + FESystem fe; + DoFHandler dof_handler; }; template SystemTest::SystemTest () : - fe (FE_Nedelec(0), 2, - FE_Q(1), 1), - dof_handler (triangulation) + fe (FE_Nedelec(0), 2, + FE_Q(1), 1), + dof_handler (triangulation) {} template void SystemTest::make_grid_and_dofs () { - + GridGenerator::hyper_cube (triangulation, -1, 1); triangulation.refine_global (0); deallog << "Number of active cells: " << triangulation.n_active_cells() << std::endl; deallog << "Total number of cells: " << triangulation.n_cells() << std::endl; - + dof_handler.distribute_dofs (fe); deallog << "Number of degrees of freedom: " << dof_handler.n_dofs() - << std::endl; + << std::endl; } template -void SystemTest::shape_to_components () +void SystemTest::shape_to_components () { - // testing, if the shape function - // with index i is of type Nedelec: - // (i.e. the first component of the FESystem) - // 1 for yes, 0 for no. - - for(unsigned int i = 0; i::shape_to_components () template -void SystemTest::check_numbering () +void SystemTest::check_numbering () { typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(), - endc = dof_handler.end(); - std::vector local_dof_indices(fe.dofs_per_cell); - + cell = dof_handler.begin_active(), + endc = dof_handler.end(); + std::vector local_dof_indices(fe.dofs_per_cell); + for (; cell!=endc; ++cell) { cell->get_dof_indices (local_dof_indices); for (unsigned int i=0; i comp(fe.n_components()); for (unsigned int i=0; iget_dof_indices (local_dof_indices); - for(unsigned int i=0; i::check_numbering () template -void SystemTest::run () +void SystemTest::run () { make_grid_and_dofs (); shape_to_components (); check_numbering(); } - -int main () + +int main () { std::ofstream logfile("anna_2/output"); deallog.attach(logfile); @@ -167,6 +167,6 @@ int main () deallog.threshold_double(1.e-10); SystemTest<2>().run(); - SystemTest<3>().run(); + SystemTest<3>().run(); return 0; } diff --git a/tests/bits/anna_3.cc b/tests/bits/anna_3.cc index d1b17d68e0..daa6af1d48 100644 --- a/tests/bits/anna_3.cc +++ b/tests/bits/anna_3.cc @@ -45,27 +45,27 @@ template class SystemTest { - public: - SystemTest (); - void run (); +public: + SystemTest (); + void run (); - private: - void make_grid_and_dofs (); - void check (); +private: + void make_grid_and_dofs (); + void check (); - Triangulation triangulation; - FESystem fe; - DoFHandler dof_handler; + Triangulation triangulation; + FESystem fe; + DoFHandler dof_handler; }; template SystemTest::SystemTest () : - fe (FE_Nedelec(0), 2, - FE_Q(1), 1), - dof_handler (triangulation) + fe (FE_Nedelec(0), 2, + FE_Q(1), 1), + dof_handler (triangulation) {} @@ -102,8 +102,8 @@ void SystemTest::check () deallog << " DoF " << i << std::endl; }; - std::vector dofs_per_component (fe.n_components(), - static_cast(0)); + std::vector dofs_per_component (fe.n_components(), + static_cast(0)); DoFTools::count_dofs_per_component (dof_handler, dofs_per_component); deallog << "DoFs per component: "; for (unsigned int i=0; i::run () make_grid_and_dofs (); check(); - // renumber degrees of freedom and - // try again + // renumber degrees of freedom and + // try again deallog << std::endl << "*** Renumbering ***" << std::endl; DoFRenumbering::component_wise (dof_handler); check (); diff --git a/tests/bits/anna_4.cc b/tests/bits/anna_4.cc index ea0fc49627..fd394d062c 100644 --- a/tests/bits/anna_4.cc +++ b/tests/bits/anna_4.cc @@ -37,11 +37,11 @@ #include #include - // We need a FESystem +// We need a FESystem #include - // we need DG-elements - // and Q1-elements +// we need DG-elements +// and Q1-elements #include #include @@ -53,15 +53,15 @@ template class VectorBoundaryValues : public Function { - public: - VectorBoundaryValues (); - virtual void vector_value (const Point &p, - Vector &values) const; +public: + VectorBoundaryValues (); + virtual void vector_value (const Point &p, + Vector &values) const; }; template VectorBoundaryValues::VectorBoundaryValues () : - Function (2) + Function (2) {} template @@ -81,28 +81,28 @@ void VectorBoundaryValues::vector_value (const Point &p, template class FindBug { - public: - FindBug (); - void run (); - private: - void make_grid_and_dofs (); - void dirichlet_conditions (); - - Triangulation triangulation; - FESystem fe; - DoFHandler dof_handler; - Vector solution; +public: + FindBug (); + void run (); +private: + void make_grid_and_dofs (); + void dirichlet_conditions (); + + Triangulation triangulation; + FESystem fe; + DoFHandler dof_handler; + Vector solution; }; - // Construct FESystem with - // first component: Q1-Element, - // second component: lowest order DG_Element +// Construct FESystem with +// first component: Q1-Element, +// second component: lowest order DG_Element template FindBug::FindBug () : - fe (FE_Q(1), 1, - FE_DGP(0), 1), - dof_handler (triangulation) + fe (FE_Q(1), 1, + FE_DGP(0), 1), + dof_handler (triangulation) {} @@ -136,53 +136,53 @@ void FindBug::make_grid_and_dofs () template void FindBug::dirichlet_conditions () { - // we want to set the Boundary DoFs - // of the selected component to a - // given value, say zero. To do - // so, we want to use VectorTools:: - // interpolate_boundary_values - // - // This works fine if all the - // components have support on the - // faces. (This, of course, has to - // be requested when fixing the - // boundary DoFs.) However, - // getting the values for the - // boundary DoFs of a valid - // component by the function - // VectorTools:: - // interpolate_boundary_values and - // an appropriate component_mask - // (unselecting the DG-component) - // does not work yet. Or, better: - // it did not work and this program - // checks that it has been - // correctly implemented by now + // we want to set the Boundary DoFs + // of the selected component to a + // given value, say zero. To do + // so, we want to use VectorTools:: + // interpolate_boundary_values + // + // This works fine if all the + // components have support on the + // faces. (This, of course, has to + // be requested when fixing the + // boundary DoFs.) However, + // getting the values for the + // boundary DoFs of a valid + // component by the function + // VectorTools:: + // interpolate_boundary_values and + // an appropriate component_mask + // (unselecting the DG-component) + // does not work yet. Or, better: + // it did not work and this program + // checks that it has been + // correctly implemented by now std::map dirichlet_dofs; - // we declare a vector of bools, - // which tells the - // VectorTools::interpolate_boundary_values - // on which components of the - // FESystem we want to impose - // Dirichlet BC. + // we declare a vector of bools, + // which tells the + // VectorTools::interpolate_boundary_values + // on which components of the + // FESystem we want to impose + // Dirichlet BC. std::vector component_mask(2); - // Dirichlet-BC for the - // Q1-Component + // Dirichlet-BC for the + // Q1-Component component_mask[0] = true; - // no Dirichlet-BC for the - // DG-component + // no Dirichlet-BC for the + // DG-component component_mask[1] = false; - // This is just for the final - // output-test + // This is just for the final + // output-test for (unsigned int i=0; i (2), @@ -194,19 +194,19 @@ void FindBug::dirichlet_conditions () std::set boundary_indicators; boundary_indicators.insert (0); - // get a list of those boundary DoFs which - // we want to be fixed: + // get a list of those boundary DoFs which + // we want to be fixed: DoFTools::extract_boundary_dofs (dof_handler, component_mask, fixed_dofs, boundary_indicators); - // (Primitive) Check if the DoFs - // where adjusted correctly (note - // that we have preset all values - // to 1, and interpolate_b_v should - // have overwritten those for - // component 0 by 0) + // (Primitive) Check if the DoFs + // where adjusted correctly (note + // that we have preset all values + // to 1, and interpolate_b_v should + // have overwritten those for + // component 0 by 0) for (unsigned int i=0; i::dirichlet_conditions () }; }; - // check 1 has obviously succeeded, - // so also check a more complicated - // boundary value function + // check 1 has obviously succeeded, + // so also check a more complicated + // boundary value function dirichlet_dofs.clear (); VectorTools::interpolate_boundary_values (dof_handler, 0, @@ -253,7 +253,7 @@ int main () FindBug<2>().run (); FindBug<3>().run (); - + return 0; } diff --git a/tests/bits/anna_6.cc b/tests/bits/anna_6.cc index 3f4997575e..4899b1ba17 100644 --- a/tests/bits/anna_6.cc +++ b/tests/bits/anna_6.cc @@ -15,34 +15,34 @@ // --------------------------------------------------------------------- -/* Test code to help fixing +/* Test code to help fixing DoFTools::extract_boundary_dofs and - + VectorTools::interpolate_boundary_values - - - + + + The underlying FE is a FESystem with one Nedelec component and one scalar component. - + We would like to use DoFTools::extract_boundary_dofs with a component_mask disabling the Nedelec and the scalar component respectively. - + Furthermore, we would like to use VectorTools::interpolate_boundary_values with a component_mask enabling only the scalar component. - + author: Anna Schneebeli, February 2003 - + */ - - + + #include "../tests.h" #include @@ -64,8 +64,8 @@ author: Anna Schneebeli, February 2003 #include #include - -#include + +#include #include #include @@ -76,60 +76,60 @@ author: Anna Schneebeli, February 2003 template class ImposeBC { - public: - ImposeBC(); - ~ImposeBC(); - void run (); - - private: - - void get_ready (); - void test_extract_boundary_DoFs (); - void test_interpolate_BC (); - - Triangulation triangulation; - - // We use a FE-System with 2 components: - // a vector-valued one for the - // field-variable u and a scalar one for - // the pressure-variable p - FESystem fe; - DoFHandler dof_handler; - - unsigned int n_u_dofs; - unsigned int n_p_dofs; - -}; +public: + ImposeBC(); + ~ImposeBC(); + void run (); + +private: + + void get_ready (); + void test_extract_boundary_DoFs (); + void test_interpolate_BC (); + + Triangulation triangulation; + + // We use a FE-System with 2 components: + // a vector-valued one for the + // field-variable u and a scalar one for + // the pressure-variable p + FESystem fe; + DoFHandler dof_handler; + + unsigned int n_u_dofs; + unsigned int n_p_dofs; + +}; // some boundary function for the scalar component template class BoundaryFunction : public Function { - public: - BoundaryFunction (); - - virtual void vector_value (const Point &p, - Vector &values) const; - +public: + BoundaryFunction (); + + virtual void vector_value (const Point &p, + Vector &values) const; + }; template -BoundaryFunction::BoundaryFunction () : - Function (dim+1) {} +BoundaryFunction::BoundaryFunction () : + Function (dim+1) {} template inline -void BoundaryFunction::vector_value (const Point &, +void BoundaryFunction::vector_value (const Point &, Vector &values) const { - - Assert (values.size() == dim+1, - ExcDimensionMismatch (values.size(), dim+1)); - + + Assert (values.size() == dim+1, + ExcDimensionMismatch (values.size(), dim+1)); + values = 0; values(dim) = 1.; } @@ -138,111 +138,111 @@ void BoundaryFunction::vector_value (const Point &, - // Construct FE with first component: Nedelec-Element, - // second component: Q1_Element +// Construct FE with first component: Nedelec-Element, +// second component: Q1_Element template ImposeBC::ImposeBC() : - fe (FE_Nedelec(0), 1, FE_Q(1), 1), - dof_handler (triangulation) + fe (FE_Nedelec(0), 1, FE_Q(1), 1), + dof_handler (triangulation) {} template -ImposeBC::~ImposeBC() +ImposeBC::~ImposeBC() { dof_handler.clear (); } template -void ImposeBC::get_ready () -{ +void ImposeBC::get_ready () +{ dof_handler.distribute_dofs (fe); - std::vector dofs_per_comp (fe.n_components()); + std::vector dofs_per_comp (fe.n_components()); DoFTools::count_dofs_per_component(dof_handler, dofs_per_comp); - - // For an FESystem with Nedelec-elements as - // first component and bilinear elements as - // component we have: - // dofs_per_comp[0] = dofs_per_comp[1] = # Ned-DoFs - // dofs_per_comp[2] = # Q1-DoFs + + // For an FESystem with Nedelec-elements as + // first component and bilinear elements as + // component we have: + // dofs_per_comp[0] = dofs_per_comp[1] = # Ned-DoFs + // dofs_per_comp[2] = # Q1-DoFs n_u_dofs = dofs_per_comp[0]; n_p_dofs = dofs_per_comp[2]; - + } template -void ImposeBC::test_extract_boundary_DoFs () -{ - - std::map boundary_values; - std::vector bc_component_select(dim + 1); - - // extract boundary DoFs for the Nedelec-component - // and impose zero boundary condition +void ImposeBC::test_extract_boundary_DoFs () +{ + + std::map boundary_values; + std::vector bc_component_select(dim + 1); + + // extract boundary DoFs for the Nedelec-component + // and impose zero boundary condition bc_component_select[0] = true; bc_component_select[1] = true; bc_component_select[2] = false; - + std::vector ned_boundary_dofs (dof_handler.n_dofs()); std::set boundary_indicators; boundary_indicators.insert (0); - DoFTools::extract_boundary_dofs (dof_handler, + DoFTools::extract_boundary_dofs (dof_handler, bc_component_select, ned_boundary_dofs, boundary_indicators); - - + + for (unsigned int i=0; i -void ImposeBC::test_interpolate_BC () -{ - - std::map boundary_values; - std::vector bc_component_select(dim + 1, false); - - - // impose inhomogeneous boundary condition - // on the scalar variable +void ImposeBC::test_interpolate_BC () +{ + + std::map boundary_values; + std::vector bc_component_select(dim + 1, false); + + + // impose inhomogeneous boundary condition + // on the scalar variable bc_component_select.back() = true; - + VectorTools::interpolate_boundary_values (dof_handler, 0, BoundaryFunction(), boundary_values, bc_component_select); - - - - // check - // (the pressure is assumed to be set to 1 - // on the boundary) + + + + // check + // (the pressure is assumed to be set to 1 + // on the boundary) std::vector p_boundary_dofs (dof_handler.n_dofs()); std::set boundary_indicators; boundary_indicators.insert (0); - DoFTools::extract_boundary_dofs (dof_handler, + DoFTools::extract_boundary_dofs (dof_handler, bc_component_select, p_boundary_dofs, boundary_indicators); for (unsigned int i=0; i::test_interpolate_BC () template -void ImposeBC::run () -{ +void ImposeBC::run () +{ GridGenerator::hyper_cube(triangulation, -1,1); triangulation.refine_global (1); triangulation.begin_active()->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); - + deallog << " Number of active cells: " << triangulation.n_active_cells() << std::endl; - + get_ready (); - + deallog << " Total number of degrees of freedom: " << dof_handler.n_dofs() << std::endl @@ -281,19 +281,19 @@ void ImposeBC::run () << std::endl; test_extract_boundary_DoFs (); - test_interpolate_BC (); + test_interpolate_BC (); } -int main () +int main () { try { std::ofstream logfile("anna_6/output"); - deallog << std::setprecision (2); + deallog << std::setprecision (2); deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); ImposeBC<2>().run (); ImposeBC<3>().run (); @@ -301,25 +301,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; diff --git a/tests/bits/apply_boundary_values_01.cc b/tests/bits/apply_boundary_values_01.cc index 969b7b5540..b81211fca7 100644 --- a/tests/bits/apply_boundary_values_01.cc +++ b/tests/bits/apply_boundary_values_01.cc @@ -43,33 +43,33 @@ template void test () { deallog << dim << "D" << std::endl; - + Triangulation triangulation; GridGenerator::hyper_cube (triangulation); - // refine the mesh in a random way + // refine the mesh in a random way triangulation.refine_global (4-dim); for (unsigned int i=0; i<11-2*dim; ++i) { typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + cell = triangulation.begin_active(); for (unsigned int index=0; cell != triangulation.end(); ++cell, ++index) if (index % (3*dim) == 0) cell->set_refine_flag(); triangulation.execute_coarsening_and_refinement (); } deallog << "Number of cells: " << triangulation.n_active_cells() << std::endl; - - // set up a DoFHandler and compute hanging - // node constraints + + // set up a DoFHandler and compute hanging + // node constraints FE_Q fe(1); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); deallog << "Number of dofs: " << dof_handler.n_dofs() << std::endl; - // then set up a sparsity pattern and two - // matrices on top of it. similar for two - // vectors + // then set up a sparsity pattern and two + // matrices on top of it. similar for two + // vectors SparsityPattern sparsity (dof_handler.n_dofs(), dof_handler.n_dofs(), dof_handler.max_couplings_between_dofs()); @@ -79,22 +79,22 @@ void test () Vector b1 (dof_handler.n_dofs()); Vector b2 (dof_handler.n_dofs()); - // then fill the two matrices and vectors - // by setting up bogus matrix entries and - // (1) writing them into the matrix and - // applying boundary values later on, or - // (2) applying them right away + // then fill the two matrices and vectors + // by setting up bogus matrix entries and + // (1) writing them into the matrix and + // applying boundary values later on, or + // (2) applying them right away std::map boundary_values; VectorTools::interpolate_boundary_values (dof_handler, - 0, - ConstantFunction(1.), - boundary_values); - + 0, + ConstantFunction(1.), + boundary_values); + std::vector local_dofs (fe.dofs_per_cell); FullMatrix local_matrix (fe.dofs_per_cell, fe.dofs_per_cell); Vector local_vector (fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) { cell->get_dof_indices (local_dofs); @@ -105,15 +105,15 @@ void test () for (unsigned int i=0; idistribute_local_to_global (local_vector, b2); } - // for A, remove boundary values only now. + // for A, remove boundary values only now. Vector x (dof_handler.n_dofs()); MatrixTools::apply_boundary_values (boundary_values, A, x, b1, false); - - // now comes the check: we subtract B from - // A, and make sure that the result is zero + + // now comes the check: we subtract B from + // A, and make sure that the result is zero A.add (-1., B); deallog << "|A|=" << A.frobenius_norm() << std::endl; deallog << "|B|=" << B.frobenius_norm() << std::endl; Assert (A.frobenius_norm() < 1e-12*B.frobenius_norm(), ExcInternalError()); - // similar for b1 and b2 + // similar for b1 and b2 b1 -= b2; deallog << "|b1|=" << b1.l2_norm() << std::endl; deallog << "|b2|=" << b2.l2_norm() << std::endl; @@ -159,25 +159,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/apply_boundary_values_02.cc b/tests/bits/apply_boundary_values_02.cc index a95d1be133..8bb84ccfd8 100644 --- a/tests/bits/apply_boundary_values_02.cc +++ b/tests/bits/apply_boundary_values_02.cc @@ -43,33 +43,33 @@ template void test () { deallog << dim << "D" << std::endl; - + Triangulation triangulation; GridGenerator::hyper_cube (triangulation); - // refine the mesh in a random way + // refine the mesh in a random way triangulation.refine_global (4-dim); for (unsigned int i=0; i<11-2*dim; ++i) { typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + cell = triangulation.begin_active(); for (unsigned int index=0; cell != triangulation.end(); ++cell, ++index) if (index % (3*dim) == 0) cell->set_refine_flag(); triangulation.execute_coarsening_and_refinement (); } deallog << "Number of cells: " << triangulation.n_active_cells() << std::endl; - - // set up a DoFHandler and compute hanging - // node constraints + + // set up a DoFHandler and compute hanging + // node constraints FE_Q fe(1); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); deallog << "Number of dofs: " << dof_handler.n_dofs() << std::endl; - // then set up a sparsity pattern and two - // matrices on top of it. similar for two - // vectors + // then set up a sparsity pattern and two + // matrices on top of it. similar for two + // vectors SparsityPattern sparsity (dof_handler.n_dofs(), dof_handler.n_dofs(), dof_handler.max_couplings_between_dofs()); @@ -79,22 +79,22 @@ void test () Vector b1 (dof_handler.n_dofs()); Vector b2 (dof_handler.n_dofs()); - // then fill the two matrices and vectors - // by setting up bogus matrix entries and - // (1) writing them into the matrix and - // applying boundary values later on, or - // (2) applying them right away + // then fill the two matrices and vectors + // by setting up bogus matrix entries and + // (1) writing them into the matrix and + // applying boundary values later on, or + // (2) applying them right away std::map boundary_values; VectorTools::interpolate_boundary_values (dof_handler, - 0, - ConstantFunction(1.), - boundary_values); - + 0, + ConstantFunction(1.), + boundary_values); + std::vector local_dofs (fe.dofs_per_cell); FullMatrix local_matrix (fe.dofs_per_cell, fe.dofs_per_cell); Vector local_vector (fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) { cell->get_dof_indices (local_dofs); @@ -105,15 +105,15 @@ void test () for (unsigned int i=0; idistribute_local_to_global (local_vector, b2); } - // for A, remove boundary values only now. + // for A, remove boundary values only now. Vector x (dof_handler.n_dofs()); MatrixTools::apply_boundary_values (boundary_values, A, x, b1, true); - - // now comes the check: we subtract B from - // A, and make sure that the result is zero + + // now comes the check: we subtract B from + // A, and make sure that the result is zero A.add (-1., B); deallog << "|A|=" << A.frobenius_norm() << std::endl; deallog << "|B|=" << B.frobenius_norm() << std::endl; Assert (A.frobenius_norm() < 1e-12*B.frobenius_norm(), ExcInternalError()); - // similar for b1 and b2 + // similar for b1 and b2 b1 -= b2; deallog << "|b1|=" << b1.l2_norm() << std::endl; deallog << "|b2|=" << b2.l2_norm() << std::endl; @@ -159,25 +159,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/apply_boundary_values_03.cc b/tests/bits/apply_boundary_values_03.cc index 898e5fac0c..5671fc4a80 100644 --- a/tests/bits/apply_boundary_values_03.cc +++ b/tests/bits/apply_boundary_values_03.cc @@ -51,11 +51,11 @@ void test () Vector b1 (N); Vector b2 (N); - // then fill the two matrices and vectors - // by setting up bogus matrix entries and - // (1) writing them into the matrix and - // applying boundary values later on, or - // (2) applying them right away + // then fill the two matrices and vectors + // by setting up bogus matrix entries and + // (1) writing them into the matrix and + // applying boundary values later on, or + // (2) applying them right away std::map boundary_values; boundary_values[N/2] = 42; @@ -63,37 +63,37 @@ void test () std::vector local_dofs (N); FullMatrix local_matrix (N,N); Vector local_vector (N); - { - for (unsigned int i=0; i x (N); MatrixTools::apply_boundary_values (boundary_values, A, x, b1, false); @@ -107,15 +107,15 @@ void test () deallog << "b2=" << std::endl; b2.print (deallog.get_file_stream()); - // now comes the check: we subtract B from - // A, and make sure that the result is zero + // now comes the check: we subtract B from + // A, and make sure that the result is zero A.add (-1., B); deallog << "|A|=" << A.frobenius_norm() << std::endl; deallog << "|B|=" << B.frobenius_norm() << std::endl; Assert (A.frobenius_norm() < 1e-12*B.frobenius_norm(), ExcInternalError()); - // similar for b1 and b2 + // similar for b1 and b2 b1 -= b2; deallog << "|b1|=" << b1.l2_norm() << std::endl; deallog << "|b2|=" << b2.l2_norm() << std::endl; @@ -139,25 +139,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/apply_boundary_values_04.cc b/tests/bits/apply_boundary_values_04.cc index ec690364ae..a8ce85e5cc 100644 --- a/tests/bits/apply_boundary_values_04.cc +++ b/tests/bits/apply_boundary_values_04.cc @@ -51,11 +51,11 @@ void test () Vector b1 (N); Vector b2 (N); - // then fill the two matrices and vectors - // by setting up bogus matrix entries and - // (1) writing them into the matrix and - // applying boundary values later on, or - // (2) applying them right away + // then fill the two matrices and vectors + // by setting up bogus matrix entries and + // (1) writing them into the matrix and + // applying boundary values later on, or + // (2) applying them right away std::map boundary_values; boundary_values[N/2] = 42; @@ -63,37 +63,37 @@ void test () std::vector local_dofs (N); FullMatrix local_matrix (N,N); Vector local_vector (N); - { - for (unsigned int i=0; i x (N); MatrixTools::apply_boundary_values (boundary_values, A, x, b1, true); @@ -107,15 +107,15 @@ void test () deallog << "b2=" << std::endl; b2.print (deallog.get_file_stream()); - // now comes the check: we subtract B from - // A, and make sure that the result is zero + // now comes the check: we subtract B from + // A, and make sure that the result is zero A.add (-1., B); deallog << "|A|=" << A.frobenius_norm() << std::endl; deallog << "|B|=" << B.frobenius_norm() << std::endl; Assert (A.frobenius_norm() < 1e-12*B.frobenius_norm(), ExcInternalError()); - // similar for b1 and b2 + // similar for b1 and b2 b1 -= b2; deallog << "|b1|=" << b1.l2_norm() << std::endl; deallog << "|b2|=" << b2.l2_norm() << std::endl; @@ -139,25 +139,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/block_matrix_array_01.cc b/tests/bits/block_matrix_array_01.cc index a7d394df54..1650cf076a 100644 --- a/tests/bits/block_matrix_array_01.cc +++ b/tests/bits/block_matrix_array_01.cc @@ -27,7 +27,7 @@ #include -int main () +int main () { std::ofstream logfile("block_matrix_array_01/output"); deallog.attach(logfile); @@ -39,9 +39,9 @@ int main () FullMatrix B(4,3); FullMatrix C(3,3); PrimitiveVectorMemory > mem; - + BlockMatrixArray block(2,2,mem); - + block.enter(A1,0,0); block.enter(A2,0,0,2,true); block.enter(B,0,1,-3.); @@ -49,6 +49,6 @@ int main () block.enter(C,1,1,1.,true); block.print_latex(deallog); - + return 0; } diff --git a/tests/bits/block_sparse_matrix_1.cc b/tests/bits/block_sparse_matrix_1.cc index 8a0608fe50..1efd87b56f 100644 --- a/tests/bits/block_sparse_matrix_1.cc +++ b/tests/bits/block_sparse_matrix_1.cc @@ -60,51 +60,51 @@ int main() deallog.depth_console(0); deallog.threshold_double(1.e-10); - Triangulation<2> tria; + Triangulation<2> tria; GridGenerator::hyper_cube (tria,0,1); tria.refine_global (1); FE_Q_Hierarchical<2> fe (1); DoFHandler<2> dof_handler (tria); dof_handler.distribute_dofs (fe); - + BlockSparsityPattern sparsity_pattern; sparsity_pattern.reinit (2,2); sparsity_pattern.collect_sizes (); - + sparsity_pattern.block(0,0).reinit (dof_handler.n_dofs(), - dof_handler.n_dofs(), - dof_handler.max_couplings_between_dofs()); + dof_handler.n_dofs(), + dof_handler.max_couplings_between_dofs()); sparsity_pattern.block(0,1).reinit (dof_handler.n_dofs(), - 1, - 1); + 1, + 1); sparsity_pattern.block(1,0).reinit (1, - dof_handler.n_dofs(), - dof_handler.n_dofs()); + dof_handler.n_dofs(), + dof_handler.n_dofs()); sparsity_pattern.block(1,1).reinit (1, - 1, - 1); + 1, + 1); sparsity_pattern.collect_sizes (); - + DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern.block(0,0)); - + for (unsigned int j=0; j B; - B.reinit (sparsity_pattern); - - QGauss<2> qr (2); - FEValues<2> fe_values (dof_handler.get_fe(), - qr, UpdateFlags(update_values | - update_gradients | - update_q_points | - update_JxW_values)); + B.reinit (sparsity_pattern); + + QGauss<2> qr (2); + FEValues<2> fe_values (dof_handler.get_fe(), + qr, UpdateFlags(update_values | + update_gradients | + update_q_points | + update_JxW_values)); MatrixTools::create_laplace_matrix (dof_handler, qr, B.block(0,0)); B.block(1,1).add (0,0,1.); @@ -113,17 +113,17 @@ int main() B.block(0,0) *= 10.; B.print_formatted (deallog.get_file_stream (),3,false); - + B *= 10.; B.print_formatted (deallog.get_file_stream (),3,false); - + B /= 10.; B.print_formatted (deallog.get_file_stream (),3,false); - + B.block(0,0) /= 10.; B.print_formatted (deallog.get_file_stream (),3,false); B = 0; - + return 0; } diff --git a/tests/bits/block_sparse_matrix_2.cc b/tests/bits/block_sparse_matrix_2.cc index 9829220e7b..fa480ac96d 100644 --- a/tests/bits/block_sparse_matrix_2.cc +++ b/tests/bits/block_sparse_matrix_2.cc @@ -40,46 +40,46 @@ int main() deallog.depth_console(0); deallog.threshold_double(1.e-10); - Triangulation<2> tria; + Triangulation<2> tria; GridGenerator::hyper_cube (tria,0,1); tria.refine_global (1); FE_Q_Hierarchical<2> fe (1); DoFHandler<2> dof_handler (tria); dof_handler.distribute_dofs (fe); - + BlockSparsityPattern sparsity_pattern; sparsity_pattern.reinit (2,2); sparsity_pattern.collect_sizes (); - + sparsity_pattern.block(0,0).reinit (dof_handler.n_dofs(), - dof_handler.n_dofs(), - dof_handler.max_couplings_between_dofs()); + dof_handler.n_dofs(), + dof_handler.max_couplings_between_dofs()); sparsity_pattern.block(0,1).reinit (dof_handler.n_dofs(), - 1, - 1); + 1, + 1); sparsity_pattern.block(1,0).reinit (1, - dof_handler.n_dofs(), - dof_handler.n_dofs()); + dof_handler.n_dofs(), + dof_handler.n_dofs()); sparsity_pattern.block(1,1).reinit (1, - 1, - 1); + 1, + 1); sparsity_pattern.collect_sizes (); - + DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern.block(0,0)); - + for (unsigned int j=0; j B; - B.reinit (sparsity_pattern); + B.reinit (sparsity_pattern); - // check some sizes + // check some sizes Assert (B.m() == B.block(0,0).m() + B.block(1,1).m(), ExcInternalError()); Assert (B.n() == B.block(0,0).n() + B.block(1,1).n(), @@ -87,7 +87,7 @@ int main() Assert (B.n_block_rows() == 2, ExcInternalError()); Assert (B.n_block_cols() == 2, ExcInternalError()); - // then clear, and check again + // then clear, and check again B.clear (); Assert (B.m() == 0, ExcInternalError()); Assert (B.n() == 0, ExcInternalError()); @@ -95,6 +95,6 @@ int main() Assert (B.n_block_cols() == 0, ExcInternalError()); deallog << "OK" << std::endl; - + return 0; } diff --git a/tests/bits/block_sparse_matrix_iterator_01.cc b/tests/bits/block_sparse_matrix_iterator_01.cc index 7306d3f001..79dd72bbc3 100644 --- a/tests/bits/block_sparse_matrix_iterator_01.cc +++ b/tests/bits/block_sparse_matrix_iterator_01.cc @@ -40,25 +40,25 @@ template void test () { deallog << dim << "D" << std::endl; - + Triangulation triangulation; GridGenerator::hyper_cube (triangulation); - // refine once, then refine first cell to - // create hanging nodes + // refine once, then refine first cell to + // create hanging nodes triangulation.refine_global (1); triangulation.execute_coarsening_and_refinement (); deallog << "Number of cells: " << triangulation.n_active_cells() << std::endl; - - // set up a DoFHandler and compute hanging - // node constraints for a Q2 element + + // set up a DoFHandler and compute hanging + // node constraints for a Q2 element FE_Q fe(1); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); deallog << "Number of dofs: " << dof_handler.n_dofs() << std::endl; - // then set up a sparsity pattern and a - // matrix on top of it + // then set up a sparsity pattern and a + // matrix on top of it std::vector block_sizes(2); block_sizes[0] = dof_handler.n_dofs()/3; block_sizes[1] = dof_handler.n_dofs() - block_sizes[0]; @@ -69,14 +69,14 @@ void test () sparsity.block(i,j).reinit (block_sizes[i], block_sizes[j], dof_handler.max_couplings_between_dofs()); sparsity.collect_sizes(); - + DoFTools::make_sparsity_pattern (dof_handler, sparsity); sparsity.compress (); BlockSparseMatrix A(sparsity); - // and output what we have. first for the - // individual blocks, and later for all - // together (which yielded an abort) + // and output what we have. first for the + // individual blocks, and later for all + // together (which yielded an abort) deallog << "Blockwise output" << std::endl; for (unsigned int i=0; i<2; ++i) for (unsigned int j=0; j<2; ++j) @@ -109,25 +109,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/block_sparse_matrix_iterator_02.cc b/tests/bits/block_sparse_matrix_iterator_02.cc index 9964144fb3..54dfc93b8e 100644 --- a/tests/bits/block_sparse_matrix_iterator_02.cc +++ b/tests/bits/block_sparse_matrix_iterator_02.cc @@ -40,25 +40,25 @@ void test () { const int dim = 2; - + Triangulation triangulation; GridGenerator::hyper_cube (triangulation); - // refine once, then refine first cell to - // create hanging nodes + // refine once, then refine first cell to + // create hanging nodes triangulation.refine_global (1); triangulation.execute_coarsening_and_refinement (); deallog << "Number of cells: " << triangulation.n_active_cells() << std::endl; - - // set up a DoFHandler and compute hanging - // node constraints for a Q2 element + + // set up a DoFHandler and compute hanging + // node constraints for a Q2 element FE_Q fe(1); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); deallog << "Number of dofs: " << dof_handler.n_dofs() << std::endl; - // then set up a sparsity pattern and a - // matrix on top of it + // then set up a sparsity pattern and a + // matrix on top of it std::vector block_sizes(2); block_sizes[0] = dof_handler.n_dofs()/3; block_sizes[1] = dof_handler.n_dofs() - block_sizes[0]; @@ -69,21 +69,21 @@ void test () sparsity.block(i,j).reinit (block_sizes[i], block_sizes[j], dof_handler.max_couplings_between_dofs()); sparsity.collect_sizes(); - + DoFTools::make_sparsity_pattern (dof_handler, sparsity); sparsity.compress (); BlockSparseMatrix A(sparsity); const BlockSparseMatrix::const_iterator - begin = A.begin(), - end = A.end(); + begin = A.begin(), + end = A.end(); deallog << begin->row() << ' ' << begin->column() << ' ' << begin->block_row() << ' ' << begin->block_column() << std::endl; - // this matrix certainly has entries + // this matrix certainly has entries Assert (begin != end, ExcInternalError()); deallog << "OK" << std::endl; } @@ -104,25 +104,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/block_sparse_matrix_iterator_03.cc b/tests/bits/block_sparse_matrix_iterator_03.cc index 4ca9dd68cb..5107ccf41f 100644 --- a/tests/bits/block_sparse_matrix_iterator_03.cc +++ b/tests/bits/block_sparse_matrix_iterator_03.cc @@ -39,25 +39,25 @@ void test () { const int dim = 2; - + Triangulation triangulation; GridGenerator::hyper_cube (triangulation); - // refine once, then refine first cell to - // create hanging nodes + // refine once, then refine first cell to + // create hanging nodes triangulation.refine_global (1); triangulation.execute_coarsening_and_refinement (); deallog << "Number of cells: " << triangulation.n_active_cells() << std::endl; - - // set up a DoFHandler and compute hanging - // node constraints for a Q2 element + + // set up a DoFHandler and compute hanging + // node constraints for a Q2 element FE_Q fe(1); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); deallog << "Number of dofs: " << dof_handler.n_dofs() << std::endl; - // then set up a sparsity pattern and a - // matrix on top of it + // then set up a sparsity pattern and a + // matrix on top of it std::vector block_sizes(2); block_sizes[0] = dof_handler.n_dofs()/3; block_sizes[1] = dof_handler.n_dofs() - block_sizes[0]; @@ -68,21 +68,21 @@ void test () sparsity.block(i,j).reinit (block_sizes[i], block_sizes[j], dof_handler.max_couplings_between_dofs()); sparsity.collect_sizes(); - + DoFTools::make_sparsity_pattern (dof_handler, sparsity); sparsity.compress (); BlockSparseMatrix A(sparsity); const BlockSparseMatrix::const_iterator - begin = A.begin(), - end = A.end(); + begin = A.begin(), + end = A.end(); deallog << begin->row() << ' ' << begin->column() << ' ' << begin->block_row() << ' ' << begin->block_column() << std::endl; - // this matrix certainly has entries + // this matrix certainly has entries Assert (begin != end, ExcInternalError()); deallog << "OK" << std::endl; } @@ -103,25 +103,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/block_sparse_matrix_iterator_04.cc b/tests/bits/block_sparse_matrix_iterator_04.cc index 7204b9b7b5..d0ad31c827 100644 --- a/tests/bits/block_sparse_matrix_iterator_04.cc +++ b/tests/bits/block_sparse_matrix_iterator_04.cc @@ -38,17 +38,17 @@ void test () BlockSparseMatrix m(bsp); - // advance it to the end of the matrix + // advance it to the end of the matrix BlockSparseMatrix::const_iterator it = m.begin(); for (unsigned int i=0; i<4; ++i) ++it; - // now also get an end iterator + // now also get an end iterator BlockSparseMatrix::const_iterator it2 = m.end(); - // make sure that the two of them match + // make sure that the two of them match Assert (it == it2, ExcInternalError()); - + deallog << "OK" << std::endl; } @@ -68,25 +68,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/block_sparse_matrix_iterator_05.cc b/tests/bits/block_sparse_matrix_iterator_05.cc index d83eb968bc..0a81660631 100644 --- a/tests/bits/block_sparse_matrix_iterator_05.cc +++ b/tests/bits/block_sparse_matrix_iterator_05.cc @@ -29,25 +29,25 @@ void test () { - // create a 1x2 block matrix with - // non-quadratic blocks so as to make them - // not specially store the diagonal + // create a 1x2 block matrix with + // non-quadratic blocks so as to make them + // not specially store the diagonal BlockSparsityPattern bsp (1,2); for (unsigned int j=0; j<2; ++j) bsp.block(0,j).reinit (3,2,1); bsp.collect_sizes (); - // leave row 0 of block 0,0 empty, but have - // something in this row for block 0,1 + // leave row 0 of block 0,0 empty, but have + // something in this row for block 0,1 bsp.block(0,0).add (1,0); - bsp.block(0,1).add (0,0); + bsp.block(0,1).add (0,0); bsp.compress (); BlockSparseMatrix m(bsp); - // get the start iterator. it should point - // to the first element of the first row, - // which happens to be in block 0,1 + // get the start iterator. it should point + // to the first element of the first row, + // which happens to be in block 0,1 BlockSparseMatrix::const_iterator it = m.begin(); deallog << it->row() << ' ' @@ -59,14 +59,14 @@ void test () Assert (it->column() == 2, ExcInternalError()); Assert (it->block_row() == 0, ExcInternalError()); Assert (it->block_column() == 1, ExcInternalError()); - - // now advance by two (the only two - // elements of the matrix) and make sure - // that we equal the end iterator + + // now advance by two (the only two + // elements of the matrix) and make sure + // that we equal the end iterator ++it; ++it; Assert (it == m.end(), ExcInternalError()); - + deallog << "OK" << std::endl; } @@ -86,25 +86,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/block_vector_iterator_01.cc b/tests/bits/block_vector_iterator_01.cc index 5c855dae37..fad4c937a3 100644 --- a/tests/bits/block_vector_iterator_01.cc +++ b/tests/bits/block_vector_iterator_01.cc @@ -30,8 +30,8 @@ void test () v(0) = 1; v(1) = 2; - // first check reading through a const - // iterator + // first check reading through a const + // iterator { BlockVector::const_iterator i=v.begin(); Assert (*i == 1, ExcInternalError()); @@ -39,17 +39,17 @@ void test () Assert (*i == 2, ExcInternalError()); } - // same, but create iterator in a different - // way + // same, but create iterator in a different + // way { BlockVector::const_iterator - i=const_cast&>(v).begin(); + i=const_cast&>(v).begin(); Assert (*i == 1, ExcInternalError()); ++i; Assert (*i == 2, ExcInternalError()); } - // read through a read-write iterator + // read through a read-write iterator { BlockVector::iterator i = v.begin(); Assert (*i == 1, ExcInternalError()); @@ -57,23 +57,23 @@ void test () Assert (*i == 2, ExcInternalError()); } - // write through a read-write iterator + // write through a read-write iterator { BlockVector::iterator i = v.begin(); *i = 2; ++i; *i = 3; - } + } - // and read again + // and read again { BlockVector::iterator i = v.begin(); Assert (*i == 2, ExcInternalError()); ++i; Assert (*i == 3, ExcInternalError()); } - + deallog << "OK" << std::endl; } @@ -93,25 +93,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/block_vector_iterator_02.cc b/tests/bits/block_vector_iterator_02.cc index 7e1d5faadc..ab2982f402 100644 --- a/tests/bits/block_vector_iterator_02.cc +++ b/tests/bits/block_vector_iterator_02.cc @@ -30,44 +30,44 @@ void test () v(0) = 1; v(1) = 2; - // first check reading through a const - // iterator + // first check reading through a const + // iterator { BlockVector::const_iterator i=v.begin(); Assert (i[0] == 1, ExcInternalError()); Assert (i[1] == 2, ExcInternalError()); } - // same, but create iterator in a different - // way + // same, but create iterator in a different + // way { BlockVector::const_iterator - i=const_cast&>(v).begin(); + i=const_cast&>(v).begin(); Assert (i[0] == 1, ExcInternalError()); Assert (i[1] == 2, ExcInternalError()); } - // read through a read-write iterator + // read through a read-write iterator { BlockVector::iterator i = v.begin(); Assert (i[0] == 1, ExcInternalError()); Assert (i[1] == 2, ExcInternalError()); } - // write through a read-write iterator + // write through a read-write iterator { BlockVector::iterator i = v.begin(); i[0] = 2; i[1] = 3; - } + } - // and read again + // and read again { BlockVector::iterator i = v.begin(); Assert (i[0] == 2, ExcInternalError()); Assert (i[1] == 3, ExcInternalError()); } - + deallog << "OK" << std::endl; } @@ -87,25 +87,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/block_vector_vector_01.cc b/tests/bits/block_vector_vector_01.cc index 6af75c4a83..b40212a7a8 100644 --- a/tests/bits/block_vector_vector_01.cc +++ b/tests/bits/block_vector_vector_01.cc @@ -23,7 +23,7 @@ // now autoconf'ed. #include "../tests.h" -#include +#include #include #include @@ -35,13 +35,13 @@ void test (Vector &v) Vector w(v); Assert (w==v, ExcInternalError()); - + deallog << "OK" << std::endl; } -int main () +int main () { std::ofstream logfile("block_vector_vector_01/output"); deallog.attach(logfile); @@ -56,25 +56,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/christian_1.cc b/tests/bits/christian_1.cc index a5dafce301..59204ba07c 100644 --- a/tests/bits/christian_1.cc +++ b/tests/bits/christian_1.cc @@ -40,61 +40,63 @@ namespace DoFToolsEx { /// transfers solution between differently refined grids template - void transfer(const DoFHandler& source_dof, const InVector& source_vector, const DoFHandler& target_dof, OutVector& target_vector); + void transfer(const DoFHandler &source_dof, const InVector &source_vector, const DoFHandler &target_dof, OutVector &target_vector); } /** * Detailed desc. * Does it make sense to have InVector and OutVector templates? Shouldn't just one Vector be enough? - * + * * @param - * + * */ template void -DoFToolsEx::transfer(const DoFHandler& source_dof, const InVector& source_vector, const DoFHandler& target_dof, OutVector& target_vector) +DoFToolsEx::transfer(const DoFHandler &source_dof, const InVector &source_vector, const DoFHandler &target_dof, OutVector &target_vector) { // any sanity tests? Trias derived from same coarse grid? - + // build mappings between the cells InterGridMap > source2target, target2source; source2target.make_mapping(source_dof, target_dof); target2source.make_mapping(target_dof, source_dof); - + // setup temporary vector InVector local_dofs(source_dof.get_fe().dofs_per_cell); - + // iterate over all active source cells typedef typename DoFHandler::active_cell_iterator cell_iterator; cell_iterator cell = source_dof.begin_active(), endc = source_dof.end(); - for(; cell != endc; ++cell) - { - if(cell->level() == source2target[cell]->level()) + for (; cell != endc; ++cell) { - // cell has not been coarsend, but possibly been refined - cell->get_dof_values(source_vector, local_dofs); - source2target[cell]->set_dof_values_by_interpolation(local_dofs, target_vector); + if (cell->level() == source2target[cell]->level()) + { + // cell has not been coarsend, but possibly been refined + cell->get_dof_values(source_vector, local_dofs); + source2target[cell]->set_dof_values_by_interpolation(local_dofs, target_vector); + } + else + { + // the source cell has been coarsened + Assert(cell->level() > source2target[cell]->level(), ExcInternalError()); + target2source[ source2target[cell] ]->get_interpolated_dof_values(source_vector, local_dofs); + source2target[cell]->set_dof_values(local_dofs, target_vector); + } } - else - { - // the source cell has been coarsened - Assert(cell->level() > source2target[cell]->level(), ExcInternalError()); - target2source[ source2target[cell] ]->get_interpolated_dof_values(source_vector, local_dofs); - source2target[cell]->set_dof_values(local_dofs, target_vector); - } - } - + // handle hanging node constraints inside or outside of this function? } class TestFunction : public Function<2> { - public: - TestFunction() : Function<2>() {} - virtual double value(const Point<2> &p, - const unsigned int) const - { return std::sin(3.14159*p(0))*std::sin(3.14159*p(1)); } +public: + TestFunction() : Function<2>() {} + virtual double value(const Point<2> &p, + const unsigned int) const + { + return std::sin(3.14159*p(0))*std::sin(3.14159*p(1)); + } }; int main() @@ -105,7 +107,7 @@ int main() deallog.threshold_double(1.e-10); - // build test-case trias + // build test-case trias Triangulation<2> tria; Triangulation<2> refined_tria; Triangulation<2> coarse_tria; @@ -123,7 +125,7 @@ int main() Triangulation<2>::active_cell_iterator it = both_tria.begin_active(); it->set_refine_flag(); (++it)->set_refine_flag(); - for(int i = 1; i < 8; ++i, ++it) + for (int i = 1; i < 8; ++i, ++it) ; it->set_coarsen_flag(); (++it)->set_coarsen_flag(); @@ -133,7 +135,7 @@ int main() // finite element FE_Q<2> fe(1); - + // dof handlers DoFHandler<2> dof(tria), refined_dof(refined_tria), coarse_dof(coarse_tria), both_dof(both_tria); dof.distribute_dofs(fe); @@ -148,18 +150,18 @@ int main() // setup solution vectors Vector refined_sol(refined_dof.n_dofs()), coarse_sol(coarse_dof.n_dofs()), both_sol(both_dof.n_dofs()); - + // transfer solutions DoFToolsEx::transfer(dof, sol, refined_dof, refined_sol); DoFToolsEx::transfer(dof, sol, coarse_dof, coarse_sol); DoFToolsEx::transfer(dof, sol, both_dof, both_sol); - + // handle hanging nodes ConstraintMatrix both_constraints; DoFTools::make_hanging_node_constraints(both_dof, both_constraints); both_constraints.close(); both_constraints.distribute(both_sol); - + // reference output using DataOut to create seperate files DataOut<2> data_out; data_out.attach_dof_handler(dof); diff --git a/tests/bits/christian_2.cc b/tests/bits/christian_2.cc index b9051982bd..a0d73999b2 100644 --- a/tests/bits/christian_2.cc +++ b/tests/bits/christian_2.cc @@ -37,7 +37,7 @@ int main() Triangulation<2> tria; GridGenerator::hyper_cube(tria, 0, 1); FE_Q<2> fe(1); - + DoFHandler<2> dof(tria); dof.distribute_dofs(fe); @@ -45,7 +45,7 @@ int main() for (unsigned int i=0; i data_out_stack; data_out_stack.declare_data_vector("dof", DataOutStack<2>::dof_vector); data_out_stack.new_parameter_value(2.5,1.); diff --git a/tests/bits/chunk_sparse_matrix_00.cc b/tests/bits/chunk_sparse_matrix_00.cc index d6969bcb9d..c3247ac9af 100644 --- a/tests/bits/chunk_sparse_matrix_00.cc +++ b/tests/bits/chunk_sparse_matrix_00.cc @@ -20,7 +20,7 @@ // yield the same result for all chunk sizes, of course #include "../tests.h" -#include +#include #include #include @@ -28,7 +28,7 @@ void test (const unsigned int chunk_size) { deallog << "Chunk size = " << chunk_size << std::endl; - + ChunkSparsityPattern sp (5,5,3,chunk_size,false); for (unsigned int i=0; i<5; ++i) for (unsigned int j=0; j<5; ++j) @@ -37,19 +37,19 @@ void test (const unsigned int chunk_size) sp.compress (); ChunkSparseMatrix m(sp); - - // first set a few entries + + // first set a few entries for (unsigned int i=0; i +#include #include #include @@ -35,14 +35,14 @@ void test (const unsigned int chunk_size) sp.compress (); ChunkSparseMatrix m(sp); - - // first set a few entries + + // first set a few entries for (unsigned int i=0; i m(sp); - // first set a few entries + // first set a few entries for (unsigned int i=0; i1, then this isn't - // necessarily true. because the - // matrix is square, we may also - // always access the diagonal - // element + // reading elements not in the + // sparsity pattern should return + // zero + const double x = m.el(i,j); + Assert (x == 0, ExcInternalError()); + + // if this is a sparsity_pattern + // with chunk_size==1, then we need + // to get an exception if we access + // any other element. if + // chunk_size>1, then this isn't + // necessarily true. because the + // matrix is square, we may also + // always access the diagonal + // element bool exc_thrown = false; try { @@ -78,7 +78,7 @@ void test (const unsigned int chunk_size) exc_thrown = true; } Assert ((exc_thrown == true) || (chunk_size > 1) || (i==j), - ExcInternalError()); + ExcInternalError()); } deallog << "OK" << std::endl; @@ -97,32 +97,32 @@ int main () { const unsigned int chunk_sizes[] = { 1, 2, 4, 5, 7 }; for (unsigned int i=0; - i +#include #include @@ -35,13 +35,13 @@ void test (const unsigned int chunk_size) ChunkSparseMatrix m(sp); - // first set a few entries + // first set a few entries for (unsigned int i=0; i +#include #include @@ -36,8 +36,8 @@ void test (const unsigned int chunk_size) sp.compress (); ChunkSparseMatrix m(sp); - - // first set a few entries + + // first set a few entries for (unsigned int i=0; i +#include #include @@ -39,20 +39,20 @@ void test (const unsigned int chunk_size) sp.compress (); ChunkSparseMatrix m(sp); - - // first set a few entries + + // first set a few entries for (unsigned int i=0; i +#include #include @@ -39,20 +39,20 @@ void test (const unsigned int chunk_size) sp.compress (); ChunkSparseMatrix m(sp); - - // first set a few entries + + // first set a few entries for (unsigned int i=0; i +#include #include @@ -33,7 +33,7 @@ void test (const unsigned int chunk_size) sp.compress (); ChunkSparseMatrix m(sp); - + Assert (m.m() == 5, ExcInternalError()); Assert (m.n() == 5, ExcInternalError()); @@ -53,32 +53,32 @@ int main () { const unsigned int chunk_sizes[] = { 1, 2, 4, 5, 7 }; for (unsigned int i=0; - i +#include #include @@ -34,13 +34,13 @@ void test (const unsigned int chunk_size) sp.compress (); ChunkSparseMatrix m(sp); - - // first set a few entries. count how many - // entries we have. note that for square - // matrices we also always store the - // diagonal element, so add one per row, - // but don't count it when traversing the - // row + + // first set a few entries. count how many + // entries we have. note that for square + // matrices we also always store the + // diagonal element, so add one per row, + // but don't count it when traversing the + // row unsigned int counter = 0; for (unsigned int i=0; i= counter, - ExcInternalError()); - + ExcInternalError()) + else + Assert (m.n_nonzero_elements() >= counter, + ExcInternalError()); + deallog << "OK" << std::endl; } @@ -78,32 +78,32 @@ int main () { const unsigned int chunk_sizes[] = { 1, 2, 4, 5, 7 }; for (unsigned int i=0; - i m(sp); - // first set a few entries. count how many - // entries we have. note that for square - // matrices we also always store the - // diagonal element + // first set a few entries. count how many + // entries we have. note that for square + // matrices we also always store the + // diagonal element unsigned int counter = 0; for (unsigned int i=0; i= counter, - ExcInternalError()); + ExcInternalError()) + else + Assert (m.n_nonzero_elements() >= counter, + ExcInternalError()); deallog << "OK" << std::endl; } @@ -73,32 +73,32 @@ int main () { const unsigned int chunk_sizes[] = { 1, 2, 4, 5, 7 }; for (unsigned int i=0; - i +#include #include @@ -33,19 +33,19 @@ void test (const unsigned int chunk_size) sp.compress (); ChunkSparseMatrix m(sp); - - // first set a few entries. count how many - // entries we have + + // first set a few entries. count how many + // entries we have for (unsigned int i=0; i +#include #include @@ -33,19 +33,19 @@ void test (const unsigned int chunk_size) sp.compress (); ChunkSparseMatrix m(sp); - - // first set a few entries. count how many - // entries we have + + // first set a few entries. count how many + // entries we have for (unsigned int i=0; i +#include #include @@ -33,9 +33,9 @@ void test (const unsigned int chunk_size) sp.compress (); ChunkSparseMatrix m(sp); - - // first set a few entries. count how many - // entries we have + + // first set a few entries. count how many + // entries we have double norm = 0; for (unsigned int i=0; i +#include #include @@ -33,18 +33,18 @@ void test (const unsigned int chunk_size) sp.compress (); ChunkSparseMatrix m(sp); - - // first set a few entries + + // first set a few entries for (unsigned int i=0; i +#include #include @@ -33,18 +33,18 @@ void test (const unsigned int chunk_size) sp.compress (); ChunkSparseMatrix m(sp); - - // first set a few entries + + // first set a few entries for (unsigned int i=0; i m(sp); - // first set a few entries + // first set a few entries for (unsigned int i=0; i m(sp); - // first set a few entries + // first set a few entries for (unsigned int i=0; i m(sp); - // first set a few entries + // first set a few entries for (unsigned int i=0; i m(sp); - // first set a few entries + // first set a few entries for (unsigned int i=0; i m(sp); - // first set a few entries + // first set a few entries for (unsigned int i=0; i +#include #include #include @@ -44,7 +44,7 @@ void test (const unsigned int chunk_size) || (i==j)) m.set (i,j, i*j); - + ChunkSparseMatrix::const_iterator i = m.begin(); for (; i!=m.end(); ++i) { @@ -77,32 +77,32 @@ int main () { const unsigned int chunk_sizes[] = { 1, 2, 4, 5, 7 }; for (unsigned int i=0; - i +#include #include #include @@ -44,7 +44,7 @@ void test (const unsigned int chunk_size) || (i==j)) m.set (i,j, i*j); - + ChunkSparseMatrix::iterator i = m.begin(); for (; i!=m.end(); ++i) { @@ -77,32 +77,32 @@ int main () { const unsigned int chunk_sizes[] = { 1, 2, 4, 5, 7 }; for (unsigned int i=0; - i +#include #include #include @@ -40,7 +40,7 @@ void test (const unsigned int chunk_size) ChunkSparseMatrix::iterator i = m.begin(); for (; i!=m.end(); ++i) i->value() = i->row()*i->column(); - + for (unsigned int i=0; i<5; ++i) for (unsigned int j=0; j<5; ++j) if (((i+2*j+1) % 3 == 0) @@ -52,7 +52,7 @@ void test (const unsigned int chunk_size) Assert (std::fabs(m.el(i,j)-i*j) < 1e-14, ExcInternalError()); } - + deallog << "OK" << std::endl; } @@ -76,25 +76,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/chunk_sparse_matrix_iterator_05.cc b/tests/bits/chunk_sparse_matrix_iterator_05.cc index a64f6f5f16..3eabc3730a 100644 --- a/tests/bits/chunk_sparse_matrix_iterator_05.cc +++ b/tests/bits/chunk_sparse_matrix_iterator_05.cc @@ -19,7 +19,7 @@ // operator+=, and reading them back through the matrix itself #include "../tests.h" -#include +#include #include #include @@ -47,7 +47,7 @@ void test (const unsigned int chunk_size) ChunkSparseMatrix::iterator i = m.begin(); for (; i!=m.end(); ++i) i->value() += i->row()*i->column(); - + for (unsigned int i=0; i<5; ++i) for (unsigned int j=0; j<5; ++j) if (((i+2*j+1) % 3 == 0) @@ -59,7 +59,7 @@ void test (const unsigned int chunk_size) Assert (std::fabs(m.el(i,j)-(1.+i*j)) < 1e-14, ExcInternalError()); } - + deallog << "OK" << std::endl; } @@ -83,25 +83,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/chunk_sparse_matrix_iterator_06.cc b/tests/bits/chunk_sparse_matrix_iterator_06.cc index 7d76f1fb1f..2299c95393 100644 --- a/tests/bits/chunk_sparse_matrix_iterator_06.cc +++ b/tests/bits/chunk_sparse_matrix_iterator_06.cc @@ -19,7 +19,7 @@ // operator-=, and reading them back through the matrix itself #include "../tests.h" -#include +#include #include #include @@ -47,7 +47,7 @@ void test (const unsigned int chunk_size) ChunkSparseMatrix::iterator i = m.begin(); for (; i!=m.end(); ++i) i->value() -= i->row()*i->column(); - + for (unsigned int i=0; i<5; ++i) for (unsigned int j=0; j<5; ++j) if (((i+2*j+1) % 3 == 0) @@ -66,7 +66,7 @@ void test (const unsigned int chunk_size) Assert (std::fabs(m.el(i,j)+i*j) < 1e-14, ExcInternalError()); } - + deallog << "OK" << std::endl; } @@ -90,25 +90,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/chunk_sparse_matrix_iterator_07.cc b/tests/bits/chunk_sparse_matrix_iterator_07.cc index c85fc2075e..efb7904aee 100644 --- a/tests/bits/chunk_sparse_matrix_iterator_07.cc +++ b/tests/bits/chunk_sparse_matrix_iterator_07.cc @@ -19,7 +19,7 @@ // operator*=, and reading them back through the matrix itself #include "../tests.h" -#include +#include #include #include @@ -47,7 +47,7 @@ void test (const unsigned int chunk_size) ChunkSparseMatrix::iterator i = m.begin(); for (; i!=m.end(); ++i) i->value() *= 2; - + for (unsigned int i=0; i<5; ++i) for (unsigned int j=0; j<5; ++j) if (((i+2*j+1) % 3 == 0) @@ -66,7 +66,7 @@ void test (const unsigned int chunk_size) Assert (std::fabs(m.el(i,j)) < 1e-14, ExcInternalError()); } - + deallog << "OK" << std::endl; } @@ -90,25 +90,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/chunk_sparse_matrix_iterator_08.cc b/tests/bits/chunk_sparse_matrix_iterator_08.cc index eabb412e70..b8fbb2a279 100644 --- a/tests/bits/chunk_sparse_matrix_iterator_08.cc +++ b/tests/bits/chunk_sparse_matrix_iterator_08.cc @@ -19,7 +19,7 @@ // operator/=, and reading them back through the matrix itself #include "../tests.h" -#include +#include #include #include @@ -47,7 +47,7 @@ void test (const unsigned int chunk_size) ChunkSparseMatrix::iterator i = m.begin(); for (; i!=m.end(); ++i) i->value() /= 2; - + for (unsigned int i=0; i<5; ++i) for (unsigned int j=0; j<5; ++j) if (((i+2*j+1) % 3 == 0) @@ -66,7 +66,7 @@ void test (const unsigned int chunk_size) Assert (std::fabs(m.el(i,j)) < 1e-14, ExcInternalError()); } - + deallog << "OK" << std::endl; } @@ -90,25 +90,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/chunk_sparse_matrix_iterator_09.cc b/tests/bits/chunk_sparse_matrix_iterator_09.cc index 50f3f09500..bf84076ddf 100644 --- a/tests/bits/chunk_sparse_matrix_iterator_09.cc +++ b/tests/bits/chunk_sparse_matrix_iterator_09.cc @@ -28,18 +28,18 @@ void test (const unsigned int chunk_size) { deallog << "Chunk size: " << chunk_size << std::endl; - // create a sparsity pattern with totally - // empty lines (not even diagonals, since - // not quadratic) + // create a sparsity pattern with totally + // empty lines (not even diagonals, since + // not quadratic) ChunkSparsityPattern sparsity(4,5,1,chunk_size); sparsity.add (1,1); sparsity.add (3,1); sparsity.compress (); - // attach a sparse matrix to it + // attach a sparse matrix to it ChunkSparseMatrix A(sparsity); - // and loop over the elements of it + // and loop over the elements of it for (ChunkSparseMatrix::const_iterator k=A.begin(); k!=A.end(); ++k) deallog << k->row() << ' ' << k->column() << ' ' << k->value() @@ -63,25 +63,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/chunk_sparse_matrix_iterator_10.cc b/tests/bits/chunk_sparse_matrix_iterator_10.cc index 1ae6cc8349..9c17bb6f4f 100644 --- a/tests/bits/chunk_sparse_matrix_iterator_10.cc +++ b/tests/bits/chunk_sparse_matrix_iterator_10.cc @@ -30,18 +30,18 @@ void test (const unsigned int chunk_size) { deallog << "Chunk size: " << chunk_size << std::endl; - // create a sparsity pattern with totally - // empty lines (not even diagonals, since - // not quadratic) + // create a sparsity pattern with totally + // empty lines (not even diagonals, since + // not quadratic) ChunkSparsityPattern sparsity(4,5,1,chunk_size); sparsity.add (1,1); sparsity.add (3,1); sparsity.compress (); - // attach a sparse matrix to it + // attach a sparse matrix to it ChunkSparseMatrix A(sparsity); - // and loop over the elements of it + // and loop over the elements of it for (ChunkSparseMatrix::const_iterator k=A.begin(); k!=A.end(); ++k) deallog << k->row() << ' ' << k->column() << ' ' << k->value() @@ -65,25 +65,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/chunk_sparse_matrix_iterator_11.cc b/tests/bits/chunk_sparse_matrix_iterator_11.cc index a98f72f910..b357927c02 100644 --- a/tests/bits/chunk_sparse_matrix_iterator_11.cc +++ b/tests/bits/chunk_sparse_matrix_iterator_11.cc @@ -29,15 +29,15 @@ void test (const unsigned int chunk_size) { deallog << "Chunk size: " << chunk_size << std::endl; - // create a sparsity pattern with totally - // empty lines (not even diagonals, since - // not quadratic) + // create a sparsity pattern with totally + // empty lines (not even diagonals, since + // not quadratic) ChunkSparsityPattern sparsity(4,5,1,chunk_size); sparsity.add (1,1); sparsity.add (3,1); sparsity.compress (); - // attach a sparse matrix to it + // attach a sparse matrix to it ChunkSparseMatrix A(sparsity); ChunkSparseMatrix::iterator k = A.begin(), @@ -54,7 +54,7 @@ void test (const unsigned int chunk_size) Assert (k == k, ExcInternalError()); Assert (!(k != k), ExcInternalError()); - + deallog << "OK" << std::endl; } @@ -75,25 +75,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/chunk_sparse_matrix_iterator_12.cc b/tests/bits/chunk_sparse_matrix_iterator_12.cc index 97ff309aef..8bdb6ecded 100644 --- a/tests/bits/chunk_sparse_matrix_iterator_12.cc +++ b/tests/bits/chunk_sparse_matrix_iterator_12.cc @@ -28,15 +28,15 @@ void test (const unsigned int chunk_size) { deallog << "Chunk size: " << chunk_size << std::endl; - // create a sparsity pattern with totally - // empty lines (not even diagonals, since - // not quadratic) + // create a sparsity pattern with totally + // empty lines (not even diagonals, since + // not quadratic) ChunkSparsityPattern sparsity(4,5,1,chunk_size); sparsity.add (1,1); sparsity.add (3,1); sparsity.compress (); - // attach a sparse matrix to it + // attach a sparse matrix to it ChunkSparseMatrix A(sparsity); ChunkSparseMatrix::const_iterator k = A.begin(), @@ -53,7 +53,7 @@ void test (const unsigned int chunk_size) Assert (k == k, ExcInternalError()); Assert (!(k != k), ExcInternalError()); - + deallog << "OK" << std::endl; } @@ -74,25 +74,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/chunk_sparse_matrix_iterator_13.cc b/tests/bits/chunk_sparse_matrix_iterator_13.cc index ec4b64db0b..4d07e3925f 100644 --- a/tests/bits/chunk_sparse_matrix_iterator_13.cc +++ b/tests/bits/chunk_sparse_matrix_iterator_13.cc @@ -28,9 +28,9 @@ void test (const unsigned int chunk_size) { deallog << "Chunk size: " << chunk_size << std::endl; - // create a sparsity pattern with totally - // empty lines (not even diagonals, since - // not quadratic) + // create a sparsity pattern with totally + // empty lines (not even diagonals, since + // not quadratic) ChunkSparsityPattern sp(5,5,3,chunk_size); for (unsigned int i=0; i<5; ++i) for (unsigned int j=0; j<5; ++j) @@ -40,29 +40,29 @@ void test (const unsigned int chunk_size) sp.add (i,j); sp.compress (); - // attach a sparse matrix to it + // attach a sparse matrix to it ChunkSparseMatrix m(sp); for (unsigned int row=0; row &v, + Vector &v, Vector &w) { - // set some entries in the - // matrix. actually, set them all + // set some entries in the + // matrix. actually, set them all ChunkSparsityPattern sp (v.size(),v.size(),v.size(), chunk_size); for (unsigned int i=0; i m(sp); for (unsigned int i=0; i v (100); - Vector w (100); - test (chunk_sizes[i], v,w); - } + ++i) + { + Vector v (100); + Vector w (100); + test (chunk_sizes[i], v,w); + } } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/chunk_sparse_matrix_vector_02.cc b/tests/bits/chunk_sparse_matrix_vector_02.cc index 8f950d57db..eb040b6904 100644 --- a/tests/bits/chunk_sparse_matrix_vector_02.cc +++ b/tests/bits/chunk_sparse_matrix_vector_02.cc @@ -27,33 +27,33 @@ void test (const unsigned int chunk_size, - Vector &v, + Vector &v, Vector &w) { - // set some entries in the - // matrix. actually, set them all + // set some entries in the + // matrix. actually, set them all ChunkSparsityPattern sp (v.size(),v.size(),v.size(), chunk_size); for (unsigned int i=0; i m(sp); for (unsigned int i=0; i v (100); - Vector w (100); - test (chunk_sizes[i], v,w); - } + ++i) + { + Vector v (100); + Vector w (100); + test (chunk_sizes[i], v,w); + } } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/chunk_sparse_matrix_vector_03.cc b/tests/bits/chunk_sparse_matrix_vector_03.cc index bc4252dbed..20e03de588 100644 --- a/tests/bits/chunk_sparse_matrix_vector_03.cc +++ b/tests/bits/chunk_sparse_matrix_vector_03.cc @@ -27,36 +27,36 @@ void test (const unsigned int chunk_size, - Vector &v, + Vector &v, Vector &w) { - // set some entries in the - // matrix. actually, set them all + // set some entries in the + // matrix. actually, set them all ChunkSparsityPattern sp (v.size(),v.size(),v.size(), chunk_size); for (unsigned int i=0; i m(sp); for (unsigned int i=0; i v (100); - Vector w (100); - test (chunk_sizes[i], v,w); - } + ++i) + { + Vector v (100); + Vector w (100); + test (chunk_sizes[i], v,w); + } } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/chunk_sparse_matrix_vector_04.cc b/tests/bits/chunk_sparse_matrix_vector_04.cc index 7e37a33e03..69f8bb7fe4 100644 --- a/tests/bits/chunk_sparse_matrix_vector_04.cc +++ b/tests/bits/chunk_sparse_matrix_vector_04.cc @@ -27,36 +27,36 @@ void test (const unsigned int chunk_size, - Vector &v, + Vector &v, Vector &w) { - // set some entries in the - // matrix. actually, set them all + // set some entries in the + // matrix. actually, set them all ChunkSparsityPattern sp (v.size(),v.size(),v.size(), chunk_size); for (unsigned int i=0; i m(sp); for (unsigned int i=0; i v (100); - Vector w (100); - test (chunk_sizes[i], v,w); - } + ++i) + { + Vector v (100); + Vector w (100); + test (chunk_sizes[i], v,w); + } } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/chunk_sparse_matrix_vector_05.cc b/tests/bits/chunk_sparse_matrix_vector_05.cc index 55a3b24afc..eae0f17693 100644 --- a/tests/bits/chunk_sparse_matrix_vector_05.cc +++ b/tests/bits/chunk_sparse_matrix_vector_05.cc @@ -27,36 +27,36 @@ void test (const unsigned int chunk_size, - Vector &v, + Vector &v, Vector &w) { - // set some entries in the - // matrix. actually, set them all + // set some entries in the + // matrix. actually, set them all ChunkSparsityPattern sp (v.size(),v.size(),v.size(), chunk_size); for (unsigned int i=0; i m(sp); for (unsigned int i=0; i + // const double s = m.matrix_scalar_product (w,v); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i v (100); - Vector w (100); - test (chunk_sizes[i],v,w); - } + ++i) + { + Vector v (100); + Vector w (100); + test (chunk_sizes[i],v,w); + } } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/chunk_sparse_matrix_vector_06.cc b/tests/bits/chunk_sparse_matrix_vector_06.cc index 093a672e4e..79c129819f 100644 --- a/tests/bits/chunk_sparse_matrix_vector_06.cc +++ b/tests/bits/chunk_sparse_matrix_vector_06.cc @@ -27,31 +27,31 @@ void test (const unsigned int chunk_size, - Vector &v) + Vector &v) { - // set some entries in the - // matrix. actually, set them all + // set some entries in the + // matrix. actually, set them all ChunkSparsityPattern sp (v.size(),v.size(),v.size(), chunk_size); for (unsigned int i=0; i m(sp); for (unsigned int i=0; i + // const double s = m.matrix_norm_square (v); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i v (100); - test (chunk_sizes[i], v); - } + ++i) + { + Vector v (100); + test (chunk_sizes[i], v); + } } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/chunk_sparse_matrix_vector_07.cc b/tests/bits/chunk_sparse_matrix_vector_07.cc index f84a4608a5..6770a39cae 100644 --- a/tests/bits/chunk_sparse_matrix_vector_07.cc +++ b/tests/bits/chunk_sparse_matrix_vector_07.cc @@ -27,37 +27,37 @@ void test (const unsigned int chunk_size, - Vector &v, + Vector &v, Vector &w, Vector &x) { - // set some entries in the - // matrix. actually, set them all + // set some entries in the + // matrix. actually, set them all ChunkSparsityPattern sp (v.size(),v.size(),v.size(), chunk_size); for (unsigned int i=0; i m(sp); for (unsigned int i=0; i v (100); - Vector w (100); - Vector x (100); - test (chunk_sizes[i],v,w,x); - } + ++i) + { + Vector v (100); + Vector w (100); + Vector x (100); + test (chunk_sizes[i],v,w,x); + } } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/coarsening_3d.cc b/tests/bits/coarsening_3d.cc index 48d3ff506f..dffdabab97 100644 --- a/tests/bits/coarsening_3d.cc +++ b/tests/bits/coarsening_3d.cc @@ -32,7 +32,7 @@ #include -int main () +int main () { std::ofstream logfile("coarsening_3d/output"); deallog.attach(logfile); @@ -42,7 +42,7 @@ int main () Triangulation<3> coarse_grid; create_L_shape (coarse_grid); - // refine once, then unrefine again + // refine once, then unrefine again coarse_grid.refine_global (1); for (Triangulation<3>::active_cell_iterator c=coarse_grid.begin_active(); c != coarse_grid.end(); ++c) @@ -52,5 +52,5 @@ int main () deallog << "ok." << std::endl; } - - + + diff --git a/tests/bits/complex_complex_full_matrix_02.cc b/tests/bits/complex_complex_full_matrix_02.cc index 88ab1a6b12..5717b754a3 100644 --- a/tests/bits/complex_complex_full_matrix_02.cc +++ b/tests/bits/complex_complex_full_matrix_02.cc @@ -36,9 +36,9 @@ check () make_complex_matrix (m); for (typename FullMatrix >::const_iterator - p = m.begin(); p!=m.end(); ++p) + p = m.begin(); p!=m.end(); ++p) deallog << p->row() << ' ' << p->column() << ' ' - << p->value() - << std::endl; + << p->value() + << std::endl; } diff --git a/tests/bits/complex_complex_full_matrix_03.cc b/tests/bits/complex_complex_full_matrix_03.cc index ac30360b66..02de710b14 100644 --- a/tests/bits/complex_complex_full_matrix_03.cc +++ b/tests/bits/complex_complex_full_matrix_03.cc @@ -35,11 +35,11 @@ check () FullMatrix > m; make_complex_matrix (m); - + for (typename FullMatrix >::const_iterator - p = m.begin(1); p!=m.end(1); ++p) + p = m.begin(1); p!=m.end(1); ++p) deallog << p->row() << ' ' << p->column() << ' ' - << p->value() - << std::endl; + << p->value() + << std::endl; } diff --git a/tests/bits/complex_complex_full_matrix_04.cc b/tests/bits/complex_complex_full_matrix_04.cc index b47dfc10ff..5d0c85d3ea 100644 --- a/tests/bits/complex_complex_full_matrix_04.cc +++ b/tests/bits/complex_complex_full_matrix_04.cc @@ -33,11 +33,12 @@ void check () { const std::complex array[] = { 1, 2, 3, 4, 5, - 6, 7, 8, 9, 0, - 1, 2, 3, 4, 5, - 6, 7, 8, 9, 0, - 1, 2, 3, 4, 5 }; - + 6, 7, 8, 9, 0, + 1, 2, 3, 4, 5, + 6, 7, 8, 9, 0, + 1, 2, 3, 4, 5 + }; + FullMatrix > m (5,5,array); print_matrix (m); diff --git a/tests/bits/complex_complex_full_matrix_06.cc b/tests/bits/complex_complex_full_matrix_06.cc index 25c8d95202..3884240559 100644 --- a/tests/bits/complex_complex_full_matrix_06.cc +++ b/tests/bits/complex_complex_full_matrix_06.cc @@ -37,7 +37,7 @@ check () FullMatrix > n; n = m; - + print_matrix (n); } diff --git a/tests/bits/complex_complex_full_matrix_08.cc b/tests/bits/complex_complex_full_matrix_08.cc index 14624842b5..a205c4006b 100644 --- a/tests/bits/complex_complex_full_matrix_08.cc +++ b/tests/bits/complex_complex_full_matrix_08.cc @@ -37,7 +37,7 @@ check () FullMatrix > n; n.copy_from (m); - + print_matrix (n); } diff --git a/tests/bits/complex_complex_full_matrix_12.cc b/tests/bits/complex_complex_full_matrix_12.cc index f900c889cc..b1b51d5df7 100644 --- a/tests/bits/complex_complex_full_matrix_12.cc +++ b/tests/bits/complex_complex_full_matrix_12.cc @@ -34,7 +34,7 @@ check () { FullMatrix > m(3,3); deallog << m.all_zero() << std::endl; - + make_complex_matrix (m); deallog << m.all_zero() << std::endl; } diff --git a/tests/bits/complex_complex_full_matrix_13.cc b/tests/bits/complex_complex_full_matrix_13.cc index a1d6093104..bb5831777f 100644 --- a/tests/bits/complex_complex_full_matrix_13.cc +++ b/tests/bits/complex_complex_full_matrix_13.cc @@ -36,7 +36,7 @@ check () make_complex_matrix (m); Vector > v; make_complex_vector (v); - + deallog << m.matrix_norm_square (v) << std::endl; } diff --git a/tests/bits/complex_complex_full_matrix_14.cc b/tests/bits/complex_complex_full_matrix_14.cc index 0f39f4793c..3b039195bf 100644 --- a/tests/bits/complex_complex_full_matrix_14.cc +++ b/tests/bits/complex_complex_full_matrix_14.cc @@ -39,7 +39,7 @@ check () make_complex_vector (w); for (unsigned int i=0; i(1.); - + deallog << m.matrix_scalar_product (v,w) << std::endl; } diff --git a/tests/bits/complex_complex_full_matrix_19.cc b/tests/bits/complex_complex_full_matrix_19.cc index d2eccc4d4c..1ee1189583 100644 --- a/tests/bits/complex_complex_full_matrix_19.cc +++ b/tests/bits/complex_complex_full_matrix_19.cc @@ -35,7 +35,7 @@ check () for (unsigned int n=1; n<=3; ++n) { const std::complex array[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; - + FullMatrix > m(n,n, array); print_matrix (m); deallog << m.determinant () << std::endl; diff --git a/tests/bits/complex_complex_full_matrix_24.cc b/tests/bits/complex_complex_full_matrix_24.cc index 4c74b67d6a..654e662c5b 100644 --- a/tests/bits/complex_complex_full_matrix_24.cc +++ b/tests/bits/complex_complex_full_matrix_24.cc @@ -36,7 +36,7 @@ check () make_complex_matrix (m); make_complex_matrix (n); m.add (3.14159, n); - + print_matrix (m); } diff --git a/tests/bits/complex_complex_full_matrix_37.cc b/tests/bits/complex_complex_full_matrix_37.cc index 7450a9df70..d3f9b0bbc8 100644 --- a/tests/bits/complex_complex_full_matrix_37.cc +++ b/tests/bits/complex_complex_full_matrix_37.cc @@ -36,7 +36,7 @@ check () make_complex_matrix (m); make_complex_matrix (n); m.equ (3.14159, n); - + print_matrix (m); } diff --git a/tests/bits/complex_complex_full_matrix_42.cc b/tests/bits/complex_complex_full_matrix_42.cc index fb369e2824..e86b009955 100644 --- a/tests/bits/complex_complex_full_matrix_42.cc +++ b/tests/bits/complex_complex_full_matrix_42.cc @@ -35,11 +35,12 @@ check () for (unsigned int n=1; n<=5; ++n) { const std::complex array[] = { 50, 2, 3, 4, 5, - 6, 50, 8, 9, 0, - 1, 2, 50, 4, 5, - 6, 7, 8, 50, 0, - 1, 2, 3, 4, 50 }; - + 6, 50, 8, 9, 0, + 1, 2, 50, 4, 5, + 6, 7, 8, 50, 0, + 1, 2, 3, 4, 50 + }; + FullMatrix > m (n,n,array), p(n,n); p.invert (m); print_matrix (p); diff --git a/tests/bits/complex_real_full_matrix_02.cc b/tests/bits/complex_real_full_matrix_02.cc index 44d6599a9c..aa85e6bb90 100644 --- a/tests/bits/complex_real_full_matrix_02.cc +++ b/tests/bits/complex_real_full_matrix_02.cc @@ -36,9 +36,9 @@ check () make_matrix (m); for (typename FullMatrix >::const_iterator - p = m.begin(); p!=m.end(); ++p) + p = m.begin(); p!=m.end(); ++p) deallog << p->row() << ' ' << p->column() << ' ' - << p->value() - << std::endl; + << p->value() + << std::endl; } diff --git a/tests/bits/complex_real_full_matrix_03.cc b/tests/bits/complex_real_full_matrix_03.cc index 01b7c3b729..fe3425fe6e 100644 --- a/tests/bits/complex_real_full_matrix_03.cc +++ b/tests/bits/complex_real_full_matrix_03.cc @@ -35,11 +35,11 @@ check () FullMatrix > m; make_matrix (m); - + for (typename FullMatrix >::const_iterator - p = m.begin(1); p!=m.end(1); ++p) + p = m.begin(1); p!=m.end(1); ++p) deallog << p->row() << ' ' << p->column() << ' ' - << p->value() - << std::endl; + << p->value() + << std::endl; } diff --git a/tests/bits/complex_real_full_matrix_04.cc b/tests/bits/complex_real_full_matrix_04.cc index d048794432..95590c955a 100644 --- a/tests/bits/complex_real_full_matrix_04.cc +++ b/tests/bits/complex_real_full_matrix_04.cc @@ -33,11 +33,12 @@ void check () { const std::complex array[] = { 1, 2, 3, 4, 5, - 6, 7, 8, 9, 0, - 1, 2, 3, 4, 5, - 6, 7, 8, 9, 0, - 1, 2, 3, 4, 5 }; - + 6, 7, 8, 9, 0, + 1, 2, 3, 4, 5, + 6, 7, 8, 9, 0, + 1, 2, 3, 4, 5 + }; + FullMatrix > m (5,5,array); print_matrix (m); diff --git a/tests/bits/complex_real_full_matrix_06.cc b/tests/bits/complex_real_full_matrix_06.cc index ed80679567..67193e564c 100644 --- a/tests/bits/complex_real_full_matrix_06.cc +++ b/tests/bits/complex_real_full_matrix_06.cc @@ -37,7 +37,7 @@ check () FullMatrix > n; n = m; - + print_matrix (n); } diff --git a/tests/bits/complex_real_full_matrix_08.cc b/tests/bits/complex_real_full_matrix_08.cc index 6c067b560d..3e8b8d9a8c 100644 --- a/tests/bits/complex_real_full_matrix_08.cc +++ b/tests/bits/complex_real_full_matrix_08.cc @@ -37,7 +37,7 @@ check () FullMatrix > n; n.copy_from (m); - + print_matrix (n); } diff --git a/tests/bits/complex_real_full_matrix_12.cc b/tests/bits/complex_real_full_matrix_12.cc index 1d49e3a09d..617be5ec0d 100644 --- a/tests/bits/complex_real_full_matrix_12.cc +++ b/tests/bits/complex_real_full_matrix_12.cc @@ -34,7 +34,7 @@ check () { FullMatrix > m(3,3); deallog << m.all_zero() << std::endl; - + make_matrix (m); deallog << m.all_zero() << std::endl; } diff --git a/tests/bits/complex_real_full_matrix_13.cc b/tests/bits/complex_real_full_matrix_13.cc index 6784fea604..df5604c5ae 100644 --- a/tests/bits/complex_real_full_matrix_13.cc +++ b/tests/bits/complex_real_full_matrix_13.cc @@ -36,7 +36,7 @@ check () make_matrix (m); Vector > v; make_vector (v); - + deallog << m.matrix_norm_square (v) << std::endl; } diff --git a/tests/bits/complex_real_full_matrix_14.cc b/tests/bits/complex_real_full_matrix_14.cc index 2ca4eccf28..9b727d3b06 100644 --- a/tests/bits/complex_real_full_matrix_14.cc +++ b/tests/bits/complex_real_full_matrix_14.cc @@ -39,7 +39,7 @@ check () make_vector (w); for (unsigned int i=0; i(1.); - + deallog << m.matrix_scalar_product (v,w) << std::endl; } diff --git a/tests/bits/complex_real_full_matrix_19.cc b/tests/bits/complex_real_full_matrix_19.cc index 2dd334647d..2d967724ec 100644 --- a/tests/bits/complex_real_full_matrix_19.cc +++ b/tests/bits/complex_real_full_matrix_19.cc @@ -35,7 +35,7 @@ check () for (unsigned int n=1; n<=3; ++n) { const std::complex array[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; - + FullMatrix > m(n,n, array); print_matrix (m); deallog << m.determinant () << std::endl; diff --git a/tests/bits/complex_real_full_matrix_24.cc b/tests/bits/complex_real_full_matrix_24.cc index b6e12d13b2..4b2efca428 100644 --- a/tests/bits/complex_real_full_matrix_24.cc +++ b/tests/bits/complex_real_full_matrix_24.cc @@ -36,7 +36,7 @@ check () make_matrix (m); make_matrix (n); m.add (3.14159, n); - + print_matrix (m); } diff --git a/tests/bits/complex_real_full_matrix_37.cc b/tests/bits/complex_real_full_matrix_37.cc index 48d140913d..fbaaf13544 100644 --- a/tests/bits/complex_real_full_matrix_37.cc +++ b/tests/bits/complex_real_full_matrix_37.cc @@ -36,7 +36,7 @@ check () make_matrix (m); make_matrix (n); m.equ (3.14159, n); - + print_matrix (m); } diff --git a/tests/bits/complex_real_full_matrix_42.cc b/tests/bits/complex_real_full_matrix_42.cc index 4bcf2bea78..600faaaea1 100644 --- a/tests/bits/complex_real_full_matrix_42.cc +++ b/tests/bits/complex_real_full_matrix_42.cc @@ -35,11 +35,12 @@ check () for (unsigned int n=1; n<=5; ++n) { const std::complex array[] = { 50, 2, 3, 4, 5, - 6, 50, 8, 9, 0, - 1, 2, 50, 4, 5, - 6, 7, 8, 50, 0, - 1, 2, 3, 4, 50 }; - + 6, 50, 8, 9, 0, + 1, 2, 50, 4, 5, + 6, 7, 8, 50, 0, + 1, 2, 3, 4, 50 + }; + FullMatrix > m (n,n,array), p(n,n); p.invert (m); print_matrix (p); diff --git a/tests/bits/complex_vector_11.cc b/tests/bits/complex_vector_11.cc index d25c03b92a..d02253300e 100644 --- a/tests/bits/complex_vector_11.cc +++ b/tests/bits/complex_vector_11.cc @@ -19,19 +19,19 @@ // check Vector >::size() #include "../tests.h" -#include +#include #include #include void test (Vector > &v) { - // set only certain elements of the vector + // set only certain elements of the vector for (unsigned int i=0; i (i+1., i+2.); v.compress (); - + Assert (v.size() == 100, ExcInternalError()); deallog << "OK" << std::endl; @@ -39,7 +39,7 @@ void test (Vector > &v) -int main () +int main () { std::ofstream logfile("complex_vector_11/output"); deallog.attach(logfile); @@ -54,25 +54,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_12.cc b/tests/bits/complex_vector_12.cc index 1777eb6df4..ad02e2362a 100644 --- a/tests/bits/complex_vector_12.cc +++ b/tests/bits/complex_vector_12.cc @@ -19,7 +19,7 @@ // check Vector >::operator() in set-mode #include "../tests.h" -#include +#include #include #include #include @@ -27,9 +27,9 @@ void test (Vector > &v) { - // set only certain elements of the - // vector. have a bit pattern of where we - // actually wrote elements to + // set only certain elements of the + // vector. have a bit pattern of where we + // actually wrote elements to std::vector pattern (v.size(), false); for (unsigned int i=0; i > &v) v.compress (); - // check that they are ok, and this time - // all of them + // check that they are ok, and this time + // all of them for (unsigned int i=0; i (i+1., i+2.))) || ((pattern[i] == false) && (v(i) == std::complex (0)))), - ExcInternalError()); + ExcInternalError()); deallog << "OK" << std::endl; } -int main () +int main () { std::ofstream logfile("complex_vector_12/output"); deallog.attach(logfile); @@ -67,25 +67,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_13.cc b/tests/bits/complex_vector_13.cc index 86a0310e40..64a66c42b3 100644 --- a/tests/bits/complex_vector_13.cc +++ b/tests/bits/complex_vector_13.cc @@ -19,7 +19,7 @@ // check Vector >::operator() in add-mode #include "../tests.h" -#include +#include #include #include #include @@ -27,9 +27,9 @@ void test (Vector > &v) { - // set only certain elements of the - // vector. have a bit pattern of where we - // actually wrote elements to + // set only certain elements of the + // vector. have a bit pattern of where we + // actually wrote elements to std::vector pattern (v.size(), false); for (unsigned int i=0; i > &v) v.compress (); - // check that they are ok, and this time - // all of them + // check that they are ok, and this time + // all of them for (unsigned int i=0; i (i+1., i+2.))) || ((pattern[i] == false) && (v(i) == std::complex (0)))), - ExcInternalError()); + ExcInternalError()); deallog << "OK" << std::endl; } -int main () +int main () { std::ofstream logfile("complex_vector_13/output"); deallog.attach(logfile); @@ -67,25 +67,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_14.cc b/tests/bits/complex_vector_14.cc index 38e376589e..0e7292ba39 100644 --- a/tests/bits/complex_vector_14.cc +++ b/tests/bits/complex_vector_14.cc @@ -19,7 +19,7 @@ // check Vector >::operator() in set/add-mode alternatingly #include "../tests.h" -#include +#include #include #include #include @@ -27,9 +27,9 @@ void test (Vector > &v) { - // set only certain elements of the - // vector. have a bit pattern of where we - // actually wrote elements to + // set only certain elements of the + // vector. have a bit pattern of where we + // actually wrote elements to std::vector pattern (v.size(), false); bool flag = false; for (unsigned int i=0; i > &v) else v(i) = std::complex (i+1., i+2.); flag = !flag; - + pattern[i] = true; } v.compress (); - // check that they are ok, and this time - // all of them + // check that they are ok, and this time + // all of them for (unsigned int i=0; i (i+1., i+2.))) - || - ((pattern[i] == false) && (v(i) == std::complex(0))), - ExcInternalError()); + || + ((pattern[i] == false) && (v(i) == std::complex(0))), + ExcInternalError()); deallog << "OK" << std::endl; } -int main () +int main () { std::ofstream logfile("complex_vector_14/output"); deallog.attach(logfile); @@ -73,25 +73,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_15.cc b/tests/bits/complex_vector_15.cc index 73faa7328a..e64fed5d9e 100644 --- a/tests/bits/complex_vector_15.cc +++ b/tests/bits/complex_vector_15.cc @@ -20,7 +20,7 @@ // writing to the same elements #include "../tests.h" -#include +#include #include #include #include @@ -28,9 +28,9 @@ void test (Vector > &v) { - // set only certain elements of the - // vector. have a bit pattern of where we - // actually wrote elements to + // set only certain elements of the + // vector. have a bit pattern of where we + // actually wrote elements to std::vector pattern (v.size(), false); for (unsigned int i=0; i > &v) v.compress (); - // check that they are ok, and this time - // all of them + // check that they are ok, and this time + // all of them for (unsigned int i=0; i (i+1., i+2.))) - || - ((pattern[i] == false) && (v(i) == std::complex(0))), - ExcInternalError()); + || + ((pattern[i] == false) && (v(i) == std::complex(0))), + ExcInternalError()); deallog << "OK" << std::endl; } -int main () +int main () { std::ofstream logfile("complex_vector_15/output"); deallog.attach(logfile); @@ -70,25 +70,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_16.cc b/tests/bits/complex_vector_16.cc index 9d90896e0f..46198a5a81 100644 --- a/tests/bits/complex_vector_16.cc +++ b/tests/bits/complex_vector_16.cc @@ -20,7 +20,7 @@ // writing and overwriting the same elements #include "../tests.h" -#include +#include #include #include #include @@ -28,9 +28,9 @@ void test (Vector > &v) { - // set only certain elements of the - // vector. have a bit pattern of where we - // actually wrote elements to + // set only certain elements of the + // vector. have a bit pattern of where we + // actually wrote elements to std::vector pattern (v.size(), false); for (unsigned int i=0; i > &v) v.compress (); - // check that they are ok, and this time - // all of them + // check that they are ok, and this time + // all of them for (unsigned int i=0; i (i+1., i+2.))) - || - ((pattern[i] == false) && (v(i) == std::complex (0))), - ExcInternalError()); + || + ((pattern[i] == false) && (v(i) == std::complex (0))), + ExcInternalError()); deallog << "OK" << std::endl; } -int main () +int main () { std::ofstream logfile("complex_vector_16/output"); deallog.attach(logfile); @@ -72,25 +72,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_17.cc b/tests/bits/complex_vector_17.cc index 91d969fb2b..142ecada91 100644 --- a/tests/bits/complex_vector_17.cc +++ b/tests/bits/complex_vector_17.cc @@ -19,7 +19,7 @@ // check Vector >::l1_norm() #include "../tests.h" -#include +#include #include #include #include @@ -27,7 +27,7 @@ void test (Vector > &v) { - // set some elements of the vector + // set some elements of the vector double norm = 0; for (unsigned int i=0; i > &v) } v.compress (); - // then check the norm + // then check the norm Assert (v.l1_norm() == norm, ExcInternalError()); deallog << "OK" << std::endl; @@ -44,7 +44,7 @@ void test (Vector > &v) -int main () +int main () { std::ofstream logfile("complex_vector_17/output"); deallog.attach(logfile); @@ -59,25 +59,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_18.cc b/tests/bits/complex_vector_18.cc index 5d4be0c428..d04ef3aa3d 100644 --- a/tests/bits/complex_vector_18.cc +++ b/tests/bits/complex_vector_18.cc @@ -19,7 +19,7 @@ // check Vector >::l2_norm() #include "../tests.h" -#include +#include #include #include #include @@ -27,17 +27,17 @@ void test (Vector > &v) { - // set some elements of the vector + // set some elements of the vector double norm = 0; for (unsigned int i=0; i (i+1., i+2.); norm += std::abs(std::complex (i+1., i+2.))* - std::abs(std::complex (i+1., i+2.)); + std::abs(std::complex (i+1., i+2.)); } v.compress (); - // then check the norm + // then check the norm Assert (std::fabs((v.l2_norm() - std::sqrt(norm))/std::sqrt(norm)) < 1e-14, ExcInternalError()); deallog << "OK" << std::endl; @@ -45,7 +45,7 @@ void test (Vector > &v) -int main () +int main () { std::ofstream logfile("complex_vector_18/output"); deallog.attach(logfile); @@ -60,25 +60,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_19.cc b/tests/bits/complex_vector_19.cc index 0094ef31df..9adb97d67e 100644 --- a/tests/bits/complex_vector_19.cc +++ b/tests/bits/complex_vector_19.cc @@ -19,7 +19,7 @@ // check Vector >::linfty_norm() #include "../tests.h" -#include +#include #include #include #include @@ -27,17 +27,17 @@ void test (Vector > &v) { - // set some elements of the vector + // set some elements of the vector double norm = 0; for (unsigned int i=0; i (i+1., i+2.); norm = std::max(norm, - std::abs(std::complex (i+1., i+2.))); + std::abs(std::complex (i+1., i+2.))); } v.compress (); - // then check the norm + // then check the norm Assert (v.linfty_norm() == norm, ExcInternalError()); deallog << "OK" << std::endl; @@ -45,7 +45,7 @@ void test (Vector > &v) -int main () +int main () { std::ofstream logfile("complex_vector_19/output"); deallog.attach(logfile); @@ -60,25 +60,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_20.cc b/tests/bits/complex_vector_20.cc index bdd7da64fc..3c623ddfce 100644 --- a/tests/bits/complex_vector_20.cc +++ b/tests/bits/complex_vector_20.cc @@ -19,7 +19,7 @@ // check Vector >::operator *= #include "../tests.h" -#include +#include #include #include #include @@ -27,9 +27,9 @@ void test (Vector > &v) { - // set only certain elements of the - // vector. have a bit pattern of where we - // actually wrote elements to + // set only certain elements of the + // vector. have a bit pattern of where we + // actually wrote elements to std::vector pattern (v.size(), false); for (unsigned int i=0; i > &v) } v.compress (); - // multiply v with 5/4 + // multiply v with 5/4 v *= 5./4.; - // check that the entries are ok + // check that the entries are ok for (unsigned int i=0; i (i+1., i+2.)*5./4.)) - || - ((pattern[i] == false) && (v(i) == std::complex(0))), - ExcInternalError()); + || + ((pattern[i] == false) && (v(i) == std::complex(0))), + ExcInternalError()); deallog << "OK" << std::endl; } -int main () +int main () { std::ofstream logfile("complex_vector_20/output"); deallog.attach(logfile); @@ -68,25 +68,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_21.cc b/tests/bits/complex_vector_21.cc index 06cc0f8704..0375ae89c1 100644 --- a/tests/bits/complex_vector_21.cc +++ b/tests/bits/complex_vector_21.cc @@ -19,7 +19,7 @@ // check Vector >::operator /= #include "../tests.h" -#include +#include #include #include #include @@ -27,9 +27,9 @@ void test (Vector > &v) { - // set only certain elements of the - // vector. have a bit pattern of where we - // actually wrote elements to + // set only certain elements of the + // vector. have a bit pattern of where we + // actually wrote elements to std::vector pattern (v.size(), false); for (unsigned int i=0; i > &v) } v.compress (); - // multiply v with 3/4 + // multiply v with 3/4 v /= 4./3.; - // check that the entries are ok + // check that the entries are ok for (unsigned int i=0; i (i+1., i+2.)*3./4.)) - || - ((pattern[i] == false) && (v(i) == std::complex(0))), - ExcInternalError()); + || + ((pattern[i] == false) && (v(i) == std::complex(0))), + ExcInternalError()); deallog << "OK" << std::endl; } -int main () +int main () { std::ofstream logfile("complex_vector_21/output"); deallog.attach(logfile); @@ -68,25 +68,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_21_negative.cc b/tests/bits/complex_vector_21_negative.cc index 7d10505794..4aaf7789c4 100644 --- a/tests/bits/complex_vector_21_negative.cc +++ b/tests/bits/complex_vector_21_negative.cc @@ -21,7 +21,7 @@ // should have been that the factor is != 0... #include "../tests.h" -#include +#include #include #include #include @@ -29,9 +29,9 @@ void test (Vector > &v) { - // set only certain elements of the - // vector. have a bit pattern of where we - // actually wrote elements to + // set only certain elements of the + // vector. have a bit pattern of where we + // actually wrote elements to std::vector pattern (v.size(), false); for (unsigned int i=0; i > &v) } v.compress (); - // multiply v with 3/4 + // multiply v with 3/4 v /= -4./3.; - // check that the entries are ok + // check that the entries are ok for (unsigned int i=0; i (i+1., i+2.)*3./4.) == std::complex(0))) - || - ((pattern[i] == false) && (v(i) == std::complex(0))), - ExcInternalError()); + || + ((pattern[i] == false) && (v(i) == std::complex(0))), + ExcInternalError()); deallog << "OK" << std::endl; } -int main () +int main () { std::ofstream logfile("complex_vector_21_negative/output"); deallog.attach(logfile); @@ -70,25 +70,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_22.cc b/tests/bits/complex_vector_22.cc index e2dc3f5fa1..4aa285c46d 100644 --- a/tests/bits/complex_vector_22.cc +++ b/tests/bits/complex_vector_22.cc @@ -20,7 +20,7 @@ // orthogonal #include "../tests.h" -#include +#include #include #include #include @@ -29,8 +29,8 @@ void test (Vector > &v, Vector > &w) { - // set only certain elements of each - // vector, but disjoint sets of elements + // set only certain elements of each + // vector, but disjoint sets of elements for (unsigned int i=0; i (i+1., i+2.); @@ -39,7 +39,7 @@ void test (Vector > &v, v.compress (); w.compress (); - // make sure the scalar product is zero + // make sure the scalar product is zero Assert (v*w == std::complex(0), ExcInternalError()); deallog << "OK" << std::endl; @@ -47,7 +47,7 @@ void test (Vector > &v, -int main () +int main () { std::ofstream logfile("complex_vector_22/output"); deallog.attach(logfile); @@ -63,25 +63,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_23.cc b/tests/bits/complex_vector_23.cc index ea23a8ed23..f3bb380071 100644 --- a/tests/bits/complex_vector_23.cc +++ b/tests/bits/complex_vector_23.cc @@ -20,7 +20,7 @@ // not orthogonal #include "../tests.h" -#include +#include #include #include #include @@ -29,9 +29,9 @@ void test (Vector > &v, Vector > &w) { - // set only certain elements of each - // vector, and record the expected scalar - // product + // set only certain elements of each + // vector, and record the expected scalar + // product std::complex product = 0; for (unsigned int i=0; i > &v, product += 1.*i*std::conj(std::complex (i+1., i+2.)); } } - + v.compress (); w.compress (); - - // make sure the scalar product is correct - deallog << v*w << ' ' << w*v << ' ' - << product << ' ' << std::conj(product) << std::endl; - + + // make sure the scalar product is correct + deallog << v *w << ' ' << w *v << ' ' + << product << ' ' << std::conj(product) << std::endl; + Assert (v*w == product, ExcInternalError()); - // also make sure that v*w=conj(w*v) + // also make sure that v*w=conj(w*v) Assert (w*v == std::conj(product), ExcInternalError()); deallog << "OK" << std::endl; @@ -61,7 +61,7 @@ void test (Vector > &v, -int main () +int main () { std::ofstream logfile("complex_vector_23/output"); deallog.attach(logfile); @@ -77,25 +77,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_24.cc b/tests/bits/complex_vector_24.cc index c22d2b9213..cb61b18439 100644 --- a/tests/bits/complex_vector_24.cc +++ b/tests/bits/complex_vector_24.cc @@ -21,7 +21,7 @@ // may be covered by one of the other tests #include "../tests.h" -#include +#include #include #include #include @@ -29,14 +29,14 @@ void test (Vector > &v) { - // set some entries of the vector + // set some entries of the vector for (unsigned int i=0; i (i+1., i+2.); v.compress (); - // then clear it again and make sure the - // vector is really empty + // then clear it again and make sure the + // vector is really empty const unsigned int sz = v.size(); v = 0; Assert (v.size() == sz, ExcInternalError()); @@ -47,7 +47,7 @@ void test (Vector > &v) -int main () +int main () { std::ofstream logfile("complex_vector_24/output"); deallog.attach(logfile); @@ -62,25 +62,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_25.cc b/tests/bits/complex_vector_25.cc index 33e6e7c1a9..fcc8f3193c 100644 --- a/tests/bits/complex_vector_25.cc +++ b/tests/bits/complex_vector_25.cc @@ -18,7 +18,7 @@ // check Vector::operator = (Scalar) with setting to zero #include "../tests.h" -#include +#include #include #include #include @@ -26,14 +26,14 @@ void test (Vector > &v) { - // set some entries of the vector + // set some entries of the vector for (unsigned int i=0; i (i+1., i+2.); v.compress (); - // then clear it again and make sure the - // vector is really empty + // then clear it again and make sure the + // vector is really empty const unsigned int sz = v.size(); v = 0; Assert (v.size() == sz, ExcInternalError()); @@ -43,7 +43,7 @@ void test (Vector > &v) } -int main () +int main () { std::ofstream logfile("complex_vector_25/output"); deallog.attach(logfile); @@ -58,25 +58,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_26.cc b/tests/bits/complex_vector_26.cc index 7bfc4a9ca6..ab0a0a7a2f 100644 --- a/tests/bits/complex_vector_26.cc +++ b/tests/bits/complex_vector_26.cc @@ -19,7 +19,7 @@ // nonzero value #include "../tests.h" -#include +#include #include #include #include @@ -27,7 +27,7 @@ void test (Vector > &v) { - // set some entries of the vector + // set some entries of the vector for (unsigned int i=0; i (i+1., i+2.); @@ -42,7 +42,7 @@ void test (Vector > &v) } -int main () +int main () { std::ofstream logfile("complex_vector_26/output"); deallog.attach(logfile); @@ -57,25 +57,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_27.cc b/tests/bits/complex_vector_27.cc index 1d17c8086d..caf6504b51 100644 --- a/tests/bits/complex_vector_27.cc +++ b/tests/bits/complex_vector_27.cc @@ -16,10 +16,10 @@ -// check Vector >::operator = (Vector) +// check Vector >::operator = (Vector) #include "../tests.h" -#include +#include #include #include #include @@ -27,21 +27,21 @@ void test (Vector > &v) { - // set some entries of the vector + // set some entries of the vector for (unsigned int i=0; i (i+1., i+2.); v.compress (); - // then copy it + // then copy it Vector > w (v.size()); w = v; - // make sure they're equal + // make sure they're equal deallog << std::abs(v*w) << ' ' << v.l2_norm() * w.l2_norm() << ' ' << std::abs(v*w) - v.l2_norm() * w.l2_norm() << std::endl; Assert (std::abs(std::abs(v*w) - v.l2_norm() * w.l2_norm()) < - 1e-14*(std::abs(v*w)), + 1e-14*(std::abs(v*w)), ExcInternalError()); deallog << "OK" << std::endl; @@ -49,7 +49,7 @@ void test (Vector > &v) -int main () +int main () { std::ofstream logfile("complex_vector_27/output"); deallog.attach(logfile); @@ -64,25 +64,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_28.cc b/tests/bits/complex_vector_28.cc index dcae97fac3..8f1482cb59 100644 --- a/tests/bits/complex_vector_28.cc +++ b/tests/bits/complex_vector_28.cc @@ -20,7 +20,7 @@ // resize the vector to be copied to beforehand #include "../tests.h" -#include +#include #include #include #include @@ -28,22 +28,22 @@ void test (Vector > &v) { - // set some entries of the vector + // set some entries of the vector for (unsigned int i=0; i (i+1., i+2.); v.compress (); - // then copy it to a vector of different - // size + // then copy it to a vector of different + // size Vector > w (1); w = v; - // make sure they're equal + // make sure they're equal deallog << std::abs(v*w) << ' ' << v.l2_norm() * w.l2_norm() << ' ' << std::abs(v*w) - v.l2_norm() * w.l2_norm() << std::endl; Assert (std::abs(std::abs(v*w) - v.l2_norm() * w.l2_norm()) < - 1e-14*std::abs(v*w), + 1e-14*std::abs(v*w), ExcInternalError()); deallog << "OK" << std::endl; @@ -51,7 +51,7 @@ void test (Vector > &v) -int main () +int main () { std::ofstream logfile("complex_vector_28/output"); deallog.attach(logfile); @@ -66,25 +66,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_29.cc b/tests/bits/complex_vector_29.cc index 848f620776..6de6b5581f 100644 --- a/tests/bits/complex_vector_29.cc +++ b/tests/bits/complex_vector_29.cc @@ -19,7 +19,7 @@ // check Vector >::reinit(fast) #include "../tests.h" -#include +#include #include #include #include @@ -28,7 +28,7 @@ void test (Vector > &v) { v.reinit (13, true); - + Assert (v.size() == 13, ExcInternalError()); deallog << "OK" << std::endl; @@ -36,7 +36,7 @@ void test (Vector > &v) -int main () +int main () { std::ofstream logfile("complex_vector_29/output"); deallog.attach(logfile); @@ -51,25 +51,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_30.cc b/tests/bits/complex_vector_30.cc index 4a884457f0..3fa0b99e16 100644 --- a/tests/bits/complex_vector_30.cc +++ b/tests/bits/complex_vector_30.cc @@ -19,7 +19,7 @@ // check Vector >::reinit(!fast) #include "../tests.h" -#include +#include #include #include #include @@ -27,15 +27,15 @@ void test (Vector > &v) { - // set some entries of the vector + // set some entries of the vector for (unsigned int i=0; i (i+1., i+2.); v.compress (); - // then resize with setting to zero + // then resize with setting to zero v.reinit (13, false); - + Assert (v.size() == 13, ExcInternalError()); Assert (v.l2_norm() == 0, ExcInternalError()); @@ -44,7 +44,7 @@ void test (Vector > &v) -int main () +int main () { std::ofstream logfile("complex_vector_30/output"); deallog.attach(logfile); @@ -59,25 +59,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_31.cc b/tests/bits/complex_vector_31.cc index a27d975ad1..1e856f6f2a 100644 --- a/tests/bits/complex_vector_31.cc +++ b/tests/bits/complex_vector_31.cc @@ -19,7 +19,7 @@ // check Vector >::l2_norm() #include "../tests.h" -#include +#include #include #include #include @@ -27,17 +27,17 @@ void test (Vector > &v) { - // set some elements of the vector + // set some elements of the vector std::complex norm = 0; for (unsigned int i=0; i (i+1., i+2.); norm += std::conj(std::complex (i+1., i+2.)) * - std::complex (i+1., i+2.); + std::complex (i+1., i+2.); } v.compress (); - // then check the norm + // then check the norm Assert (std::abs(v.norm_sqr() - norm) < 1e-14*std::abs(norm), ExcInternalError()); @@ -46,7 +46,7 @@ void test (Vector > &v) -int main () +int main () { std::ofstream logfile("complex_vector_31/output"); deallog.attach(logfile); @@ -61,25 +61,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_32.cc b/tests/bits/complex_vector_32.cc index a96f9ac4ab..6e47089122 100644 --- a/tests/bits/complex_vector_32.cc +++ b/tests/bits/complex_vector_32.cc @@ -19,7 +19,7 @@ // check Vector >::mean_value() #include "../tests.h" -#include +#include #include #include #include @@ -27,7 +27,7 @@ void test (Vector > &v) { - // set some elements of the vector + // set some elements of the vector std::complex sum = 0; for (unsigned int i=0; i > &v) } v.compress (); - // then check the norm + // then check the norm Assert (std::abs(v.mean_value() - sum/(1.*v.size())) < - 1e-14*std::abs(sum)/v.size(), + 1e-14*std::abs(sum)/v.size(), ExcInternalError()); deallog << "OK" << std::endl; @@ -46,7 +46,7 @@ void test (Vector > &v) -int main () +int main () { std::ofstream logfile("complex_vector_32/output"); deallog.attach(logfile); @@ -61,25 +61,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_33.cc b/tests/bits/complex_vector_33.cc index 0b0c322e1d..6230fdfb26 100644 --- a/tests/bits/complex_vector_33.cc +++ b/tests/bits/complex_vector_33.cc @@ -19,7 +19,7 @@ // check Vector >::lp_norm(3) #include "../tests.h" -#include +#include #include #include #include @@ -27,17 +27,17 @@ void test (Vector > &v) { - // set some elements of the vector + // set some elements of the vector std::complex sum = 0; for (unsigned int i=0; i (i+1., i+2.); sum += std::pow (std::abs(std::complex (i+1., i+2.)), - 3); + 3); } v.compress (); - // then check the norm + // then check the norm Assert (std::abs(v.lp_norm(3) - std::pow(sum, 1./3.)) < 1e-14*std::abs(std::pow(sum, 1./3.)), ExcInternalError()); @@ -47,7 +47,7 @@ void test (Vector > &v) -int main () +int main () { std::ofstream logfile("complex_vector_33/output"); deallog.attach(logfile); @@ -62,25 +62,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_34.cc b/tests/bits/complex_vector_34.cc index 40b4c16c48..9cf08801df 100644 --- a/tests/bits/complex_vector_34.cc +++ b/tests/bits/complex_vector_34.cc @@ -19,7 +19,7 @@ // check Vector >::all_zero #include "../tests.h" -#include +#include #include #include #include @@ -27,17 +27,17 @@ void test (Vector > &v) { - // set some elements of the vector + // set some elements of the vector for (unsigned int i=0; i (i+1., i+2.); } v.compress (); - // set them to zero again + // set them to zero again v = 0; - // then check all_zero + // then check all_zero Assert (v.all_zero() == true, ExcInternalError()); deallog << "OK" << std::endl; @@ -45,7 +45,7 @@ void test (Vector > &v) -int main () +int main () { std::ofstream logfile("complex_vector_34/output"); deallog.attach(logfile); @@ -60,25 +60,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_35.cc b/tests/bits/complex_vector_35.cc index 038856e295..f5f974ece5 100644 --- a/tests/bits/complex_vector_35.cc +++ b/tests/bits/complex_vector_35.cc @@ -16,10 +16,10 @@ -// check Vector >::operator+=(Vector) +// check Vector >::operator+=(Vector) #include "../tests.h" -#include +#include #include #include #include @@ -28,29 +28,29 @@ void test (Vector > &v, Vector > &w) { - // set only certain elements of each - // vector + // set only certain elements of each + // vector for (unsigned int i=0; i (i+1., i+2.); } - + v.compress (); w.compress (); v += w; - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), - ExcInternalError()); + ExcInternalError()); Assert (v(i) == std::complex (i+1., i+2.)+1.*i, - ExcInternalError()); + ExcInternalError()); } else { @@ -65,7 +65,7 @@ void test (Vector > &v, -int main () +int main () { std::ofstream logfile("complex_vector_35/output"); deallog.attach(logfile); @@ -81,25 +81,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_36.cc b/tests/bits/complex_vector_36.cc index de33bba2cd..4311a13a0a 100644 --- a/tests/bits/complex_vector_36.cc +++ b/tests/bits/complex_vector_36.cc @@ -16,10 +16,10 @@ -// check Vector >::operator-=(Vector) +// check Vector >::operator-=(Vector) #include "../tests.h" -#include +#include #include #include #include @@ -28,29 +28,29 @@ void test (Vector > &v, Vector > &w) { - // set only certain elements of each - // vector + // set only certain elements of each + // vector for (unsigned int i=0; i (i+1., i+2.); } - + v.compress (); w.compress (); v -= w; - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), - ExcInternalError()); + ExcInternalError()); Assert (v(i) == std::complex (-1., -(i+2.)), - ExcInternalError()); + ExcInternalError()); } else { @@ -65,7 +65,7 @@ void test (Vector > &v, -int main () +int main () { std::ofstream logfile("complex_vector_36/output"); deallog.attach(logfile); @@ -81,25 +81,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_37.cc b/tests/bits/complex_vector_37.cc index 2471d00789..ddf131c018 100644 --- a/tests/bits/complex_vector_37.cc +++ b/tests/bits/complex_vector_37.cc @@ -19,7 +19,7 @@ // check Vector >::add (scalar) #include "../tests.h" -#include +#include #include #include #include @@ -29,22 +29,22 @@ void test (Vector > &v) { for (unsigned int i=0; i (i+1., i+2.); - + v.compress (); v.add (1.); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i (i+2., i+2.), - ExcInternalError()); + ExcInternalError()); deallog << "OK" << std::endl; } -int main () +int main () { std::ofstream logfile("complex_vector_37/output"); deallog.attach(logfile); @@ -59,25 +59,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_38.cc b/tests/bits/complex_vector_38.cc index 036ad2ac69..c1d7754ebf 100644 --- a/tests/bits/complex_vector_38.cc +++ b/tests/bits/complex_vector_38.cc @@ -16,10 +16,10 @@ -// check Vector >::add(Vector) +// check Vector >::add(Vector) #include "../tests.h" -#include +#include #include #include #include @@ -33,19 +33,19 @@ void test (Vector > &v, v(i) = i; w(i) = std::complex (i+1., i+2.); } - + v.compress (); w.compress (); v.add (w); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), - ExcInternalError()); + ExcInternalError()); Assert (v(i) == 1.*i+std::complex (i+1., i+2.), - ExcInternalError()); + ExcInternalError()); } deallog << "OK" << std::endl; @@ -53,7 +53,7 @@ void test (Vector > &v, -int main () +int main () { std::ofstream logfile("complex_vector_38/output"); deallog.attach(logfile); @@ -69,25 +69,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_39.cc b/tests/bits/complex_vector_39.cc index 7d70578565..808bf0e999 100644 --- a/tests/bits/complex_vector_39.cc +++ b/tests/bits/complex_vector_39.cc @@ -16,10 +16,10 @@ -// check Vector >::add(scalar, Vector) +// check Vector >::add(scalar, Vector) #include "../tests.h" -#include +#include #include #include #include @@ -33,19 +33,19 @@ void test (Vector > &v, v(i) = i; w(i) = std::complex (i+1., i+2.); } - + v.compress (); w.compress (); v.add (2, w); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), - ExcInternalError()); + ExcInternalError()); Assert (v(i) == 1.*i+2.*std::complex (i+1., i+2.), - ExcInternalError()); + ExcInternalError()); } deallog << "OK" << std::endl; @@ -53,7 +53,7 @@ void test (Vector > &v, -int main () +int main () { std::ofstream logfile("complex_vector_39/output"); deallog.attach(logfile); @@ -69,25 +69,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_40.cc b/tests/bits/complex_vector_40.cc index 94b5ecc491..b69a1ac024 100644 --- a/tests/bits/complex_vector_40.cc +++ b/tests/bits/complex_vector_40.cc @@ -19,7 +19,7 @@ // check Vector >::add(s,V,s,V) #include "../tests.h" -#include +#include #include #include #include @@ -35,20 +35,20 @@ void test (Vector > &v, w(i) = std::complex (i+1., i+2.); x(i) = i+2.; } - + v.compress (); w.compress (); x.compress (); v.add (2, w, 3, x); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), ExcInternalError()); Assert (x(i) == i+2., ExcInternalError()); Assert (v(i) == 1.*i+2.*std::complex (i+1., i+2.)+3*(i+2.), - ExcInternalError()); + ExcInternalError()); } deallog << "OK" << std::endl; @@ -56,7 +56,7 @@ void test (Vector > &v, -int main () +int main () { std::ofstream logfile("complex_vector_40/output"); deallog.attach(logfile); @@ -73,25 +73,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_41.cc b/tests/bits/complex_vector_41.cc index fc6d7b5094..f0d817ee4c 100644 --- a/tests/bits/complex_vector_41.cc +++ b/tests/bits/complex_vector_41.cc @@ -16,10 +16,10 @@ -// check Vector >::sadd(s, Vector) +// check Vector >::sadd(s, Vector) #include "../tests.h" -#include +#include #include #include #include @@ -33,19 +33,19 @@ void test (Vector > &v, v(i) = i; w(i) = std::complex (i+1., i+2.); } - + v.compress (); w.compress (); v.sadd (2, w); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), - ExcInternalError()); + ExcInternalError()); Assert (v(i) == 2.*i+std::complex (i+1., i+2.), - ExcInternalError()); + ExcInternalError()); } deallog << "OK" << std::endl; @@ -53,7 +53,7 @@ void test (Vector > &v, -int main () +int main () { std::ofstream logfile("complex_vector_41/output"); deallog.attach(logfile); @@ -69,25 +69,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_42.cc b/tests/bits/complex_vector_42.cc index e41f793a1a..fe3154adbc 100644 --- a/tests/bits/complex_vector_42.cc +++ b/tests/bits/complex_vector_42.cc @@ -16,10 +16,10 @@ -// check Vector >::sadd(scalar, scalar, Vector) +// check Vector >::sadd(scalar, scalar, Vector) #include "../tests.h" -#include +#include #include #include #include @@ -33,19 +33,19 @@ void test (Vector > &v, v(i) = i; w(i) = std::complex (i+1., i+2.); } - + v.compress (); w.compress (); v.sadd (3, 2, w); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), - ExcInternalError()); + ExcInternalError()); Assert (v(i) == 3.*i+2.*std::complex (i+1., i+2.), - ExcInternalError()); + ExcInternalError()); } deallog << "OK" << std::endl; @@ -53,7 +53,7 @@ void test (Vector > &v, -int main () +int main () { std::ofstream logfile("complex_vector_42/output"); deallog.attach(logfile); @@ -69,25 +69,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_43.cc b/tests/bits/complex_vector_43.cc index 36c5b2000d..527d67ecde 100644 --- a/tests/bits/complex_vector_43.cc +++ b/tests/bits/complex_vector_43.cc @@ -19,7 +19,7 @@ // check Vector >::sadd(s,s,V,s,V) #include "../tests.h" -#include +#include #include #include #include @@ -35,20 +35,20 @@ void test (Vector > &v, w(i) = std::complex (i+1., i+2.); x(i) = i+2.; } - + v.compress (); w.compress (); x.compress (); v.sadd (1.5, 2, w, 3, x); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), ExcInternalError()); Assert (x(i) == i+2., ExcInternalError()); Assert (v(i) == 1.5*i+2.*std::complex (i+1., i+2.)+3*(i+2.), - ExcInternalError()); + ExcInternalError()); } deallog << "OK" << std::endl; @@ -56,7 +56,7 @@ void test (Vector > &v, -int main () +int main () { std::ofstream logfile("complex_vector_43/output"); deallog.attach(logfile); @@ -73,25 +73,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_44.cc b/tests/bits/complex_vector_44.cc index abc5717723..5b46f67c51 100644 --- a/tests/bits/complex_vector_44.cc +++ b/tests/bits/complex_vector_44.cc @@ -19,7 +19,7 @@ // check Vector >::sadd(s,s,V,s,V,s,V) #include "../tests.h" -#include +#include #include #include #include @@ -37,7 +37,7 @@ void test (Vector > &v, x(i) = i+2.; y(i) = std::complex (i+3., i+4.); } - + v.compress (); w.compress (); x.compress (); @@ -45,18 +45,18 @@ void test (Vector > &v, v.sadd (1.5, 2, w, 3, x, 4, y); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), - ExcInternalError()); + ExcInternalError()); Assert (x(i) == i+2., ExcInternalError()); Assert (y(i) == std::complex (i+3., i+4.), - ExcInternalError()); + ExcInternalError()); Assert (v(i) == - 1.5*i+2.*std::complex (i+1., i+2.)+ - 3.*(i+2.)+4.*std::complex (i+3., i+4.), - ExcInternalError()); + 1.5*i+2.*std::complex (i+1., i+2.)+ + 3.*(i+2.)+4.*std::complex (i+3., i+4.), + ExcInternalError()); } deallog << "OK" << std::endl; @@ -64,7 +64,7 @@ void test (Vector > &v, -int main () +int main () { std::ofstream logfile("complex_vector_44/output"); deallog.attach(logfile); @@ -82,25 +82,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_45.cc b/tests/bits/complex_vector_45.cc index 6df225f7ce..28251a49d9 100644 --- a/tests/bits/complex_vector_45.cc +++ b/tests/bits/complex_vector_45.cc @@ -19,7 +19,7 @@ // check Vector >::scale #include "../tests.h" -#include +#include #include #include #include @@ -33,13 +33,13 @@ void test (Vector > &v, v(i) = i; w(i) = std::complex (i+1., i+2.); } - + v.compress (); w.compress (); v.scale (w); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), ExcInternalError()); @@ -51,7 +51,7 @@ void test (Vector > &v, -int main () +int main () { std::ofstream logfile("complex_vector_45/output"); deallog.attach(logfile); @@ -67,25 +67,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_46.cc b/tests/bits/complex_vector_46.cc index 64c6cb139a..d531b58592 100644 --- a/tests/bits/complex_vector_46.cc +++ b/tests/bits/complex_vector_46.cc @@ -19,7 +19,7 @@ // check Vector >::equ (s,V) #include "../tests.h" -#include +#include #include #include #include @@ -33,19 +33,19 @@ void test (Vector > &v, v(i) = i; w(i) = std::complex (i+1., i+2.); } - + v.compress (); w.compress (); v.equ (2, w); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), - ExcInternalError()); + ExcInternalError()); Assert (v(i) == 2.*std::complex (i+1., i+2.), - ExcInternalError()); + ExcInternalError()); } deallog << "OK" << std::endl; @@ -53,7 +53,7 @@ void test (Vector > &v, -int main () +int main () { std::ofstream logfile("complex_vector_46/output"); deallog.attach(logfile); @@ -69,25 +69,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_47.cc b/tests/bits/complex_vector_47.cc index 9c58366c7a..722c4937ad 100644 --- a/tests/bits/complex_vector_47.cc +++ b/tests/bits/complex_vector_47.cc @@ -19,7 +19,7 @@ // check Vector >::equ (s,V,s,V) #include "../tests.h" -#include +#include #include #include #include @@ -35,21 +35,21 @@ void test (Vector > &v, w(i) = std::complex (i+1., i+2.); x(i) = i+2.; } - + v.compress (); w.compress (); x.compress (); v.equ (2, w, 3, x); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i (i+1., i+2.), - ExcInternalError()); + ExcInternalError()); Assert (x(i) == i+2., ExcInternalError()); Assert (v(i) == 2.*std::complex (i+1., i+2.)+3.*(i+2.), - ExcInternalError()); + ExcInternalError()); } deallog << "OK" << std::endl; @@ -57,7 +57,7 @@ void test (Vector > &v, -int main () +int main () { std::ofstream logfile("complex_vector_47/output"); deallog.attach(logfile); @@ -74,25 +74,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_48.cc b/tests/bits/complex_vector_48.cc index c8c3f68fe6..95935d9483 100644 --- a/tests/bits/complex_vector_48.cc +++ b/tests/bits/complex_vector_48.cc @@ -19,7 +19,7 @@ // check Vector >::ratio #include "../tests.h" -#include +#include #include #include #include @@ -35,23 +35,23 @@ void test (Vector > &v, w(i) = std::complex (i+2., i+3.); x(i) = std::complex (i+3., i+4.); } - + v.compress (); w.compress (); x.compress (); v.ratio (w, x); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i (i+2., i+3.), - ExcInternalError()); + ExcInternalError()); Assert (x(i) == std::complex (i+3., i+4.), - ExcInternalError()); + ExcInternalError()); Assert (std::abs(v(i) - - std::complex (i+2., i+3.) / - std::complex (i+3., i+4.)) < 1e-14*std::abs(v(i)), + std::complex (i+2., i+3.) / + std::complex (i+3., i+4.)) < 1e-14*std::abs(v(i)), ExcInternalError()); } @@ -60,7 +60,7 @@ void test (Vector > &v, -int main () +int main () { std::ofstream logfile("complex_vector_48/output"); deallog.attach(logfile); @@ -77,25 +77,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_49.cc b/tests/bits/complex_vector_49.cc index 9e187396cc..aae3915dc7 100644 --- a/tests/bits/complex_vector_49.cc +++ b/tests/bits/complex_vector_49.cc @@ -20,7 +20,7 @@ // argument #include "../tests.h" -#include +#include #include #include #include @@ -28,20 +28,20 @@ void test (Vector > &v) { - // set some entries of the vector + // set some entries of the vector for (unsigned int i=0; i (i+1., i+2.); v.compress (); - // then copy it + // then copy it Vector > w (v); - // make sure they're equal + // make sure they're equal deallog << std::abs(v*w) << ' ' << v.l2_norm() * w.l2_norm() << ' ' << std::abs(v*w) - v.l2_norm() * w.l2_norm() << std::endl; Assert (std::abs(std::abs(v*w) - v.l2_norm() * w.l2_norm()) - < 1e-14*std::abs(v*w), + < 1e-14*std::abs(v*w), ExcInternalError()); deallog << "OK" << std::endl; @@ -49,7 +49,7 @@ void test (Vector > &v) -int main () +int main () { std::ofstream logfile("complex_vector_49/output"); deallog.attach(logfile); @@ -64,25 +64,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_equality_1.cc b/tests/bits/complex_vector_equality_1.cc index ea6c0adbe1..da868190c7 100644 --- a/tests/bits/complex_vector_equality_1.cc +++ b/tests/bits/complex_vector_equality_1.cc @@ -20,7 +20,7 @@ // equal #include "../tests.h" -#include +#include #include #include #include @@ -29,8 +29,8 @@ void test (Vector > &v, Vector > &w) { - // set only certain elements of each - // vector + // set only certain elements of each + // vector for (unsigned int i=0; i (i+0., i+1.); @@ -61,25 +61,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_equality_2.cc b/tests/bits/complex_vector_equality_2.cc index bcdb07fc45..4d2e0abf36 100644 --- a/tests/bits/complex_vector_equality_2.cc +++ b/tests/bits/complex_vector_equality_2.cc @@ -20,7 +20,7 @@ // equal #include "../tests.h" -#include +#include #include #include #include @@ -29,16 +29,16 @@ void test (Vector > &v, Vector > &w) { - // set only certain elements of each - // vector + // set only certain elements of each + // vector for (unsigned int i=0; i (i, i+1.); if (i%3 == 0) w(i) = std::complex (i+1., i+2.); } - // but then copy elements and make sure the - // vectors are actually equal + // but then copy elements and make sure the + // vectors are actually equal v = w; Assert (v==w, ExcInternalError()); @@ -63,25 +63,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_equality_3.cc b/tests/bits/complex_vector_equality_3.cc index fbb71d3655..f27cb1ecc4 100644 --- a/tests/bits/complex_vector_equality_3.cc +++ b/tests/bits/complex_vector_equality_3.cc @@ -20,7 +20,7 @@ // equal #include "../tests.h" -#include +#include #include #include #include @@ -29,8 +29,8 @@ void test (Vector > &v, Vector > &w) { - // set only certain elements of each - // vector + // set only certain elements of each + // vector for (unsigned int i=0; i (i, i+1.); @@ -61,25 +61,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_equality_4.cc b/tests/bits/complex_vector_equality_4.cc index 97c3723234..41873359e2 100644 --- a/tests/bits/complex_vector_equality_4.cc +++ b/tests/bits/complex_vector_equality_4.cc @@ -20,7 +20,7 @@ // equal #include "../tests.h" -#include +#include #include #include #include @@ -29,16 +29,16 @@ void test (Vector > &v, Vector > &w) { - // set only certain elements of each - // vector + // set only certain elements of each + // vector for (unsigned int i=0; i (i, i+1.); if (i%3 == 0) w(i) = std::complex (i+1., i+2.); } - // but then copy elements and make sure the - // vectors are actually equal + // but then copy elements and make sure the + // vectors are actually equal v = w; Assert (! (v.operator != (w)), ExcInternalError()); @@ -63,25 +63,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_equality_5.cc b/tests/bits/complex_vector_equality_5.cc index f98a3cb676..6d9b54380e 100644 --- a/tests/bits/complex_vector_equality_5.cc +++ b/tests/bits/complex_vector_equality_5.cc @@ -20,7 +20,7 @@ // equal and different template arguments #include "../tests.h" -#include +#include #include #include #include @@ -29,8 +29,8 @@ void test (Vector > &v, Vector > &w) { - // set only certain elements of each - // vector + // set only certain elements of each + // vector for (unsigned int i=0; i (i, i+1.); @@ -62,25 +62,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_equality_6.cc b/tests/bits/complex_vector_equality_6.cc index b0f5ff6370..704b4b5bb5 100644 --- a/tests/bits/complex_vector_equality_6.cc +++ b/tests/bits/complex_vector_equality_6.cc @@ -20,7 +20,7 @@ // equal and different template arguments #include "../tests.h" -#include +#include #include #include #include @@ -29,16 +29,16 @@ void test (Vector > &v, Vector > &w) { - // set only certain elements of each - // vector + // set only certain elements of each + // vector for (unsigned int i=0; i (i, i+1.); if (i%3 == 0) w(i) = std::complex (i+1., i+2.); } - // but then copy elements and make sure the - // vectors are actually equal + // but then copy elements and make sure the + // vectors are actually equal v = w; Assert (v==w, ExcInternalError()); Assert (w==v, ExcInternalError()); @@ -64,25 +64,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_equality_7.cc b/tests/bits/complex_vector_equality_7.cc index 7492e28f39..c65a6e0f4a 100644 --- a/tests/bits/complex_vector_equality_7.cc +++ b/tests/bits/complex_vector_equality_7.cc @@ -20,7 +20,7 @@ // equal and different template arguments #include "../tests.h" -#include +#include #include #include #include @@ -29,8 +29,8 @@ void test (Vector > &v, Vector > &w) { - // set only certain elements of each - // vector + // set only certain elements of each + // vector for (unsigned int i=0; i (i, i+1.); @@ -62,25 +62,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_equality_8.cc b/tests/bits/complex_vector_equality_8.cc index ebdb2017b4..ab52c44611 100644 --- a/tests/bits/complex_vector_equality_8.cc +++ b/tests/bits/complex_vector_equality_8.cc @@ -20,7 +20,7 @@ // equal and different template arguments #include "../tests.h" -#include +#include #include #include #include @@ -29,16 +29,16 @@ void test (Vector > &v, Vector > &w) { - // set only certain elements of each - // vector + // set only certain elements of each + // vector for (unsigned int i=0; i (i, i+1.); if (i%3 == 0) w(i) = std::complex (i+1., i+2.); } - // but then copy elements and make sure the - // vectors are actually equal + // but then copy elements and make sure the + // vectors are actually equal v = w; Assert (! (v!=w), ExcInternalError()); Assert (! (w!=v), ExcInternalError()); @@ -64,25 +64,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/complex_vector_vector_01.cc b/tests/bits/complex_vector_vector_01.cc index d826bd04dd..c1a83d17ad 100644 --- a/tests/bits/complex_vector_vector_01.cc +++ b/tests/bits/complex_vector_vector_01.cc @@ -22,7 +22,7 @@ // now autoconf'ed. #include "../tests.h" -#include +#include #include #include @@ -34,13 +34,13 @@ void test (Vector > &v) Vector > w(v); Assert (w==v, ExcInternalError()); - + deallog << "OK" << std::endl; } -int main () +int main () { std::ofstream logfile("complex_vector_vector_01/output"); deallog.attach(logfile); @@ -55,25 +55,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/compressed_set_sparsity_pattern_01.cc b/tests/bits/compressed_set_sparsity_pattern_01.cc index f34d858b5e..e9905a35ef 100644 --- a/tests/bits/compressed_set_sparsity_pattern_01.cc +++ b/tests/bits/compressed_set_sparsity_pattern_01.cc @@ -28,10 +28,10 @@ void test () { - // set up a sparsity pattern. since - // CompressedSetSparsityPatterns are most - // often used for 3d, use a rather large - // number of entries per row + // set up a sparsity pattern. since + // CompressedSetSparsityPatterns are most + // often used for 3d, use a rather large + // number of entries per row const unsigned int N = 1000; CompressedSetSparsityPattern csp (N,N); for (unsigned int i=0; i &v) -{ +{ deallog << v.size(); for (unsigned int i=0; i void check () { - // create tria and dofhandler - // objects. set different boundary - // and sub-domain ids + // create tria and dofhandler + // objects. set different boundary + // and sub-domain ids Triangulation tria; GridGenerator::hyper_cube(tria, 0., 1.); tria.refine_global (1); @@ -72,12 +72,12 @@ check () tria.execute_coarsening_and_refinement (); } - // Taylor-Hood element + // Taylor-Hood element FESystem fe (FE_Q(1), dim, FE_DGQ(0), 1); DoFHandler dof_handler (tria); dof_handler.distribute_dofs (fe); - // no grouping + // no grouping { std::vector dpc(dim+1); DoFTools::count_dofs_per_component (dof_handler, dpc); @@ -91,8 +91,8 @@ check () } - // grouping into less groups than - // components + // grouping into less groups than + // components { std::vector group(dim+1, 0); group[dim] = 1; @@ -101,7 +101,7 @@ check () Assert (dpc.size() == 2, ExcInternalError()); print (dpc); } - + { std::vector group(dim+1, 0); group[dim] = 1; @@ -109,10 +109,10 @@ check () DoFTools::count_dofs_per_block (dof_handler, dpc, group); Assert (dpc.size() == 2, ExcInternalError()); print (dpc); - } + } - // grouping into more groups than - // components + // grouping into more groups than + // components { std::vector group(dim+1, 2*dim); group[dim] = 0; @@ -121,7 +121,7 @@ check () Assert (dpc.size() == 2*dim+1, ExcInternalError()); print (dpc); } - + { std::vector group(dim+1, 2*dim); group[dim] = 0; @@ -129,7 +129,7 @@ check () DoFTools::count_dofs_per_block (dof_handler, dpc, group); Assert (dpc.size() == 2*dim+1, ExcInternalError()); print (dpc); - } + } } diff --git a/tests/bits/count_dofs_per_block_02.cc b/tests/bits/count_dofs_per_block_02.cc index de00dc2c05..495421e256 100644 --- a/tests/bits/count_dofs_per_block_02.cc +++ b/tests/bits/count_dofs_per_block_02.cc @@ -45,22 +45,22 @@ std::string output_file_name = "count_dofs_per_block_02/output"; void print (const std::vector &v) -{ +{ deallog << v.size(); for (unsigned int i=0; i void check () { - // create tria and dofhandler - // objects. set different boundary - // and sub-domain ids + // create tria and dofhandler + // objects. set different boundary + // and sub-domain ids Triangulation tria; GridGenerator::hyper_cube(tria, 0., 1.); tria.refine_global (1); @@ -75,7 +75,7 @@ check () dof_handler.distribute_dofs (fe); deallog << "Number of DoFs: " << dof_handler.n_dofs() << std::endl; - // no grouping + // no grouping { std::vector dpc(dim+1); DoFTools::count_dofs_per_component (dof_handler, dpc); @@ -89,8 +89,8 @@ check () } - // grouping into less groups than - // components + // grouping into less groups than + // components { std::vector group(dim+1, 0); group[dim] = 1; @@ -99,7 +99,7 @@ check () Assert (dpc.size() == 2, ExcInternalError()); print (dpc); } - + { std::vector group(2, 0); group[1] = 1; @@ -107,10 +107,10 @@ check () DoFTools::count_dofs_per_block (dof_handler, dpc, group); Assert (dpc.size() == 2, ExcInternalError()); print (dpc); - } + } - // grouping into more groups than - // components + // grouping into more groups than + // components { std::vector group(dim+1, 2*dim); group[dim] = 0; @@ -119,7 +119,7 @@ check () Assert (dpc.size() == 2*dim+1, ExcInternalError()); print (dpc); } - + { std::vector group(2, 2*dim); group[1] = 0; @@ -127,7 +127,7 @@ check () DoFTools::count_dofs_per_block (dof_handler, dpc, group); Assert (dpc.size() == 2*dim+1, ExcInternalError()); print (dpc); - } + } } diff --git a/tests/bits/count_dofs_per_component_hp_01.cc b/tests/bits/count_dofs_per_component_hp_01.cc index 47571dab0c..46762725fa 100644 --- a/tests/bits/count_dofs_per_component_hp_01.cc +++ b/tests/bits/count_dofs_per_component_hp_01.cc @@ -68,7 +68,7 @@ void test () deallog <<"DoFs in the " < #include - -int main () + +int main () { std::ofstream logfile("cylinder/output"); deallog.attach(logfile); @@ -40,15 +40,15 @@ int main () deallog.threshold_double(1.e-10); deallog << std::setprecision (2); - // generate a cylinder + // generate a cylinder Triangulation<3> tria; GridGenerator::cylinder (tria, std::sqrt(2.)); - // output all faces. here, we - // should have 18 (two layers of - // cells, each with 4 outer faces, - // plus 5 faces each for the top - // and bottom of the cylinder) + // output all faces. here, we + // should have 18 (two layers of + // cells, each with 4 outer faces, + // plus 5 faces each for the top + // and bottom of the cylinder) unsigned int external_faces = 0; for (Triangulation<3>::face_iterator face=tria.begin_face(); face!=tria.end_face(); ++face) @@ -66,6 +66,6 @@ int main () deallog << "External faces: " << external_faces << std::endl; Assert (external_faces == 18, ExcInternalError()); - + return 0; } diff --git a/tests/bits/cylinder_01.cc b/tests/bits/cylinder_01.cc index 8585bf337c..95b8b22c91 100644 --- a/tests/bits/cylinder_01.cc +++ b/tests/bits/cylinder_01.cc @@ -46,14 +46,14 @@ void check () triangulation.refine_global (2); for (typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + cell = triangulation.begin_active(); cell!=triangulation.end(); ++cell) for (unsigned int i=0; i::vertices_per_cell; ++i) deallog << cell->vertex(i) << std::endl; } -int main () +int main () { std::ofstream logfile("cylinder_01/output"); deallog.attach(logfile); @@ -64,5 +64,5 @@ int main () check<3> (); } - - + + diff --git a/tests/bits/cylinder_02.cc b/tests/bits/cylinder_02.cc index 3eb9801e2f..f3930d41a9 100644 --- a/tests/bits/cylinder_02.cc +++ b/tests/bits/cylinder_02.cc @@ -16,7 +16,7 @@ -// check the cells generated by the CylinderBoundary the +// check the cells generated by the CylinderBoundary the // axiparallel cylinder parallel to the y-axis #include "../tests.h" @@ -52,21 +52,21 @@ void check () Triangulation triangulation; GridGenerator::cylinder (triangulation); - GridTools::transform ((Point (*)(const Point&))&rotate_to_y, triangulation); - + GridTools::transform ((Point ( *)(const Point &))&rotate_to_y, triangulation); + static const CylinderBoundary boundary (1,1); triangulation.set_boundary (0, boundary); triangulation.refine_global (2); for (typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + cell = triangulation.begin_active(); cell!=triangulation.end(); ++cell) for (unsigned int i=0; i::vertices_per_cell; ++i) deallog << cell->vertex(i) << std::endl; } -int main () +int main () { std::ofstream logfile("cylinder_02/output"); deallog.attach(logfile); @@ -77,5 +77,5 @@ int main () check<3> (); } - - + + diff --git a/tests/bits/cylinder_03.cc b/tests/bits/cylinder_03.cc index 5d0e0ebc75..91431813d1 100644 --- a/tests/bits/cylinder_03.cc +++ b/tests/bits/cylinder_03.cc @@ -49,21 +49,21 @@ void check () Triangulation triangulation; GridGenerator::cylinder (triangulation); - GridTools::transform ((Point (*)(const Point&))&rotate_to_y, triangulation); - + GridTools::transform ((Point ( *)(const Point &))&rotate_to_y, triangulation); + static const CylinderBoundary boundary (1,2); triangulation.set_boundary (0, boundary); triangulation.refine_global (2); for (typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + cell = triangulation.begin_active(); cell!=triangulation.end(); ++cell) for (unsigned int i=0; i::vertices_per_cell; ++i) deallog << cell->vertex(i) << std::endl; } -int main () +int main () { std::ofstream logfile("cylinder_03/output"); deallog.attach(logfile); @@ -73,5 +73,5 @@ int main () check<3> (); } - - + + diff --git a/tests/bits/cylinder_04.cc b/tests/bits/cylinder_04.cc index 312b356142..e067e52fba 100644 --- a/tests/bits/cylinder_04.cc +++ b/tests/bits/cylinder_04.cc @@ -42,8 +42,8 @@ template Point rotate_to_y (const Point &p) { return Point (p[0]*std::cos(xy_angle) - p[1]*std::sin(xy_angle), - p[0]*std::sin(xy_angle) + p[1]*std::cos(xy_angle), - p[2]); + p[0]*std::sin(xy_angle) + p[1]*std::cos(xy_angle), + p[2]); } @@ -53,23 +53,23 @@ void check () Triangulation triangulation; GridGenerator::cylinder (triangulation); - GridTools::transform ((Point (*)(const Point&))&rotate_to_y, triangulation); - + GridTools::transform ((Point ( *)(const Point &))&rotate_to_y, triangulation); + static const CylinderBoundary boundary (1, - Point(std::cos(xy_angle), std::sin(xy_angle), 0), - Point()); + Point(std::cos(xy_angle), std::sin(xy_angle), 0), + Point()); triangulation.set_boundary (0, boundary); triangulation.refine_global (2); for (typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + cell = triangulation.begin_active(); cell!=triangulation.end(); ++cell) for (unsigned int i=0; i::vertices_per_cell; ++i) deallog << cell->vertex(i) << std::endl; } -int main () +int main () { std::ofstream logfile("cylinder_04/output"); deallog.attach(logfile); @@ -79,5 +79,5 @@ int main () check<3> (); } - - + + diff --git a/tests/bits/cylinder_shell_01.cc b/tests/bits/cylinder_shell_01.cc index 4359f2b12e..17eeda8bf9 100644 --- a/tests/bits/cylinder_shell_01.cc +++ b/tests/bits/cylinder_shell_01.cc @@ -28,9 +28,9 @@ #include #include - -int main () + +int main () { std::ofstream logfile("cylinder_shell_01/output"); deallog.attach(logfile); @@ -38,12 +38,12 @@ int main () deallog.threshold_double(1.e-10); deallog << std::setprecision (2); - // generate a hyperball in 3d + // generate a hyperball in 3d Triangulation<3> tria; GridGenerator::cylinder_shell (tria, 1, .8, 1); - // make sure that all cells have positive - // volume + // make sure that all cells have positive + // volume for (Triangulation<3>::active_cell_iterator cell=tria.begin_active(); cell!=tria.end(); ++cell) deallog << cell << ' ' << cell->measure () << std::endl; diff --git a/tests/bits/cylinder_shell_02.cc b/tests/bits/cylinder_shell_02.cc index 2b95a1d6a6..7f17388a77 100644 --- a/tests/bits/cylinder_shell_02.cc +++ b/tests/bits/cylinder_shell_02.cc @@ -33,9 +33,9 @@ #include #include - -int main () + +int main () { std::ofstream logfile("cylinder_shell_02/output"); deallog.attach(logfile); @@ -43,7 +43,7 @@ int main () deallog.threshold_double(1.e-10); deallog << std::setprecision (2); - // generate a hyperball in 3d + // generate a hyperball in 3d Triangulation<3> tria; GridGenerator::cylinder_shell (tria, 1, .8, 1); @@ -53,9 +53,9 @@ int main () QMidpoint<3> q; FEValues<3> fe_values (fe, q, update_JxW_values); - - // make sure that all cells have positive - // volume + + // make sure that all cells have positive + // volume for (DoFHandler<3>::active_cell_iterator cell=dof_handler.begin_active(); cell!=dof_handler.end(); ++cell) { diff --git a/tests/bits/data_out_01.cc b/tests/bits/data_out_01.cc index 4d1f0cb73b..90b26b13a9 100644 --- a/tests/bits/data_out_01.cc +++ b/tests/bits/data_out_01.cc @@ -35,23 +35,23 @@ check_this (const DoFHandler &dof_handler, data_out.add_data_vector (v_node, "node_data"); data_out.add_data_vector (v_cell, "cell_data"); data_out.build_patches (); - + data_out.write_dx (deallog.get_file_stream()); data_out.set_flags (DataOutBase::UcdFlags(true)); - data_out.write_ucd (deallog.get_file_stream()); + data_out.write_ucd (deallog.get_file_stream()); data_out.write_gmv (deallog.get_file_stream()); data_out.write_tecplot (deallog.get_file_stream()); data_out.write_vtk (deallog.get_file_stream()); data_out.write_gnuplot (deallog.get_file_stream()); data_out.write_deal_II_intermediate (deallog.get_file_stream()); - // the following is only - // implemented for 2d + // the following is only + // implemented for 2d if (dim == 2) { data_out.write_povray (deallog.get_file_stream()); data_out.write_eps (deallog.get_file_stream()); - } + } } diff --git a/tests/bits/data_out_02.cc b/tests/bits/data_out_02.cc index 0f61d29168..a8f5cc0bec 100644 --- a/tests/bits/data_out_02.cc +++ b/tests/bits/data_out_02.cc @@ -36,29 +36,29 @@ check_this (const DoFHandler &dof_handler, BlockVector v_node, v_cell; make_block_vector (v_node_x, v_node); make_block_vector (v_cell_x, v_cell); - + DataOut data_out; data_out.attach_dof_handler (dof_handler); data_out.add_data_vector (v_node, "node_data"); data_out.add_data_vector (v_cell, "cell_data"); data_out.build_patches (); - + data_out.write_dx (deallog.get_file_stream()); data_out.set_flags (DataOutBase::UcdFlags(true)); - data_out.write_ucd (deallog.get_file_stream()); + data_out.write_ucd (deallog.get_file_stream()); data_out.write_gmv (deallog.get_file_stream()); data_out.write_tecplot (deallog.get_file_stream()); data_out.write_vtk (deallog.get_file_stream()); data_out.write_gnuplot (deallog.get_file_stream()); data_out.write_deal_II_intermediate (deallog.get_file_stream()); - // the following is only - // implemented for 2d + // the following is only + // implemented for 2d if (dim == 2) { data_out.write_povray (deallog.get_file_stream()); data_out.write_eps (deallog.get_file_stream()); - } + } } diff --git a/tests/bits/data_out_03.cc b/tests/bits/data_out_03.cc index 59b0b8f21a..3c1baefda2 100644 --- a/tests/bits/data_out_03.cc +++ b/tests/bits/data_out_03.cc @@ -33,14 +33,18 @@ std::string output_file_name = "data_out_03/output"; template class XDataOut : public DataOut { - public: - const std::vector > & - get_patches() const - { return DataOut::get_patches(); } - - std::vector - get_dataset_names () const - { return DataOut::get_dataset_names(); } +public: + const std::vector > & + get_patches() const + { + return DataOut::get_patches(); + } + + std::vector + get_dataset_names () const + { + return DataOut::get_dataset_names(); + } }; // have a class that makes sure we can get at the patches and data set @@ -48,14 +52,18 @@ class XDataOut : public DataOut template class XDataOutReader : public DataOutReader { - public: - const std::vector > & - get_patches() const - { return DataOutReader::get_patches(); } - - std::vector - get_dataset_names () const - { return DataOutReader::get_dataset_names(); } +public: + const std::vector > & + get_patches() const + { + return DataOutReader::get_patches(); + } + + std::vector + get_dataset_names () const + { + return DataOutReader::get_dataset_names(); + } }; @@ -70,7 +78,7 @@ check_this (const DoFHandler &dof_handler, data_out.add_data_vector (v_node, "node_data"); data_out.add_data_vector (v_cell, "cell_data"); data_out.build_patches (); - + { std::ofstream tmp ("data_out_03.tmp"); data_out.write_deal_II_intermediate (tmp); @@ -80,24 +88,24 @@ check_this (const DoFHandler &dof_handler, { std::ifstream tmp ("data_out_03.tmp"); reader.read (tmp); - } + } - // finally make sure that we have - // read everything back in - // correctly + // finally make sure that we have + // read everything back in + // correctly Assert (data_out.get_dataset_names() == reader.get_dataset_names(), - ExcInternalError()); - + ExcInternalError()); + Assert (data_out.get_patches().size() == reader.get_patches().size(), - ExcInternalError()); + ExcInternalError()); for (unsigned int i=0; i class XDataOut : public DataOut { - public: - const std::vector > & - get_patches() const - { return DataOut::get_patches(); } +public: + const std::vector > & + get_patches() const + { + return DataOut::get_patches(); + } - std::vector - get_dataset_names () const - { return DataOut::get_dataset_names(); } + std::vector + get_dataset_names () const + { + return DataOut::get_dataset_names(); + } + std::vector > + get_vector_data_ranges () const + { + // if we have enough components for a + // vector solution, make the last dim + // components a vector std::vector > - get_vector_data_ranges () const - { - // if we have enough components for a - // vector solution, make the last dim - // components a vector - std::vector > - retval; - if (get_dataset_names().size() >= dim) - retval.push_back (std_cxx1x::tuple - - (get_dataset_names().size()-dim, - get_dataset_names().size()-1, - "vector_data")); - return retval; - } + retval; + if (get_dataset_names().size() >= dim) + retval.push_back (std_cxx1x::tuple + + (get_dataset_names().size()-dim, + get_dataset_names().size()-1, + "vector_data")); + return retval; + } }; // have a class that makes sure we can get at the patches and data set @@ -68,20 +72,24 @@ class XDataOut : public DataOut template class XDataOutReader : public DataOutReader { - public: - const std::vector > & - get_patches() const - { return DataOutReader::get_patches(); } +public: + const std::vector > & + get_patches() const + { + return DataOutReader::get_patches(); + } - std::vector - get_dataset_names () const - { return DataOutReader::get_dataset_names(); } + std::vector + get_dataset_names () const + { + return DataOutReader::get_dataset_names(); + } - std::vector > - get_vector_data_ranges () const - { - return DataOutReader::get_vector_data_ranges (); - } + std::vector > + get_vector_data_ranges () const + { + return DataOutReader::get_vector_data_ranges (); + } }; @@ -108,47 +116,47 @@ check_this (const DoFHandler &dof_handler, reader.read (tmp); } - // finally make sure that we have - // read everything back in - // correctly + // finally make sure that we have + // read everything back in + // correctly Assert (data_out.get_dataset_names() == reader.get_dataset_names(), - ExcInternalError()); + ExcInternalError()); Assert (data_out.get_patches().size() == reader.get_patches().size(), - ExcInternalError()); + ExcInternalError()); for (unsigned int i=0; i(data_out.get_vector_data_ranges()[i]) - << ' ' - << std_cxx1x::get<1>(data_out.get_vector_data_ranges()[i]) - << ' ' - << std_cxx1x::get<2>(data_out.get_vector_data_ranges()[i]) - << std::endl; + << ' ' + << std_cxx1x::get<1>(data_out.get_vector_data_ranges()[i]) + << ' ' + << std_cxx1x::get<2>(data_out.get_vector_data_ranges()[i]) + << std::endl; Assert (std_cxx1x::get<0>(data_out.get_vector_data_ranges()[i]) - == - std_cxx1x::get<0>(reader.get_vector_data_ranges()[i]), - ExcInternalError()); + == + std_cxx1x::get<0>(reader.get_vector_data_ranges()[i]), + ExcInternalError()); Assert (std_cxx1x::get<1>(data_out.get_vector_data_ranges()[i]) - == - std_cxx1x::get<1>(reader.get_vector_data_ranges()[i]), - ExcInternalError()); + == + std_cxx1x::get<1>(reader.get_vector_data_ranges()[i]), + ExcInternalError()); Assert (std_cxx1x::get<2>(data_out.get_vector_data_ranges()[i]) - == - std_cxx1x::get<2>(reader.get_vector_data_ranges()[i]), - ExcInternalError()); + == + std_cxx1x::get<2>(reader.get_vector_data_ranges()[i]), + ExcInternalError()); } - // for good measure, delete tmp file + // for good measure, delete tmp file remove ("data_out_04.tmp"); deallog << "OK" << std::endl; diff --git a/tests/bits/data_out_05.cc b/tests/bits/data_out_05.cc index f87d611374..dd71f81284 100644 --- a/tests/bits/data_out_05.cc +++ b/tests/bits/data_out_05.cc @@ -40,43 +40,43 @@ check_this (const DoFHandler &dof_handler, const Vector &v_cell) { std::vector - data_component_interpretation (dof_handler.get_fe().n_components(), - DataComponentInterpretation::component_is_scalar); - // if possible, declare the last - // dim components as vectors + data_component_interpretation (dof_handler.get_fe().n_components(), + DataComponentInterpretation::component_is_scalar); + // if possible, declare the last + // dim components as vectors if (dof_handler.get_fe().n_components() >= dim) for (unsigned int i=dof_handler.get_fe().n_components()-dim; - i data_out; data_out.attach_dof_handler (dof_handler); data_out.add_data_vector (v_node, - std::vector(dof_handler.get_fe().n_components(), - "node_data_1"), - DataOut::type_dof_data, - data_component_interpretation); + std::vector(dof_handler.get_fe().n_components(), + "node_data_1"), + DataOut::type_dof_data, + data_component_interpretation); data_out.add_data_vector (v_node, - std::vector(dof_handler.get_fe().n_components(), - "node_data_2"), - DataOut::type_dof_data, - data_component_interpretation); + std::vector(dof_handler.get_fe().n_components(), + "node_data_2"), + DataOut::type_dof_data, + data_component_interpretation); data_out.add_data_vector (v_cell, "cell_data"); data_out.build_patches (); - + data_out.write_vtk (deallog.get_file_stream()); } diff --git a/tests/bits/data_out_common.h b/tests/bits/data_out_common.h index 21344d8a97..556ef3c46c 100644 --- a/tests/bits/data_out_common.h +++ b/tests/bits/data_out_common.h @@ -1,6 +1,6 @@ //---------------------------- dof_tools_common.cc --------------------------- // $Id$ -// Version: $Name$ +// Version: $Name$ // // Copyright (C) 2003, 2004, 2005, 2008, 2010 by the deal.II authors // @@ -72,10 +72,10 @@ check (const FiniteElement &fe, deallog << "Checking " << name << " in " << dim << "d:" << std::endl; - - // create tria and dofhandler - // objects. set different boundary - // and sub-domain ids + + // create tria and dofhandler + // objects. set different boundary + // and sub-domain ids Triangulation tria; GridGenerator::hyper_cube(tria, 0., 1.); tria.refine_global (1); @@ -90,8 +90,8 @@ check (const FiniteElement &fe, Vector v_cell (dof_handler.get_tria().n_active_cells()); for (unsigned int i=0; i &fe, #define CHECK(EL,deg,dim)\ - { FE_ ## EL EL(deg); \ - check(EL, #EL #deg); } + { FE_ ## EL EL(deg); \ + check(EL, #EL #deg); } #define CHECK_ALL(EL,deg)\ - { CHECK(EL,deg,1); \ - CHECK(EL,deg,2); \ - CHECK(EL,deg,3); \ - } + { CHECK(EL,deg,1); \ + CHECK(EL,deg,2); \ + CHECK(EL,deg,3); \ + } int @@ -120,7 +120,7 @@ main() logfile << std::setprecision (2); deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); CHECK_ALL(Q,1); CHECK_ALL(Q,2); @@ -132,30 +132,30 @@ main() CHECK(Nedelec, 0, 2); CHECK(Nedelec, 0, 3); - + return 0; } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/data_out_curved_cells.cc b/tests/bits/data_out_curved_cells.cc index 708271ed4b..9a99e5142f 100644 --- a/tests/bits/data_out_curved_cells.cc +++ b/tests/bits/data_out_curved_cells.cc @@ -59,8 +59,8 @@ using namespace dealii; // this is copied from GridGenerator void laplace_solve (const SparseMatrix &S, - const std::map &m, - Vector &u) + const std::map &m, + Vector &u) { const unsigned int n_dofs=S.n(); FilteredMatrix > SF (S); @@ -84,163 +84,163 @@ void laplace_solve (const SparseMatrix &S, // boundary void curved_grid (std::ofstream &out) { - // number of cells in radial and - // circumferential direction + // number of cells in radial and + // circumferential direction const unsigned int n_phi=4, - n_r=8; - // inner and outer radius + n_r=8; + // inner and outer radius const double r_i=0.5, - r_a=2.0; - // we want to increase the radial extent of - // each cell by 'factor'. compute, how large - // the first extent 'dr' has to be + r_a=2.0; + // we want to increase the radial extent of + // each cell by 'factor'. compute, how large + // the first extent 'dr' has to be double factor=2., - sum=0; + sum=0; for (unsigned int j=0; j r(n_r+1,r_i); for (unsigned int j=1; j > vertices(n_phi*(n_r+1)); for (unsigned int j=0; j(r[j]*cos(alpha),r[j]*sin(alpha)); + const unsigned int p=i+j*n_phi; + const double alpha=i*2*numbers::PI/n_phi; + vertices[p]=Point<2>(r[j]*cos(alpha),r[j]*sin(alpha)); } - // create connectivity + // create connectivity std::vector > cells(n_phi*n_r); for (unsigned int j=0; j triangulation; triangulation.create_triangulation_compatibility(vertices,cells,SubCellData()); - // now provide everything that is - // needed for solving a Laplace - // equation. + // now provide everything that is + // needed for solving a Laplace + // equation. MappingQ1<2> mapping_q1; FE_Q<2> fe(2); DoFHandler<2> dof_handler(triangulation); dof_handler.distribute_dofs(fe); SparsityPattern sparsity_pattern (dof_handler.n_dofs (), dof_handler.n_dofs (), - dof_handler.max_couplings_between_dofs()); + dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern); sparsity_pattern.compress (); SparseMatrix S(sparsity_pattern); QGauss<2> quadrature(4); MatrixCreator::create_laplace_matrix(mapping_q1, dof_handler, quadrature, S); - // set up the boundary values for - // the laplace problem + // set up the boundary values for + // the laplace problem std::vector > m(2); - // fill these maps: on the inner boundary try - // to approximate a circle, on the outer - // boundary use straight lines + // fill these maps: on the inner boundary try + // to approximate a circle, on the outer + // boundary use straight lines DoFHandler<2>::cell_iterator cell=dof_handler.begin_active(), - endc=dof_handler.end(); + endc=dof_handler.end(); DoFHandler<2>::face_iterator face; for (; cell!=endc; ++cell) { - // fix all vertices + // fix all vertices for (unsigned int vertex_no=0; - vertex_no::vertices_per_cell; ++vertex_no) - { - for (unsigned int i=0; i<2; ++i) - m[i][cell->vertex_dof_index(vertex_no, 0)]=0.; - } + vertex_no::vertices_per_cell; ++vertex_no) + { + for (unsigned int i=0; i<2; ++i) + m[i][cell->vertex_dof_index(vertex_no, 0)]=0.; + } if (cell->at_boundary()) - for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no) - { - face=cell->face(face_no); - // insert a modifiued value for - // the middle point of boundary - // faces - if (face->at_boundary()) - { - const double eps=1e-4; - if (std::fabs(face->vertex(1).norm()-r_i)dof_index(0)]= (face->center()*(r_i/face->center().norm()-1))(i); - else if (std::fabs(face->vertex(1).norm()-r_a)dof_index(0)]=0.; - else - Assert(false, ExcInternalError()); - } - } + for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no) + { + face=cell->face(face_no); + // insert a modifiued value for + // the middle point of boundary + // faces + if (face->at_boundary()) + { + const double eps=1e-4; + if (std::fabs(face->vertex(1).norm()-r_i)dof_index(0)]= (face->center()*(r_i/face->center().norm()-1))(i); + else if (std::fabs(face->vertex(1).norm()-r_a)dof_index(0)]=0.; + else + Assert(false, ExcInternalError()); + } + } } - // solve the 2 problems with - // different right hand sides. + // solve the 2 problems with + // different right hand sides. Vector us[2]; for (unsigned int i=0; i<2; ++i) us[i].reinit (dof_handler.n_dofs()); - // solve linear systems in parallel + // solve linear systems in parallel Threads::ThreadGroup<> threads; for (unsigned int i=0; i<2; ++i) threads += Threads::spawn (&laplace_solve)(S, m[i], us[i]); threads.join_all (); - // create a new DoFHandler for the combined - // system + // create a new DoFHandler for the combined + // system FESystem<2> cfe(FE_Q<2>(2),2); DoFHandler<2> cdh(triangulation); cdh.distribute_dofs(cfe); Vector displacements(cdh.n_dofs()), - dx(fe.dofs_per_cell), - dy(fe.dofs_per_cell), - dxy(cfe.dofs_per_cell); + dx(fe.dofs_per_cell), + dy(fe.dofs_per_cell), + dxy(cfe.dofs_per_cell); DoFHandler<2>::active_cell_iterator component_cell=dof_handler.begin_active(), - end_c=dof_handler.end(), - combined_cell=cdh.begin_active(); + end_c=dof_handler.end(), + combined_cell=cdh.begin_active(); for (; component_cell!=end_c; ++component_cell, ++combined_cell) { component_cell->get_dof_values (us[0], dx); component_cell->get_dof_values (us[1], dy); for (unsigned int i=0; iset_dof_values (dxy, displacements); } - // and create the MappingQEulerian + // and create the MappingQEulerian MappingQEulerian<2> euler(2, displacements, cdh); - // now the actual test + // now the actual test DataOut<2> data_out; data_out.attach_dof_handler(cdh); std::vector names; names.push_back("x_displacement"); names.push_back("y_displacement"); data_out.add_data_vector(displacements,names); - // output with no mapping + // output with no mapping data_out.build_patches(5); data_out.write_gnuplot(out); - // output with no curved cells + // output with no curved cells data_out.build_patches(euler,5,DataOut<2>::no_curved_cells); data_out.write_gnuplot(out); - // output with curved cells at the boundary - // (default) + // output with curved cells at the boundary + // (default) data_out.build_patches(euler,5); data_out.write_gnuplot(out); - // output with all cells curved + // output with all cells curved data_out.build_patches(euler,5,DataOut<2>::curved_inner_cells); data_out.write_gnuplot(out); } @@ -256,10 +256,10 @@ int main () deallog.depth_console(0); deallog.threshold_double(1.e-10); - // this test, for reasons unknown - // to me, appears to deadlock at - // times. make sure we kill it - // after some time + // this test, for reasons unknown + // to me, appears to deadlock at + // times. make sure we kill it + // after some time #ifdef DEAL_II_WITH_THREADS DeadlockKiller killer; #endif diff --git a/tests/bits/data_out_faces_01.cc b/tests/bits/data_out_faces_01.cc index 77029d7ebc..6511ed3fcc 100644 --- a/tests/bits/data_out_faces_01.cc +++ b/tests/bits/data_out_faces_01.cc @@ -26,37 +26,37 @@ std::string output_file_name = "data_out_faces_01/output"; void -my_check_this (const DoFHandler<1> &, - const Vector &, - const Vector &) +my_check_this (const DoFHandler<1> &, + const Vector &, + const Vector &) { - // nothing to check in 1d + // nothing to check in 1d } template void my_check_this (const DoFHandler &dof_handler, - const Vector &v_node, - const Vector &v_cell) + const Vector &v_node, + const Vector &v_cell) { DataOutFaces data_out_faces; data_out_faces.attach_dof_handler (dof_handler); data_out_faces.add_data_vector (v_node, "node_data"); data_out_faces.add_data_vector (v_cell, "cell_data"); data_out_faces.build_patches (); - + data_out_faces.write_dx (deallog.get_file_stream()); data_out_faces.set_flags (DataOutBase::UcdFlags(true)); - data_out_faces.write_ucd (deallog.get_file_stream()); + data_out_faces.write_ucd (deallog.get_file_stream()); data_out_faces.write_gmv (deallog.get_file_stream()); data_out_faces.write_tecplot (deallog.get_file_stream()); data_out_faces.write_vtk (deallog.get_file_stream()); data_out_faces.write_gnuplot (deallog.get_file_stream()); data_out_faces.write_deal_II_intermediate (deallog.get_file_stream()); - // povray and eps cannot presently - // write out face data + // povray and eps cannot presently + // write out face data } @@ -66,13 +66,13 @@ check_this (const DoFHandler &dof_handler, const Vector &v_node, const Vector &v_cell) { - // since we can't forward declare - // check_this in this file (it is forward - // declared in data_out_common.h), we - // also can't make the driver file aware of - // the overload for 1d. to avoid linker - // errors, we can consequently not overload - // check_this, and need this forwarder - // function + // since we can't forward declare + // check_this in this file (it is forward + // declared in data_out_common.h), we + // also can't make the driver file aware of + // the overload for 1d. to avoid linker + // errors, we can consequently not overload + // check_this, and need this forwarder + // function my_check_this (dof_handler, v_node, v_cell); } diff --git a/tests/bits/data_out_faces_02.cc b/tests/bits/data_out_faces_02.cc index 55cd93fa0e..4b394945d6 100644 --- a/tests/bits/data_out_faces_02.cc +++ b/tests/bits/data_out_faces_02.cc @@ -28,41 +28,41 @@ std::string output_file_name = "data_out_faces_02/output"; void -my_check_this (const DoFHandler<1> &, - const Vector &, - const Vector &) +my_check_this (const DoFHandler<1> &, + const Vector &, + const Vector &) { - // nothing to check in 1d + // nothing to check in 1d } template void my_check_this (const DoFHandler &dof_handler, - const Vector &v_node_x, - const Vector &v_cell_x) + const Vector &v_node_x, + const Vector &v_cell_x) { BlockVector v_node, v_cell; make_block_vector (v_node_x, v_node); make_block_vector (v_cell_x, v_cell); - + DataOutFaces data_out_faces; data_out_faces.attach_dof_handler (dof_handler); data_out_faces.add_data_vector (v_node, "node_data"); data_out_faces.add_data_vector (v_cell, "cell_data"); data_out_faces.build_patches (); - + data_out_faces.write_dx (deallog.get_file_stream()); data_out_faces.set_flags (DataOutBase::UcdFlags(true)); - data_out_faces.write_ucd (deallog.get_file_stream()); + data_out_faces.write_ucd (deallog.get_file_stream()); data_out_faces.write_gmv (deallog.get_file_stream()); data_out_faces.write_tecplot (deallog.get_file_stream()); data_out_faces.write_vtk (deallog.get_file_stream()); data_out_faces.write_gnuplot (deallog.get_file_stream()); data_out_faces.write_deal_II_intermediate (deallog.get_file_stream()); - // povray and eps cannot presently - // write out face data + // povray and eps cannot presently + // write out face data } @@ -74,13 +74,13 @@ check_this (const DoFHandler &dof_handler, const Vector &v_node, const Vector &v_cell) { - // since we can't forward declare - // check_this in this file (it is forward - // declared in data_out_common.h), we - // also can't make the driver file aware of - // the overload for 1d. to avoid linker - // errors, we can consequently not overload - // check_this, and need this forwarder - // function + // since we can't forward declare + // check_this in this file (it is forward + // declared in data_out_common.h), we + // also can't make the driver file aware of + // the overload for 1d. to avoid linker + // errors, we can consequently not overload + // check_this, and need this forwarder + // function my_check_this (dof_handler, v_node, v_cell); } diff --git a/tests/bits/data_out_faces_03.cc b/tests/bits/data_out_faces_03.cc index 2d786e6e35..8588ca36b8 100644 --- a/tests/bits/data_out_faces_03.cc +++ b/tests/bits/data_out_faces_03.cc @@ -33,14 +33,18 @@ std::string output_file_name = "data_out_faces_03/output"; template class XDataOut : public DataOutFaces { - public: - const std::vector > & - get_patches() const - { return DataOutFaces::get_patches(); } - - std::vector - get_dataset_names () const - { return DataOutFaces::get_dataset_names(); } +public: + const std::vector > & + get_patches() const + { + return DataOutFaces::get_patches(); + } + + std::vector + get_dataset_names () const + { + return DataOutFaces::get_dataset_names(); + } }; // have a class that makes sure we can get at the patches and data set @@ -48,24 +52,28 @@ class XDataOut : public DataOutFaces template class XDataOutReader : public DataOutReader { - public: - const std::vector > & - get_patches() const - { return DataOutReader::get_patches(); } - - std::vector - get_dataset_names () const - { return DataOutReader::get_dataset_names(); } +public: + const std::vector > & + get_patches() const + { + return DataOutReader::get_patches(); + } + + std::vector + get_dataset_names () const + { + return DataOutReader::get_dataset_names(); + } }; void my_check_this (const DoFHandler<1> &, - const Vector &, - const Vector &) + const Vector &, + const Vector &) { - // don't check in 1d + // don't check in 1d } @@ -74,15 +82,15 @@ my_check_this (const DoFHandler<1> &, template void my_check_this (const DoFHandler &dof_handler, - const Vector &v_node, - const Vector &v_cell) + const Vector &v_node, + const Vector &v_cell) { XDataOut data_out; data_out.attach_dof_handler (dof_handler); data_out.add_data_vector (v_node, "node_data"); data_out.add_data_vector (v_cell, "cell_data"); data_out.build_patches (); - + { std::ofstream tmp ("data_out_faces_03.tmp"); data_out.write_deal_II_intermediate (tmp); @@ -92,24 +100,24 @@ my_check_this (const DoFHandler &dof_handler, { std::ifstream tmp ("data_out_faces_03.tmp"); reader.read (tmp); - } + } - // finally make sure that we have - // read everything back in - // correctly + // finally make sure that we have + // read everything back in + // correctly Assert (data_out.get_dataset_names() == reader.get_dataset_names(), - ExcInternalError()); - + ExcInternalError()); + Assert (data_out.get_patches().size() == reader.get_patches().size(), - ExcInternalError()); + ExcInternalError()); for (unsigned int i=0; i &dof_handler, const Vector &v_node, const Vector &v_cell) { - // since we can't forward declare - // check_this in this file (it is forward - // declared in data_out_common.h), we - // also can't make the driver file aware of - // the overload for 1d. to avoid linker - // errors, we can consequently not overload - // check_this, and need this forwarder - // function + // since we can't forward declare + // check_this in this file (it is forward + // declared in data_out_common.h), we + // also can't make the driver file aware of + // the overload for 1d. to avoid linker + // errors, we can consequently not overload + // check_this, and need this forwarder + // function my_check_this (dof_handler, v_node, v_cell); } diff --git a/tests/bits/data_out_faces_04.cc b/tests/bits/data_out_faces_04.cc index b603dfeaf5..2be0e4432d 100644 --- a/tests/bits/data_out_faces_04.cc +++ b/tests/bits/data_out_faces_04.cc @@ -36,20 +36,24 @@ std::string output_file_name = "data_out_faces_04/output"; template class XDataOut : public DataOutFaces { - public: - const std::vector > & - get_patches() const - { return DataOutFaces::get_patches(); } - - std::vector - get_dataset_names () const - { return DataOutFaces::get_dataset_names(); } - - std::vector > - get_vector_data_ranges () const - { - return DataOutFaces::get_vector_data_ranges (); - } +public: + const std::vector > & + get_patches() const + { + return DataOutFaces::get_patches(); + } + + std::vector + get_dataset_names () const + { + return DataOutFaces::get_dataset_names(); + } + + std::vector > + get_vector_data_ranges () const + { + return DataOutFaces::get_vector_data_ranges (); + } }; // have a class that makes sure we can get at the patches and data set @@ -57,30 +61,34 @@ class XDataOut : public DataOutFaces template class XDataOutReader : public DataOutReader { - public: - const std::vector > & - get_patches() const - { return DataOutReader::get_patches(); } - - std::vector - get_dataset_names () const - { return DataOutReader::get_dataset_names(); } - - std::vector > - get_vector_data_ranges () const - { - return DataOutReader::get_vector_data_ranges (); - } +public: + const std::vector > & + get_patches() const + { + return DataOutReader::get_patches(); + } + + std::vector + get_dataset_names () const + { + return DataOutReader::get_dataset_names(); + } + + std::vector > + get_vector_data_ranges () const + { + return DataOutReader::get_vector_data_ranges (); + } }; void my_check_this (const DoFHandler<1> &, - const Vector &, - const Vector &) + const Vector &, + const Vector &) { - // don't check in 1d + // don't check in 1d } @@ -89,8 +97,8 @@ my_check_this (const DoFHandler<1> &, template void my_check_this (const DoFHandler &dof_handler, - const Vector &v_node, - const Vector &v_cell) + const Vector &v_node, + const Vector &v_cell) { XDataOut data_out; data_out.attach_dof_handler (dof_handler); @@ -109,47 +117,47 @@ my_check_this (const DoFHandler &dof_handler, reader.read (tmp); } - // finally make sure that we have - // read everything back in - // correctly + // finally make sure that we have + // read everything back in + // correctly Assert (data_out.get_dataset_names() == reader.get_dataset_names(), - ExcInternalError()); + ExcInternalError()); Assert (data_out.get_patches().size() == reader.get_patches().size(), - ExcInternalError()); + ExcInternalError()); for (unsigned int i=0; i(data_out.get_vector_data_ranges()[i]) - << ' ' - << std_cxx1x::get<1>(data_out.get_vector_data_ranges()[i]) - << ' ' - << std_cxx1x::get<2>(data_out.get_vector_data_ranges()[i]) - << std::endl; + << ' ' + << std_cxx1x::get<1>(data_out.get_vector_data_ranges()[i]) + << ' ' + << std_cxx1x::get<2>(data_out.get_vector_data_ranges()[i]) + << std::endl; Assert (std_cxx1x::get<0>(data_out.get_vector_data_ranges()[i]) - == - std_cxx1x::get<0>(reader.get_vector_data_ranges()[i]), - ExcInternalError()); + == + std_cxx1x::get<0>(reader.get_vector_data_ranges()[i]), + ExcInternalError()); Assert (std_cxx1x::get<1>(data_out.get_vector_data_ranges()[i]) - == - std_cxx1x::get<1>(reader.get_vector_data_ranges()[i]), - ExcInternalError()); + == + std_cxx1x::get<1>(reader.get_vector_data_ranges()[i]), + ExcInternalError()); Assert (std_cxx1x::get<2>(data_out.get_vector_data_ranges()[i]) - == - std_cxx1x::get<2>(reader.get_vector_data_ranges()[i]), - ExcInternalError()); + == + std_cxx1x::get<2>(reader.get_vector_data_ranges()[i]), + ExcInternalError()); } - // for good measure, delete tmp file + // for good measure, delete tmp file remove ("data_out_faces_04.tmp"); deallog << "OK" << std::endl; @@ -164,13 +172,13 @@ check_this (const DoFHandler &dof_handler, const Vector &v_node, const Vector &v_cell) { - // since we can't forward declare - // check_this in this file (it is forward - // declared in data_out_common.h), we - // also can't make the driver file aware of - // the overload for 1d. to avoid linker - // errors, we can consequently not overload - // check_this, and need this forwarder - // function + // since we can't forward declare + // check_this in this file (it is forward + // declared in data_out_common.h), we + // also can't make the driver file aware of + // the overload for 1d. to avoid linker + // errors, we can consequently not overload + // check_this, and need this forwarder + // function my_check_this (dof_handler, v_node, v_cell); } diff --git a/tests/bits/data_out_rotation_01.cc b/tests/bits/data_out_rotation_01.cc index 7403b5eaa3..cb92f56157 100644 --- a/tests/bits/data_out_rotation_01.cc +++ b/tests/bits/data_out_rotation_01.cc @@ -26,37 +26,37 @@ std::string output_file_name = "data_out_rotation_01/output"; void -my_check_this (const DoFHandler<3> &, - const Vector &, - const Vector &) +my_check_this (const DoFHandler<3> &, + const Vector &, + const Vector &) { - // nothing to check in 3d + // nothing to check in 3d } template void my_check_this (const DoFHandler &dof_handler, - const Vector &v_node, - const Vector &v_cell) + const Vector &v_node, + const Vector &v_cell) { DataOutRotation data_out_rotation; data_out_rotation.attach_dof_handler (dof_handler); data_out_rotation.add_data_vector (v_node, "node_data"); data_out_rotation.add_data_vector (v_cell, "cell_data"); data_out_rotation.build_patches (4); - + data_out_rotation.write_dx (deallog.get_file_stream()); data_out_rotation.set_flags (DataOutBase::UcdFlags(true)); - data_out_rotation.write_ucd (deallog.get_file_stream()); + data_out_rotation.write_ucd (deallog.get_file_stream()); data_out_rotation.write_gmv (deallog.get_file_stream()); data_out_rotation.write_tecplot (deallog.get_file_stream()); data_out_rotation.write_vtk (deallog.get_file_stream()); data_out_rotation.write_gnuplot (deallog.get_file_stream()); data_out_rotation.write_deal_II_intermediate (deallog.get_file_stream()); - // following only implemented for - // 1d+rotation=2d + // following only implemented for + // 1d+rotation=2d if (dim == 1) { data_out_rotation.write_povray (deallog.get_file_stream()); @@ -71,13 +71,13 @@ check_this (const DoFHandler &dof_handler, const Vector &v_node, const Vector &v_cell) { - // since we can't forward declare - // check_this in this file (it is forward - // declared in data_out_common.h), we - // also can't make the driver file aware of - // the overload for 1d. to avoid linker - // errors, we can consequently not overload - // check_this, and need this forwarder - // function + // since we can't forward declare + // check_this in this file (it is forward + // declared in data_out_common.h), we + // also can't make the driver file aware of + // the overload for 1d. to avoid linker + // errors, we can consequently not overload + // check_this, and need this forwarder + // function my_check_this (dof_handler, v_node, v_cell); } diff --git a/tests/bits/data_out_rotation_02.cc b/tests/bits/data_out_rotation_02.cc index 8ffb24ed74..4e550a72f3 100644 --- a/tests/bits/data_out_rotation_02.cc +++ b/tests/bits/data_out_rotation_02.cc @@ -29,41 +29,41 @@ std::string output_file_name = "data_out_rotation_02/output"; void -my_check_this (const DoFHandler<3> &, - const Vector &, - const Vector &) +my_check_this (const DoFHandler<3> &, + const Vector &, + const Vector &) { - // nothing to check in 3d + // nothing to check in 3d } template void my_check_this (const DoFHandler &dof_handler, - const Vector &v_node_x, - const Vector &v_cell_x) + const Vector &v_node_x, + const Vector &v_cell_x) { BlockVector v_node, v_cell; make_block_vector (v_node_x, v_node); make_block_vector (v_cell_x, v_cell); - + DataOutRotation data_out_rotation; data_out_rotation.attach_dof_handler (dof_handler); data_out_rotation.add_data_vector (v_node, "node_data"); data_out_rotation.add_data_vector (v_cell, "cell_data"); data_out_rotation.build_patches (4); - + data_out_rotation.write_dx (deallog.get_file_stream()); data_out_rotation.set_flags (DataOutBase::UcdFlags(true)); - data_out_rotation.write_ucd (deallog.get_file_stream()); + data_out_rotation.write_ucd (deallog.get_file_stream()); data_out_rotation.write_gmv (deallog.get_file_stream()); data_out_rotation.write_tecplot (deallog.get_file_stream()); data_out_rotation.write_vtk (deallog.get_file_stream()); data_out_rotation.write_gnuplot (deallog.get_file_stream()); data_out_rotation.write_deal_II_intermediate (deallog.get_file_stream()); - // following only implemented for - // 1d+rotation=2d + // following only implemented for + // 1d+rotation=2d if (dim == 1) { data_out_rotation.write_povray (deallog.get_file_stream()); @@ -78,13 +78,13 @@ check_this (const DoFHandler &dof_handler, const Vector &v_node, const Vector &v_cell) { - // since we can't forward declare - // check_this in this file (it is forward - // declared in data_out_common.h), we - // also can't make the driver file aware of - // the overload for 1d. to avoid linker - // errors, we can consequently not overload - // check_this, and need this forwarder - // function + // since we can't forward declare + // check_this in this file (it is forward + // declared in data_out_common.h), we + // also can't make the driver file aware of + // the overload for 1d. to avoid linker + // errors, we can consequently not overload + // check_this, and need this forwarder + // function my_check_this (dof_handler, v_node, v_cell); } diff --git a/tests/bits/data_out_rotation_03.cc b/tests/bits/data_out_rotation_03.cc index 6da416d639..1549e70039 100644 --- a/tests/bits/data_out_rotation_03.cc +++ b/tests/bits/data_out_rotation_03.cc @@ -33,14 +33,18 @@ std::string output_file_name = "data_out_rotation_03/output"; template class XDataOut : public DataOutRotation { - public: - const std::vector > & - get_patches() const - { return DataOutRotation::get_patches(); } - - std::vector - get_dataset_names () const - { return DataOutRotation::get_dataset_names(); } +public: + const std::vector > & + get_patches() const + { + return DataOutRotation::get_patches(); + } + + std::vector + get_dataset_names () const + { + return DataOutRotation::get_dataset_names(); + } }; // have a class that makes sure we can get at the patches and data set @@ -48,23 +52,27 @@ class XDataOut : public DataOutRotation template class XDataOutReader : public DataOutReader { - public: - const std::vector > & - get_patches() const - { return DataOutReader::get_patches(); } - - std::vector - get_dataset_names () const - { return DataOutReader::get_dataset_names(); } +public: + const std::vector > & + get_patches() const + { + return DataOutReader::get_patches(); + } + + std::vector + get_dataset_names () const + { + return DataOutReader::get_dataset_names(); + } }; void my_check_this (const DoFHandler<3> &, - const Vector &, - const Vector &) + const Vector &, + const Vector &) { - // no checks in 3d + // no checks in 3d } @@ -72,19 +80,19 @@ my_check_this (const DoFHandler<3> &, template void my_check_this (const DoFHandler &dof_handler, - const Vector &v_node, - const Vector &v_cell) + const Vector &v_node, + const Vector &v_cell) { XDataOut data_out; data_out.attach_dof_handler (dof_handler); data_out.add_data_vector (v_node, "node_data"); data_out.add_data_vector (v_cell, "cell_data"); data_out.build_patches (4); - + { std::ofstream tmp ("data_out_rotation_03.tmp"); - // use full precision to avoid - // errors + // use full precision to avoid + // errors tmp.precision (20); data_out.write_deal_II_intermediate (tmp); } @@ -93,24 +101,24 @@ my_check_this (const DoFHandler &dof_handler, { std::ifstream tmp ("data_out_rotation_03.tmp"); reader.read (tmp); - } + } - // finally make sure that we have - // read everything back in - // correctly + // finally make sure that we have + // read everything back in + // correctly Assert (data_out.get_dataset_names() == reader.get_dataset_names(), - ExcInternalError()); - + ExcInternalError()); + Assert (data_out.get_patches().size() == reader.get_patches().size(), - ExcInternalError()); + ExcInternalError()); for (unsigned int i=0; i &dof_handler, const Vector &v_node, const Vector &v_cell) { - // since we can't forward declare - // check_this in this file (it is forward - // declared in data_out_common.h), we - // also can't make the driver file aware of - // the overload for 1d. to avoid linker - // errors, we can consequently not overload - // check_this, and need this forwarder - // function + // since we can't forward declare + // check_this in this file (it is forward + // declared in data_out_common.h), we + // also can't make the driver file aware of + // the overload for 1d. to avoid linker + // errors, we can consequently not overload + // check_this, and need this forwarder + // function my_check_this (dof_handler, v_node, v_cell); } diff --git a/tests/bits/data_out_rotation_04.cc b/tests/bits/data_out_rotation_04.cc index 8d89204935..82cdadb1d1 100644 --- a/tests/bits/data_out_rotation_04.cc +++ b/tests/bits/data_out_rotation_04.cc @@ -36,20 +36,24 @@ std::string output_file_name = "data_out_rotation_04/output"; template class XDataOut : public DataOutRotation { - public: - const std::vector > & - get_patches() const - { return DataOutRotation::get_patches(); } - - std::vector - get_dataset_names () const - { return DataOutRotation::get_dataset_names(); } - - std::vector > - get_vector_data_ranges () const - { - return DataOutRotation::get_vector_data_ranges (); - } +public: + const std::vector > & + get_patches() const + { + return DataOutRotation::get_patches(); + } + + std::vector + get_dataset_names () const + { + return DataOutRotation::get_dataset_names(); + } + + std::vector > + get_vector_data_ranges () const + { + return DataOutRotation::get_vector_data_ranges (); + } }; // have a class that makes sure we can get at the patches and data set @@ -57,29 +61,33 @@ class XDataOut : public DataOutRotation template class XDataOutReader : public DataOutReader { - public: - const std::vector > & - get_patches() const - { return DataOutReader::get_patches(); } - - std::vector - get_dataset_names () const - { return DataOutReader::get_dataset_names(); } - - std::vector > - get_vector_data_ranges () const - { - return DataOutReader::get_vector_data_ranges (); - } +public: + const std::vector > & + get_patches() const + { + return DataOutReader::get_patches(); + } + + std::vector + get_dataset_names () const + { + return DataOutReader::get_dataset_names(); + } + + std::vector > + get_vector_data_ranges () const + { + return DataOutReader::get_vector_data_ranges (); + } }; void my_check_this (const DoFHandler<3> &, - const Vector &, - const Vector &) + const Vector &, + const Vector &) { - // no checks in 3d + // no checks in 3d } @@ -87,8 +95,8 @@ my_check_this (const DoFHandler<3> &, template void my_check_this (const DoFHandler &dof_handler, - const Vector &v_node, - const Vector &v_cell) + const Vector &v_node, + const Vector &v_cell) { XDataOut data_out; data_out.attach_dof_handler (dof_handler); @@ -98,8 +106,8 @@ my_check_this (const DoFHandler &dof_handler, { std::ofstream tmp ("data_out_rotation_04.tmp"); - // use full precision to avoid - // errors + // use full precision to avoid + // errors tmp.precision (20); data_out.write_deal_II_intermediate (tmp); } @@ -110,47 +118,47 @@ my_check_this (const DoFHandler &dof_handler, reader.read (tmp); } - // finally make sure that we have - // read everything back in - // correctly + // finally make sure that we have + // read everything back in + // correctly Assert (data_out.get_dataset_names() == reader.get_dataset_names(), - ExcInternalError()); + ExcInternalError()); Assert (data_out.get_patches().size() == reader.get_patches().size(), - ExcInternalError()); + ExcInternalError()); for (unsigned int i=0; i(data_out.get_vector_data_ranges()[i]) - << ' ' - << std_cxx1x::get<1>(data_out.get_vector_data_ranges()[i]) - << ' ' - << std_cxx1x::get<2>(data_out.get_vector_data_ranges()[i]) - << std::endl; + << ' ' + << std_cxx1x::get<1>(data_out.get_vector_data_ranges()[i]) + << ' ' + << std_cxx1x::get<2>(data_out.get_vector_data_ranges()[i]) + << std::endl; Assert (std_cxx1x::get<0>(data_out.get_vector_data_ranges()[i]) - == - std_cxx1x::get<0>(reader.get_vector_data_ranges()[i]), - ExcInternalError()); + == + std_cxx1x::get<0>(reader.get_vector_data_ranges()[i]), + ExcInternalError()); Assert (std_cxx1x::get<1>(data_out.get_vector_data_ranges()[i]) - == - std_cxx1x::get<1>(reader.get_vector_data_ranges()[i]), - ExcInternalError()); + == + std_cxx1x::get<1>(reader.get_vector_data_ranges()[i]), + ExcInternalError()); Assert (std_cxx1x::get<2>(data_out.get_vector_data_ranges()[i]) - == - std_cxx1x::get<2>(reader.get_vector_data_ranges()[i]), - ExcInternalError()); + == + std_cxx1x::get<2>(reader.get_vector_data_ranges()[i]), + ExcInternalError()); } - // for good measure, delete tmp file + // for good measure, delete tmp file remove ("data_out_rotation_04.tmp"); deallog << "OK" << std::endl; @@ -163,13 +171,13 @@ check_this (const DoFHandler &dof_handler, const Vector &v_node, const Vector &v_cell) { - // since we can't forward declare - // check_this in this file (it is forward - // declared in data_out_common.h), we - // also can't make the driver file aware of - // the overload for 1d. to avoid linker - // errors, we can consequently not overload - // check_this, and need this forwarder - // function + // since we can't forward declare + // check_this in this file (it is forward + // declared in data_out_common.h), we + // also can't make the driver file aware of + // the overload for 1d. to avoid linker + // errors, we can consequently not overload + // check_this, and need this forwarder + // function my_check_this (dof_handler, v_node, v_cell); } diff --git a/tests/bits/data_out_stack_01.cc b/tests/bits/data_out_stack_01.cc index cddeda4d3a..633d94b37f 100644 --- a/tests/bits/data_out_stack_01.cc +++ b/tests/bits/data_out_stack_01.cc @@ -30,21 +30,21 @@ check_this (const DoFHandler &dof_handler, const Vector &v_node, const Vector &v_cell) { - // 3d would generate 4d data, which - // we don't presently support - // - // output for 2d+time is not - // presently implemented + // 3d would generate 4d data, which + // we don't presently support + // + // output for 2d+time is not + // presently implemented if (dim > 1) return; - + DataOutStack data_out_stack; data_out_stack.declare_data_vector ("node_data", DataOutStack::dof_vector); data_out_stack.declare_data_vector ("cell_data", DataOutStack::cell_vector); - - + + data_out_stack.new_parameter_value (1., 1.); data_out_stack.attach_dof_handler (dof_handler); data_out_stack.add_data_vector (v_node, "node_data"); @@ -64,23 +64,23 @@ check_this (const DoFHandler &dof_handler, data_out_stack.add_data_vector (vc1, "cell_data"); data_out_stack.build_patches (); data_out_stack.finish_parameter_value (); - + data_out_stack.write_dx (deallog.get_file_stream()); data_out_stack.set_flags (DataOutBase::UcdFlags(true)); - data_out_stack.write_ucd (deallog.get_file_stream()); + data_out_stack.write_ucd (deallog.get_file_stream()); data_out_stack.write_gmv (deallog.get_file_stream()); data_out_stack.write_tecplot (deallog.get_file_stream()); data_out_stack.write_vtk (deallog.get_file_stream()); data_out_stack.write_gnuplot (deallog.get_file_stream()); data_out_stack.write_deal_II_intermediate (deallog.get_file_stream()); - // the following is only - // implemented for 2d (=1d+time) + // the following is only + // implemented for 2d (=1d+time) if (dim == 1) { data_out_stack.write_povray (deallog.get_file_stream()); data_out_stack.write_eps (deallog.get_file_stream()); - } + } } diff --git a/tests/bits/data_out_stack_02.cc b/tests/bits/data_out_stack_02.cc index c4057afe8b..bb24c2efcb 100644 --- a/tests/bits/data_out_stack_02.cc +++ b/tests/bits/data_out_stack_02.cc @@ -34,21 +34,21 @@ check_this (const DoFHandler &dof_handler, const Vector &v_node, const Vector &v_cell) { - // 3d would generate 4d data, which - // we don't presently support - // - // output for 2d+time is not - // presently implemented + // 3d would generate 4d data, which + // we don't presently support + // + // output for 2d+time is not + // presently implemented if (dim > 1) return; - + DataOutStack data_out_stack; data_out_stack.declare_data_vector ("node_data", DataOutStack::dof_vector); data_out_stack.declare_data_vector ("cell_data", DataOutStack::cell_vector); - - + + data_out_stack.new_parameter_value (1., 1.); data_out_stack.attach_dof_handler (dof_handler); @@ -72,23 +72,23 @@ check_this (const DoFHandler &dof_handler, data_out_stack.add_data_vector (vc1, names_2); data_out_stack.build_patches (); data_out_stack.finish_parameter_value (); - + data_out_stack.write_dx (deallog.get_file_stream()); data_out_stack.set_flags (DataOutBase::UcdFlags(true)); - data_out_stack.write_ucd (deallog.get_file_stream()); + data_out_stack.write_ucd (deallog.get_file_stream()); data_out_stack.write_gmv (deallog.get_file_stream()); data_out_stack.write_tecplot (deallog.get_file_stream()); data_out_stack.write_vtk (deallog.get_file_stream()); data_out_stack.write_gnuplot (deallog.get_file_stream()); data_out_stack.write_deal_II_intermediate (deallog.get_file_stream()); - // the following is only - // implemented for 2d (=1d+time) + // the following is only + // implemented for 2d (=1d+time) if (dim == 1) { data_out_stack.write_povray (deallog.get_file_stream()); data_out_stack.write_eps (deallog.get_file_stream()); - } + } } diff --git a/tests/bits/data_out_stack_03.cc b/tests/bits/data_out_stack_03.cc index 9ea6b00c70..1377daebe5 100644 --- a/tests/bits/data_out_stack_03.cc +++ b/tests/bits/data_out_stack_03.cc @@ -34,28 +34,28 @@ template -void run () +void run () { Triangulation triangulation; GridGenerator::hyper_cube (triangulation, -1, 1); triangulation.refine_global (1); - + FE_Q fe(1); DoFHandler dof_handler(triangulation); dof_handler.distribute_dofs (fe); - // create a continuous field over - // this DoFHandler + // create a continuous field over + // this DoFHandler Vector v(dof_handler.n_dofs()); v = 1.; v(v.size()/2) = 2.; - // output this field using - // DataOutStack. the result should - // be a continuous field again + // output this field using + // DataOutStack. the result should + // be a continuous field again DataOutStack data_out_stack; data_out_stack.declare_data_vector ("solution", - DataOutStack::dof_vector); + DataOutStack::dof_vector); data_out_stack.new_parameter_value (1,1); data_out_stack.attach_dof_handler (dof_handler); data_out_stack.add_data_vector (v, "solution"); @@ -67,7 +67,7 @@ void run () -int main () +int main () { std::ofstream logfile("data_out_stack_03/output"); deallog.attach(logfile); diff --git a/tests/bits/deal_solver_04.cc b/tests/bits/deal_solver_04.cc index 603126037f..2b201f084c 100644 --- a/tests/bits/deal_solver_04.cc +++ b/tests/bits/deal_solver_04.cc @@ -40,18 +40,18 @@ template void -check_solve( SOLVER& solver, const MATRIX& A, - VECTOR& u, VECTOR& f, const PRECONDITION& P) +check_solve( SOLVER &solver, const MATRIX &A, + VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; - + u = 0.; f = 1.; - try + try { solver.solve(A,u,f,P); } - catch (std::exception& e) + catch (std::exception &e) { deallog << e.what() << std::endl; abort (); @@ -69,7 +69,7 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + GrowingVectorMemory<> mem; SolverControl control(100, 1.e-3); @@ -77,8 +77,8 @@ int main() unsigned int dim = (size-1)*(size-1); deallog << "Size " << size << " Unknowns " << dim << std::endl; - - // Make matrix + + // Make matrix FDMatrix testproblem(size, size); SparsityPattern structure(dim, dim, 5); testproblem.five_point_structure(structure); diff --git a/tests/bits/deal_solver_05.cc b/tests/bits/deal_solver_05.cc index 72f3115c5c..548c2b5683 100644 --- a/tests/bits/deal_solver_05.cc +++ b/tests/bits/deal_solver_05.cc @@ -39,18 +39,18 @@ template void -check_solve( SOLVER& solver, const MATRIX& A, - VECTOR& u, VECTOR& f, const PRECONDITION& P) +check_solve( SOLVER &solver, const MATRIX &A, + VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; - + u = 0.; f = 1.; - try + try { solver.solve(A,u,f,P); } - catch (std::exception& e) + catch (std::exception &e) { deallog << e.what() << std::endl; abort (); @@ -68,7 +68,7 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + GrowingVectorMemory<> mem; SolverControl control(100, 1.e-3); @@ -76,8 +76,8 @@ int main() unsigned int dim = (size-1)*(size-1); deallog << "Size " << size << " Unknowns " << dim << std::endl; - - // Make matrix + + // Make matrix FDMatrix testproblem(size, size); SparsityPattern structure(dim, dim, 5); testproblem.five_point_structure(structure); diff --git a/tests/bits/denis_1.cc b/tests/bits/denis_1.cc index 31e6aacd0f..461f057fb8 100644 --- a/tests/bits/denis_1.cc +++ b/tests/bits/denis_1.cc @@ -22,7 +22,7 @@ // the program is already there let's make use of it. // // this program is a modified version of one by -// Denis Danilov , +// Denis Danilov , #include "../tests.h" @@ -43,28 +43,28 @@ class F : public Function<2> { - public: - virtual double value (const Point<2> &p, const unsigned int) const - { - double delta = 0.05; - double x, y, r; - x = p(0); - y = p(1); - r = std::sqrt( x*x + y*y ); - return 0.5 * ( 1 - std::tanh( ( r - 0.5 ) - /( 2*M_SQRT2 * delta ) ) ) ; - } +public: + virtual double value (const Point<2> &p, const unsigned int) const + { + double delta = 0.05; + double x, y, r; + x = p(0); + y = p(1); + r = std::sqrt( x*x + y*y ); + return 0.5 * ( 1 - std::tanh( ( r - 0.5 ) + /( 2*M_SQRT2 * delta ) ) ) ; + } }; -int main() +int main() { std::ofstream logfile("denis_1/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); deallog << std::setprecision (2); - deallog << std::fixed; + deallog << std::fixed; Triangulation<2> triangulation; FE_Q<2> fe(2); @@ -79,7 +79,7 @@ int main() dof_handler.distribute_dofs(fe); DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); - + phi_solution.reinit(dof_handler.n_dofs()); VectorTools::interpolate (dof_handler, F(), phi_solution); @@ -89,17 +89,17 @@ int main() gradient_phi_min = 1e30; gradient_phi_max = -1; - cell = dof_handler.begin_active(); - for(unsigned int cell_no=0; cell!=endc; ++cell, ++cell_no) + cell = dof_handler.begin_active(); + for (unsigned int cell_no=0; cell!=endc; ++cell, ++cell_no) { - if( gradient_phi(cell_no) < gradient_phi_min ) - gradient_phi_min = gradient_phi(cell_no); - - if( gradient_phi(cell_no) > gradient_phi_max ) - gradient_phi_max = gradient_phi(cell_no); - + if ( gradient_phi(cell_no) < gradient_phi_min ) + gradient_phi_min = gradient_phi(cell_no); + + if ( gradient_phi(cell_no) > gradient_phi_max ) + gradient_phi_max = gradient_phi(cell_no); + } deallog << "gradient_phi_min: " << gradient_phi_min << std::endl; - deallog << "gradient_phi_max: " << gradient_phi_max << std::endl; + deallog << "gradient_phi_max: " << gradient_phi_max << std::endl; } diff --git a/tests/bits/distorted_cells_01.cc b/tests/bits/distorted_cells_01.cc index 9e9c6c88b3..7b38059a68 100644 --- a/tests/bits/distorted_cells_01.cc +++ b/tests/bits/distorted_cells_01.cc @@ -45,16 +45,16 @@ void check (const unsigned int testcase) switch (testcase) { - case 1: - deallog << "Pinched cell in " << dim << "d" << std::endl; - vertices[0] = vertices[1]; - break; - case 2: - deallog << "Twisted cell in " << dim << "d" << std::endl; - std::swap (vertices[0], vertices[1]); - break; - default: - Assert (false, ExcNotImplemented()); + case 1: + deallog << "Pinched cell in " << dim << "d" << std::endl; + vertices[0] = vertices[1]; + break; + case 2: + deallog << "Twisted cell in " << dim << "d" << std::endl; + std::swap (vertices[0], vertices[1]); + break; + default: + Assert (false, ExcNotImplemented()); } @@ -78,9 +78,9 @@ void check (const unsigned int testcase) flag = true; deallog << dcv.distorted_cells.size() << " distorted cells" - << std::endl; + << std::endl; Assert (dcv.distorted_cells.front() == coarse_grid.begin(0), - ExcInternalError()); + ExcInternalError()); } Assert (flag == true, ExcInternalError()); diff --git a/tests/bits/distorted_cells_02.cc b/tests/bits/distorted_cells_02.cc index b15dffd31a..d93df5e318 100644 --- a/tests/bits/distorted_cells_02.cc +++ b/tests/bits/distorted_cells_02.cc @@ -56,9 +56,9 @@ void check () flag = true; deallog << dcv.distorted_cells.size() << " distorted cells" - << std::endl; + << std::endl; Assert (dcv.distorted_cells.front() == coarse_grid.begin(0), - ExcInternalError()); + ExcInternalError()); } Assert (flag == true, ExcInternalError()); diff --git a/tests/bits/distorted_cells_03.cc b/tests/bits/distorted_cells_03.cc index 3b6d603dd6..08985b912d 100644 --- a/tests/bits/distorted_cells_03.cc +++ b/tests/bits/distorted_cells_03.cc @@ -42,34 +42,34 @@ template class MyBoundary : public Boundary { - virtual Point - get_new_point_on_line (const typename Triangulation::line_iterator &line) const - { - deallog << "Finding point between " - << line->vertex(0) << " and " - << line->vertex(1) << std::endl; - - // in 2d, find a point that - // lies on the opposite side - // of the quad. in 3d, choose - // the midpoint of the edge - if (dim == 2) - return Point(0,0.75); - else - return (line->vertex(0) + line->vertex(1)) / 2; - } - - virtual Point - get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const - { - deallog << "Finding point between " - << quad->vertex(0) << " and " - << quad->vertex(1) << " and " - << quad->vertex(2) << " and " - << quad->vertex(3) << std::endl; - - return Point(0,0,.75); - } + virtual Point + get_new_point_on_line (const typename Triangulation::line_iterator &line) const + { + deallog << "Finding point between " + << line->vertex(0) << " and " + << line->vertex(1) << std::endl; + + // in 2d, find a point that + // lies on the opposite side + // of the quad. in 3d, choose + // the midpoint of the edge + if (dim == 2) + return Point(0,0.75); + else + return (line->vertex(0) + line->vertex(1)) / 2; + } + + virtual Point + get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const + { + deallog << "Finding point between " + << quad->vertex(0) << " and " + << quad->vertex(1) << " and " + << quad->vertex(2) << " and " + << quad->vertex(3) << std::endl; + + return Point(0,0,.75); + } }; @@ -79,18 +79,18 @@ void check () { MyBoundary my_boundary; - // create a single square/cube + // create a single square/cube Triangulation coarse_grid (Triangulation::none, true); GridGenerator::hyper_cube (coarse_grid, -1, 1); - // set bottom face to use MyBoundary + // set bottom face to use MyBoundary for (unsigned int f=0; f::faces_per_cell; ++f) if (coarse_grid.begin_active()->face(f)->center()[dim-1] == -1) coarse_grid.begin_active()->face(f)->set_boundary_indicator (1); coarse_grid.set_boundary (1, my_boundary); - // now try to refine this one - // cell. we should get an exception + // now try to refine this one + // cell. we should get an exception bool flag = false; try { @@ -102,21 +102,21 @@ void check () flag = true; deallog << dcv.distorted_cells.size() << " distorted cells" - << std::endl; + << std::endl; Assert (dcv.distorted_cells.front() == coarse_grid.begin(0), - ExcInternalError()); + ExcInternalError()); - // ignore the exception, i.e. do not - // even attempt to fix up the problem - // (but see the _04 testcase for this) + // ignore the exception, i.e. do not + // even attempt to fix up the problem + // (but see the _04 testcase for this) } Assert (flag == true, ExcInternalError()); Assert (coarse_grid.n_levels() == 2, ExcInternalError()); Assert (coarse_grid.n_active_cells() == 1< class MyBoundary : public Boundary { - virtual Point - get_new_point_on_line (const typename Triangulation::line_iterator &line) const - { - deallog << "Finding point between " - << line->vertex(0) << " and " - << line->vertex(1) << std::endl; - - // in 2d, find a point that - // lies on the opposite side - // of the quad. in 3d, choose - // the midpoint of the edge - if (dim == 2) - return Point(0,0.75); - else - return (line->vertex(0) + line->vertex(1)) / 2; - } - - virtual Point - get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const - { - deallog << "Finding point between " - << quad->vertex(0) << " and " - << quad->vertex(1) << " and " - << quad->vertex(2) << " and " - << quad->vertex(3) << std::endl; - - return Point(0,0,.75); - } - - virtual - Point - project_to_surface (const typename Triangulation::line_iterator &, - const Point &p) const - { - deallog << "Projecting line point " << p << std::endl; - - if (dim == 2) - return Point(p[0], 0.75-1.75*std::fabs(p[0])); - else - return p; - } - - virtual - Point - project_to_surface (const typename Triangulation::quad_iterator &, - const Point &p) const - { - deallog << "Projecting quad point " << p << std::endl; - - Assert (dim == 3, ExcInternalError()); - - return Point(p[0], p[1], - 0.75-1.75*std::max(std::fabs(p[0]), - std::fabs(p[1]))); - } - - virtual - Point - project_to_surface (const typename Triangulation::hex_iterator &, - const Point &) const - { - Assert (false, ExcInternalError()); - return Point(); - } + virtual Point + get_new_point_on_line (const typename Triangulation::line_iterator &line) const + { + deallog << "Finding point between " + << line->vertex(0) << " and " + << line->vertex(1) << std::endl; + + // in 2d, find a point that + // lies on the opposite side + // of the quad. in 3d, choose + // the midpoint of the edge + if (dim == 2) + return Point(0,0.75); + else + return (line->vertex(0) + line->vertex(1)) / 2; + } + + virtual Point + get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const + { + deallog << "Finding point between " + << quad->vertex(0) << " and " + << quad->vertex(1) << " and " + << quad->vertex(2) << " and " + << quad->vertex(3) << std::endl; + + return Point(0,0,.75); + } + + virtual + Point + project_to_surface (const typename Triangulation::line_iterator &, + const Point &p) const + { + deallog << "Projecting line point " << p << std::endl; + + if (dim == 2) + return Point(p[0], 0.75-1.75*std::fabs(p[0])); + else + return p; + } + + virtual + Point + project_to_surface (const typename Triangulation::quad_iterator &, + const Point &p) const + { + deallog << "Projecting quad point " << p << std::endl; + + Assert (dim == 3, ExcInternalError()); + + return Point(p[0], p[1], + 0.75-1.75*std::max(std::fabs(p[0]), + std::fabs(p[1]))); + } + + virtual + Point + project_to_surface (const typename Triangulation::hex_iterator &, + const Point &) const + { + Assert (false, ExcInternalError()); + return Point(); + } }; @@ -112,18 +112,18 @@ void check () { MyBoundary my_boundary; - // create a single square/cube + // create a single square/cube Triangulation coarse_grid (Triangulation::none, true); GridGenerator::hyper_cube (coarse_grid, -1, 1); - // set bottom face to use MyBoundary + // set bottom face to use MyBoundary for (unsigned int f=0; f::faces_per_cell; ++f) if (coarse_grid.begin_active()->face(f)->center()[dim-1] == -1) coarse_grid.begin_active()->face(f)->set_boundary_indicator (1); coarse_grid.set_boundary (1, my_boundary); - // now try to refine this one - // cell. we should get an exception + // now try to refine this one + // cell. we should get an exception try { coarse_grid.begin_active()->set_refine_flag (); @@ -132,17 +132,17 @@ void check () catch (typename Triangulation::DistortedCellList &dcv) { typename Triangulation::DistortedCellList - subset = GridTools::fix_up_distorted_child_cells (dcv, - coarse_grid); + subset = GridTools::fix_up_distorted_child_cells (dcv, + coarse_grid); Assert (subset.distorted_cells.size() == 0, - ExcInternalError()); + ExcInternalError()); } Assert (coarse_grid.n_levels() == 2, ExcInternalError()); Assert (coarse_grid.n_active_cells() == 1< class MyBoundary : public Boundary { - virtual Point - get_new_point_on_line (const typename Triangulation::line_iterator &line) const - { - deallog << "Finding point between " - << line->vertex(0) << " and " - << line->vertex(1) << std::endl; - - // in 2d, find a point that - // lies on the opposite side - // of the quad. in 3d, choose - // the midpoint of the edge - if (dim == 2) - return Point(0,1.25); - else - return (line->vertex(0) + line->vertex(1)) / 2; - } - - virtual Point - get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const - { - deallog << "Finding point between " - << quad->vertex(0) << " and " - << quad->vertex(1) << " and " - << quad->vertex(2) << " and " - << quad->vertex(3) << std::endl; - - return Point(0,0,1.25); - } - - virtual - Point - project_to_surface (const typename Triangulation::line_iterator &, - const Point &p) const - { - deallog << "Projecting line point " << p << std::endl; - - if (dim == 2) - return Point(p[0], 1.25-2.25*std::fabs(p[0])); - else - return p; - } - - virtual - Point - project_to_surface (const typename Triangulation::quad_iterator &, - const Point &p) const - { - deallog << "Projecting quad point " << p << std::endl; - - Assert (dim == 3, ExcInternalError()); - - return Point(p[0], p[1], - 1.25-2.25*std::max(std::fabs(p[0]), - std::fabs(p[1]))); - } - - virtual - Point - project_to_surface (const typename Triangulation::hex_iterator &, - const Point &) const - { - Assert (false, ExcInternalError()); - return Point(); - } + virtual Point + get_new_point_on_line (const typename Triangulation::line_iterator &line) const + { + deallog << "Finding point between " + << line->vertex(0) << " and " + << line->vertex(1) << std::endl; + + // in 2d, find a point that + // lies on the opposite side + // of the quad. in 3d, choose + // the midpoint of the edge + if (dim == 2) + return Point(0,1.25); + else + return (line->vertex(0) + line->vertex(1)) / 2; + } + + virtual Point + get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const + { + deallog << "Finding point between " + << quad->vertex(0) << " and " + << quad->vertex(1) << " and " + << quad->vertex(2) << " and " + << quad->vertex(3) << std::endl; + + return Point(0,0,1.25); + } + + virtual + Point + project_to_surface (const typename Triangulation::line_iterator &, + const Point &p) const + { + deallog << "Projecting line point " << p << std::endl; + + if (dim == 2) + return Point(p[0], 1.25-2.25*std::fabs(p[0])); + else + return p; + } + + virtual + Point + project_to_surface (const typename Triangulation::quad_iterator &, + const Point &p) const + { + deallog << "Projecting quad point " << p << std::endl; + + Assert (dim == 3, ExcInternalError()); + + return Point(p[0], p[1], + 1.25-2.25*std::max(std::fabs(p[0]), + std::fabs(p[1]))); + } + + virtual + Point + project_to_surface (const typename Triangulation::hex_iterator &, + const Point &) const + { + Assert (false, ExcInternalError()); + return Point(); + } }; @@ -114,18 +114,18 @@ void check () { MyBoundary my_boundary; - // create a single square/cube + // create a single square/cube Triangulation coarse_grid (Triangulation::none, true); GridGenerator::hyper_cube (coarse_grid, -1, 1); - // set bottom face to use MyBoundary + // set bottom face to use MyBoundary for (unsigned int f=0; f::faces_per_cell; ++f) if (coarse_grid.begin_active()->face(f)->center()[dim-1] == -1) coarse_grid.begin_active()->face(f)->set_boundary_indicator (1); coarse_grid.set_boundary (1, my_boundary); - // now try to refine this one - // cell. we should get an exception + // now try to refine this one + // cell. we should get an exception try { coarse_grid.begin_active()->set_refine_flag (); @@ -134,17 +134,17 @@ void check () catch (typename Triangulation::DistortedCellList &dcv) { typename Triangulation::DistortedCellList - subset = GridTools::fix_up_distorted_child_cells (dcv, - coarse_grid); + subset = GridTools::fix_up_distorted_child_cells (dcv, + coarse_grid); Assert (subset.distorted_cells.size() == 1, - ExcInternalError()); + ExcInternalError()); } Assert (coarse_grid.n_levels() == 2, ExcInternalError()); Assert (coarse_grid.n_active_cells() == 1< class MyBoundary : public Boundary { - virtual Point - get_new_point_on_line (const typename Triangulation::line_iterator &line) const - { - deallog << "Finding point between " - << line->vertex(0) << " and " - << line->vertex(1) << std::endl; - - return Point(0,0.5,0.9); - } - - virtual Point - get_new_point_on_quad (const typename Triangulation::quad_iterator &) const - { - Assert (false, ExcInternalError()); - return Point(0,0,1.25); - } + virtual Point + get_new_point_on_line (const typename Triangulation::line_iterator &line) const + { + deallog << "Finding point between " + << line->vertex(0) << " and " + << line->vertex(1) << std::endl; + + return Point(0,0.5,0.9); + } + + virtual Point + get_new_point_on_quad (const typename Triangulation::quad_iterator &) const + { + Assert (false, ExcInternalError()); + return Point(0,0,1.25); + } }; @@ -65,7 +65,7 @@ void check () { MyBoundary my_boundary; - // create two cubes + // create two cubes Triangulation coarse_grid (Triangulation::none, true); std::vector sub(dim, 1); @@ -73,17 +73,17 @@ void check () Point p1 (-1,0,0), p2(1,1,1); GridGenerator::subdivided_hyper_rectangle(coarse_grid, sub, p1, p2, true); - // set bottom middle edge to use MyBoundary + // set bottom middle edge to use MyBoundary for (unsigned int f=0; f::faces_per_cell; ++f) for (unsigned int e=0; e::faces_per_cell; ++e) if (coarse_grid.begin_active()->face(f)->line(e)->center()[0] == 0) - if (coarse_grid.begin_active()->face(f)->line(e)->center()[1] == 0.5) - if (coarse_grid.begin_active()->face(f)->line(e)->center()[2] == 0) - coarse_grid.begin_active()->face(f)->line(e)->set_boundary_indicator (99); + if (coarse_grid.begin_active()->face(f)->line(e)->center()[1] == 0.5) + if (coarse_grid.begin_active()->face(f)->line(e)->center()[2] == 0) + coarse_grid.begin_active()->face(f)->line(e)->set_boundary_indicator (99); coarse_grid.set_boundary (99, my_boundary); - // now try to refine this one - // cell. we should get an exception + // now try to refine this one + // cell. we should get an exception try { coarse_grid.refine_global(1); @@ -91,27 +91,27 @@ void check () catch (typename Triangulation::DistortedCellList &dcv) { deallog << "Found " << dcv.distorted_cells.size() << " distorted cells" - << std::endl; + << std::endl; Assert (dcv.distorted_cells.size() == 2, - ExcInternalError()); + ExcInternalError()); typename Triangulation::DistortedCellList - subset = GridTools::fix_up_distorted_child_cells (dcv, - coarse_grid); + subset = GridTools::fix_up_distorted_child_cells (dcv, + coarse_grid); deallog << "Found " << subset.distorted_cells.size() - << " cells that are still distorted" - << std::endl; + << " cells that are still distorted" + << std::endl; Assert (subset.distorted_cells.size() == 0, - ExcInternalError()); + ExcInternalError()); } Assert (coarse_grid.n_levels() == 2, ExcInternalError()); Assert (coarse_grid.n_active_cells() == 2*1< quadrature(2); FEValues fe_values(dummy, quadrature, update_JxW_values); // should throw an assertion - try + try { fe_values.reinit(coarse_grid.begin()); } diff --git a/tests/bits/distorted_mapped_cells_01.cc b/tests/bits/distorted_mapped_cells_01.cc index 86c696eea2..2dfc786776 100644 --- a/tests/bits/distorted_mapped_cells_01.cc +++ b/tests/bits/distorted_mapped_cells_01.cc @@ -61,15 +61,15 @@ void test() FEValues fe_val (mapping, fe, quad, update_JxW_values); double integral = 0.; /*typename*/ Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); + cell = tria.begin_active(), endc = tria.end(); for ( ; cell != endc; ++cell) { try - { - fe_val.reinit (cell); - for (unsigned int q=0; q fe_val (mapping, dummy, quad, update_JxW_values); double integral = 0.; /*typename*/ Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); + cell = tria.begin_active(), endc = tria.end(); for ( ; cell != endc; ++cell) { - try{ - fe_val.reinit (cell); - for (unsigned int q=0; q triangulation; GridGenerator::hyper_cube (triangulation); - // refine the mesh in a random way so as to - // generate as many hanging node - // constraints as possible + // refine the mesh in a random way so as to + // generate as many hanging node + // constraints as possible triangulation.refine_global (4-dim); for (unsigned int i=0; i<11-2*dim; ++i) { typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + cell = triangulation.begin_active(); for (unsigned int index=0; cell != triangulation.end(); ++cell, ++index) if (index % (3*dim) == 0) cell->set_refine_flag(); triangulation.execute_coarsening_and_refinement (); } deallog << "Number of cells: " << triangulation.n_active_cells() << std::endl; - - // set up a DoFHandler and compute hanging - // node constraints + + // set up a DoFHandler and compute hanging + // node constraints FE_Q fe(1); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); @@ -71,8 +71,8 @@ void test () constraints.close (); deallog << "Number of constraints: " << constraints.n_constraints() << std::endl; - // then set up a sparsity pattern and two - // matrices on top of it + // then set up a sparsity pattern and two + // matrices on top of it SparsityPattern sparsity (dof_handler.n_dofs(), dof_handler.n_dofs(), dof_handler.max_couplings_between_dofs()); @@ -80,15 +80,15 @@ void test () constraints.condense (sparsity); SparseMatrix A(sparsity), B(sparsity); - // then fill the two matrices by setting up - // bogus matrix entries and (1) writing - // them into the matrix and condensing away - // hanging node constraints later on, or - // (2) distributing them right away + // then fill the two matrices by setting up + // bogus matrix entries and (1) writing + // them into the matrix and condensing away + // hanging node constraints later on, or + // (2) distributing them right away std::vector local_dofs (fe.dofs_per_cell); FullMatrix local_matrix (fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) { cell->get_dof_indices (local_dofs); @@ -97,28 +97,28 @@ void test () for (unsigned int j=0; j void test () { deallog << dim << "D" << std::endl; - + Triangulation triangulation; GridGenerator::hyper_cube (triangulation); - // refine the mesh in a random way so as to - // generate as many hanging node - // constraints as possible + // refine the mesh in a random way so as to + // generate as many hanging node + // constraints as possible triangulation.refine_global (4-dim); for (unsigned int i=0; i<11-2*dim; ++i) { typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + cell = triangulation.begin_active(); for (unsigned int index=0; cell != triangulation.end(); ++cell, ++index) if (index % (3*dim) == 0) cell->set_refine_flag(); @@ -57,9 +57,9 @@ void test () } deallog << "Number of cells: " << triangulation.n_active_cells() << std::endl; - - // set up a DoFHandler and compute hanging - // node constraints + + // set up a DoFHandler and compute hanging + // node constraints FE_Q fe(1); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); @@ -70,18 +70,18 @@ void test () constraints.close (); deallog << "Number of constraints: " << constraints.n_constraints() << std::endl; - // then set up two vectors + // then set up two vectors Vector A(dof_handler.n_dofs()), B(dof_handler.n_dofs()); - // then fill the two vectors by setting up - // bogus matrix entries and (1) writing - // them into the vector and condensing away - // hanging node constraints later on, or - // (2) distributing them right away + // then fill the two vectors by setting up + // bogus matrix entries and (1) writing + // them into the vector and condensing away + // hanging node constraints later on, or + // (2) distributing them right away std::vector local_dofs (fe.dofs_per_cell); Vector local_vector (fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) { cell->get_dof_indices (local_dofs); @@ -89,27 +89,27 @@ void test () for (unsigned int i=0; i void test () { deallog << dim << "D" << std::endl; - + Triangulation triangulation; GridGenerator::hyper_cube (triangulation); - // refine once, then refine first cell to - // create hanging nodes + // refine once, then refine first cell to + // create hanging nodes triangulation.refine_global (1); triangulation.begin_active()->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); deallog << "Number of cells: " << triangulation.n_active_cells() << std::endl; - - // set up a DoFHandler and compute hanging - // node constraints for a Q2 element + + // set up a DoFHandler and compute hanging + // node constraints for a Q2 element FE_Q fe(2); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); @@ -66,8 +66,8 @@ void test () constraints.close (); deallog << "Number of constraints: " << constraints.n_constraints() << std::endl; - // then set up a sparsity pattern and a - // matrix on top of it + // then set up a sparsity pattern and a + // matrix on top of it SparsityPattern sparsity (dof_handler.n_dofs(), dof_handler.n_dofs(), dof_handler.max_couplings_between_dofs()); @@ -75,12 +75,12 @@ void test () constraints.condense (sparsity); SparseMatrix A(sparsity); - // then fill the matrix by setting up - // bogus matrix entries + // then fill the matrix by setting up + // bogus matrix entries std::vector local_dofs (fe.dofs_per_cell); FullMatrix local_matrix (fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) { cell->get_dof_indices (local_dofs); @@ -89,16 +89,16 @@ void test () for (unsigned int j=0; j::const_iterator i=A.begin(); i!=A.end(); ++i) deallog << i->row() << ' ' << i->column() << ' ' << i->value() << std::endl; @@ -122,25 +122,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/dof_constraints_04.cc b/tests/bits/dof_constraints_04.cc index 1fa41479fe..057ffbe063 100644 --- a/tests/bits/dof_constraints_04.cc +++ b/tests/bits/dof_constraints_04.cc @@ -41,19 +41,19 @@ template void test () { deallog << dim << "D" << std::endl; - + Triangulation triangulation; GridGenerator::hyper_cube (triangulation); - // refine once, then refine first cell to - // create hanging nodes + // refine once, then refine first cell to + // create hanging nodes triangulation.refine_global (1); triangulation.begin_active()->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); deallog << "Number of cells: " << triangulation.n_active_cells() << std::endl; - - // set up a DoFHandler and compute hanging - // node constraints for a Q2 element + + // set up a DoFHandler and compute hanging + // node constraints for a Q2 element FE_Q fe(2); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); @@ -68,15 +68,15 @@ void test () for (unsigned int i=0; i::const_iterator i=b.begin(); i!=b.end(); ++i) deallog << *i << std::endl; - // now also make sure that the elements in - // constrained rows are zero + // now also make sure that the elements in + // constrained rows are zero for (unsigned int i=0; i void test () { deallog << dim << "D" << std::endl; - + Triangulation triangulation; GridGenerator::hyper_cube (triangulation); - // refine once, then refine first cell to - // create hanging nodes + // refine once, then refine first cell to + // create hanging nodes triangulation.refine_global (1); triangulation.begin_active()->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); deallog << "Number of cells: " << triangulation.n_active_cells() << std::endl; - - // set up a DoFHandler and compute hanging - // node constraints for a Q2 element + + // set up a DoFHandler and compute hanging + // node constraints for a Q2 element FE_Q fe(2); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); @@ -68,22 +68,22 @@ void test () for (unsigned int i=0; i::const_iterator i=b.begin(); i!=b.end(); ++i) deallog << *i << std::endl; - // now also make sure that the elements in - // constrained rows are zero, and that all - // the other elements are unchanged + // now also make sure that the elements in + // constrained rows are zero, and that all + // the other elements are unchanged for (unsigned int i=0; i void test () { deallog << dim << "D" << std::endl; - + Triangulation triangulation; GridGenerator::hyper_cube (triangulation); - // refine once, then refine first cell to - // create hanging nodes + // refine once, then refine first cell to + // create hanging nodes triangulation.refine_global (1); triangulation.begin_active()->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); deallog << "Number of cells: " << triangulation.n_active_cells() << std::endl; - - // set up a DoFHandler and compute hanging - // node constraints for a Q2 element + + // set up a DoFHandler and compute hanging + // node constraints for a Q2 element FE_Q fe(2); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); @@ -62,14 +62,14 @@ void test () constraints.close (); deallog << "Number of constraints: " << constraints.n_constraints() << std::endl; - // then set up a sparsity pattern and a - // matrix on top of it + // then set up a sparsity pattern and a + // matrix on top of it CompressedSparsityPattern sparsity (dof_handler.n_dofs(), dof_handler.n_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sparsity); constraints.condense (sparsity); - // output what we have + // output what we have for (unsigned int i=0; i void test () { deallog << dim << "D" << std::endl; - + Triangulation triangulation; GridGenerator::hyper_cube (triangulation); - // refine once, then refine first cell to - // create hanging nodes + // refine once, then refine first cell to + // create hanging nodes triangulation.refine_global (1); triangulation.begin_active()->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); deallog << "Number of cells: " << triangulation.n_active_cells() << std::endl; - - // set up a DoFHandler and compute hanging - // node constraints for a Q2 element + + // set up a DoFHandler and compute hanging + // node constraints for a Q2 element FE_Q fe(2); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); @@ -62,14 +62,14 @@ void test () constraints.close (); deallog << "Number of constraints: " << constraints.n_constraints() << std::endl; - // then set up a sparsity pattern and a - // matrix on top of it + // then set up a sparsity pattern and a + // matrix on top of it CompressedSetSparsityPattern sparsity (dof_handler.n_dofs(), - dof_handler.n_dofs()); + dof_handler.n_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sparsity); constraints.condense (sparsity); - // output what we have + // output what we have for (unsigned int i=0; i void test () { deallog << dim << "D" << std::endl; - + Triangulation triangulation; GridGenerator::hyper_cube (triangulation); - // refine once, then refine first cell to - // create hanging nodes + // refine once, then refine first cell to + // create hanging nodes triangulation.refine_global (1); triangulation.begin_active()->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); deallog << "Number of cells: " << triangulation.n_active_cells() << std::endl; - - // set up a DoFHandler and compute hanging - // node constraints for a Q2 element + + // set up a DoFHandler and compute hanging + // node constraints for a Q2 element FE_Q fe(2); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); @@ -72,22 +72,22 @@ void test () for (unsigned int i=0; i::const_iterator i=b.begin(); i!=b.end(); ++i) deallog << *i << std::endl; - // now also make sure that the elements in - // constrained rows are zero, and that all - // the other elements are unchanged + // now also make sure that the elements in + // constrained rows are zero, and that all + // the other elements are unchanged for (unsigned int i=0; i void test () { deallog << dim << "D" << std::endl; - + Triangulation triangulation; GridGenerator::hyper_cube (triangulation); - // refine once, then refine first cell to - // create hanging nodes + // refine once, then refine first cell to + // create hanging nodes triangulation.refine_global (1); triangulation.begin_active()->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); deallog << "Number of cells: " << triangulation.n_active_cells() << std::endl; - - // set up a DoFHandler and compute hanging - // node constraints for a Q2 element + + // set up a DoFHandler and compute hanging + // node constraints for a Q2 element FE_Q fe(2); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); @@ -72,15 +72,15 @@ void test () for (unsigned int i=0; i::const_iterator i=b.begin(); i!=b.end(); ++i) deallog << *i << std::endl; - // now also make sure that the elements in - // constrained rows are zero + // now also make sure that the elements in + // constrained rows are zero for (unsigned int i=0; i void test () { deallog << dim << "D" << std::endl; - + Triangulation triangulation; GridGenerator::hyper_cube (triangulation); - // refine once, then refine first cell to - // create hanging nodes + // refine once, then refine first cell to + // create hanging nodes triangulation.refine_global (1); triangulation.begin_active()->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); deallog << "Number of cells: " << triangulation.n_active_cells() << std::endl; - - // set up a DoFHandler and compute hanging - // node constraints for a Q2 element + + // set up a DoFHandler and compute hanging + // node constraints for a Q2 element FE_Q fe(2); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); @@ -66,8 +66,8 @@ void test () constraints.close (); deallog << "Number of constraints: " << constraints.n_constraints() << std::endl; - // then set up a sparsity pattern and a - // matrix on top of it + // then set up a sparsity pattern and a + // matrix on top of it std::vector block_sizes(2); block_sizes[0] = dof_handler.n_dofs()/3; block_sizes[1] = dof_handler.n_dofs() - block_sizes[0]; @@ -78,17 +78,17 @@ void test () sparsity.block(i,j).reinit (block_sizes[i], block_sizes[j], dof_handler.max_couplings_between_dofs()); sparsity.collect_sizes(); - + DoFTools::make_sparsity_pattern (dof_handler, sparsity); constraints.condense (sparsity); BlockSparseMatrix A(sparsity); - // then fill the matrix by setting up - // bogus matrix entries + // then fill the matrix by setting up + // bogus matrix entries std::vector local_dofs (fe.dofs_per_cell); FullMatrix local_matrix (fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) { cell->get_dof_indices (local_dofs); @@ -97,16 +97,16 @@ void test () for (unsigned int j=0; j::const_iterator i=A.begin(); i!=A.end(); ++i) deallog << i->block_row() << ' ' << i->block_column() << ' ' << i->row() << ' ' << i->column() << ' ' << i->value() @@ -131,25 +131,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/dof_constraints_10.cc b/tests/bits/dof_constraints_10.cc index 3728e1e669..849d3532ad 100644 --- a/tests/bits/dof_constraints_10.cc +++ b/tests/bits/dof_constraints_10.cc @@ -41,19 +41,19 @@ template void test () { deallog << dim << "D" << std::endl; - + Triangulation triangulation; GridGenerator::hyper_cube (triangulation); - // refine once, then refine first cell to - // create hanging nodes + // refine once, then refine first cell to + // create hanging nodes triangulation.refine_global (1); triangulation.begin_active()->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); deallog << "Number of cells: " << triangulation.n_active_cells() << std::endl; - - // set up a DoFHandler and compute hanging - // node constraints for a Q2 element + + // set up a DoFHandler and compute hanging + // node constraints for a Q2 element FE_Q fe(2); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); @@ -64,14 +64,14 @@ void test () constraints.close (); deallog << "Number of constraints: " << constraints.n_constraints() << std::endl; - // then set up a sparsity pattern and a - // matrix on top of it + // then set up a sparsity pattern and a + // matrix on top of it CompressedSparsityPattern sparsity (dof_handler.n_dofs(), dof_handler.n_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sparsity); constraints.condense (sparsity); - // and output what we have + // and output what we have SparsityPattern A; A.copy_from (sparsity); for (SparsityPattern::const_iterator i=A.begin(); i!=A.end(); ++i) @@ -97,25 +97,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/dof_constraints_10_x.cc b/tests/bits/dof_constraints_10_x.cc index 30f34e99f6..353ba831c1 100644 --- a/tests/bits/dof_constraints_10_x.cc +++ b/tests/bits/dof_constraints_10_x.cc @@ -41,19 +41,19 @@ template void test () { deallog << dim << "D" << std::endl; - + Triangulation triangulation; GridGenerator::hyper_cube (triangulation); - // refine once, then refine first cell to - // create hanging nodes + // refine once, then refine first cell to + // create hanging nodes triangulation.refine_global (1); triangulation.begin_active()->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); deallog << "Number of cells: " << triangulation.n_active_cells() << std::endl; - - // set up a DoFHandler and compute hanging - // node constraints for a Q2 element + + // set up a DoFHandler and compute hanging + // node constraints for a Q2 element FE_Q fe(2); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); @@ -64,14 +64,14 @@ void test () constraints.close (); deallog << "Number of constraints: " << constraints.n_constraints() << std::endl; - // then set up a sparsity pattern and a - // matrix on top of it + // then set up a sparsity pattern and a + // matrix on top of it CompressedSetSparsityPattern sparsity (dof_handler.n_dofs(), - dof_handler.n_dofs()); + dof_handler.n_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sparsity); constraints.condense (sparsity); - // and output what we have + // and output what we have SparsityPattern A; A.copy_from (sparsity); for (SparsityPattern::const_iterator i=A.begin(); i!=A.end(); ++i) @@ -97,25 +97,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/dof_constraints_11.cc b/tests/bits/dof_constraints_11.cc index ddbca65f2c..9cc2fb3949 100644 --- a/tests/bits/dof_constraints_11.cc +++ b/tests/bits/dof_constraints_11.cc @@ -42,19 +42,19 @@ template void test () { deallog << dim << "D" << std::endl; - + Triangulation triangulation; GridGenerator::hyper_cube (triangulation); - // refine once, then refine first cell to - // create hanging nodes + // refine once, then refine first cell to + // create hanging nodes triangulation.refine_global (1); triangulation.begin_active()->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); deallog << "Number of cells: " << triangulation.n_active_cells() << std::endl; - - // set up a DoFHandler and compute hanging - // node constraints for a Q2 element + + // set up a DoFHandler and compute hanging + // node constraints for a Q2 element FE_Q fe(2); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); @@ -65,8 +65,8 @@ void test () constraints.close (); deallog << "Number of constraints: " << constraints.n_constraints() << std::endl; - // then set up a sparsity pattern and a - // matrix on top of it + // then set up a sparsity pattern and a + // matrix on top of it std::vector block_sizes(2); block_sizes[0] = dof_handler.n_dofs()/3; block_sizes[1] = dof_handler.n_dofs() - block_sizes[0]; @@ -76,11 +76,11 @@ void test () for (unsigned int j=0; j<2; ++j) sparsity.block(i,j).reinit (block_sizes[i], block_sizes[j]); sparsity.collect_sizes(); - + DoFTools::make_sparsity_pattern (dof_handler, sparsity); constraints.condense (sparsity); - // and output what we have + // and output what we have BlockSparsityPattern A; A.copy_from (sparsity); for (unsigned int r=0; r void test () { deallog << dim << "D" << std::endl; - + Triangulation triangulation; GridGenerator::hyper_cube (triangulation); - // refine once, then refine first cell to - // create hanging nodes + // refine once, then refine first cell to + // create hanging nodes triangulation.refine_global (1); triangulation.begin_active()->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); deallog << "Number of cells: " << triangulation.n_active_cells() << std::endl; - - // set up a DoFHandler and compute hanging - // node constraints for a Q2 element + + // set up a DoFHandler and compute hanging + // node constraints for a Q2 element FE_Q fe(2); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); @@ -65,8 +65,8 @@ void test () constraints.close (); deallog << "Number of constraints: " << constraints.n_constraints() << std::endl; - // then set up a sparsity pattern and a - // matrix on top of it + // then set up a sparsity pattern and a + // matrix on top of it std::vector block_sizes(2); block_sizes[0] = dof_handler.n_dofs()/3; block_sizes[1] = dof_handler.n_dofs() - block_sizes[0]; @@ -76,11 +76,11 @@ void test () for (unsigned int j=0; j<2; ++j) sparsity.block(i,j).reinit (block_sizes[i], block_sizes[j]); sparsity.collect_sizes(); - + DoFTools::make_sparsity_pattern (dof_handler, sparsity); constraints.condense (sparsity); - // and output what we have + // and output what we have BlockSparsityPattern A; A.copy_from (sparsity); for (unsigned int r=0; r &dof_handler) const unsigned int n_components = dof_handler.get_fe().n_components(); deallog << "n_dofs:" << dof_handler.n_dofs() << std::endl; - + std::vector dofs_per_component(n_components); DoFTools::count_dofs_per_component (dof_handler, - dofs_per_component); + dofs_per_component); - for (unsigned int i=0;i &dof_handler) std::vector target_component(n_components,0U); dofs_per_component.resize (1); DoFTools::count_dofs_per_component (dof_handler, - dofs_per_component, - false, - target_component); - for (unsigned int i=0;i &, -// SparsityPattern &); +// SparsityPattern &); std::string output_file_name = "dof_tools_01a/output"; @@ -32,16 +32,16 @@ template void check_this (const DoFHandler &dof_handler) { - // create sparsity pattern + // create sparsity pattern SparsityPattern sp (dof_handler.n_dofs(), dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sp); sp.compress (); - - // write out 10 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 10 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<10; ++l) { const unsigned int line = l*(sp.n_rows()/10); @@ -50,7 +50,7 @@ check_this (const DoFHandler &dof_handler) deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; diff --git a/tests/bits/dof_tools_01a_constraints_false.cc b/tests/bits/dof_tools_01a_constraints_false.cc index 239012421d..fa6c9678ee 100644 --- a/tests/bits/dof_tools_01a_constraints_false.cc +++ b/tests/bits/dof_tools_01a_constraints_false.cc @@ -22,7 +22,7 @@ // check // DoFTools:: // make_sparsity_pattern (const DoFHandler &, -// SparsityPattern &, +// SparsityPattern &, // ConstraintMatrix, // true); @@ -37,17 +37,17 @@ check_this (const DoFHandler &dof_handler) ConstraintMatrix cm; DoFTools::make_hanging_node_constraints (dof_handler, cm); cm.close (); - - // create sparsity pattern + + // create sparsity pattern SparsityPattern sp (dof_handler.n_dofs(), dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sp, cm, false); sp.compress (); - - // write out 10 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 10 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<10; ++l) { const unsigned int line = l*(sp.n_rows()/10); @@ -56,7 +56,7 @@ check_this (const DoFHandler &dof_handler) deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; diff --git a/tests/bits/dof_tools_01a_constraints_true.cc b/tests/bits/dof_tools_01a_constraints_true.cc index 549568e886..d6c1c22713 100644 --- a/tests/bits/dof_tools_01a_constraints_true.cc +++ b/tests/bits/dof_tools_01a_constraints_true.cc @@ -22,7 +22,7 @@ // check // DoFTools:: // make_sparsity_pattern (const DoFHandler &, -// SparsityPattern &, +// SparsityPattern &, // ConstraintMatrix, // true); @@ -37,17 +37,17 @@ check_this (const DoFHandler &dof_handler) ConstraintMatrix cm; DoFTools::make_hanging_node_constraints (dof_handler, cm); cm.close (); - - // create sparsity pattern + + // create sparsity pattern SparsityPattern sp (dof_handler.n_dofs(), dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sp, cm, true); sp.compress (); - - // write out 10 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 10 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<10; ++l) { const unsigned int line = l*(sp.n_rows()/10); @@ -56,7 +56,7 @@ check_this (const DoFHandler &dof_handler) deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; diff --git a/tests/bits/dof_tools_01a_subdomain.cc b/tests/bits/dof_tools_01a_subdomain.cc index ff59c005fe..6d82bc2943 100644 --- a/tests/bits/dof_tools_01a_subdomain.cc +++ b/tests/bits/dof_tools_01a_subdomain.cc @@ -22,7 +22,7 @@ // check // DoFTools:: // make_sparsity_pattern (const DoFHandler &, -// SparsityPattern &, ...) +// SparsityPattern &, ...) // with the subdomain argument @@ -33,22 +33,22 @@ template void check_this (const DoFHandler &dof_handler) { - // create sparsity pattern + // create sparsity pattern SparsityPattern sp (dof_handler.n_dofs(), dof_handler.max_couplings_between_dofs()); - // pass a subdomain id; note that - // the framework sets the subdomain - // id to the level of each cell + // pass a subdomain id; note that + // the framework sets the subdomain + // id to the level of each cell DoFTools::make_sparsity_pattern (dof_handler, sp, - ConstraintMatrix(), true, - 2); + ConstraintMatrix(), true, + 2); sp.compress (); - - // write out 10 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 10 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<10; ++l) { const unsigned int line = l*(sp.n_rows()/10); @@ -57,7 +57,7 @@ check_this (const DoFHandler &dof_handler) deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; diff --git a/tests/bits/dof_tools_01b.cc b/tests/bits/dof_tools_01b.cc index fecafb645a..1811a780da 100644 --- a/tests/bits/dof_tools_01b.cc +++ b/tests/bits/dof_tools_01b.cc @@ -22,7 +22,7 @@ // check // DoFTools:: // make_sparsity_pattern (const DoFHandler &, -// CompressedSparsityPattern &); +// CompressedSparsityPattern &); std::string output_file_name = "dof_tools_01b/output"; @@ -31,15 +31,15 @@ template void check_this (const DoFHandler &dof_handler) { - // create sparsity pattern + // create sparsity pattern CompressedSparsityPattern sp (dof_handler.n_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); @@ -48,7 +48,7 @@ check_this (const DoFHandler &dof_handler) deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; diff --git a/tests/bits/dof_tools_01b_x.cc b/tests/bits/dof_tools_01b_x.cc index 577fe86303..15526b442e 100644 --- a/tests/bits/dof_tools_01b_x.cc +++ b/tests/bits/dof_tools_01b_x.cc @@ -22,7 +22,7 @@ // check // DoFTools:: // make_sparsity_pattern (const DoFHandler &, -// CompressedSetSparsityPattern &); +// CompressedSetSparsityPattern &); std::string output_file_name = "dof_tools_01b_x/output"; @@ -31,25 +31,25 @@ template void check_this (const DoFHandler &dof_handler) { - // create sparsity pattern + // create sparsity pattern CompressedSetSparsityPattern sp (dof_handler.n_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); for (CompressedSetSparsityPattern::row_iterator - c = sp.row_begin(line); c!=sp.row_end(line); ++c) + c = sp.row_begin(line); c!=sp.row_end(line); ++c) deallog << *c << " "; deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; diff --git a/tests/bits/dof_tools_01c.cc b/tests/bits/dof_tools_01c.cc index 440ff59d14..d15d20e7a4 100644 --- a/tests/bits/dof_tools_01c.cc +++ b/tests/bits/dof_tools_01c.cc @@ -22,7 +22,7 @@ // check // DoFTools:: // make_sparsity_pattern (const DoFHandler &, -// BlockSparsityPattern &); +// BlockSparsityPattern &); std::string output_file_name = "dof_tools_01c/output"; @@ -31,16 +31,16 @@ template void check_this (const DoFHandler &dof_handler) { - // we split up the matrix into - // blocks according to the number - // of dofs in each component. this - // fails if the element is not - // primitive, so skip this test for - // such elements + // we split up the matrix into + // blocks according to the number + // of dofs in each component. this + // fails if the element is not + // primitive, so skip this test for + // such elements if (dof_handler.get_fe().is_primitive() != true) return; - - // create sparsity pattern + + // create sparsity pattern const unsigned int n_components = dof_handler.get_fe().n_components(); BlockSparsityPattern sp (n_components, n_components); @@ -53,19 +53,19 @@ check_this (const DoFHandler &dof_handler) dofs_per_component[j], dof_handler.max_couplings_between_dofs()); sp.collect_sizes (); - + DoFTools::make_sparsity_pattern (dof_handler, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); std::pair - block_row = sp.get_row_indices().global_to_local(line); + block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; col &dof_handler) } } - // write out some other indicators + // write out some other indicators for (unsigned int r=0; r &dof_handler) deallog << x.bandwidth () << std::endl << x.max_entries_per_row () << std::endl << x.n_nonzero_elements () << std::endl; - + unsigned int hash = 0; for (unsigned int l=0; l &, -// BlockCompressedSparsityPattern &); +// BlockCompressedSparsityPattern &); std::string output_file_name = "dof_tools_01d/output"; @@ -31,16 +31,16 @@ template void check_this (const DoFHandler &dof_handler) { - // we split up the matrix into - // blocks according to the number - // of dofs in each component. this - // fails if the element is not - // primitive, so skip this test for - // such elements + // we split up the matrix into + // blocks according to the number + // of dofs in each component. this + // fails if the element is not + // primitive, so skip this test for + // such elements if (dof_handler.get_fe().is_primitive() != true) return; - - // create sparsity pattern + + // create sparsity pattern const unsigned int n_components = dof_handler.get_fe().n_components(); BlockCompressedSparsityPattern sp (n_components, n_components); @@ -52,19 +52,19 @@ check_this (const DoFHandler &dof_handler) sp.block(i,j).reinit(dofs_per_component[i], dofs_per_component[j]); sp.collect_sizes (); - + DoFTools::make_sparsity_pattern (dof_handler, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); std::pair - block_row = sp.get_row_indices().global_to_local(line); + block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; col &dof_handler) } } - // write out some other indicators + // write out some other indicators for (unsigned int r=0; r &dof_handler) deallog << x.bandwidth () << std::endl << x.max_entries_per_row () << std::endl << x.n_nonzero_elements () << std::endl; - + unsigned int hash = 0; for (unsigned int l=0; l &, -// BlockCompressedSetSparsityPattern &); +// BlockCompressedSetSparsityPattern &); std::string output_file_name = "dof_tools_01d_x/output"; @@ -31,19 +31,19 @@ template void check_this (const DoFHandler &dof_handler) { - // we split up the matrix into - // blocks according to the number - // of dofs in each component. this - // fails if the element is not - // primitive, so skip this test for - // such elements + // we split up the matrix into + // blocks according to the number + // of dofs in each component. this + // fails if the element is not + // primitive, so skip this test for + // such elements if (dof_handler.get_fe().is_primitive() != true) return; - - // create sparsity pattern + + // create sparsity pattern const unsigned int n_components = dof_handler.get_fe().n_components(); BlockCompressedSetSparsityPattern sp (n_components, - n_components); + n_components); std::vector dofs_per_component(n_components); DoFTools::count_dofs_per_component (dof_handler, dofs_per_component); @@ -52,31 +52,31 @@ check_this (const DoFHandler &dof_handler) sp.block(i,j).reinit(dofs_per_component[i], dofs_per_component[j]); sp.collect_sizes (); - + DoFTools::make_sparsity_pattern (dof_handler, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); std::pair - block_row = sp.get_row_indices().global_to_local(line); + block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; col &dof_handler) deallog << x.bandwidth () << std::endl << x.max_entries_per_row () << std::endl << x.n_nonzero_elements () << std::endl; - + unsigned int hash = 0; for (unsigned int l=0; l &, // std::vector > &, -// SparsityPattern &); +// SparsityPattern &); std::string output_file_name = "dof_tools_02a/output"; @@ -33,23 +33,23 @@ template void check_this (const DoFHandler &dof_handler) { - // set up X-shape mask + // set up X-shape mask const unsigned int n_components = dof_handler.get_fe().n_components(); std::vector > mask (n_components, std::vector(n_components,false)); for (unsigned int i=0; i &dof_handler) deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; diff --git a/tests/bits/dof_tools_02a_constraints_false.cc b/tests/bits/dof_tools_02a_constraints_false.cc index 2c19b7b518..08e2439fb4 100644 --- a/tests/bits/dof_tools_02a_constraints_false.cc +++ b/tests/bits/dof_tools_02a_constraints_false.cc @@ -23,7 +23,7 @@ // DoFTools:: // make_sparsity_pattern (const DoFHandler &, // std::vector > &, -// SparsityPattern &, +// SparsityPattern &, // ConstraintMatrix, // true); @@ -35,7 +35,7 @@ template void check_this (const DoFHandler &dof_handler) { - // set up X-shape mask + // set up X-shape mask const unsigned int n_components = dof_handler.get_fe().n_components(); Table<2,DoFTools::Coupling> mask (n_components,n_components); for (unsigned int i=0; i &dof_handler) ConstraintMatrix cm; DoFTools::make_hanging_node_constraints (dof_handler, cm); cm.close (); - - // create sparsity pattern + + // create sparsity pattern SparsityPattern sp (dof_handler.n_dofs(), dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof_handler, mask, sp, cm, false); sp.compress (); - - // write out 10 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 10 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<10; ++l) { const unsigned int line = l*(sp.n_rows()/10); @@ -66,7 +66,7 @@ check_this (const DoFHandler &dof_handler) deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; diff --git a/tests/bits/dof_tools_02a_constraints_true.cc b/tests/bits/dof_tools_02a_constraints_true.cc index 0a70a69808..65bafc2e56 100644 --- a/tests/bits/dof_tools_02a_constraints_true.cc +++ b/tests/bits/dof_tools_02a_constraints_true.cc @@ -23,7 +23,7 @@ // DoFTools:: // make_sparsity_pattern (const DoFHandler &, // std::vector > &, -// SparsityPattern &, +// SparsityPattern &, // ConstraintMatrix, // true); @@ -35,7 +35,7 @@ template void check_this (const DoFHandler &dof_handler) { - // set up X-shape mask + // set up X-shape mask const unsigned int n_components = dof_handler.get_fe().n_components(); Table<2,DoFTools::Coupling> mask (n_components,n_components); for (unsigned int i=0; i &dof_handler) ConstraintMatrix cm; DoFTools::make_hanging_node_constraints (dof_handler, cm); cm.close (); - - // create sparsity pattern + + // create sparsity pattern SparsityPattern sp (dof_handler.n_dofs(), dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof_handler, mask, sp, cm, true); sp.compress (); - - // write out 10 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 10 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<10; ++l) { const unsigned int line = l*(sp.n_rows()/10); @@ -66,7 +66,7 @@ check_this (const DoFHandler &dof_handler) deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; diff --git a/tests/bits/dof_tools_02a_subdomain.cc b/tests/bits/dof_tools_02a_subdomain.cc index 005b5f5fec..bbedd6f66a 100644 --- a/tests/bits/dof_tools_02a_subdomain.cc +++ b/tests/bits/dof_tools_02a_subdomain.cc @@ -23,7 +23,7 @@ // DoFTools:: // make_sparsity_pattern (const DoFHandler &, // std::vector > &, -// SparsityPattern &, +// SparsityPattern &, // ...) // with the subdomain argument @@ -35,7 +35,7 @@ template void check_this (const DoFHandler &dof_handler) { - // set up X-shape mask + // set up X-shape mask const unsigned int n_components = dof_handler.get_fe().n_components(); Table<2,DoFTools::Coupling> mask (n_components,n_components); for (unsigned int i=0; i &dof_handler) for (unsigned int i=0; i &dof_handler) deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; diff --git a/tests/bits/dof_tools_02b.cc b/tests/bits/dof_tools_02b.cc index 634cd686c1..b273a404f4 100644 --- a/tests/bits/dof_tools_02b.cc +++ b/tests/bits/dof_tools_02b.cc @@ -23,7 +23,7 @@ // DoFTools:: // make_sparsity_pattern (const DoFHandler &, // std::vector > &, -// CompressedSparsityPattern &); +// CompressedSparsityPattern &); std::string output_file_name = "dof_tools_02b/output"; @@ -32,22 +32,22 @@ template void check_this (const DoFHandler &dof_handler) { - // set up X-shape mask + // set up X-shape mask const unsigned int n_components = dof_handler.get_fe().n_components(); std::vector > mask (n_components, std::vector(n_components,false)); for (unsigned int i=0; i &dof_handler) deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; diff --git a/tests/bits/dof_tools_02b_x.cc b/tests/bits/dof_tools_02b_x.cc index 090400b717..0c29e546b0 100644 --- a/tests/bits/dof_tools_02b_x.cc +++ b/tests/bits/dof_tools_02b_x.cc @@ -23,7 +23,7 @@ // DoFTools:: // make_sparsity_pattern (const DoFHandler &, // std::vector > &, -// CompressedSetSparsityPattern &); +// CompressedSetSparsityPattern &); std::string output_file_name = "dof_tools_02b_x/output"; @@ -32,32 +32,32 @@ template void check_this (const DoFHandler &dof_handler) { - // set up X-shape mask + // set up X-shape mask const unsigned int n_components = dof_handler.get_fe().n_components(); std::vector > mask (n_components, std::vector(n_components,false)); for (unsigned int i=0; i &, // std::vector > &, -// BlockSparsityPattern &); +// BlockSparsityPattern &); std::string output_file_name = "dof_tools_02c/output"; @@ -32,23 +32,23 @@ template void check_this (const DoFHandler &dof_handler) { - // set up X-shape mask + // set up X-shape mask const unsigned int n_components = dof_handler.get_fe().n_components(); std::vector > mask (n_components, std::vector(n_components,false)); for (unsigned int i=0; i dofs_per_component(n_components); @@ -60,19 +60,19 @@ check_this (const DoFHandler &dof_handler) dofs_per_component[j], dof_handler.max_couplings_between_dofs()); sp.collect_sizes (); - + DoFTools::make_sparsity_pattern (dof_handler, mask, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); std::pair - block_row = sp.get_row_indices().global_to_local(line); + block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; col &dof_handler) } } - // write out some other indicators + // write out some other indicators for (unsigned int r=0; r &dof_handler) deallog << x.bandwidth () << std::endl << x.max_entries_per_row () << std::endl << x.n_nonzero_elements () << std::endl; - + unsigned int hash = 0; for (unsigned int l=0; l &, // std::vector > &, -// BlockCompressedSparsityPattern &); +// BlockCompressedSparsityPattern &); std::string output_file_name = "dof_tools_02d/output"; @@ -32,23 +32,23 @@ template void check_this (const DoFHandler &dof_handler) { - // set up X-shape mask + // set up X-shape mask const unsigned int n_components = dof_handler.get_fe().n_components(); std::vector > mask (n_components, std::vector(n_components,false)); for (unsigned int i=0; i dofs_per_component(n_components); @@ -59,19 +59,19 @@ check_this (const DoFHandler &dof_handler) sp.block(i,j).reinit(dofs_per_component[i], dofs_per_component[j]); sp.collect_sizes (); - + DoFTools::make_sparsity_pattern (dof_handler, mask, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); std::pair - block_row = sp.get_row_indices().global_to_local(line); + block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; col &dof_handler) } } - // write out some other indicators + // write out some other indicators for (unsigned int r=0; r &dof_handler) deallog << x.bandwidth () << std::endl << x.max_entries_per_row () << std::endl << x.n_nonzero_elements () << std::endl; - + unsigned int hash = 0; for (unsigned int l=0; l &, // std::vector > &, -// BlockCompressedSetSparsityPattern &); +// BlockCompressedSetSparsityPattern &); std::string output_file_name = "dof_tools_02d_x/output"; @@ -32,25 +32,25 @@ template void check_this (const DoFHandler &dof_handler) { - // set up X-shape mask + // set up X-shape mask const unsigned int n_components = dof_handler.get_fe().n_components(); std::vector > mask (n_components, std::vector(n_components,false)); for (unsigned int i=0; i dofs_per_component(n_components); DoFTools::count_dofs_per_component (dof_handler, dofs_per_component); @@ -59,31 +59,31 @@ check_this (const DoFHandler &dof_handler) sp.block(i,j).reinit(dofs_per_component[i], dofs_per_component[j]); sp.collect_sizes (); - + DoFTools::make_sparsity_pattern (dof_handler, mask, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); std::pair - block_row = sp.get_row_indices().global_to_local(line); + block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; col &dof_handler) deallog << x.bandwidth () << std::endl << x.max_entries_per_row () << std::endl << x.n_nonzero_elements () << std::endl; - + unsigned int hash = 0; for (unsigned int l=0; l &, -// ConstraintMatrix &); +// ConstraintMatrix &); std::string output_file_name = "dof_tools_03/output"; @@ -33,22 +33,22 @@ template void check_this (const DoFHandler &dof_handler) { - // use a higher output accuracy for this - // test. the reason is that many of the - // constraints are negative powers of 2, - // which have exact representations with 3 - // or 4 digits of accuracy, but not with - // the usual 2 digits (for example, 0.375, - // which sometimes rounds to 0.38 and - // sometimes to 0.37, depending on how - // intermediate errors have accumulated) + // use a higher output accuracy for this + // test. the reason is that many of the + // constraints are negative powers of 2, + // which have exact representations with 3 + // or 4 digits of accuracy, but not with + // the usual 2 digits (for example, 0.375, + // which sometimes rounds to 0.38 and + // sometimes to 0.37, depending on how + // intermediate errors have accumulated) deallog << std::setprecision (5); - - // don't run this test if hanging - // nodes are not implemented + + // don't run this test if hanging + // nodes are not implemented if (dof_handler.get_fe().constraints_are_implemented() == false) return; - + ConstraintMatrix cm; DoFTools::make_hanging_node_constraints (dof_handler, cm); cm.close (); @@ -59,7 +59,7 @@ check_this (const DoFHandler &dof_handler) for (unsigned int i=0; i &dof_handler) for (unsigned int i=0; i v (dof_handler.n_dofs()); - v(i) = 1; - cm.condense (v); - for (unsigned int j=0; j v (dof_handler.n_dofs()); + v(i) = 1; + cm.condense (v); + for (unsigned int j=0; j &dof_handler) std::vector component_select (dof_handler.get_fe().n_components(), true); std::vector boundary_dofs (dof_handler.n_dofs()); - - // first with all components + + // first with all components { DoFTools::extract_boundary_dofs (dof_handler, component_select, @@ -41,8 +41,8 @@ check_this (const DoFHandler &dof_handler) output_bool_vector (boundary_dofs); } - // next with only every second - // component + // next with only every second + // component for (unsigned int i=1; i &dof_handler) output_bool_vector (boundary_dofs); } - // third further restrict to - // boundary indicator 0 + // third further restrict to + // boundary indicator 0 { std::set boundary_ids; boundary_ids.insert (0); @@ -62,5 +62,5 @@ check_this (const DoFHandler &dof_handler) boundary_dofs, boundary_ids); output_bool_vector (boundary_dofs); - } + } } diff --git a/tests/bits/dof_tools_06.cc b/tests/bits/dof_tools_06.cc index 8468469efe..9973ca1df2 100644 --- a/tests/bits/dof_tools_06.cc +++ b/tests/bits/dof_tools_06.cc @@ -30,7 +30,7 @@ void check_this (const DoFHandler &dof_handler) { std::vector dofs(dof_handler.n_dofs()); - + for (unsigned int level=0; level &dof_handler) std::vector map(dof_handler.n_dofs()); std::set boundary_ids; - // check for boundary id 0 alone + // check for boundary id 0 alone boundary_ids.insert (0); DoFTools::map_dof_to_boundary_indices (dof_handler, map); for (unsigned int i=0; i &dof_handler) << " "; deallog << std::endl; - // check for boundary id 0 and 1 + // check for boundary id 0 and 1 boundary_ids.insert (1); DoFTools::map_dof_to_boundary_indices (dof_handler, map); for (unsigned int i=0; i &, -// const DoFHandler &, -// std::vector > &) +// const DoFHandler &, +// std::vector > &) std::string output_file_name = "dof_tools_10/output"; @@ -32,17 +32,17 @@ template void check_this (const DoFHandler &dof_handler) { - // don't check if fe has no support - // points + // don't check if fe has no support + // points if (dof_handler.get_fe().get_unit_support_points().size() == 0) return; - + std::vector > map(dof_handler.n_dofs()); MappingQ mapping(2); DoFTools::map_dofs_to_support_points (mapping, dof_handler, map); - // output every third element + // output every third element for (unsigned int i=0; i &, -// const DoFHandler &, -// std::map, unsigned int, Comp> &) +// const DoFHandler &, +// std::map, unsigned int, Comp> &) std::string output_file_name = "dof_tools_11/output"; struct Comp { - template - bool operator() (const Point p, const Point q) const - { - for (unsigned int d=0; d q(d)) - return false; - + template + bool operator() (const Point p, const Point q) const + { + for (unsigned int d=0; d q(d)) return false; - } + + return false; + } }; @@ -47,8 +47,8 @@ template void check_this (const DoFHandler &dof_handler) { - // don't check if fe has no support - // points + // don't check if fe has no support + // points if (dof_handler.get_fe().get_unit_support_points().size() == 0) return; @@ -57,10 +57,10 @@ check_this (const DoFHandler &dof_handler) DoFTools::map_support_points_to_dofs (mapping, dof_handler, map); - // output every second element + // output every second element unsigned int j=0; for (typename std::map, types::global_dof_index, Comp>::const_iterator - i=map.begin(); i!=map.end(); ++i,++j) + i=map.begin(); i!=map.end(); ++i,++j) if (j%2 == 0) deallog << i->first << " " << i->second << std::endl; deallog << std::endl; diff --git a/tests/bits/dof_tools_12.cc b/tests/bits/dof_tools_12.cc index 4acc719b86..95de974f99 100644 --- a/tests/bits/dof_tools_12.cc +++ b/tests/bits/dof_tools_12.cc @@ -32,12 +32,12 @@ check_this (const DoFHandler &dof_handler) std::vector selected_dofs (dof_handler.n_dofs()); std::vector mask (dof_handler.get_fe().n_components(), false); - // only select first component + // only select first component mask[0] = true; DoFTools::extract_dofs (dof_handler, ComponentMask(mask), selected_dofs); output_bool_vector (selected_dofs); - // also select last component + // also select last component mask.back() = true; DoFTools::extract_dofs (dof_handler, ComponentMask(mask), selected_dofs); output_bool_vector (selected_dofs); diff --git a/tests/bits/dof_tools_13.cc b/tests/bits/dof_tools_13.cc index db5ee54e57..555444e73f 100644 --- a/tests/bits/dof_tools_13.cc +++ b/tests/bits/dof_tools_13.cc @@ -31,35 +31,35 @@ template void check_this (const DoFHandler &dof_handler) { - // this doesn't make much sense if - // the element is not primitive + // this doesn't make much sense if + // the element is not primitive if (dof_handler.get_fe().is_primitive() == false) return; - + Vector cell_data (dof_handler.get_tria().n_active_cells()); for (unsigned int i=0; i dof_data (dof_handler.n_dofs()); DoFTools::distribute_cell_to_dof_vector (dof_handler, cell_data, dof_data); - - // output every third element + + // output every third element for (unsigned int i=0; i void check_this (const DoFHandler &dof_handler) { - // this doesn't make much sense if - // the element is not primitive + // this doesn't make much sense if + // the element is not primitive if (dof_handler.get_fe().is_primitive() == false) return; @@ -46,61 +46,61 @@ check_this (const DoFHandler &dof_handler) for (unsigned int i=0; i dof_data (dof_handler.n_dofs()); - // preset the vector to make sure - // that the function zeroes out - // previous content. however, only - // touch those elements that we - // will actually use + // preset the vector to make sure + // that the function zeroes out + // previous content. however, only + // touch those elements that we + // will actually use std::vector component_dofs (dof_handler.n_dofs()); { std::vector component_mask (dof_handler.get_fe().n_components(), - false); + false); component_mask[0] = true; DoFTools::extract_dofs (dof_handler, ComponentMask(component_mask), component_dofs); for (unsigned int i=0; i component_mask (dof_handler.get_fe().n_components(), - false); + false); component_mask.back() = true; DoFTools::extract_dofs (dof_handler, ComponentMask(component_mask), component_dofs); for (unsigned int i=0; i &dof_handler) deallog << dof_data(i) << " "; deallog << std::endl; - // check that no other values were - // set + // check that no other values were + // set for (unsigned int i=0; i void check_this (const DoFHandler &dof_handler) { - // no other args + // no other args deallog << dof_handler.n_boundary_dofs() << std::endl; - // with FunctionMap + // with FunctionMap typename FunctionMap::type fm; fm[0] = 0; deallog << dof_handler.n_boundary_dofs(fm) << std::endl; - - // with std::set + + // with std::set std::set s; s.insert (0); deallog << dof_handler.n_boundary_dofs(s) << std::endl; - + } diff --git a/tests/bits/dof_tools_15a.cc b/tests/bits/dof_tools_15a.cc index 59288b0479..3cc00834c6 100644 --- a/tests/bits/dof_tools_15a.cc +++ b/tests/bits/dof_tools_15a.cc @@ -23,7 +23,7 @@ // DoFTools:: // make_boundary_sparsity_pattern (const DoFHandler &, // const std::vector & -// SparsityPattern &); +// SparsityPattern &); std::string output_file_name = "dof_tools_15a/output"; @@ -33,24 +33,24 @@ template void check_this (const DoFHandler &dof_handler) { - // test doesn't make much sense if - // no boundary dofs exist + // test doesn't make much sense if + // no boundary dofs exist if (dof_handler.get_fe().dofs_per_face == 0) return; - + std::vector map (dof_handler.n_dofs()); DoFTools::map_dof_to_boundary_indices (dof_handler, map); - - // create sparsity pattern + + // create sparsity pattern SparsityPattern sp (dof_handler.n_boundary_dofs(), dof_handler.max_couplings_between_dofs()); DoFTools::make_boundary_sparsity_pattern (dof_handler, map, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); @@ -59,7 +59,7 @@ check_this (const DoFHandler &dof_handler) deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; diff --git a/tests/bits/dof_tools_15b.cc b/tests/bits/dof_tools_15b.cc index b489916ef1..a1dd023f31 100644 --- a/tests/bits/dof_tools_15b.cc +++ b/tests/bits/dof_tools_15b.cc @@ -23,7 +23,7 @@ // DoFTools:: // make_boundary_sparsity_pattern (const DoFHandler &, // const std::vector & -// CompressedSparsityPattern &); +// CompressedSparsityPattern &); std::string output_file_name = "dof_tools_15b/output"; @@ -32,23 +32,23 @@ template void check_this (const DoFHandler &dof_handler) { - // test doesn't make much sense if - // no boundary dofs exist + // test doesn't make much sense if + // no boundary dofs exist if (dof_handler.get_fe().dofs_per_face == 0) return; - + std::vector map (dof_handler.n_dofs()); DoFTools::map_dof_to_boundary_indices (dof_handler, map); - - // create sparsity pattern + + // create sparsity pattern CompressedSparsityPattern sp (dof_handler.n_boundary_dofs()); DoFTools::make_boundary_sparsity_pattern (dof_handler, map, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); @@ -57,7 +57,7 @@ check_this (const DoFHandler &dof_handler) deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; diff --git a/tests/bits/dof_tools_15b_x.cc b/tests/bits/dof_tools_15b_x.cc index a00c1b9bbf..fa2fd7a957 100644 --- a/tests/bits/dof_tools_15b_x.cc +++ b/tests/bits/dof_tools_15b_x.cc @@ -23,7 +23,7 @@ // DoFTools:: // make_boundary_sparsity_pattern (const DoFHandler &, // const std::vector & -// CompressedSetSparsityPattern &); +// CompressedSetSparsityPattern &); std::string output_file_name = "dof_tools_15b_x/output"; @@ -32,33 +32,33 @@ template void check_this (const DoFHandler &dof_handler) { - // test doesn't make much sense if - // no boundary dofs exist + // test doesn't make much sense if + // no boundary dofs exist if (dof_handler.get_fe().dofs_per_face == 0) return; - + std::vector map (dof_handler.n_dofs()); DoFTools::map_dof_to_boundary_indices (dof_handler, map); - - // create sparsity pattern + + // create sparsity pattern CompressedSetSparsityPattern sp (dof_handler.n_boundary_dofs()); DoFTools::make_boundary_sparsity_pattern (dof_handler, map, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); for (CompressedSetSparsityPattern::row_iterator - c = sp.row_begin(line); c!=sp.row_end(line); ++c) + c = sp.row_begin(line); c!=sp.row_end(line); ++c) deallog << *c << " "; deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; diff --git a/tests/bits/dof_tools_15c.cc b/tests/bits/dof_tools_15c.cc index be97c2d5f1..092b8a38f2 100644 --- a/tests/bits/dof_tools_15c.cc +++ b/tests/bits/dof_tools_15c.cc @@ -23,7 +23,7 @@ // DoFTools:: // make_boundary_sparsity_pattern (const DoFHandler &, // const std::vector & -// BlockSparsityPattern &); +// BlockSparsityPattern &); std::string output_file_name = "dof_tools_15c/output"; @@ -32,46 +32,46 @@ template void check_this (const DoFHandler &dof_handler) { - // test doesn't make much sense if - // no boundary dofs exist + // test doesn't make much sense if + // no boundary dofs exist if (dof_handler.get_fe().dofs_per_face == 0) return; - + std::vector map (dof_handler.n_dofs()); DoFTools::map_dof_to_boundary_indices (dof_handler, map); - + const unsigned int n_blocks = std::min ( - static_cast(dof_handler.get_fe().n_components()), - dof_handler.n_boundary_dofs()); + static_cast(dof_handler.get_fe().n_components()), + dof_handler.n_boundary_dofs()); BlockSparsityPattern sp (n_blocks, n_blocks); - // split dofs almost arbitrarily to - // blocks + // split dofs almost arbitrarily to + // blocks std::vector dofs_per_block(n_blocks); for (unsigned int i=0; i - block_row = sp.get_row_indices().global_to_local(line); + block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; col &dof_handler) } } - // write out some other indicators + // write out some other indicators for (unsigned int r=0; r &dof_handler) deallog << x.bandwidth () << std::endl << x.max_entries_per_row () << std::endl << x.n_nonzero_elements () << std::endl; - + unsigned int hash = 0; for (unsigned int l=0; l &, // const std::vector & -// BlockCompressedSparsityPattern &); +// BlockCompressedSparsityPattern &); std::string output_file_name = "dof_tools_15d/output"; @@ -32,45 +32,45 @@ template void check_this (const DoFHandler &dof_handler) { - // test doesn't make much sense if - // no boundary dofs exist + // test doesn't make much sense if + // no boundary dofs exist if (dof_handler.get_fe().dofs_per_face == 0) return; - + std::vector map (dof_handler.n_dofs()); DoFTools::map_dof_to_boundary_indices (dof_handler, map); - + const unsigned int n_blocks = std::min ( - static_cast(dof_handler.get_fe().n_components()), - dof_handler.n_boundary_dofs()); + static_cast(dof_handler.get_fe().n_components()), + dof_handler.n_boundary_dofs()); BlockCompressedSparsityPattern sp (n_blocks, n_blocks); - // split dofs almost arbitrarily to - // blocks + // split dofs almost arbitrarily to + // blocks std::vector dofs_per_block(n_blocks); for (unsigned int i=0; i - block_row = sp.get_row_indices().global_to_local(line); + block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; col &dof_handler) } } - // write out some other indicators + // write out some other indicators for (unsigned int r=0; r &dof_handler) deallog << x.bandwidth () << std::endl << x.max_entries_per_row () << std::endl << x.n_nonzero_elements () << std::endl; - + unsigned int hash = 0; for (unsigned int l=0; l &, // const std::vector & -// BlockCompressedSetSparsityPattern &); +// BlockCompressedSetSparsityPattern &); std::string output_file_name = "dof_tools_15d_x/output"; @@ -32,57 +32,57 @@ template void check_this (const DoFHandler &dof_handler) { - // test doesn't make much sense if - // no boundary dofs exist + // test doesn't make much sense if + // no boundary dofs exist if (dof_handler.get_fe().dofs_per_face == 0) return; - + std::vector map (dof_handler.n_dofs()); DoFTools::map_dof_to_boundary_indices (dof_handler, map); - + const unsigned int n_blocks = std::min ( - static_cast(dof_handler.get_fe().n_components()), - dof_handler.n_boundary_dofs()); + static_cast(dof_handler.get_fe().n_components()), + dof_handler.n_boundary_dofs()); BlockCompressedSetSparsityPattern sp (n_blocks, - n_blocks); - // split dofs almost arbitrarily to - // blocks + n_blocks); + // split dofs almost arbitrarily to + // blocks std::vector dofs_per_block(n_blocks); for (unsigned int i=0; i - block_row = sp.get_row_indices().global_to_local(line); + block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; col &dof_handler) deallog << x.bandwidth () << std::endl << x.max_entries_per_row () << std::endl << x.n_nonzero_elements () << std::endl; - + unsigned int hash = 0; for (unsigned int l=0; l &, // const typename FunctionMap::type & // const std::vector & -// SparsityPattern &); +// SparsityPattern &); std::string output_file_name = "dof_tools_16a/output"; @@ -34,29 +34,29 @@ template void check_this (const DoFHandler &dof_handler) { - // test doesn't make much sense if - // no boundary dofs exist + // test doesn't make much sense if + // no boundary dofs exist if (dof_handler.get_fe().dofs_per_face == 0) return; - + std::vector map (dof_handler.n_dofs()); std::set set; set.insert (0); DoFTools::map_dof_to_boundary_indices (dof_handler, set, map); - - // create sparsity pattern + + // create sparsity pattern typename FunctionMap::type boundary_ids; - boundary_ids[0] = 0; + boundary_ids[0] = 0; SparsityPattern sp (dof_handler.n_boundary_dofs(boundary_ids), dof_handler.max_couplings_between_dofs()); DoFTools::make_boundary_sparsity_pattern (dof_handler, boundary_ids, map, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); @@ -65,7 +65,7 @@ check_this (const DoFHandler &dof_handler) deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; diff --git a/tests/bits/dof_tools_16b.cc b/tests/bits/dof_tools_16b.cc index 78e64e8e87..2a5966188c 100644 --- a/tests/bits/dof_tools_16b.cc +++ b/tests/bits/dof_tools_16b.cc @@ -24,7 +24,7 @@ // make_boundary_sparsity_pattern (const DoFHandler &, // const typename FunctionMap::type & // const std::vector & -// CompressedSparsityPattern &); +// CompressedSparsityPattern &); std::string output_file_name = "dof_tools_16b/output"; @@ -33,28 +33,28 @@ template void check_this (const DoFHandler &dof_handler) { - // test doesn't make much sense if - // no boundary dofs exist + // test doesn't make much sense if + // no boundary dofs exist if (dof_handler.get_fe().dofs_per_face == 0) return; - + std::vector map (dof_handler.n_dofs()); std::set set; set.insert (0); DoFTools::map_dof_to_boundary_indices (dof_handler, set, map); - - // create sparsity pattern + + // create sparsity pattern typename FunctionMap::type boundary_ids; boundary_ids[0] = 0; CompressedSparsityPattern sp (dof_handler.n_boundary_dofs(boundary_ids)); DoFTools::make_boundary_sparsity_pattern (dof_handler, boundary_ids, map, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); @@ -63,7 +63,7 @@ check_this (const DoFHandler &dof_handler) deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; diff --git a/tests/bits/dof_tools_16b_x.cc b/tests/bits/dof_tools_16b_x.cc index 98bf527172..d54d0b36d5 100644 --- a/tests/bits/dof_tools_16b_x.cc +++ b/tests/bits/dof_tools_16b_x.cc @@ -24,7 +24,7 @@ // make_boundary_sparsity_pattern (const DoFHandler &, // const typename FunctionMap::type & // const std::vector & -// CompressedSetSparsityPattern &); +// CompressedSetSparsityPattern &); std::string output_file_name = "dof_tools_16b_x/output"; @@ -33,38 +33,38 @@ template void check_this (const DoFHandler &dof_handler) { - // test doesn't make much sense if - // no boundary dofs exist + // test doesn't make much sense if + // no boundary dofs exist if (dof_handler.get_fe().dofs_per_face == 0) return; - + std::vector map (dof_handler.n_dofs()); std::set set; set.insert (0); DoFTools::map_dof_to_boundary_indices (dof_handler, set, map); - - // create sparsity pattern + + // create sparsity pattern typename FunctionMap::type boundary_ids; boundary_ids[0] = 0; CompressedSetSparsityPattern sp (dof_handler.n_boundary_dofs(boundary_ids)); DoFTools::make_boundary_sparsity_pattern (dof_handler, boundary_ids, map, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); for (CompressedSetSparsityPattern::row_iterator - c = sp.row_begin(line); c!=sp.row_end(line); ++c) + c = sp.row_begin(line); c!=sp.row_end(line); ++c) deallog << *c << " "; deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; diff --git a/tests/bits/dof_tools_16c.cc b/tests/bits/dof_tools_16c.cc index ee67debe5b..4de8084a4b 100644 --- a/tests/bits/dof_tools_16c.cc +++ b/tests/bits/dof_tools_16c.cc @@ -24,7 +24,7 @@ // make_boundary_sparsity_pattern (const DoFHandler &, // const typename FunctionMap::type & // const std::vector & -// BlockSparsityPattern &); +// BlockSparsityPattern &); std::string output_file_name = "dof_tools_16c/output"; @@ -33,16 +33,16 @@ template void check_this (const DoFHandler &dof_handler) { - // test doesn't make much sense if - // no boundary dofs exist + // test doesn't make much sense if + // no boundary dofs exist if (dof_handler.get_fe().dofs_per_face == 0) return; - + std::vector map (dof_handler.n_dofs()); std::set set; set.insert (0); DoFTools::map_dof_to_boundary_indices (dof_handler, set, map); - + typename FunctionMap::type boundary_ids; boundary_ids[0] = 0; const unsigned int n_boundary_dofs = dof_handler.n_boundary_dofs(boundary_ids); @@ -50,34 +50,34 @@ check_this (const DoFHandler &dof_handler) n_boundary_dofs); BlockSparsityPattern sp (n_blocks, n_blocks); - // split dofs almost arbitrarily to - // blocks + // split dofs almost arbitrarily to + // blocks std::vector dofs_per_block(n_blocks); for (unsigned int i=0; i - block_row = sp.get_row_indices().global_to_local(line); + block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; col &dof_handler) } } - // write out some other indicators + // write out some other indicators for (unsigned int r=0; r &dof_handler) deallog << x.bandwidth () << std::endl << x.max_entries_per_row () << std::endl << x.n_nonzero_elements () << std::endl; - + unsigned int hash = 0; for (unsigned int l=0; l &, // const typename FunctionMap::type & // const std::vector & -// BlockCompressedSparsityPattern &); +// BlockCompressedSparsityPattern &); std::string output_file_name = "dof_tools_16d/output"; @@ -33,11 +33,11 @@ template void check_this (const DoFHandler &dof_handler) { - // test doesn't make much sense if - // no boundary dofs exist + // test doesn't make much sense if + // no boundary dofs exist if (dof_handler.get_fe().dofs_per_face == 0) return; - + std::vector map (dof_handler.n_dofs()); std::set set; set.insert (0); @@ -47,18 +47,18 @@ check_this (const DoFHandler &dof_handler) boundary_ids[0] = 0; const types::global_dof_index n_boundary_dofs = dof_handler.n_boundary_dofs(boundary_ids); const unsigned int n_blocks = std::min ( - static_cast(dof_handler.get_fe().n_components()), - n_boundary_dofs); + static_cast(dof_handler.get_fe().n_components()), + n_boundary_dofs); BlockCompressedSparsityPattern sp (n_blocks, n_blocks); - // split dofs almost arbitrarily to - // blocks + // split dofs almost arbitrarily to + // blocks std::vector dofs_per_block(n_blocks); for (unsigned int i=0; i &dof_handler) DoFTools::make_boundary_sparsity_pattern (dof_handler, boundary_ids, map, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); std::pair - block_row = sp.get_row_indices().global_to_local(line); + block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; col &dof_handler) } } - // write out some other indicators + // write out some other indicators for (unsigned int r=0; r &dof_handler) deallog << x.bandwidth () << std::endl << x.max_entries_per_row () << std::endl << x.n_nonzero_elements () << std::endl; - + unsigned int hash = 0; for (unsigned int l=0; l &, // const typename FunctionMap::type & // const std::vector & -// BlockCompressedSetSparsityPattern &); +// BlockCompressedSetSparsityPattern &); std::string output_file_name = "dof_tools_16d_x/output"; @@ -33,11 +33,11 @@ template void check_this (const DoFHandler &dof_handler) { - // test doesn't make much sense if - // no boundary dofs exist + // test doesn't make much sense if + // no boundary dofs exist if (dof_handler.get_fe().dofs_per_face == 0) return; - + std::vector map (dof_handler.n_dofs()); std::set set; set.insert (0); @@ -47,18 +47,18 @@ check_this (const DoFHandler &dof_handler) boundary_ids[0] = 0; const types::global_dof_index n_boundary_dofs = dof_handler.n_boundary_dofs(boundary_ids); const unsigned int n_blocks = std::min ( - static_cast(dof_handler.get_fe().n_components()), - n_boundary_dofs); + static_cast(dof_handler.get_fe().n_components()), + n_boundary_dofs); BlockCompressedSetSparsityPattern sp (n_blocks, - n_blocks); - // split dofs almost arbitrarily to - // blocks + n_blocks); + // split dofs almost arbitrarily to + // blocks std::vector dofs_per_block(n_blocks); for (unsigned int i=0; i &dof_handler) DoFTools::make_boundary_sparsity_pattern (dof_handler, boundary_ids, map, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); std::pair - block_row = sp.get_row_indices().global_to_local(line); + block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; col &dof_handler) deallog << x.bandwidth () << std::endl << x.max_entries_per_row () << std::endl << x.n_nonzero_elements () << std::endl; - + unsigned int hash = 0; for (unsigned int l=0; l &, -// SparsityPattern &); +// SparsityPattern &); std::string output_file_name = "dof_tools_17a/output"; @@ -32,16 +32,16 @@ template void check_this (const DoFHandler &dof_handler) { - // create sparsity pattern + // create sparsity pattern SparsityPattern sp (dof_handler.n_dofs(), dof_handler.max_couplings_between_dofs()*2); DoFTools::make_flux_sparsity_pattern (dof_handler, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); @@ -50,7 +50,7 @@ check_this (const DoFHandler &dof_handler) deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; diff --git a/tests/bits/dof_tools_17b.cc b/tests/bits/dof_tools_17b.cc index 31269a8561..88c1ed8283 100644 --- a/tests/bits/dof_tools_17b.cc +++ b/tests/bits/dof_tools_17b.cc @@ -22,7 +22,7 @@ // check // DoFTools:: // make_flux_sparsity_pattern (const DoFHandler &, -// CompressedSparsityPattern &); +// CompressedSparsityPattern &); std::string output_file_name = "dof_tools_17b/output"; @@ -31,15 +31,15 @@ template void check_this (const DoFHandler &dof_handler) { - // create sparsity pattern + // create sparsity pattern CompressedSparsityPattern sp (dof_handler.n_dofs()); DoFTools::make_flux_sparsity_pattern (dof_handler, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); @@ -48,7 +48,7 @@ check_this (const DoFHandler &dof_handler) deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; diff --git a/tests/bits/dof_tools_17b_x.cc b/tests/bits/dof_tools_17b_x.cc index 9fdf9afef6..804a631488 100644 --- a/tests/bits/dof_tools_17b_x.cc +++ b/tests/bits/dof_tools_17b_x.cc @@ -22,7 +22,7 @@ // check // DoFTools:: // make_flux_sparsity_pattern (const DoFHandler &, -// CompressedSetSparsityPattern &); +// CompressedSetSparsityPattern &); std::string output_file_name = "dof_tools_17b_x/output"; @@ -31,25 +31,25 @@ template void check_this (const DoFHandler &dof_handler) { - // create sparsity pattern + // create sparsity pattern CompressedSetSparsityPattern sp (dof_handler.n_dofs()); DoFTools::make_flux_sparsity_pattern (dof_handler, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); for (CompressedSetSparsityPattern::row_iterator - c = sp.row_begin(line); c!=sp.row_end(line); ++c) + c = sp.row_begin(line); c!=sp.row_end(line); ++c) deallog << *c << " "; deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; diff --git a/tests/bits/dof_tools_17c.cc b/tests/bits/dof_tools_17c.cc index 92d1e85fff..4adce838e9 100644 --- a/tests/bits/dof_tools_17c.cc +++ b/tests/bits/dof_tools_17c.cc @@ -22,7 +22,7 @@ // check // DoFTools:: // make_flux_sparsity_pattern (const DoFHandler &, -// BlockSparsityPattern &); +// BlockSparsityPattern &); std::string output_file_name = "dof_tools_17c/output"; @@ -31,16 +31,16 @@ template void check_this (const DoFHandler &dof_handler) { - // we split up the matrix into - // blocks according to the number - // of dofs in each component. this - // fails if the element is not - // primitive, so skip this test for - // such elements + // we split up the matrix into + // blocks according to the number + // of dofs in each component. this + // fails if the element is not + // primitive, so skip this test for + // such elements if (dof_handler.get_fe().is_primitive() != true) return; - - // create sparsity pattern + + // create sparsity pattern const unsigned int n_components = dof_handler.get_fe().n_components(); BlockSparsityPattern sp (n_components, n_components); @@ -53,19 +53,19 @@ check_this (const DoFHandler &dof_handler) dofs_per_component[j], dof_handler.max_couplings_between_dofs()*2); sp.collect_sizes (); - + DoFTools::make_flux_sparsity_pattern (dof_handler, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); std::pair - block_row = sp.get_row_indices().global_to_local(line); + block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; col &dof_handler) } } - // write out some other indicators + // write out some other indicators for (unsigned int r=0; r &dof_handler) deallog << x.bandwidth () << std::endl << x.max_entries_per_row () << std::endl << x.n_nonzero_elements () << std::endl; - + unsigned int hash = 0; for (unsigned int l=0; l &, -// BlockCompressedSparsityPattern &); +// BlockCompressedSparsityPattern &); std::string output_file_name = "dof_tools_17d/output"; @@ -31,16 +31,16 @@ template void check_this (const DoFHandler &dof_handler) { - // we split up the matrix into - // blocks according to the number - // of dofs in each component. this - // fails if the element is not - // primitive, so skip this test for - // such elements + // we split up the matrix into + // blocks according to the number + // of dofs in each component. this + // fails if the element is not + // primitive, so skip this test for + // such elements if (dof_handler.get_fe().is_primitive() != true) return; - - // create sparsity pattern + + // create sparsity pattern const unsigned int n_components = dof_handler.get_fe().n_components(); BlockCompressedSparsityPattern sp (n_components, n_components); @@ -52,19 +52,19 @@ check_this (const DoFHandler &dof_handler) sp.block(i,j).reinit(dofs_per_component[i], dofs_per_component[j]); sp.collect_sizes (); - + DoFTools::make_flux_sparsity_pattern (dof_handler, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); std::pair - block_row = sp.get_row_indices().global_to_local(line); + block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; col &dof_handler) } } - // write out some other indicators + // write out some other indicators for (unsigned int r=0; r &dof_handler) deallog << x.bandwidth () << std::endl << x.max_entries_per_row () << std::endl << x.n_nonzero_elements () << std::endl; - + unsigned int hash = 0; for (unsigned int l=0; l &, -// BlockCompressedSetSparsityPattern &); +// BlockCompressedSetSparsityPattern &); std::string output_file_name = "dof_tools_17d_x/output"; @@ -31,19 +31,19 @@ template void check_this (const DoFHandler &dof_handler) { - // we split up the matrix into - // blocks according to the number - // of dofs in each component. this - // fails if the element is not - // primitive, so skip this test for - // such elements + // we split up the matrix into + // blocks according to the number + // of dofs in each component. this + // fails if the element is not + // primitive, so skip this test for + // such elements if (dof_handler.get_fe().is_primitive() != true) return; - - // create sparsity pattern + + // create sparsity pattern const unsigned int n_components = dof_handler.get_fe().n_components(); BlockCompressedSetSparsityPattern sp (n_components, - n_components); + n_components); std::vector dofs_per_component(n_components); DoFTools::count_dofs_per_component (dof_handler, dofs_per_component); @@ -52,31 +52,31 @@ check_this (const DoFHandler &dof_handler) sp.block(i,j).reinit(dofs_per_component[i], dofs_per_component[j]); sp.collect_sizes (); - + DoFTools::make_flux_sparsity_pattern (dof_handler, sp); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); std::pair - block_row = sp.get_row_indices().global_to_local(line); + block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; col &dof_handler) deallog << x.bandwidth () << std::endl << x.max_entries_per_row () << std::endl << x.n_nonzero_elements () << std::endl; - + unsigned int hash = 0; for (unsigned int l=0; l &, -// SparsityPattern &); +// SparsityPattern &); std::string output_file_name = "dof_tools_18a/output"; - // set up masks. choose X-shaped - // masks with full first row and - // column (well, we had to invent - // something) +// set up masks. choose X-shaped +// masks with full first row and +// column (well, we had to invent +// something) void make_masks (const unsigned int n, Table<2,DoFTools::Coupling> &m1, @@ -42,9 +42,9 @@ make_masks (const unsigned int n, m1(i,0) = m1(0,i) = m2(i,0) = m2(0,i) = m1(i,i) = m2(i,i) = DoFTools::nonzero; } - + void -my_check_this (const DoFHandler<1> &) +my_check_this (const DoFHandler<1> &) {} @@ -56,18 +56,18 @@ my_check_this (const DoFHandler &dof_handler) Table<2,DoFTools::Coupling> mask_ext; make_masks (dof_handler.get_fe().n_components(), mask_int, mask_ext); - - // create sparsity pattern + + // create sparsity pattern SparsityPattern sp (dof_handler.n_dofs(), dof_handler.max_couplings_between_dofs()*2); DoFTools::make_flux_sparsity_pattern (dof_handler, sp, mask_int, mask_ext); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); @@ -76,7 +76,7 @@ my_check_this (const DoFHandler &dof_handler) deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; @@ -96,13 +96,13 @@ template void check_this (const DoFHandler &dof_handler) { - // since we can't forward declare - // check_this in this file (it is forward - // declared in dof_tools_common.h), we - // also can't make the driver file aware of - // the overload for 1d. to avoid linker - // errors, we can consequently not overload - // check_this, and need this forwarder - // function + // since we can't forward declare + // check_this in this file (it is forward + // declared in dof_tools_common.h), we + // also can't make the driver file aware of + // the overload for 1d. to avoid linker + // errors, we can consequently not overload + // check_this, and need this forwarder + // function my_check_this (dof_handler); } diff --git a/tests/bits/dof_tools_18a_1d.cc b/tests/bits/dof_tools_18a_1d.cc index e1f548f443..faeb7bf390 100644 --- a/tests/bits/dof_tools_18a_1d.cc +++ b/tests/bits/dof_tools_18a_1d.cc @@ -39,8 +39,8 @@ // check // DoFTools:: // make_flux_sparsity_pattern (const DoFHandler &, -// SparsityPattern &, -// ConstraintMatrix &); +// SparsityPattern &, +// ConstraintMatrix &); // this used to fail at one point because we forgot that in 1d // neighboring cells can be more than one level apart. with // FE_DGQ(0) elements, we get the following mesh and DoF indices: @@ -59,17 +59,17 @@ template void check_this (const DoFHandler &dof_handler) { - // create sparsity pattern + // create sparsity pattern SparsityPattern sp (dof_handler.n_dofs(), dof_handler.max_couplings_between_dofs()*2); DoFTools::make_flux_sparsity_pattern (dof_handler, sp, - ConstraintMatrix()); + ConstraintMatrix()); sp.compress (); - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l &dof_handler) deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; @@ -96,8 +96,8 @@ check_this (const DoFHandler &dof_handler) void check_this () { - // create a mesh where two cells at levels - // 1 and 3 are adjacent + // create a mesh where two cells at levels + // 1 and 3 are adjacent const int dim = 1; Triangulation tr; GridGenerator::hyper_cube (tr); @@ -105,7 +105,7 @@ check_this () tr.begin_active()->set_refine_flag(); tr.execute_coarsening_and_refinement(); for (Triangulation::active_cell_iterator - c=tr.begin_active(2); c!=tr.end_active(2); ++c) + c=tr.begin_active(2); c!=tr.end_active(2); ++c) c->set_refine_flag(); tr.execute_coarsening_and_refinement(); @@ -135,24 +135,24 @@ main() catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/dof_tools_18b.cc b/tests/bits/dof_tools_18b.cc index 876279ed35..771b1319e5 100644 --- a/tests/bits/dof_tools_18b.cc +++ b/tests/bits/dof_tools_18b.cc @@ -22,14 +22,14 @@ // check // DoFTools:: // make_flux_sparsity_pattern (const DoFHandler &, -// CompressedSparsityPattern &); +// CompressedSparsityPattern &); std::string output_file_name = "dof_tools_18b/output"; - // set up masks. choose X-shaped - // masks with full first row and - // column (well, we had to invent - // something) +// set up masks. choose X-shaped +// masks with full first row and +// column (well, we had to invent +// something) void make_masks (const unsigned int n, Table<2, DoFTools::Coupling> &m1, @@ -41,9 +41,9 @@ make_masks (const unsigned int n, m1(i,0) = m1(0,i) = m2(i,0) = m2(0,i) = m1(i,i) = m2(i,i) = DoFTools::nonzero; } - + void -my_check_this (const DoFHandler<1> &) +my_check_this (const DoFHandler<1> &) {} @@ -56,17 +56,17 @@ my_check_this (const DoFHandler &dof_handler) Table<2, DoFTools::Coupling> mask_ext; make_masks (dof_handler.get_fe().n_components(), mask_int, mask_ext); - - // create sparsity pattern + + // create sparsity pattern CompressedSparsityPattern sp (dof_handler.n_dofs()); DoFTools::make_flux_sparsity_pattern (dof_handler, sp, mask_int, mask_ext); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); @@ -75,7 +75,7 @@ my_check_this (const DoFHandler &dof_handler) deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; @@ -90,13 +90,13 @@ template void check_this (const DoFHandler &dof_handler) { - // since we can't forward declare - // check_this in this file (it is forward - // declared in dof_tools_common.h), we - // also can't make the driver file aware of - // the overload for 1d. to avoid linker - // errors, we can consequently not overload - // check_this, and need this forwarder - // function + // since we can't forward declare + // check_this in this file (it is forward + // declared in dof_tools_common.h), we + // also can't make the driver file aware of + // the overload for 1d. to avoid linker + // errors, we can consequently not overload + // check_this, and need this forwarder + // function my_check_this (dof_handler); } diff --git a/tests/bits/dof_tools_18b_x.cc b/tests/bits/dof_tools_18b_x.cc index 257c941d3a..c4e69e31a9 100644 --- a/tests/bits/dof_tools_18b_x.cc +++ b/tests/bits/dof_tools_18b_x.cc @@ -22,14 +22,14 @@ // check // DoFTools:: // make_flux_sparsity_pattern (const DoFHandler &, -// CompressedSetSparsityPattern &); +// CompressedSetSparsityPattern &); std::string output_file_name = "dof_tools_18b_x/output"; - // set up masks. choose X-shaped - // masks with full first row and - // column (well, we had to invent - // something) +// set up masks. choose X-shaped +// masks with full first row and +// column (well, we had to invent +// something) void make_masks (const unsigned int n, Table<2, DoFTools::Coupling> &m1, @@ -41,9 +41,9 @@ make_masks (const unsigned int n, m1(i,0) = m1(0,i) = m2(i,0) = m2(0,i) = m1(i,i) = m2(i,i) = DoFTools::nonzero; } - + void -my_check_this (const DoFHandler<1> &) +my_check_this (const DoFHandler<1> &) {} @@ -56,27 +56,27 @@ my_check_this (const DoFHandler &dof_handler) Table<2, DoFTools::Coupling> mask_ext; make_masks (dof_handler.get_fe().n_components(), mask_int, mask_ext); - - // create sparsity pattern + + // create sparsity pattern CompressedSetSparsityPattern sp (dof_handler.n_dofs()); DoFTools::make_flux_sparsity_pattern (dof_handler, sp, mask_int, mask_ext); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); for (CompressedSetSparsityPattern::row_iterator - c = sp.row_begin(line); c!=sp.row_end(line); ++c) + c = sp.row_begin(line); c!=sp.row_end(line); ++c) deallog << *c << " "; deallog << std::endl; } - // write out some other indicators + // write out some other indicators deallog << sp.bandwidth () << std::endl << sp.max_entries_per_row () << std::endl << sp.n_nonzero_elements () << std::endl; @@ -91,13 +91,13 @@ template void check_this (const DoFHandler &dof_handler) { - // since we can't forward declare - // check_this in this file (it is forward - // declared in dof_tools_common.h), we - // also can't make the driver file aware of - // the overload for 1d. to avoid linker - // errors, we can consequently not overload - // check_this, and need this forwarder - // function + // since we can't forward declare + // check_this in this file (it is forward + // declared in dof_tools_common.h), we + // also can't make the driver file aware of + // the overload for 1d. to avoid linker + // errors, we can consequently not overload + // check_this, and need this forwarder + // function my_check_this (dof_handler); } diff --git a/tests/bits/dof_tools_18c.cc b/tests/bits/dof_tools_18c.cc index 61a9bb0cc8..c034b4c5c9 100644 --- a/tests/bits/dof_tools_18c.cc +++ b/tests/bits/dof_tools_18c.cc @@ -22,14 +22,14 @@ // check // DoFTools:: // make_flux_sparsity_pattern (const DoFHandler &, -// BlockSparsityPattern &); +// BlockSparsityPattern &); std::string output_file_name = "dof_tools_18c/output"; - // set up masks. choose X-shaped - // masks with full first row and - // column (well, we had to invent - // something) +// set up masks. choose X-shaped +// masks with full first row and +// column (well, we had to invent +// something) void make_masks (const unsigned int n, Table<2, DoFTools::Coupling> &m1, @@ -41,9 +41,9 @@ make_masks (const unsigned int n, m1(i,0) = m1(0,i) = m2(i,0) = m2(0,i) = m1(i,i) = m2(i,i) = DoFTools::nonzero; } - + void -my_check_this (const DoFHandler<1> &) +my_check_this (const DoFHandler<1> &) {} @@ -51,21 +51,21 @@ template void my_check_this (const DoFHandler &dof_handler) { - // we split up the matrix into - // blocks according to the number - // of dofs in each component. this - // fails if the element is not - // primitive, so skip this test for - // such elements + // we split up the matrix into + // blocks according to the number + // of dofs in each component. this + // fails if the element is not + // primitive, so skip this test for + // such elements if (dof_handler.get_fe().is_primitive() != true) return; - + Table<2, DoFTools::Coupling> mask_int; Table<2, DoFTools::Coupling> mask_ext; make_masks (dof_handler.get_fe().n_components(), mask_int, mask_ext); - - // create sparsity pattern + + // create sparsity pattern const unsigned int n_components = dof_handler.get_fe().n_components(); BlockSparsityPattern sp (n_components, n_components); @@ -78,20 +78,20 @@ my_check_this (const DoFHandler &dof_handler) dofs_per_component[j], dof_handler.max_couplings_between_dofs()*2); sp.collect_sizes (); - + DoFTools::make_flux_sparsity_pattern (dof_handler, sp, mask_int, mask_ext); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); std::pair - block_row = sp.get_row_indices().global_to_local(line); + block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; col &dof_handler) } } - // write out some other indicators + // write out some other indicators for (unsigned int r=0; r &dof_handler) deallog << x.bandwidth () << std::endl << x.max_entries_per_row () << std::endl << x.n_nonzero_elements () << std::endl; - + unsigned int hash = 0; for (unsigned int l=0; l void check_this (const DoFHandler &dof_handler) { - // since we can't forward declare - // check_this in this file (it is forward - // declared in dof_tools_common.h), we - // also can't make the driver file aware of - // the overload for 1d. to avoid linker - // errors, we can consequently not overload - // check_this, and need this forwarder - // function + // since we can't forward declare + // check_this in this file (it is forward + // declared in dof_tools_common.h), we + // also can't make the driver file aware of + // the overload for 1d. to avoid linker + // errors, we can consequently not overload + // check_this, and need this forwarder + // function my_check_this (dof_handler); } diff --git a/tests/bits/dof_tools_18d.cc b/tests/bits/dof_tools_18d.cc index 41d6acb5a5..9a45b64a68 100644 --- a/tests/bits/dof_tools_18d.cc +++ b/tests/bits/dof_tools_18d.cc @@ -22,14 +22,14 @@ // check // DoFTools:: // make_flux_sparsity_pattern (const DoFHandler &, -// BlockCompressedSparsityPattern &); +// BlockCompressedSparsityPattern &); std::string output_file_name = "dof_tools_18d/output"; - // set up masks. choose X-shaped - // masks with full first row and - // column (well, we had to invent - // something) +// set up masks. choose X-shaped +// masks with full first row and +// column (well, we had to invent +// something) void make_masks (const unsigned int n, Table<2, DoFTools::Coupling> &m1, @@ -41,9 +41,9 @@ make_masks (const unsigned int n, m1(i,0) = m1(0,i) = m2(i,0) = m2(0,i) = m1(i,i) = m2(i,i) = DoFTools::nonzero; } - + void -my_check_this (const DoFHandler<1> &) +my_check_this (const DoFHandler<1> &) {} @@ -52,21 +52,21 @@ template void my_check_this (const DoFHandler &dof_handler) { - // we split up the matrix into - // blocks according to the number - // of dofs in each component. this - // fails if the element is not - // primitive, so skip this test for - // such elements + // we split up the matrix into + // blocks according to the number + // of dofs in each component. this + // fails if the element is not + // primitive, so skip this test for + // such elements if (dof_handler.get_fe().is_primitive() != true) return; - + Table<2, DoFTools::Coupling> mask_int; Table<2, DoFTools::Coupling> mask_ext; make_masks (dof_handler.get_fe().n_components(), mask_int, mask_ext); - - // create sparsity pattern + + // create sparsity pattern const unsigned int n_components = dof_handler.get_fe().n_components(); BlockCompressedSparsityPattern sp (n_components, n_components); @@ -78,20 +78,20 @@ my_check_this (const DoFHandler &dof_handler) sp.block(i,j).reinit(dofs_per_component[i], dofs_per_component[j]); sp.collect_sizes (); - + DoFTools::make_flux_sparsity_pattern (dof_handler, sp, mask_int, mask_ext); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); std::pair - block_row = sp.get_row_indices().global_to_local(line); + block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; col &dof_handler) } } - // write out some other indicators + // write out some other indicators for (unsigned int r=0; r &dof_handler) deallog << x.bandwidth () << std::endl << x.max_entries_per_row () << std::endl << x.n_nonzero_elements () << std::endl; - + unsigned int hash = 0; for (unsigned int l=0; l void check_this (const DoFHandler &dof_handler) { - // since we can't forward declare - // check_this in this file (it is forward - // declared in dof_tools_common.h), we - // also can't make the driver file aware of - // the overload for 1d. to avoid linker - // errors, we can consequently not overload - // check_this, and need this forwarder - // function + // since we can't forward declare + // check_this in this file (it is forward + // declared in dof_tools_common.h), we + // also can't make the driver file aware of + // the overload for 1d. to avoid linker + // errors, we can consequently not overload + // check_this, and need this forwarder + // function my_check_this (dof_handler); } diff --git a/tests/bits/dof_tools_18d_x.cc b/tests/bits/dof_tools_18d_x.cc index c29823da1d..dc2e12b579 100644 --- a/tests/bits/dof_tools_18d_x.cc +++ b/tests/bits/dof_tools_18d_x.cc @@ -22,14 +22,14 @@ // check // DoFTools:: // make_flux_sparsity_pattern (const DoFHandler &, -// BlockCompressedSetSparsityPattern &); +// BlockCompressedSetSparsityPattern &); std::string output_file_name = "dof_tools_18d_x/output"; - // set up masks. choose X-shaped - // masks with full first row and - // column (well, we had to invent - // something) +// set up masks. choose X-shaped +// masks with full first row and +// column (well, we had to invent +// something) void make_masks (const unsigned int n, Table<2, DoFTools::Coupling> &m1, @@ -41,9 +41,9 @@ make_masks (const unsigned int n, m1(i,0) = m1(0,i) = m2(i,0) = m2(0,i) = m1(i,i) = m2(i,i) = DoFTools::nonzero; } - + void -my_check_this (const DoFHandler<1> &) +my_check_this (const DoFHandler<1> &) {} @@ -52,24 +52,24 @@ template void my_check_this (const DoFHandler &dof_handler) { - // we split up the matrix into - // blocks according to the number - // of dofs in each component. this - // fails if the element is not - // primitive, so skip this test for - // such elements + // we split up the matrix into + // blocks according to the number + // of dofs in each component. this + // fails if the element is not + // primitive, so skip this test for + // such elements if (dof_handler.get_fe().is_primitive() != true) return; - + Table<2, DoFTools::Coupling> mask_int; Table<2, DoFTools::Coupling> mask_ext; make_masks (dof_handler.get_fe().n_components(), mask_int, mask_ext); - - // create sparsity pattern + + // create sparsity pattern const unsigned int n_components = dof_handler.get_fe().n_components(); BlockCompressedSetSparsityPattern sp (n_components, - n_components); + n_components); std::vector dofs_per_component(n_components); DoFTools::count_dofs_per_component (dof_handler, dofs_per_component); @@ -78,32 +78,32 @@ my_check_this (const DoFHandler &dof_handler) sp.block(i,j).reinit(dofs_per_component[i], dofs_per_component[j]); sp.collect_sizes (); - + DoFTools::make_flux_sparsity_pattern (dof_handler, sp, mask_int, mask_ext); sp.compress (); - - // write out 20 lines of this - // pattern (if we write out the - // whole pattern, the output file - // would be in the range of 40 MB) + + // write out 20 lines of this + // pattern (if we write out the + // whole pattern, the output file + // would be in the range of 40 MB) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); std::pair - block_row = sp.get_row_indices().global_to_local(line); + block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; col &dof_handler) deallog << x.bandwidth () << std::endl << x.max_entries_per_row () << std::endl << x.n_nonzero_elements () << std::endl; - + unsigned int hash = 0; for (unsigned int l=0; l void check_this (const DoFHandler &dof_handler) { - // since we can't forward declare - // check_this in this file (it is forward - // declared in dof_tools_common.h), we - // also can't make the driver file aware of - // the overload for 1d. to avoid linker - // errors, we can consequently not overload - // check_this, and need this forwarder - // function + // since we can't forward declare + // check_this in this file (it is forward + // declared in dof_tools_common.h), we + // also can't make the driver file aware of + // the overload for 1d. to avoid linker + // errors, we can consequently not overload + // check_this, and need this forwarder + // function my_check_this (dof_handler); } diff --git a/tests/bits/dof_tools_19.cc b/tests/bits/dof_tools_19.cc index 279d486679..b847205d46 100644 --- a/tests/bits/dof_tools_19.cc +++ b/tests/bits/dof_tools_19.cc @@ -27,7 +27,7 @@ // check // DoFTools:: // make_hanging_node_constraints (const DoFHandler &, -// ConstraintMatrix &); +// ConstraintMatrix &); // // As the results of dof_tools_03 seem unclear, this test aims // at verifying the constraints by projecting a constant function @@ -46,19 +46,19 @@ template void check_this (const DoFHandler &dof_handler) { - // there's presently a crash in the - // Raviart-Thomas element. don't - // check this element for that - // reason. this case is covered in - // rt_crash_01, however + // there's presently a crash in the + // Raviart-Thomas element. don't + // check this element for that + // reason. this case is covered in + // rt_crash_01, however if (dof_handler.get_fe().get_name().find ("RaviartThomas") != std::string::npos) return; - - ConstantFunction test_func (1, dof_handler.get_fe().n_components ()); - // don't run this test if hanging - // nodes are not implemented + ConstantFunction test_func (1, dof_handler.get_fe().n_components ()); + + // don't run this test if hanging + // nodes are not implemented if (dof_handler.get_fe().constraints_are_implemented() == false) return; @@ -74,8 +74,8 @@ check_this (const DoFHandler &dof_handler) Vector solution (dof_handler.n_dofs ()); VectorTools::project (dof_handler, cm, - quadrature, test_func, - solution); + quadrature, test_func, + solution); cm.distribute (solution); // Evaluate error @@ -86,6 +86,6 @@ check_this (const DoFHandler &dof_handler) const double p_l2_error = cellwise_errors.l2_norm(); Assert (p_l2_error < 1e-11, ExcInternalError()); - + deallog << "L2_Error : " << p_l2_error << std::endl; } diff --git a/tests/bits/dof_tools_20.cc b/tests/bits/dof_tools_20.cc index 02986e0a3f..69864a8b86 100644 --- a/tests/bits/dof_tools_20.cc +++ b/tests/bits/dof_tools_20.cc @@ -33,34 +33,34 @@ check_this (const DoFHandler &dof_handler) true); std::vector boundary_dofs (dof_handler.n_dofs()); - // first with all components + // first with all components { DoFTools::extract_dofs_with_support_on_boundary (dof_handler, - component_select, - boundary_dofs); + component_select, + boundary_dofs); output_bool_vector (boundary_dofs); } - // next with only every second - // component + // next with only every second + // component for (unsigned int i=1; i boundary_ids; boundary_ids.insert (0); DoFTools::extract_dofs_with_support_on_boundary (dof_handler, - component_select, - boundary_dofs, - boundary_ids); + component_select, + boundary_dofs, + boundary_ids); output_bool_vector (boundary_dofs); } } diff --git a/tests/bits/dof_tools_21_b.cc b/tests/bits/dof_tools_21_b.cc index ec3f620c68..6771c3ce60 100644 --- a/tests/bits/dof_tools_21_b.cc +++ b/tests/bits/dof_tools_21_b.cc @@ -58,127 +58,135 @@ using namespace dealii; /* The 2D case */ void generate_grid(Triangulation<2> &triangulation, int orientation) { - Point<2> vertices_1[] - = { - Point<2> (-1.,-3.), - Point<2> (+1.,-3.), - Point<2> (-1.,-1.), - Point<2> (+1.,-1.), - Point<2> (-1.,+1.), - Point<2> (+1.,+1.), - Point<2> (-1.,+3.), - Point<2> (+1.,+3.), - }; - std::vector > vertices (&vertices_1[0], &vertices_1[8]); - - std::vector > cells (2, CellData<2>()); - - /* cell 0 */ - int cell_vertices_0[GeometryInfo<2>::vertices_per_cell] = {0, 1, 2, 3}; - - /* cell 1 */ - int cell_vertices_1[2][GeometryInfo<2>::vertices_per_cell] - = { - {4,5,6,7}, - {7,6,5,4}, - }; - - for (unsigned int j=0;j::vertices_per_cell;++j) { + Point<2> vertices_1[] + = + { + Point<2> (-1.,-3.), + Point<2> (+1.,-3.), + Point<2> (-1.,-1.), + Point<2> (+1.,-1.), + Point<2> (-1.,+1.), + Point<2> (+1.,+1.), + Point<2> (-1.,+3.), + Point<2> (+1.,+3.), + }; + std::vector > vertices (&vertices_1[0], &vertices_1[8]); + + std::vector > cells (2, CellData<2>()); + + /* cell 0 */ + int cell_vertices_0[GeometryInfo<2>::vertices_per_cell] = {0, 1, 2, 3}; + + /* cell 1 */ + int cell_vertices_1[2][GeometryInfo<2>::vertices_per_cell] + = + { + {4,5,6,7}, + {7,6,5,4}, + }; + + for (unsigned int j=0; j::vertices_per_cell; ++j) + { cells[0].vertices[j] = cell_vertices_0[j]; cells[1].vertices[j] = cell_vertices_1[orientation][j]; } - cells[0].material_id = 0; - cells[1].material_id = 0; + cells[0].material_id = 0; + cells[1].material_id = 0; - triangulation.create_triangulation(vertices, cells, SubCellData()); + triangulation.create_triangulation(vertices, cells, SubCellData()); - Triangulation<2>::cell_iterator cell_1 = triangulation.begin(); - Triangulation<2>::cell_iterator cell_2 = cell_1++; - Triangulation<2>::face_iterator face_1; - Triangulation<2>::face_iterator face_2; + Triangulation<2>::cell_iterator cell_1 = triangulation.begin(); + Triangulation<2>::cell_iterator cell_2 = cell_1++; + Triangulation<2>::face_iterator face_1; + Triangulation<2>::face_iterator face_2; - // Look for the two outermost faces: - for (unsigned int j=0;j::faces_per_cell;++j) { + // Look for the two outermost faces: + for (unsigned int j=0; j::faces_per_cell; ++j) + { if (cell_1->face(j)->center()(1) > 2.9) face_1 = cell_1->face(j); if (cell_2->face(j)->center()(1) < -2.9) face_2 = cell_2->face(j); } - face_1->set_boundary_indicator(42); - face_2->set_boundary_indicator(43); + face_1->set_boundary_indicator(42); + face_2->set_boundary_indicator(43); - triangulation.refine_global(0); + triangulation.refine_global(0); } /* The 3D case */ void generate_grid(Triangulation<3> &triangulation, int orientation) { - Point<3> vertices_1[] - = { - Point<3> (-1.,-1.,-3.), - Point<3> (+1.,-1.,-3.), - Point<3> (-1.,+1.,-3.), - Point<3> (+1.,+1.,-3.), - Point<3> (-1.,-1.,-1.), - Point<3> (+1.,-1.,-1.), - Point<3> (-1.,+1.,-1.), - Point<3> (+1.,+1.,-1.), - Point<3> (-1.,-1.,+1.), - Point<3> (+1.,-1.,+1.), - Point<3> (-1.,+1.,+1.), - Point<3> (+1.,+1.,+1.), - Point<3> (-1.,-1.,+3.), - Point<3> (+1.,-1.,+3.), - Point<3> (-1.,+1.,+3.), - Point<3> (+1.,+1.,+3.) - }; - std::vector > vertices (&vertices_1[0], &vertices_1[16]); - - std::vector > cells (2, CellData<3>()); - - /* cell 0 */ - int cell_vertices_0[GeometryInfo<3>::vertices_per_cell] = {0, 1, 2, 3, 4, 5, 6, 7}; - - /* cell 1 */ - int cell_vertices_1[8][GeometryInfo<3>::vertices_per_cell] - = { - {8,9,10,11,12,13,14,15}, - {9,11,8,10,13,15,12,14}, - {11,10,9,8,15,14,13,12}, - {10,8,11,9,14,12,15,13}, - {13,12,15,14,9,8,11,10}, - {12,14,13,15,8,10,9,11}, - {14,15,12,13,10,11,8,9}, - {15,13,14,12,11,9,10,8}, - }; - - for (unsigned int j=0;j::vertices_per_cell;++j) { + Point<3> vertices_1[] + = + { + Point<3> (-1.,-1.,-3.), + Point<3> (+1.,-1.,-3.), + Point<3> (-1.,+1.,-3.), + Point<3> (+1.,+1.,-3.), + Point<3> (-1.,-1.,-1.), + Point<3> (+1.,-1.,-1.), + Point<3> (-1.,+1.,-1.), + Point<3> (+1.,+1.,-1.), + Point<3> (-1.,-1.,+1.), + Point<3> (+1.,-1.,+1.), + Point<3> (-1.,+1.,+1.), + Point<3> (+1.,+1.,+1.), + Point<3> (-1.,-1.,+3.), + Point<3> (+1.,-1.,+3.), + Point<3> (-1.,+1.,+3.), + Point<3> (+1.,+1.,+3.) + }; + std::vector > vertices (&vertices_1[0], &vertices_1[16]); + + std::vector > cells (2, CellData<3>()); + + /* cell 0 */ + int cell_vertices_0[GeometryInfo<3>::vertices_per_cell] = {0, 1, 2, 3, 4, 5, 6, 7}; + + /* cell 1 */ + int cell_vertices_1[8][GeometryInfo<3>::vertices_per_cell] + = + { + {8,9,10,11,12,13,14,15}, + {9,11,8,10,13,15,12,14}, + {11,10,9,8,15,14,13,12}, + {10,8,11,9,14,12,15,13}, + {13,12,15,14,9,8,11,10}, + {12,14,13,15,8,10,9,11}, + {14,15,12,13,10,11,8,9}, + {15,13,14,12,11,9,10,8}, + }; + + for (unsigned int j=0; j::vertices_per_cell; ++j) + { cells[0].vertices[j] = cell_vertices_0[j]; cells[1].vertices[j] = cell_vertices_1[orientation][j]; } - cells[0].material_id = 0; - cells[1].material_id = 0; + cells[0].material_id = 0; + cells[1].material_id = 0; - triangulation.create_triangulation(vertices, cells, SubCellData()); + triangulation.create_triangulation(vertices, cells, SubCellData()); - Triangulation<3>::cell_iterator cell_1 = triangulation.begin(); - Triangulation<3>::cell_iterator cell_2 = cell_1++; - Triangulation<3>::face_iterator face_1; - Triangulation<3>::face_iterator face_2; + Triangulation<3>::cell_iterator cell_1 = triangulation.begin(); + Triangulation<3>::cell_iterator cell_2 = cell_1++; + Triangulation<3>::face_iterator face_1; + Triangulation<3>::face_iterator face_2; - // Look for the two outermost faces: - for (unsigned int j=0;j::faces_per_cell;++j) { + // Look for the two outermost faces: + for (unsigned int j=0; j::faces_per_cell; ++j) + { if (cell_1->face(j)->center()(2) > 2.9) face_1 = cell_1->face(j); if (cell_2->face(j)->center()(2) < -2.9) face_2 = cell_2->face(j); } - face_1->set_boundary_indicator(42); - face_2->set_boundary_indicator(43); + face_1->set_boundary_indicator(42); + face_2->set_boundary_indicator(43); - triangulation.refine_global(0); + triangulation.refine_global(0); } @@ -203,21 +211,23 @@ void print_matching(DoFHandler &dof_handler, bool constrain_only_velocity = FEValuesExtractors::Scalar pressure(3); ComponentMask velocity_mask; - if(constrain_only_velocity) + if (constrain_only_velocity) velocity_mask = fe.component_mask (v); // Look for the two outermost faces: typename DoFHandler::face_iterator face_1; typename DoFHandler::face_iterator face_2; for (typename DoFHandler::cell_iterator cell = dof_handler.begin(0); - cell != dof_handler.end(0); ++cell) { - for (unsigned int j=0;j::faces_per_cell;++j) { - if (cell->face(j)->center()(dim==2 ? 1 : 2) > 2.9) - face_1 = cell->face(j); - if (cell->face(j)->center()(dim==2 ? 1 : 2) < -2.9) - face_2 = cell->face(j); + cell != dof_handler.end(0); ++cell) + { + for (unsigned int j=0; j::faces_per_cell; ++j) + { + if (cell->face(j)->center()(dim==2 ? 1 : 2) > 2.9) + face_1 = cell->face(j); + if (cell->face(j)->center()(dim==2 ? 1 : 2) < -2.9) + face_2 = cell->face(j); + } } - } // Determine the orientation of the two faces: @@ -233,11 +243,11 @@ void print_matching(DoFHandler &dof_handler, bool constrain_only_velocity = for (unsigned int c = 0; c < fe.n_components(); c++) { deallog << std::endl << " component " << c << ":"; - for(unsigned int i = 0; i < fe.dofs_per_face; ++i) + for (unsigned int i = 0; i < fe.dofs_per_face; ++i) { - if(fe.face_system_to_component_index(i).first == c) + if (fe.face_system_to_component_index(i).first == c) deallog << " (" << dofs_1[i] << " - " - << support_points[dofs_1[i]] << ")"; + << support_points[dofs_1[i]] << ")"; } } deallog << std::endl; @@ -245,20 +255,20 @@ void print_matching(DoFHandler &dof_handler, bool constrain_only_velocity = for (unsigned int c = 0; c < fe.n_components(); c++) { deallog << std::endl << " component " << c << ":"; - for(unsigned int i = 0; i < fe.dofs_per_face; ++i) + for (unsigned int i = 0; i < fe.dofs_per_face; ++i) { - if(fe.face_system_to_component_index(i).first == c) + if (fe.face_system_to_component_index(i).first == c) deallog << " (" << dofs_2[i] << " - " - << support_points[dofs_2[i]] << ")"; + << support_points[dofs_2[i]] << ")"; } } deallog << std::endl; std::bitset<3> orientation; - if(not GridTools::orthogonal_equality(orientation, face_1, face_2, - dim==2 ? 1 : 2, - dealii::Tensor<1,dim>())) + if (not GridTools::orthogonal_equality(orientation, face_1, face_2, + dim==2 ? 1 : 2, + dealii::Tensor<1,dim>())) std::cerr << " not match! oh noze!! " << std::endl; deallog << "Orientation: " << orientation[0] << orientation[1] << orientation[2] << std::endl; @@ -285,84 +295,89 @@ int main() deallog << "Test for 2D, Q1:" << std::endl << std::endl; - for(int i = 0; i < 2; ++i) { - // Generate a triangulation and match: - Triangulation<2> triangulation; - FE_Q<2> fe(1); - DoFHandler<2> dof_handler; + for (int i = 0; i < 2; ++i) + { + // Generate a triangulation and match: + Triangulation<2> triangulation; + FE_Q<2> fe(1); + DoFHandler<2> dof_handler; - deallog << "Triangulation:" << i << std::endl; + deallog << "Triangulation:" << i << std::endl; - generate_grid(triangulation, i); - dof_handler.initialize(triangulation, fe); - print_matching(dof_handler); - } + generate_grid(triangulation, i); + dof_handler.initialize(triangulation, fe); + print_matching(dof_handler); + } deallog << "Test for 3D, Q1:" << std::endl << std::endl; - for(int i = 0; i < 8; ++i) { - // Generate a triangulation and match: - Triangulation<3> triangulation; - FE_Q<3> fe(1); - DoFHandler<3> dof_handler; + for (int i = 0; i < 8; ++i) + { + // Generate a triangulation and match: + Triangulation<3> triangulation; + FE_Q<3> fe(1); + DoFHandler<3> dof_handler; - deallog << "Triangulation:" << i << std::endl; + deallog << "Triangulation:" << i << std::endl; - generate_grid(triangulation, i); - dof_handler.initialize(triangulation, fe); - print_matching(dof_handler); - } + generate_grid(triangulation, i); + dof_handler.initialize(triangulation, fe); + print_matching(dof_handler); + } deallog << "Test for 3D, Q1, correct subface iteration:" << std::endl << std::endl; - for(int i = 0; i < 8; ++i) { - // Generate a triangulation and match: - Triangulation<3> triangulation; - FE_Q<3> fe(1); - DoFHandler<3> dof_handler; + for (int i = 0; i < 8; ++i) + { + // Generate a triangulation and match: + Triangulation<3> triangulation; + FE_Q<3> fe(1); + DoFHandler<3> dof_handler; - deallog << "Triangulation:" << i << std::endl; + deallog << "Triangulation:" << i << std::endl; - generate_grid(triangulation, i); - triangulation.refine_global(1); - dof_handler.initialize(triangulation, fe); - print_matching(dof_handler); - } + generate_grid(triangulation, i); + triangulation.refine_global(1); + dof_handler.initialize(triangulation, fe); + print_matching(dof_handler); + } deallog << "Test for 3D, Q4:" << std::endl << std::endl; - for(int i = 0; i < 8; ++i) { - // Generate a triangulation and match: - Triangulation<3> triangulation; - FE_Q<3> fe(4); - DoFHandler<3> dof_handler; + for (int i = 0; i < 8; ++i) + { + // Generate a triangulation and match: + Triangulation<3> triangulation; + FE_Q<3> fe(4); + DoFHandler<3> dof_handler; - deallog << "Triangulation:" << i << std::endl; + deallog << "Triangulation:" << i << std::endl; - generate_grid(triangulation, i); - dof_handler.initialize(triangulation, fe); - print_matching(dof_handler); - } + generate_grid(triangulation, i); + dof_handler.initialize(triangulation, fe); + print_matching(dof_handler); + } deallog << "Test for 3D, Taylor-Hood with Component-Mask on v:" << std::endl << std::endl; - for(int i = 0; i < 8; ++i) { - // Generate a triangulation and match: - Triangulation<3> triangulation; - FE_Q<3> u(2); - FE_Q<3> p(1); - FESystem<3> taylor_hood(u, 3, p, 1); + for (int i = 0; i < 8; ++i) + { + // Generate a triangulation and match: + Triangulation<3> triangulation; + FE_Q<3> u(2); + FE_Q<3> p(1); + FESystem<3> taylor_hood(u, 3, p, 1); - DoFHandler<3> dof_handler; + DoFHandler<3> dof_handler; - deallog << "Triangulation:" << i << std::endl; + deallog << "Triangulation:" << i << std::endl; - generate_grid(triangulation, i); - dof_handler.initialize(triangulation, taylor_hood); - print_matching(dof_handler, true); - } + generate_grid(triangulation, i); + dof_handler.initialize(triangulation, taylor_hood); + print_matching(dof_handler, true); + } return 0; } diff --git a/tests/bits/dof_tools_common.h b/tests/bits/dof_tools_common.h index c4c85bf890..6aa3a654c4 100644 --- a/tests/bits/dof_tools_common.h +++ b/tests/bits/dof_tools_common.h @@ -1,6 +1,6 @@ //---------------------------- dof_tools_common.h --------------------------- // $Id$ -// Version: $Name$ +// Version: $Name$ // // Copyright (C) 2003, 2004, 2005, 2006, 2008, 2010 by the deal.II authors // @@ -48,7 +48,7 @@ extern std::string output_file_name; void output_bool_vector (std::vector &v) { -for (unsigned int i=0; i void set_boundary_ids (Triangulation &tria) -{ +{ for (unsigned int f=0; f::faces_per_cell; ++f) tria.begin_active()->face(f)->set_boundary_indicator (f); } @@ -67,7 +67,7 @@ set_boundary_ids (Triangulation &tria) void set_boundary_ids (Triangulation<1> &) {} - + template @@ -78,10 +78,10 @@ check (const FiniteElement &fe, deallog << "Checking " << name << " in " << dim << "d:" << std::endl; - - // create tria and dofhandler - // objects. set different boundary - // and sub-domain ids + + // create tria and dofhandler + // objects. set different boundary + // and sub-domain ids Triangulation tria; GridGenerator::hyper_cube(tria, 0., 1.); set_boundary_ids (tria); @@ -92,13 +92,13 @@ check (const FiniteElement &fe, tria.execute_coarsening_and_refinement (); } for (typename Triangulation::active_cell_iterator - cell=tria.begin_active(); + cell=tria.begin_active(); cell!=tria.end(); ++cell) cell->set_subdomain_id (cell->level()); DoFHandler dof_handler (tria); dof_handler.distribute_dofs (fe); - // call main function in .cc files + // call main function in .cc files check_this (dof_handler); } @@ -107,27 +107,27 @@ check (const FiniteElement &fe, #define CHECK(EL,deg,dim)\ - { FE_ ## EL EL(deg); \ - check(EL, #EL #deg); } + { FE_ ## EL EL(deg); \ + check(EL, #EL #deg); } #define CHECK_SYS1(sub1,N1,dim) \ - { FESystem q(sub1, N1); \ - check(q, #sub1 #N1); } + { FESystem q(sub1, N1); \ + check(q, #sub1 #N1); } #define CHECK_SYS2(sub1,N1,sub2,N2,dim) \ - { FESystem q(sub1, N1, sub2, N2); \ - check(q, #sub1 #N1 #sub2 #N2); } + { FESystem q(sub1, N1, sub2, N2); \ + check(q, #sub1 #N1 #sub2 #N2); } #define CHECK_SYS3(sub1,N1,sub2,N2,sub3,N3,dim) \ - { FESystem q(sub1, N1, sub2, N2, sub3, N3); \ - check(q, #sub1 #N1 #sub2 #N2 #sub3 #N3); } + { FESystem q(sub1, N1, sub2, N2, sub3, N3); \ + check(q, #sub1 #N1 #sub2 #N2 #sub3 #N3); } #define CHECK_ALL(EL,deg)\ - { CHECK(EL,deg,1); \ - CHECK(EL,deg,2); \ - CHECK(EL,deg,3); \ - } + { CHECK(EL,deg,1); \ + CHECK(EL,deg,2); \ + CHECK(EL,deg,3); \ + } int @@ -140,7 +140,7 @@ main() deallog << std::setprecision (2); deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); CHECK_ALL(Q,1); CHECK_ALL(Q,2); @@ -167,7 +167,7 @@ main() CHECK(RaviartThomasNodal, 0, 3); CHECK(RaviartThomasNodal, 1, 3); CHECK(RaviartThomasNodal, 2, 3); - + CHECK_SYS1(FE_Q<1>(1), 3,1); CHECK_SYS1(FE_DGQ<1>(2),2,1); CHECK_SYS1(FE_DGP<1>(3),1,1); @@ -199,7 +199,7 @@ main() CHECK_SYS3(FE_DGQ<3>(1), 3,FE_DGP<3>(3),1,FE_Q<3>(1),3,3); - // systems of systems + // systems of systems CHECK_SYS3((FESystem<2>(FE_Q<2>(1),3)), 3, FE_DGQ<2>(0), 1, FE_Q<2>(1), 3, @@ -210,7 +210,7 @@ main() FE_DGQ<2>(0),1),2, 2); - // systems with Nedelec elements + // systems with Nedelec elements CHECK_SYS2 (FE_DGQ<2>(3), 1, FE_Nedelec<2>(0), 2, 2); @@ -219,30 +219,30 @@ main() FESystem<2>(FE_Q<2>(2),1, FE_Nedelec<2>(0),2),2, 2); - + return 0; } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/dof_tools_periodic.h b/tests/bits/dof_tools_periodic.h index db2eb4c153..df93d1dc0a 100644 --- a/tests/bits/dof_tools_periodic.h +++ b/tests/bits/dof_tools_periodic.h @@ -50,7 +50,7 @@ extern std::string output_file_name; void output_bool_vector (std::vector &v) { -for (unsigned int i=0; i &fe, << " in " << dim << "d:" << std::endl; - // create tria and dofhandler - // objects. set different boundary - // and sub-domain ids + // create tria and dofhandler + // objects. set different boundary + // and sub-domain ids Triangulation tria; GridGenerator::hyper_cube(tria, -2., 2.); tria.refine_global (1); - // refine the first two cells: + // refine the first two cells: for (int i=0; i<2; ++i) { tria.begin_active()->set_refine_flag(); @@ -86,13 +86,13 @@ check (const FiniteElement &fe, } tria.refine_global (1); for (typename Triangulation::active_cell_iterator - cell=tria.begin_active(); + cell=tria.begin_active(); cell!=tria.end(); ++cell) cell->set_subdomain_id (cell->level()); DoFHandler dof_handler (tria); dof_handler.distribute_dofs (fe); - // call main function in .cc files + // call main function in .cc files check_this (dof_handler); } @@ -101,27 +101,27 @@ check (const FiniteElement &fe, #define CHECK(EL,deg,dim)\ - { FE_ ## EL EL(deg); \ - check(EL, #EL #deg); } + { FE_ ## EL EL(deg); \ + check(EL, #EL #deg); } #define CHECK_SYS1(sub1,N1,dim) \ - { FESystem q(sub1, N1); \ - check(q, #sub1 #N1); } + { FESystem q(sub1, N1); \ + check(q, #sub1 #N1); } #define CHECK_SYS2(sub1,N1,sub2,N2,dim) \ - { FESystem q(sub1, N1, sub2, N2); \ - check(q, #sub1 #N1 #sub2 #N2); } + { FESystem q(sub1, N1, sub2, N2); \ + check(q, #sub1 #N1 #sub2 #N2); } #define CHECK_SYS3(sub1,N1,sub2,N2,sub3,N3,dim) \ - { FESystem q(sub1, N1, sub2, N2, sub3, N3); \ - check(q, #sub1 #N1 #sub2 #N2 #sub3 #N3); } + { FESystem q(sub1, N1, sub2, N2, sub3, N3); \ + check(q, #sub1 #N1 #sub2 #N2 #sub3 #N3); } #define CHECK_ALL(EL,deg)\ - { /*CHECK(EL,deg,1);*/ \ - CHECK(EL,deg,2); \ - CHECK(EL,deg,3); \ - } + { /*CHECK(EL,deg,1);*/ \ + CHECK(EL,deg,2); \ + CHECK(EL,deg,3); \ + } int @@ -134,7 +134,7 @@ main() deallog << std::setprecision (2); deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); CHECK_ALL(Q,1); CHECK_ALL(Q,2); @@ -193,7 +193,7 @@ main() CHECK_SYS3(FE_DGQ<3>(1), 3,FE_DGP<3>(3),1,FE_Q<3>(1),3,3); - // systems of systems + // systems of systems CHECK_SYS3((FESystem<2>(FE_Q<2>(1),3)), 3, FE_DGQ<2>(0), 1, FE_Q<2>(1), 3, @@ -204,7 +204,7 @@ main() FE_DGQ<2>(0),1),2, 2); - // systems with Nedelec elements + // systems with Nedelec elements CHECK_SYS2 (FE_DGQ<2>(3), 1, FE_Nedelec<2>(0), 2, 2); @@ -219,24 +219,24 @@ main() catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/error_estimator_01.cc b/tests/bits/error_estimator_01.cc index db9468be1a..c430c711e1 100644 --- a/tests/bits/error_estimator_01.cc +++ b/tests/bits/error_estimator_01.cc @@ -41,24 +41,28 @@ template class MySquareFunction : public Function { - public: - MySquareFunction () : Function(2) {} - - virtual double value (const Point &p, - const unsigned int component) const - { return (component+1)*p.square(); } - - virtual void vector_value (const Point &p, - Vector &values) const - { values(0) = value(p,0); - values(1) = value(p,1); } +public: + MySquareFunction () : Function(2) {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return (component+1)*p.square(); + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + values(0) = value(p,0); + values(1) = value(p,1); + } }; template Quadrature & -get_q_face (Function&) +get_q_face (Function &) { static QGauss q(4); return q; @@ -66,7 +70,7 @@ get_q_face (Function&) Quadrature<0> & -get_q_face (Function<1>&) +get_q_face (Function<1> &) { Quadrature<0> *q = 0; return *q; @@ -77,38 +81,38 @@ get_q_face (Function<1>&) template void make_mesh (Triangulation &tria) { - + GridGenerator::hyper_cube(tria, -1, 1); - // refine the mesh in a random way so as to - // generate as many cells with - // hanging nodes as possible + // refine the mesh in a random way so as to + // generate as many cells with + // hanging nodes as possible tria.refine_global (4-dim); const double steps[4] = { /*d=0*/ 0, 7, 3, 3 }; for (unsigned int i=0; i::active_cell_iterator - cell = tria.begin_active(); + cell = tria.begin_active(); for (unsigned int index=0; cell != tria.end(); ++cell, ++index) if (index % (3*dim) == 0) cell->set_refine_flag(); tria.execute_coarsening_and_refinement (); } - // we now have a number of cells, - // flag them with some subdomain - // ids based on their position, in - // particular we take the quadrant - // (octant) + // we now have a number of cells, + // flag them with some subdomain + // ids based on their position, in + // particular we take the quadrant + // (octant) typename Triangulation::active_cell_iterator - cell = tria.begin_active (), - endc = tria.end (); + cell = tria.begin_active (), + endc = tria.end (); for (; cell!=endc; ++cell) { unsigned int subdomain = 0; for (unsigned int d=0; dcenter()(d) > 0) - subdomain |= (1<center()(d) > 0) + subdomain |= (1<set_subdomain_id (subdomain); @@ -123,10 +127,10 @@ void check () { Functions::CosineFunction function; - + Triangulation tria; make_mesh (tria); - + FE_Q element(3); DoFHandler dof(tria); dof.distribute_dofs(element); @@ -136,33 +140,33 @@ check () std::map*> neumann_bc; neumann_bc[0] = &function; - + Vector v (dof.n_dofs()); VectorTools::interpolate (mapping, dof, function, v); Vector error1 (tria.n_active_cells()); Vector error2 (tria.n_active_cells()); - // compute error by looking at all cells at - // once and output this as the base line - // results. scale results so that they show - // up in the output file as a reasonable - // number + // compute error by looking at all cells at + // once and output this as the base line + // results. scale results so that they show + // up in the output file as a reasonable + // number KellyErrorEstimator::estimate (mapping, dof, q_face, neumann_bc, v, error1); const double scaling_factor = 10000.*error1.size()/error1.l1_norm(); error1 *= scaling_factor; - + deallog << "Estimated error indicators:" << std::endl; for (unsigned int i=0; i class MySquareFunction : public Function { - public: - MySquareFunction () : Function(2) {} - - virtual double value (const Point &p, - const unsigned int component) const - { return (component+1)*p.square(); } - - virtual void vector_value (const Point &p, - Vector &values) const - { values(0) = value(p,0); - values(1) = value(p,1); } +public: + MySquareFunction () : Function(2) {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return (component+1)*p.square(); + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + values(0) = value(p,0); + values(1) = value(p,1); + } }; template Quadrature & -get_q_face (Function&) +get_q_face (Function &) { static QGauss q(4); return q; @@ -66,7 +70,7 @@ get_q_face (Function&) Quadrature<0> & -get_q_face (Function<1>&) +get_q_face (Function<1> &) { Quadrature<0> *q = 0; return *q; @@ -77,38 +81,38 @@ get_q_face (Function<1>&) template void make_mesh (Triangulation &tria) { - + GridGenerator::hyper_cube(tria, -1, 1); - // refine the mesh in a random way so as to - // generate as many cells with - // hanging nodes as possible + // refine the mesh in a random way so as to + // generate as many cells with + // hanging nodes as possible tria.refine_global (4-dim); const double steps[4] = { /*d=0*/ 0, 7, 3, 3 }; for (unsigned int i=0; i::active_cell_iterator - cell = tria.begin_active(); + cell = tria.begin_active(); for (unsigned int index=0; cell != tria.end(); ++cell, ++index) if (index % (3*dim) == 0) cell->set_refine_flag(); tria.execute_coarsening_and_refinement (); } - // we now have a number of cells, - // flag them with some material - // ids based on their position, in - // particular we take the quadrant - // (octant) + // we now have a number of cells, + // flag them with some material + // ids based on their position, in + // particular we take the quadrant + // (octant) typename Triangulation::active_cell_iterator - cell = tria.begin_active (), - endc = tria.end (); + cell = tria.begin_active (), + endc = tria.end (); for (; cell!=endc; ++cell) { unsigned int material = 0; for (unsigned int d=0; dcenter()(d) > 0) - material |= (1<center()(d) > 0) + material |= (1<set_material_id (material); @@ -123,10 +127,10 @@ void check () { Functions::CosineFunction function; - + Triangulation tria; make_mesh (tria); - + FE_Q element(3); DoFHandler dof(tria); dof.distribute_dofs(element); @@ -136,33 +140,33 @@ check () std::map*> neumann_bc; neumann_bc[0] = &function; - + Vector v (dof.n_dofs()); VectorTools::interpolate (mapping, dof, function, v); Vector error1 (tria.n_active_cells()); Vector error2 (tria.n_active_cells()); - // compute error by looking at all cells at - // once and output this as the base line - // results. scale results so that they show - // up in the output file as a reasonable - // number + // compute error by looking at all cells at + // once and output this as the base line + // results. scale results so that they show + // up in the output file as a reasonable + // number KellyErrorEstimator::estimate (mapping, dof, q_face, neumann_bc, v, error1); const double scaling_factor = 10000.*error1.size()/error1.l1_norm(); error1 *= scaling_factor; - + deallog << "Estimated error indicators:" << std::endl; for (unsigned int i=0; i &fe1, if (dim == 1) return; - // check all combinations of fe1 and fe2 + // check all combinations of fe1 and fe2 FullMatrix face_constraints; try { face_constraints.reinit (fe1.dofs_per_face, - fe1.dofs_per_face); + fe1.dofs_per_face); fe1.get_face_interpolation_matrix (fe1, face_constraints); deallog << fe1.get_name() - << " vs. " - << fe1.get_name() - << std::endl; - output_matrix (face_constraints); + << " vs. " + << fe1.get_name() + << std::endl; + output_matrix (face_constraints); } catch (...) { @@ -55,14 +55,14 @@ check_this (const FiniteElement &fe1, try { face_constraints.reinit (fe2.dofs_per_face, - fe2.dofs_per_face); + fe2.dofs_per_face); fe2.get_face_interpolation_matrix (fe2, face_constraints); deallog << fe2.get_name() - << " vs. " - << fe2.get_name() - << std::endl; - output_matrix (face_constraints); + << " vs. " + << fe2.get_name() + << std::endl; + output_matrix (face_constraints); } catch (...) { @@ -71,15 +71,15 @@ check_this (const FiniteElement &fe1, if (fe1.dofs_per_face <= fe2.dofs_per_face) try { - face_constraints.reinit (fe2.dofs_per_face, - fe1.dofs_per_face); - fe1.get_face_interpolation_matrix (fe2, face_constraints); - - deallog << fe1.get_name() - << " vs. " - << fe2.get_name() - << std::endl; - output_matrix (face_constraints); + face_constraints.reinit (fe2.dofs_per_face, + fe1.dofs_per_face); + fe1.get_face_interpolation_matrix (fe2, face_constraints); + + deallog << fe1.get_name() + << " vs. " + << fe2.get_name() + << std::endl; + output_matrix (face_constraints); } catch (...) { @@ -88,15 +88,15 @@ check_this (const FiniteElement &fe1, if (fe2.dofs_per_face <= fe1.dofs_per_face) try { - face_constraints.reinit (fe1.dofs_per_face, - fe2.dofs_per_face); - fe2.get_face_interpolation_matrix (fe1, face_constraints); - - deallog << fe2.get_name() - << " vs. " - << fe1.get_name() - << std::endl; - output_matrix (face_constraints); + face_constraints.reinit (fe1.dofs_per_face, + fe2.dofs_per_face); + fe2.get_face_interpolation_matrix (fe1, face_constraints); + + deallog << fe2.get_name() + << " vs. " + << fe1.get_name() + << std::endl; + output_matrix (face_constraints); } catch (...) { diff --git a/tests/bits/face_orientation_and_fe_nedelec_01.cc b/tests/bits/face_orientation_and_fe_nedelec_01.cc index 375eb0c3d1..7fd5c71cf0 100644 --- a/tests/bits/face_orientation_and_fe_nedelec_01.cc +++ b/tests/bits/face_orientation_and_fe_nedelec_01.cc @@ -63,58 +63,58 @@ void test (); template class F : public Function { - public: - F (const unsigned int q, - const unsigned int n_components) - : - Function(n_components), - q(q) - {} - - virtual double value (const Point &p, - const unsigned int component) const +public: + F (const unsigned int q, + const unsigned int n_components) + : + Function(n_components), + q(q) + {} + + virtual double value (const Point &p, + const unsigned int component) const + { + Assert ((component == 0) && (this->n_components == 1), + ExcInternalError()); + double val = 0; + for (unsigned int d=0; d &p, + Vector &v) const + { + for (unsigned int c=0; cn_components == 1), - ExcInternalError()); - double val = 0; - for (unsigned int d=0; d &p, - Vector &v) const - { - for (unsigned int c=0; c void do_project (const Triangulation &triangulation, - const FiniteElement &fe, - const unsigned int p, - const unsigned int order_difference) -{ + const FiniteElement &fe, + const unsigned int p, + const unsigned int order_difference) +{ DoFHandler dof_handler(triangulation); dof_handler.distribute_dofs (fe); @@ -122,38 +122,38 @@ void do_project (const Triangulation &triangulation, ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof_handler, - constraints); + constraints); constraints.close (); Vector projection (dof_handler.n_dofs()); Vector error (triangulation.n_active_cells()); for (unsigned int q=0; q<=p+2-order_difference; ++q) { - // project the function + // project the function VectorTools::project (dof_handler, - constraints, - QGauss(p+2), - F (q, fe.n_components()), - projection); - // just to make sure it doesn't get - // forgotten: handle hanging node - // constraints + constraints, + QGauss(p+2), + F (q, fe.n_components()), + projection); + // just to make sure it doesn't get + // forgotten: handle hanging node + // constraints constraints.distribute (projection); - - // then compute the interpolation error + + // then compute the interpolation error VectorTools::integrate_difference (dof_handler, - projection, - F (q, fe.n_components()), - error, - QGauss(std::max(p,q)+1), - VectorTools::L2_norm); + projection, + F (q, fe.n_components()), + error, + QGauss(std::max(p,q)+1), + VectorTools::L2_norm); deallog << fe.get_name() << ", P_" << q - << ", rel. error=" << error.l2_norm() / projection.l2_norm() - << std::endl; - + << ", rel. error=" << error.l2_norm() / projection.l2_norm() + << std::endl; + if (q<=p-order_difference) - Assert (error.l2_norm() <= 1e-10*projection.l2_norm(), - ExcFailedProjection(error.l2_norm() / projection.l2_norm())); + Assert (error.l2_norm() <= 1e-10*projection.l2_norm(), + ExcFailedProjection(error.l2_norm() / projection.l2_norm())); } } @@ -171,22 +171,22 @@ void do_project (const Triangulation &triangulation, // having face_orientation==false template void test_with_wrong_face_orientation (const FiniteElement &fe, - const unsigned int p, - const unsigned int order_difference = 0) + const unsigned int p, + const unsigned int order_difference = 0) { if (dim != 3) return; - + for (unsigned int i=0; i<7; ++i) { Triangulation triangulation; GridGenerator::hyper_ball (triangulation); typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + cell = triangulation.begin_active(); std::advance (cell, i); cell->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); - + do_project (triangulation, fe, p, order_difference); } } @@ -198,7 +198,7 @@ int main () { std::ofstream logfile(logname); deallog << std::setprecision (3); - + deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); diff --git a/tests/bits/face_orientation_and_fe_q_01.cc b/tests/bits/face_orientation_and_fe_q_01.cc index 7bade10890..5d58bd9ba5 100644 --- a/tests/bits/face_orientation_and_fe_q_01.cc +++ b/tests/bits/face_orientation_and_fe_q_01.cc @@ -66,58 +66,58 @@ void test (); template class F : public Function { - public: - F (const unsigned int q, - const unsigned int n_components) - : - Function(n_components), - q(q) - {} - - virtual double value (const Point &p, - const unsigned int component) const +public: + F (const unsigned int q, + const unsigned int n_components) + : + Function(n_components), + q(q) + {} + + virtual double value (const Point &p, + const unsigned int component) const + { + Assert ((component == 0) && (this->n_components == 1), + ExcInternalError()); + double val = 0; + for (unsigned int d=0; d &p, + Vector &v) const + { + for (unsigned int c=0; cn_components == 1), - ExcInternalError()); - double val = 0; - for (unsigned int d=0; d &p, - Vector &v) const - { - for (unsigned int c=0; c void do_project (const Triangulation &triangulation, - const FiniteElement &fe, - const unsigned int p, - const unsigned int order_difference) -{ + const FiniteElement &fe, + const unsigned int p, + const unsigned int order_difference) +{ DoFHandler dof_handler(triangulation); dof_handler.distribute_dofs (fe); @@ -125,38 +125,38 @@ void do_project (const Triangulation &triangulation, ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof_handler, - constraints); + constraints); constraints.close (); Vector projection (dof_handler.n_dofs()); Vector error (triangulation.n_active_cells()); for (unsigned int q=0; q<=p+2-order_difference; ++q) { - // project the function + // project the function VectorTools::project (dof_handler, - constraints, - QGauss(p+2), - F (q, fe.n_components()), - projection); - // just to make sure it doesn't get - // forgotten: handle hanging node - // constraints + constraints, + QGauss(p+2), + F (q, fe.n_components()), + projection); + // just to make sure it doesn't get + // forgotten: handle hanging node + // constraints constraints.distribute (projection); - - // then compute the interpolation error + + // then compute the interpolation error VectorTools::integrate_difference (dof_handler, - projection, - F (q, fe.n_components()), - error, - QGauss(std::max(p,q)+1), - VectorTools::L2_norm); + projection, + F (q, fe.n_components()), + error, + QGauss(std::max(p,q)+1), + VectorTools::L2_norm); deallog << fe.get_name() << ", P_" << q - << ", rel. error=" << error.l2_norm() / projection.l2_norm() - << std::endl; - + << ", rel. error=" << error.l2_norm() / projection.l2_norm() + << std::endl; + if (q<=p-order_difference) - Assert (error.l2_norm() <= 1e-10*projection.l2_norm(), - ExcFailedProjection(error.l2_norm() / projection.l2_norm())); + Assert (error.l2_norm() <= 1e-10*projection.l2_norm(), + ExcFailedProjection(error.l2_norm() / projection.l2_norm())); } } @@ -174,22 +174,22 @@ void do_project (const Triangulation &triangulation, // having face_orientation==false template void test_with_wrong_face_orientation (const FiniteElement &fe, - const unsigned int p, - const unsigned int order_difference = 0) + const unsigned int p, + const unsigned int order_difference = 0) { if (dim != 3) return; - + for (unsigned int i=0; i<7; ++i) { Triangulation triangulation; GridGenerator::hyper_ball (triangulation); typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + cell = triangulation.begin_active(); std::advance (cell, i); cell->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); - + do_project (triangulation, fe, p, order_difference); } } @@ -201,7 +201,7 @@ int main () { std::ofstream logfile(logname); deallog << std::setprecision (3); - + deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); diff --git a/tests/bits/face_orientation_and_fe_q_02.cc b/tests/bits/face_orientation_and_fe_q_02.cc index 1f9740a428..557cbfe7b2 100644 --- a/tests/bits/face_orientation_and_fe_q_02.cc +++ b/tests/bits/face_orientation_and_fe_q_02.cc @@ -54,58 +54,58 @@ void test (); template class F : public Function { - public: - F (const unsigned int q, - const unsigned int n_components) - : - Function(n_components), - q(q) - {} - - virtual double value (const Point &p, - const unsigned int component) const +public: + F (const unsigned int q, + const unsigned int n_components) + : + Function(n_components), + q(q) + {} + + virtual double value (const Point &p, + const unsigned int component) const + { + Assert ((component == 0) && (this->n_components == 1), + ExcInternalError()); + double val = 0; + for (unsigned int d=0; d &p, + Vector &v) const + { + for (unsigned int c=0; cn_components == 1), - ExcInternalError()); - double val = 0; - for (unsigned int d=0; d &p, - Vector &v) const - { - for (unsigned int c=0; c void do_project (const Triangulation &triangulation, - const FiniteElement &fe, - const unsigned int p, - const unsigned int order_difference) -{ + const FiniteElement &fe, + const unsigned int p, + const unsigned int order_difference) +{ DoFHandler dof_handler(triangulation); dof_handler.distribute_dofs (fe); @@ -113,38 +113,38 @@ void do_project (const Triangulation &triangulation, ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof_handler, - constraints); + constraints); constraints.close (); Vector projection (dof_handler.n_dofs()); Vector error (triangulation.n_active_cells()); for (unsigned int q=0; q<=p+2-order_difference; ++q) { - // project the function + // project the function VectorTools::project (dof_handler, - constraints, - QGauss(p+2), - F (q, fe.n_components()), - projection); - // just to make sure it doesn't get - // forgotten: handle hanging node - // constraints + constraints, + QGauss(p+2), + F (q, fe.n_components()), + projection); + // just to make sure it doesn't get + // forgotten: handle hanging node + // constraints constraints.distribute (projection); - - // then compute the interpolation error + + // then compute the interpolation error VectorTools::integrate_difference (dof_handler, - projection, - F (q, fe.n_components()), - error, - QGauss(std::max(p,q)+1), - VectorTools::L2_norm); + projection, + F (q, fe.n_components()), + error, + QGauss(std::max(p,q)+1), + VectorTools::L2_norm); deallog << fe.get_name() << ", P_" << q - << ", rel. error=" << error.l2_norm() / projection.l2_norm() - << std::endl; - + << ", rel. error=" << error.l2_norm() / projection.l2_norm() + << std::endl; + if (q<=p-order_difference) - Assert (error.l2_norm() <= 1e-10*projection.l2_norm(), - ExcFailedProjection(error.l2_norm() / projection.l2_norm())); + Assert (error.l2_norm() <= 1e-10*projection.l2_norm(), + ExcFailedProjection(error.l2_norm() / projection.l2_norm())); } } @@ -154,7 +154,7 @@ void do_project (const Triangulation &triangulation, // face_flip==false and hanging nodes. maybe it triggers all sorts of // assumptions that may be hidden in places // -// the mesh we use is a 7 cell moebius-type in 3d, with the first and last +// the mesh we use is a 7 cell moebius-type in 3d, with the first and last // cell refined in turn. that then makes 2 meshes with 14 active cells // each. this also cycles through all possibilities of coarser or finer cell // having face_rotation==false || face_flip==false @@ -163,33 +163,33 @@ void do_project (const Triangulation &triangulation, // face_flip (the standard case in which evereything is as usual is left out) template void test_with_wrong_face_orientation (const FiniteElement &fe, - const unsigned int p, - const unsigned int order_difference = 0) + const unsigned int p, + const unsigned int order_difference = 0) { if (dim != 3) return; for (unsigned int j=1; j<4; ++j) - // j=1: face_rotation=true, face_flip=true - // j=2: face_rotation=false, face_flip=true - // j=3: face_rotation=true, face_flip=false + // j=1: face_rotation=true, face_flip=true + // j=2: face_rotation=false, face_flip=true + // j=3: face_rotation=true, face_flip=false for (unsigned int i=0; i<2; ++i) { - Triangulation triangulation; - GridGenerator::moebius (triangulation,7,j,1.0,0.2); - typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - if (i==0) - { - std::advance (cell,6); - deallog<<"face_rotation="<face_rotation(2) - <<", face_flip="<face_flip(2)<set_refine_flag (); - triangulation.execute_coarsening_and_refinement (); - - do_project (triangulation, fe, p, order_difference); + Triangulation triangulation; + GridGenerator::moebius (triangulation,7,j,1.0,0.2); + typename Triangulation::active_cell_iterator + cell = triangulation.begin_active(); + if (i==0) + { + std::advance (cell,6); + deallog<<"face_rotation="<face_rotation(2) + <<", face_flip="<face_flip(2)<set_refine_flag (); + triangulation.execute_coarsening_and_refinement (); + + do_project (triangulation, fe, p, order_difference); } } @@ -200,7 +200,7 @@ int main () { std::ofstream logfile(logname); deallog << std::setprecision (3); - + deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); diff --git a/tests/bits/face_orientation_crash.cc b/tests/bits/face_orientation_crash.cc index 5b5275aa18..bf3c816d19 100644 --- a/tests/bits/face_orientation_crash.cc +++ b/tests/bits/face_orientation_crash.cc @@ -44,43 +44,43 @@ template void check () { - // create a mesh with at least one cell - // that has a face with - // face_orientation==false. refine each of - // the 7 cells in turn, to make sure we - // have a face with hanging nodes that has - // face_orientation==false at least once + // create a mesh with at least one cell + // that has a face with + // face_orientation==false. refine each of + // the 7 cells in turn, to make sure we + // have a face with hanging nodes that has + // face_orientation==false at least once for (unsigned int i=0; i<7; ++i) { deallog << "Check " << i << std::endl; - + Triangulation tria; GridGenerator::hyper_ball(tria); typename Triangulation::active_cell_iterator - cell = tria.begin_active(); + cell = tria.begin_active(); std::advance(cell,i); cell->set_refine_flag(); tria.execute_coarsening_and_refinement (); - // attach a DoFHandler + // attach a DoFHandler FE_Q element(1); DoFHandler dof(tria); dof.distribute_dofs(element); - // then build hanging node - // constraints. this should trip the - // new code using the hp constraints, - // added in late July 2006 + // then build hanging node + // constraints. this should trip the + // new code using the hp constraints, + // added in late July 2006 ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof, - constraints); + constraints); for (unsigned int j=0; j &dof_handler) { const FiniteElement &fe = dof_handler.get_fe(); - + for (unsigned int i = 0; i < fe.dofs_per_face; ++i) { deallog << fe.face_to_equivalent_cell_index (i) - << ' ' - << fe.face_to_cell_index (i, 0) - << std::endl; + << ' ' + << fe.face_to_cell_index (i, 0) + << std::endl; Assert (fe.face_to_equivalent_cell_index (i) == - fe.face_to_cell_index (i, 0), - ExcInternalError()); + fe.face_to_cell_index (i, 0), + ExcInternalError()); } - + deallog << "OK" << std::endl; } diff --git a/tests/bits/fe_field_function_01.cc b/tests/bits/fe_field_function_01.cc index 799e06a9a2..80e6cdeb03 100644 --- a/tests/bits/fe_field_function_01.cc +++ b/tests/bits/fe_field_function_01.cc @@ -34,14 +34,15 @@ double abs_zero(double a) { - if( std::abs(a) < 1e-10) + if ( std::abs(a) < 1e-10) return 0; else return a; } template -void test() { +void test() +{ Triangulation tria; GridGenerator::hyper_cube(tria); tria.refine_global(8/dim); @@ -60,27 +61,27 @@ void test() { deallog << "V norm: " << v1.l2_norm() << std::endl; Functions::FEFieldFunction, Vector > - fef(dh, v1); + fef(dh, v1); VectorTools::interpolate(dh, fef, v2); v2.add(-1, v1); deallog << "Interpolation error: " << abs_zero(v2.l2_norm()) - << std::endl; + << std::endl; Vector error(tria.n_active_cells()); QGauss quad(2); VectorTools::integrate_difference(dh, v1, ff, - error, quad, - VectorTools::H1_norm); + error, quad, + VectorTools::H1_norm); deallog << "H1 Interpolation error: " - << abs_zero(error.l2_norm()) << std::endl; + << abs_zero(error.l2_norm()) << std::endl; error = 0; VectorTools::integrate_difference(dh, v1, fef, - error, quad, - VectorTools::H1_norm); + error, quad, + VectorTools::H1_norm); deallog << "H1 Interpolation error with fef: " - << abs_zero(error.l2_norm()) << std::endl; + << abs_zero(error.l2_norm()) << std::endl; } diff --git a/tests/bits/fe_field_function_01_vector.cc b/tests/bits/fe_field_function_01_vector.cc index d60df11fa0..70da9dad0c 100644 --- a/tests/bits/fe_field_function_01_vector.cc +++ b/tests/bits/fe_field_function_01_vector.cc @@ -37,26 +37,27 @@ template class F : public Function { - public: - F() : Function(2) {} - virtual void vector_value (const Point &p, - Vector &v) const - { - v = 0; - v[0] = p.square(); - } +public: + F() : Function(2) {} + virtual void vector_value (const Point &p, + Vector &v) const + { + v = 0; + v[0] = p.square(); + } }; double abs_zero(double a) { - if( std::abs(a) < 1e-10) + if ( std::abs(a) < 1e-10) return 0; else return a; } template -void test() { +void test() +{ Triangulation tria; GridGenerator::hyper_cube(tria); tria.refine_global(8/dim); @@ -75,27 +76,27 @@ void test() { deallog << "V norm: " << v1.l2_norm() << std::endl; Functions::FEFieldFunction, Vector > - fef(dh, v1); + fef(dh, v1); VectorTools::interpolate(dh, fef, v2); v2.add(-1, v1); deallog << "Interpolation error: " << abs_zero(v2.l2_norm()) - << std::endl; + << std::endl; Vector error(tria.n_active_cells()); QGauss quad(2); VectorTools::integrate_difference(dh, v1, F(), - error, quad, - VectorTools::L2_norm); + error, quad, + VectorTools::L2_norm); deallog << "L2 Interpolation error: " - << abs_zero(error.l2_norm()) << std::endl; + << abs_zero(error.l2_norm()) << std::endl; error = 0; VectorTools::integrate_difference(dh, v1, fef, - error, quad, - VectorTools::L2_norm); + error, quad, + VectorTools::L2_norm); deallog << "L2 Interpolation error with fef: " - << abs_zero(error.l2_norm()) << std::endl; + << abs_zero(error.l2_norm()) << std::endl; } diff --git a/tests/bits/fe_field_function_02.cc b/tests/bits/fe_field_function_02.cc index 2edf718b81..64bf9a06a9 100644 --- a/tests/bits/fe_field_function_02.cc +++ b/tests/bits/fe_field_function_02.cc @@ -37,14 +37,15 @@ double abs_zero(double a) { - if( std::abs(a) < 1e-10) + if ( std::abs(a) < 1e-10) return 0; else return a; } template -void test() { +void test() +{ Triangulation tria; GridGenerator::hyper_cube(tria); tria.refine_global(8/dim); @@ -63,13 +64,13 @@ void test() { deallog << "V norm: " << v1.l2_norm() << std::endl; Functions::FEFieldFunction, Vector > - fef(dh, v1); + fef(dh, v1); - // project the discrete function fef back - // onto the finite element space. this - // should be the identity operation and - // consequently subtracting the vector from - // itself should yield zero + // project the discrete function fef back + // onto the finite element space. this + // should be the identity operation and + // consequently subtracting the vector from + // itself should yield zero { ConstraintMatrix cm; cm.close(); @@ -78,7 +79,7 @@ void test() { v2.add(-1, v1); deallog << "Projection error: " << abs_zero(v2.l2_norm()) - << std::endl; + << std::endl; Assert (v2.l2_norm() < 1e-10, ExcInternalError()); } diff --git a/tests/bits/fe_field_function_02_vector.cc b/tests/bits/fe_field_function_02_vector.cc index 9d23ec8e53..279639f45f 100644 --- a/tests/bits/fe_field_function_02_vector.cc +++ b/tests/bits/fe_field_function_02_vector.cc @@ -40,27 +40,28 @@ template class F : public Function { - public: - F() : Function(2) {} - virtual void vector_value (const Point &p, - Vector &v) const - { - v = 0; - v[0] = p.square(); - } +public: + F() : Function(2) {} + virtual void vector_value (const Point &p, + Vector &v) const + { + v = 0; + v[0] = p.square(); + } }; double abs_zero(double a) { - if( std::abs(a) < 1e-10) + if ( std::abs(a) < 1e-10) return 0; else return a; } template -void test() { +void test() +{ Triangulation tria; GridGenerator::hyper_cube(tria); tria.refine_global(8/dim); @@ -79,13 +80,13 @@ void test() { deallog << "V norm: " << v1.l2_norm() << std::endl; Functions::FEFieldFunction, Vector > - fef(dh, v1); + fef(dh, v1); - // project the discrete function fef back - // onto the finite element space. this - // should be the identity operation and - // consequently subtracting the vector from - // itself should yield zero + // project the discrete function fef back + // onto the finite element space. this + // should be the identity operation and + // consequently subtracting the vector from + // itself should yield zero { ConstraintMatrix cm; cm.close(); @@ -94,7 +95,7 @@ void test() { v2.add(-1, v1); deallog << "Projection error: " << abs_zero(v2.l2_norm()) - << std::endl; + << std::endl; Assert (v2.l2_norm() < 1e-10, ExcInternalError()); } diff --git a/tests/bits/fe_field_function_03.cc b/tests/bits/fe_field_function_03.cc index 7bc1d92e04..bec1a14b24 100644 --- a/tests/bits/fe_field_function_03.cc +++ b/tests/bits/fe_field_function_03.cc @@ -16,7 +16,7 @@ -// Test the functionality of the laplacian in the FEFieldFunction class. +// Test the functionality of the laplacian in the FEFieldFunction class. #include "../tests.h" #include @@ -33,7 +33,8 @@ #include template -void test() { +void test() +{ Triangulation tria; GridGenerator::hyper_cube(tria); tria.refine_global(9/dim); @@ -52,14 +53,14 @@ void test() { deallog << "V norm: " << v1.l2_norm() << std::endl; Functions::FEFieldFunction, Vector > - fef(dh, v1); + fef(dh, v1); - //create the origin - Point p; - //compute the error of the laplacian in this point + //create the origin + Point p; + //compute the error of the laplacian in this point deallog << "Value of the laplacian in 0:" << std::endl; deallog << "correct value: " << ff.laplacian(p) <<", approximation: "<< fef.laplacian(p) << std::endl; - + //now we want to test the list version Point p1 = Point::unit_vector(0); p1 = p1 * 0.5; @@ -69,12 +70,12 @@ void test() { vec.push_back(p2); std::vector values_c(2); std::vector values_a(2); - + //get the laplacians at these two points ff.laplacian_list(vec, values_c); fef.laplacian_list(vec, values_a); - deallog << "Value of the laplacian in 0.5*e1 and 0.25 * e1:" << std::endl; - deallog << " correct values: " < @@ -33,7 +33,8 @@ #include template -void test() { +void test() +{ Triangulation tria; GridGenerator::hyper_cube(tria); tria.refine_global(9/dim); @@ -52,14 +53,14 @@ void test() { deallog << "V norm: " << v1.l2_norm() << std::endl; Functions::FEFieldFunction, Vector > - fef(dh, v1); + fef(dh, v1); - //create the origin - Point p; - //compute the error of the laplacian in this point + //create the origin + Point p; + //compute the error of the laplacian in this point deallog << "Value of the laplacian in 0:" << std::endl; deallog << "correct value: " << ff.laplacian(p) <<", approximation: "<< fef.laplacian(p) << std::endl; - + //now we want to test the list version Point p1 = Point::unit_vector(0); p1 = p1 * 0.5; @@ -69,12 +70,12 @@ void test() { vec.push_back(p2); std::vector values_c(2); std::vector values_a(2); - + //get the laplacians at these two points ff.laplacian_list(vec, values_c); fef.laplacian_list(vec, values_a); - deallog << "Value of the laplacian in 0.5*e1 and 0.25 * e1:" << std::endl; - deallog << " correct values: " < class F : public Function { - public: - virtual double value (const Point &p, - const unsigned int) const - { - return p.square(); - } +public: + virtual double value (const Point &p, + const unsigned int) const + { + return p.square(); + } }; @@ -65,19 +65,19 @@ void test() Functions::FEFieldFunction<2> fe_function (dof_handler, solution); std::vector > points; - // add a bunch of points. all - // points are inside the circle. - // the problem happens because we - // walk over a bunch of cells in - // the process of finding all of - // these points and then realize - // when we get to the one at the - // end that the coordinates for - // this point can't be found in the - // cell we have touched last (it's - // too far away from that cell, and - // the inverse mapping does not - // converge + // add a bunch of points. all + // points are inside the circle. + // the problem happens because we + // walk over a bunch of cells in + // the process of finding all of + // these points and then realize + // when we get to the one at the + // end that the coordinates for + // this point can't be found in the + // cell we have touched last (it's + // too far away from that cell, and + // the inverse mapping does not + // converge for (unsigned int i=0; i<20; ++i) for (unsigned int j=0; j<20; ++j) points.push_back (Point(-0.7+i*0.07,-0.7+j*0.07)); @@ -88,9 +88,9 @@ void test() for (unsigned int i=0; i class F : public Function { - public: - F() : Function(2) {} - virtual void vector_value (const Point &p, - Vector &v) const - { - v = 0; - v[0] = p.square(); - } +public: + F() : Function(2) {} + virtual void vector_value (const Point &p, + Vector &v) const + { + v = 0; + v[0] = p.square(); + } }; @@ -68,19 +68,19 @@ void test() Functions::FEFieldFunction<2> fe_function (dof_handler, solution); std::vector > points; - // add a bunch of points. all - // points are inside the circle. - // the problem happens because we - // walk over a bunch of cells in - // the process of finding all of - // these points and then realize - // when we get to the one at the - // end that the coordinates for - // this point can't be found in the - // cell we have touched last (it's - // too far away from that cell, and - // the inverse mapping does not - // converge + // add a bunch of points. all + // points are inside the circle. + // the problem happens because we + // walk over a bunch of cells in + // the process of finding all of + // these points and then realize + // when we get to the one at the + // end that the coordinates for + // this point can't be found in the + // cell we have touched last (it's + // too far away from that cell, and + // the inverse mapping does not + // converge for (unsigned int i=0; i<20; ++i) for (unsigned int j=0; j<20; ++j) points.push_back (Point(-0.7+i*0.07,-0.7+j*0.07)); @@ -92,14 +92,14 @@ void test() for (unsigned int i=0; i class F : public Function { - public: - virtual double value (const Point &p, - const unsigned int) const - { - return p.square(); - } +public: + virtual double value (const Point &p, + const unsigned int) const + { + return p.square(); + } }; @@ -63,45 +63,45 @@ void test() DoFHandler dof_handler(triangulation); dof_handler.distribute_dofs(fe); - // interpolate a quadratic function - // into the space; this function - // can be represented exactly, so - // that we can compare again later + // interpolate a quadratic function + // into the space; this function + // can be represented exactly, so + // that we can compare again later Vector solution(dof_handler.n_dofs()); VectorTools::interpolate (dof_handler, F(), solution); Functions::FEFieldFunction<2> fe_function (dof_handler, solution); std::vector > points; - // add only one points but also set - // the active cell to one that - // doesn't contain the current - // point. the problem happens - // because we walk over a bunch of - // cells in the process of finding - // all of these points and then - // realize when we get to the one - // at the end that the coordinates - // for this point can't be found in - // the cell we have touched last - // (it's too far away from that - // cell, and the inverse mapping - // does not converge + // add only one points but also set + // the active cell to one that + // doesn't contain the current + // point. the problem happens + // because we walk over a bunch of + // cells in the process of finding + // all of these points and then + // realize when we get to the one + // at the end that the coordinates + // for this point can't be found in + // the cell we have touched last + // (it's too far away from that + // cell, and the inverse mapping + // does not converge points.push_back (Point(-0.27999999999999992, -0.62999999999999989)); fe_function.set_active_cell (typename DoFHandler::active_cell_iterator - (&triangulation, - 1, - 4, - &dof_handler)); + (&triangulation, + 1, + 4, + &dof_handler)); std::vector m (points.size()); fe_function.value_list (points, m); for (unsigned int i=0; i class F : public Function { - public: - F() : Function(2) {} - virtual void vector_value (const Point &p, - Vector &v) const - { - v = 0; - v[0] = p.square(); - } +public: + F() : Function(2) {} + virtual void vector_value (const Point &p, + Vector &v) const + { + v = 0; + v[0] = p.square(); + } }; @@ -67,36 +67,36 @@ void test() DoFHandler dof_handler(triangulation); dof_handler.distribute_dofs(fe); - // interpolate a quadratic function - // into the space; this function - // can be represented exactly, so - // that we can compare again later + // interpolate a quadratic function + // into the space; this function + // can be represented exactly, so + // that we can compare again later Vector solution(dof_handler.n_dofs()); VectorTools::interpolate (dof_handler, F(), solution); Functions::FEFieldFunction<2> fe_function (dof_handler, solution); std::vector > points; - // add only one points but also set - // the active cell to one that - // doesn't contain the current - // point. the problem happens - // because we walk over a bunch of - // cells in the process of finding - // all of these points and then - // realize when we get to the one - // at the end that the coordinates - // for this point can't be found in - // the cell we have touched last - // (it's too far away from that - // cell, and the inverse mapping - // does not converge + // add only one points but also set + // the active cell to one that + // doesn't contain the current + // point. the problem happens + // because we walk over a bunch of + // cells in the process of finding + // all of these points and then + // realize when we get to the one + // at the end that the coordinates + // for this point can't be found in + // the cell we have touched last + // (it's too far away from that + // cell, and the inverse mapping + // does not converge points.push_back (Point(-0.27999999999999992, -0.62999999999999989)); fe_function.set_active_cell (typename DoFHandler::active_cell_iterator - (&triangulation, - 1, - 4, - &dof_handler)); + (&triangulation, + 1, + 4, + &dof_handler)); std::vector > m (points.size(), Vector(2)); fe_function.vector_value_list (points, m); @@ -104,14 +104,14 @@ void test() for (unsigned int i=0; i class F : public Function { - public: - F() : Function(2) {} - virtual void vector_value (const Point &p, - Vector &v) const - { - v = 0; - v[0] = p.square(); - } +public: + F() : Function(2) {} + virtual void vector_value (const Point &p, + Vector &v) const + { + v = 0; + v[0] = p.square(); + } }; @@ -67,49 +67,49 @@ void test() DoFHandler dof_handler(triangulation); dof_handler.distribute_dofs(fe); - // interpolate a quadratic function - // into the space; this function - // can be represented exactly, so - // that we can compare again later + // interpolate a quadratic function + // into the space; this function + // can be represented exactly, so + // that we can compare again later Vector solution(dof_handler.n_dofs()); VectorTools::interpolate (dof_handler, F(), solution); Functions::FEFieldFunction<2> fe_function (dof_handler, solution); - // add only one points but also set - // the active cell to one that - // doesn't contain the current - // point. the problem happens - // because we walk over a bunch of - // cells in the process of finding - // all of these points and then - // realize when we get to the one - // at the end that the coordinates - // for this point can't be found in - // the cell we have touched last - // (it's too far away from that - // cell, and the inverse mapping - // does not converge + // add only one points but also set + // the active cell to one that + // doesn't contain the current + // point. the problem happens + // because we walk over a bunch of + // cells in the process of finding + // all of these points and then + // realize when we get to the one + // at the end that the coordinates + // for this point can't be found in + // the cell we have touched last + // (it's too far away from that + // cell, and the inverse mapping + // does not converge Point point(-0.27999999999999992, -0.62999999999999989); fe_function.set_active_cell (typename DoFHandler::active_cell_iterator - (&triangulation, - 1, - 4, - &dof_handler)); + (&triangulation, + 1, + 4, + &dof_handler)); Vector m(2); fe_function.vector_value (point, m); { Assert (std::fabs(m(0) - point.square()) - < - 1e-10 * std::fabs(m(0) + point.square()), - ExcInternalError()); + < + 1e-10 * std::fabs(m(0) + point.square()), + ExcInternalError()); Assert (std::fabs(m(1)) - < - 1e-10, - ExcInternalError()); + < + 1e-10, + ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/bits/fe_field_function_07_vector.cc b/tests/bits/fe_field_function_07_vector.cc index 0c90e814be..6c554fccc2 100644 --- a/tests/bits/fe_field_function_07_vector.cc +++ b/tests/bits/fe_field_function_07_vector.cc @@ -41,23 +41,23 @@ template class F : public Function { - public: - F() : Function(2) {} - - virtual void vector_value (const Point &p, - Vector &v) const - { - v[0] = p[0]; - v[1] = 0; - } - - virtual void vector_gradient (const Point &p, - std::vector > &v) const - { - v[0] = 0; - v[1] = 0; - v[0][0] = 1; - } +public: + F() : Function(2) {} + + virtual void vector_value (const Point &p, + Vector &v) const + { + v[0] = p[0]; + v[1] = 0; + } + + virtual void vector_gradient (const Point &p, + std::vector > &v) const + { + v[0] = 0; + v[1] = 0; + v[0][0] = 1; + } }; @@ -76,51 +76,51 @@ void test() DoFHandler dof_handler(triangulation); dof_handler.distribute_dofs(fe); - // interpolate a quadratic function - // into the space; this function - // can be represented exactly, so - // that we can compare again later + // interpolate a quadratic function + // into the space; this function + // can be represented exactly, so + // that we can compare again later Vector solution(dof_handler.n_dofs()); VectorTools::interpolate (dof_handler, F(), solution); Functions::FEFieldFunction<2> fe_function (dof_handler, solution); - // add only one points but also set - // the active cell to one that - // doesn't contain the current - // point. the problem happens - // because we walk over a bunch of - // cells in the process of finding - // all of these points and then - // realize when we get to the one - // at the end that the coordinates - // for this point can't be found in - // the cell we have touched last - // (it's too far away from that - // cell, and the inverse mapping - // does not converge + // add only one points but also set + // the active cell to one that + // doesn't contain the current + // point. the problem happens + // because we walk over a bunch of + // cells in the process of finding + // all of these points and then + // realize when we get to the one + // at the end that the coordinates + // for this point can't be found in + // the cell we have touched last + // (it's too far away from that + // cell, and the inverse mapping + // does not converge Point point(-0.27999999999999992, -0.62999999999999989); fe_function.set_active_cell (typename DoFHandler::active_cell_iterator - (&triangulation, - 1, - 4, - &dof_handler)); + (&triangulation, + 1, + 4, + &dof_handler)); std::vector > m(2); fe_function.vector_gradient (point, m); Assert (std::fabs(m[0][0] - 1) - < - 1e-10 * std::fabs(m[0][0] + 1), - ExcInternalError()); + < + 1e-10 * std::fabs(m[0][0] + 1), + ExcInternalError()); Assert (std::fabs(m[0][1]) - < - 1e-10, - ExcInternalError()); + < + 1e-10, + ExcInternalError()); Assert (m[1].norm() - < - 1e-10, - ExcInternalError()); + < + 1e-10, + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/fe_field_function_08_vector.cc b/tests/bits/fe_field_function_08_vector.cc index 252cedcb00..bc02392f4c 100644 --- a/tests/bits/fe_field_function_08_vector.cc +++ b/tests/bits/fe_field_function_08_vector.cc @@ -41,23 +41,23 @@ template class F : public Function { - public: - F() : Function(2) {} - - virtual void vector_value (const Point &p, - Vector &v) const - { - v = 0; - for (unsigned int i=0; i &p, - Vector &v) const - { - v = 0; - v[0] = p.square() * 4 * 3 * dim; - } +public: + F() : Function(2) {} + + virtual void vector_value (const Point &p, + Vector &v) const + { + v = 0; + for (unsigned int i=0; i &p, + Vector &v) const + { + v = 0; + v[0] = p.square() * 4 * 3 * dim; + } }; @@ -76,49 +76,49 @@ void test() DoFHandler dof_handler(triangulation); dof_handler.distribute_dofs(fe); - // interpolate a quadratic function - // into the space; this function - // can be represented exactly, so - // that we can compare again later + // interpolate a quadratic function + // into the space; this function + // can be represented exactly, so + // that we can compare again later Vector solution(dof_handler.n_dofs()); VectorTools::interpolate (dof_handler, F(), solution); Functions::FEFieldFunction<2> fe_function (dof_handler, solution); - // add only one points but also set - // the active cell to one that - // doesn't contain the current - // point. the problem happens - // because we walk over a bunch of - // cells in the process of finding - // all of these points and then - // realize when we get to the one - // at the end that the coordinates - // for this point can't be found in - // the cell we have touched last - // (it's too far away from that - // cell, and the inverse mapping - // does not converge + // add only one points but also set + // the active cell to one that + // doesn't contain the current + // point. the problem happens + // because we walk over a bunch of + // cells in the process of finding + // all of these points and then + // realize when we get to the one + // at the end that the coordinates + // for this point can't be found in + // the cell we have touched last + // (it's too far away from that + // cell, and the inverse mapping + // does not converge Point point(-0.27999999999999992, -0.62999999999999989); fe_function.set_active_cell (typename DoFHandler::active_cell_iterator - (&triangulation, - 1, - 4, - &dof_handler)); + (&triangulation, + 1, + 4, + &dof_handler)); Vector m(2); fe_function.vector_laplacian (point, m); { Assert (std::fabs(m(0) - point.square()*4*3) - < - 1e-8 * std::fabs(m(0) + point.square()*4*3), - ExcInternalError()); + < + 1e-8 * std::fabs(m(0) + point.square()*4*3), + ExcInternalError()); Assert (std::fabs(m(1)) - < - 1e-10, - ExcInternalError()); + < + 1e-10, + ExcInternalError()); } deallog << "OK" << std::endl; diff --git a/tests/bits/fe_q_3d_01.cc b/tests/bits/fe_q_3d_01.cc index 1705c4ef86..8dd6c54a01 100644 --- a/tests/bits/fe_q_3d_01.cc +++ b/tests/bits/fe_q_3d_01.cc @@ -29,70 +29,70 @@ // matrices taken from the old file deal.II/source/fe/fe_q_3d.cc -namespace FE_Q_3d +namespace FE_Q_3d { static const double constraint_q1[] = { - 0.25,0.25,0.25,0.25, - 0.5,0,0.5,0, - 0,0.5,0,0.5, - 0.5,0.5,0,0, - 0,0,0.5,0.5 + 0.25,0.25,0.25,0.25, + 0.5,0,0.5,0, + 0,0.5,0,0.5, + 0.5,0.5,0,0, + 0,0,0.5,0.5 }; static const double constraint_q2[] = { - 0,0,0,0,0,0,0,0,1, - 0,0,0,0,1,0,0,0,0, - 0,0,0,0,0,1,0,0,0, - 0,0,0,0,0,0,1,0,0, - 0,0,0,0,0,0,0,1,0, - 0,0,0,0,0,0,0.375,-0.125,0.75, - 0,0,0,0,0,0,-0.125,0.375,0.75, - 0,0,0,0,0.375,-0.125,0,0,0.75, - 0,0,0,0,-0.125,0.375,0,0,0.75, - 0.375,0,-0.125,0,0.75,0,0,0,0, - -0.125,0,0.375,0,0.75,0,0,0,0, - 0,0.375,0,-0.125,0,0.75,0,0,0, - 0,-0.125,0,0.375,0,0.75,0,0,0, - 0.375,-0.125,0,0,0,0,0.75,0,0, - -0.125,0.375,0,0,0,0,0.75,0,0, - 0,0,0.375,-0.125,0,0,0,0.75,0, - 0,0,-0.125,0.375,0,0,0,0.75,0, - 0.140625,-0.046875,-0.046875,0.015625,0.28125,-0.09375,0.28125,-0.09375,0.5625, - -0.046875,0.140625,0.015625,-0.046875,-0.09375,0.28125,0.28125,-0.09375,0.5625, - -0.046875,0.015625,0.140625,-0.046875,0.28125,-0.09375,-0.09375,0.28125,0.5625, - 0.015625,-0.046875,-0.046875,0.140625,-0.09375,0.28125,-0.09375,0.28125,0.5625 + 0,0,0,0,0,0,0,0,1, + 0,0,0,0,1,0,0,0,0, + 0,0,0,0,0,1,0,0,0, + 0,0,0,0,0,0,1,0,0, + 0,0,0,0,0,0,0,1,0, + 0,0,0,0,0,0,0.375,-0.125,0.75, + 0,0,0,0,0,0,-0.125,0.375,0.75, + 0,0,0,0,0.375,-0.125,0,0,0.75, + 0,0,0,0,-0.125,0.375,0,0,0.75, + 0.375,0,-0.125,0,0.75,0,0,0,0, + -0.125,0,0.375,0,0.75,0,0,0,0, + 0,0.375,0,-0.125,0,0.75,0,0,0, + 0,-0.125,0,0.375,0,0.75,0,0,0, + 0.375,-0.125,0,0,0,0,0.75,0,0, + -0.125,0.375,0,0,0,0,0.75,0,0, + 0,0,0.375,-0.125,0,0,0,0.75,0, + 0,0,-0.125,0.375,0,0,0,0.75,0, + 0.140625,-0.046875,-0.046875,0.015625,0.28125,-0.09375,0.28125,-0.09375,0.5625, + -0.046875,0.140625,0.015625,-0.046875,-0.09375,0.28125,0.28125,-0.09375,0.5625, + -0.046875,0.015625,0.140625,-0.046875,0.28125,-0.09375,-0.09375,0.28125,0.5625, + 0.015625,-0.046875,-0.046875,0.140625,-0.09375,0.28125,-0.09375,0.28125,0.5625 }; } namespace Matrices { - const double * const + const double *const constraint_matrices[] = { - FE_Q_3d::constraint_q1, - FE_Q_3d::constraint_q2 + FE_Q_3d::constraint_q1, + FE_Q_3d::constraint_q2 }; - const unsigned int + const unsigned int n_constraint_matrices - = sizeof(constraint_matrices) / - sizeof(constraint_matrices[0]); + = sizeof(constraint_matrices) / + sizeof(constraint_matrices[0]); } void check () { - // check for q=1,2 + // check for q=1,2 for (unsigned int q=1; q<=2; ++q) { deallog << "q=" << q << std::endl; - + FE_Q<3> fe(q); - + FullMatrix x(fe.constraints().m(), fe.constraints().n()); @@ -117,13 +117,13 @@ void check () } -int main () +int main () { std::ofstream logfile("fe_q_3d_01/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + check (); } diff --git a/tests/bits/fe_q_constraints.cc b/tests/bits/fe_q_constraints.cc index 6bf8541d81..d3a9f153ba 100644 --- a/tests/bits/fe_q_constraints.cc +++ b/tests/bits/fe_q_constraints.cc @@ -17,13 +17,13 @@ // This file implements a simple test procedure for the algorithm -// which constructs the constraint matrices for FE_Q<3> elements -// of arbitrary order. After interpolating a polynomial with the -// degree of the ansatzspace, the hanging node constraints are -// distributed to the solution vector. This procedure should not -// change the solution vector. Hence the difference between the -// exact function and the FE function is measured before and -// after the distribution of the hanging node constraints. +// which constructs the constraint matrices for FE_Q<3> elements +// of arbitrary order. After interpolating a polynomial with the +// degree of the ansatzspace, the hanging node constraints are +// distributed to the solution vector. This procedure should not +// change the solution vector. Hence the difference between the +// exact function and the FE function is measured before and +// after the distribution of the hanging node constraints. #include "../tests.h" #include @@ -57,36 +57,36 @@ template class TestFunction : public Function { - private: - std::vector > base; - const unsigned int p_order; - - public: - TestFunction (const unsigned int p_order); - - virtual double value (const Point &p, - const unsigned int component = 0) const; +private: + std::vector > base; + const unsigned int p_order; + +public: + TestFunction (const unsigned int p_order); + + virtual double value (const Point &p, + const unsigned int component = 0) const; }; template TestFunction::TestFunction (const unsigned int p_order) : - p_order (p_order) + p_order (p_order) { std::vector coeff(p_order); - + for (unsigned int d = 0; d < dim; ++d) { for (unsigned int c = 0; c < p_order; ++c) - coeff[c] = (double) rand () / (double) RAND_MAX; + coeff[c] = (double) rand () / (double) RAND_MAX; base.push_back (Polynomials::Polynomial (coeff)); - } + } } template double TestFunction::value (const Point &p, - const unsigned int /*component*/) const + const unsigned int /*component*/) const { double val = base[0].value(p(0)); for (unsigned int i = 1; i < dim; ++i) @@ -96,39 +96,39 @@ double TestFunction::value (const Point &p, template -class TestFEQConstraints +class TestFEQConstraints { - public: - TestFEQConstraints (unsigned int p_order, unsigned int refinements); - void run (); - - private: - const unsigned int refinements; - const unsigned int p_order; - - void refine_grid_random (); - void make_grid_and_dofs (); - - void test (); - - Triangulation triangulation; - FE_Q fe; - DoFHandler dof_handler; - ConstraintMatrix hanging_node_constraints; +public: + TestFEQConstraints (unsigned int p_order, unsigned int refinements); + void run (); + +private: + const unsigned int refinements; + const unsigned int p_order; + + void refine_grid_random (); + void make_grid_and_dofs (); + + void test (); + + Triangulation triangulation; + FE_Q fe; + DoFHandler dof_handler; + ConstraintMatrix hanging_node_constraints; }; template TestFEQConstraints::TestFEQConstraints (unsigned int p_order, - unsigned int refinements) : - refinements (refinements), - p_order (p_order), - fe (p_order), - dof_handler (triangulation) + unsigned int refinements) : + refinements (refinements), + p_order (p_order), + fe (p_order), + dof_handler (triangulation) { } -// Actually this function creates with pseudo-random numbers errors, +// Actually this function creates with pseudo-random numbers errors, // which are then used to refine the grid. This should be a tough test for // the hanging nodes. template @@ -136,13 +136,13 @@ void TestFEQConstraints::refine_grid_random () { const unsigned int n_cells = triangulation.n_active_cells(); Vector estimated_error_per_cell (n_cells); - + for (unsigned int i = 0; i < n_cells; ++i) estimated_error_per_cell(i) = (double) rand () / (double) RAND_MAX; - + GridRefinement::refine_and_coarsen_fixed_number (triangulation, - estimated_error_per_cell, - 0.3, 0.03); + estimated_error_per_cell, + 0.3, 0.03); triangulation.execute_coarsening_and_refinement (); } @@ -152,22 +152,22 @@ void TestFEQConstraints::make_grid_and_dofs () { GridGenerator::hyper_cube (triangulation, -1, 1); triangulation.refine_global (2); - + for (unsigned int i = 0; i < refinements; ++i) refine_grid_random (); - + dof_handler.distribute_dofs (fe); - + deallog << "---------------------------------------------------------" - << std::endl; + << std::endl; deallog << "P-Order: " << p_order - << " Number of degrees of freedom: " - << dof_handler.n_dofs() - << std::endl; - + << " Number of degrees of freedom: " + << dof_handler.n_dofs() + << std::endl; + hanging_node_constraints.clear (); DoFTools::make_hanging_node_constraints (dof_handler, - hanging_node_constraints); + hanging_node_constraints); hanging_node_constraints.close (); } @@ -177,9 +177,9 @@ void TestFEQConstraints::test () { TestFunction test_function (p_order); double l2test, - l2norm1, - l2norm2, - l2error; + l2norm1, + l2norm2, + l2error; Vector solution; solution.reinit (dof_handler.n_dofs ()); @@ -190,39 +190,39 @@ void TestFEQConstraints::test () Vector norm_per_cell (triangulation.n_active_cells ()); VectorTools::interpolate (dof_handler, test_function, solution); - // First error check. Simply the interpolation error of the used FE-Space - // on the given triangulation. + // First error check. Simply the interpolation error of the used FE-Space + // on the given triangulation. VectorTools::integrate_difference (dof_handler, solution, - ZeroFunction(1), - norm_per_cell, - quadrature, - VectorTools::L2_norm); + ZeroFunction(1), + norm_per_cell, + quadrature, + VectorTools::L2_norm); l2test = norm_per_cell.l2_norm (); - deallog << "L2-Norm of test function " - << l2test << std::endl; - - // First error check. Simply the interpolation error of the used FE-Space - // on the given triangulation. + deallog << "L2-Norm of test function " + << l2test << std::endl; + + // First error check. Simply the interpolation error of the used FE-Space + // on the given triangulation. VectorTools::integrate_difference (dof_handler, solution, - test_function, - norm_per_cell, - quadrature, - VectorTools::L2_norm); + test_function, + norm_per_cell, + quadrature, + VectorTools::L2_norm); l2norm1 = norm_per_cell.l2_norm () / l2test; - // Second error check. Interpolation error, after redistribution of the - // values onto the DoFs on the hanging nodes. + // Second error check. Interpolation error, after redistribution of the + // values onto the DoFs on the hanging nodes. hanging_node_constraints.distribute (solution); VectorTools::integrate_difference (dof_handler, solution, - test_function, - norm_per_cell, - quadrature, - VectorTools::L2_norm); + test_function, + norm_per_cell, + quadrature, + VectorTools::L2_norm); l2norm2 = norm_per_cell.l2_norm () / l2test; l2error = fabs (l2norm1 - l2norm2); - deallog << "Normed L2-Error 1: " << l2norm1 - << " Normed L2-Error 2: " << l2norm2 << std::endl - << "Normed L2-Diff: " << l2error << " "; + deallog << "Normed L2-Error 1: " << l2norm1 + << " Normed L2-Error 2: " << l2norm2 << std::endl + << "Normed L2-Diff: " << l2error << " "; if (l2error < 1.0e-16) deallog << "OK" << std::endl; else @@ -231,14 +231,14 @@ void TestFEQConstraints::test () template -void TestFEQConstraints::run () +void TestFEQConstraints::run () { make_grid_and_dofs (); test (); } -int main () +int main () { std::ofstream logfile("fe_q_constraints/output"); deallog.attach(logfile); @@ -246,17 +246,17 @@ int main () deallog.threshold_double(1.e-10); unsigned int ref_level[] = {4,3,2}; - - // Initialise the random generator with an - // arbitrary number. This should ensure - // reproducible results. + + // Initialise the random generator with an + // arbitrary number. This should ensure + // reproducible results. srand (4375384); - - // With these parameters, the elements are - // tested up to a polynomial degree of - // 6. The triangulation is refined 2 times - // uniformly and several times (pseudo-) - // randomly. + + // With these parameters, the elements are + // tested up to a polynomial degree of + // 6. The triangulation is refined 2 times + // uniformly and several times (pseudo-) + // randomly. TestFEQConstraints<3> *test; for (unsigned int p = 1; p < 4; ++p) { diff --git a/tests/bits/fe_system.cc b/tests/bits/fe_system.cc index 648cfe4e14..d7fe12ad89 100644 --- a/tests/bits/fe_system.cc +++ b/tests/bits/fe_system.cc @@ -44,37 +44,37 @@ template void test() { - #ifdef DEAL_II_WITH_THREADS +#ifdef DEAL_II_WITH_THREADS DeadlockKiller killer; - #endif - - // 0 components is not okay +#endif + + // 0 components is not okay FESystem fe(FE_Q(1), 1, FE_Q(2), 0); Triangulation tria; GridGenerator::hyper_cube(tria, 0., 1.); tria.refine_global(2); -tria.begin_active()->set_refine_flag(); -tria.execute_coarsening_and_refinement(); + tria.begin_active()->set_refine_flag(); + tria.execute_coarsening_and_refinement(); DoFHandler dofh(tria); -dofh.distribute_dofs(fe); + dofh.distribute_dofs(fe); -ConstraintMatrix cm; + ConstraintMatrix cm; DoFTools::make_hanging_node_constraints (dofh, cm); cm.close (); -std::ostringstream ss; -cm.print(ss); + std::ostringstream ss; + cm.print(ss); + + deallog << ss.str() << std::endl; -deallog << ss.str() << std::endl; - deallog << "ok" << std::endl; } @@ -84,13 +84,13 @@ main() { std::ofstream logfile ("fe_system/output"); deallog << std::setprecision(PRECISION); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); test<2>(); - + return 0; } diff --git a/tests/bits/fe_tools_01a.cc b/tests/bits/fe_tools_01a.cc index de67d1c98d..375d3a7231 100644 --- a/tests/bits/fe_tools_01a.cc +++ b/tests/bits/fe_tools_01a.cc @@ -59,14 +59,14 @@ check (const FE_Q &fe, #define CHECK(EL,deg,dim)\ - { FE_ ## EL EL(deg); \ - check(EL, #EL #deg); } + { FE_ ## EL EL(deg); \ + check(EL, #EL #deg); } #define CHECK_ALL(EL,deg)\ - { CHECK(EL,deg,1); \ - CHECK(EL,deg,2); \ - CHECK(EL,deg,3); \ - } + { CHECK(EL,deg,1); \ + CHECK(EL,deg,2); \ + CHECK(EL,deg,3); \ + } int @@ -84,30 +84,30 @@ main() CHECK_ALL(Q,2); CHECK_ALL(Q,3); CHECK_ALL(Q,4); - + return 0; } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/fe_tools_01b.cc b/tests/bits/fe_tools_01b.cc index d612e90893..9ec77bb84d 100644 --- a/tests/bits/fe_tools_01b.cc +++ b/tests/bits/fe_tools_01b.cc @@ -59,14 +59,14 @@ check (const FE_Q &fe, #define CHECK(EL,deg,dim)\ - { FE_ ## EL EL(deg); \ - check(EL, #EL #deg); } + { FE_ ## EL EL(deg); \ + check(EL, #EL #deg); } #define CHECK_ALL(EL,deg)\ - { CHECK(EL,deg,1); \ - CHECK(EL,deg,2); \ - CHECK(EL,deg,3); \ - } + { CHECK(EL,deg,1); \ + CHECK(EL,deg,2); \ + CHECK(EL,deg,3); \ + } int @@ -78,36 +78,36 @@ main() deallog << std::setprecision (2); deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); CHECK_ALL(Q,1); CHECK_ALL(Q,2); CHECK_ALL(Q,3); CHECK_ALL(Q,4); - + return 0; } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/fe_tools_01c.cc b/tests/bits/fe_tools_01c.cc index a1055afba0..5b1a5f6b97 100644 --- a/tests/bits/fe_tools_01c.cc +++ b/tests/bits/fe_tools_01c.cc @@ -34,9 +34,9 @@ #include -// check invertability of the map from +// check invertability of the map from // DoFTools::hierarchic_to_lexicographic_numbering -// to +// to // DoFTools::lexicographic_to_hierarchic_numbering @@ -64,8 +64,8 @@ check (const FE_Q &fe, Assert (n1[n2[i]] == i, ExcInternalError()); Assert (n2[n1[i]] == i, - ExcInternalError()); - + ExcInternalError()); + deallog << n1[n2[i]] << " "; } deallog << std::endl; @@ -76,14 +76,14 @@ check (const FE_Q &fe, #define CHECK(EL,deg,dim)\ - { FE_ ## EL EL(deg); \ - check(EL, #EL #deg); } + { FE_ ## EL EL(deg); \ + check(EL, #EL #deg); } #define CHECK_ALL(EL,deg)\ - { CHECK(EL,deg,1); \ - CHECK(EL,deg,2); \ - CHECK(EL,deg,3); \ - } + { CHECK(EL,deg,1); \ + CHECK(EL,deg,2); \ + CHECK(EL,deg,3); \ + } int @@ -95,36 +95,36 @@ main() deallog << std::setprecision (2); deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); CHECK_ALL(Q,1); CHECK_ALL(Q,2); CHECK_ALL(Q,3); CHECK_ALL(Q,4); - + return 0; } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/fe_tools_02.cc b/tests/bits/fe_tools_02.cc index c75b2aa116..204c6d5b7b 100644 --- a/tests/bits/fe_tools_02.cc +++ b/tests/bits/fe_tools_02.cc @@ -31,17 +31,17 @@ void check_this (const FiniteElement &fe1, const FiniteElement &fe2) { - // only check if both elements have - // support points. otherwise, - // interpolation doesn't really - // work. + // only check if both elements have + // support points. otherwise, + // interpolation doesn't really + // work. if ((fe1.get_unit_support_points().size() == 0) || (fe2.get_unit_support_points().size() == 0)) return; - // likewise for non-primitive elements + // likewise for non-primitive elements if (!fe1.is_primitive() || !fe2.is_primitive()) return; - + FullMatrix m (fe2.dofs_per_cell, fe1.dofs_per_cell); FETools::get_interpolation_matrix (fe1, fe2, m); diff --git a/tests/bits/fe_tools_03.cc b/tests/bits/fe_tools_03.cc index c502a8a4e4..ebaba61ca8 100644 --- a/tests/bits/fe_tools_03.cc +++ b/tests/bits/fe_tools_03.cc @@ -31,17 +31,17 @@ void check_this (const FiniteElement &fe1, const FiniteElement &fe2) { - // only check if both elements have - // support points. otherwise, - // interpolation doesn't really - // work + // only check if both elements have + // support points. otherwise, + // interpolation doesn't really + // work if ((fe1.get_unit_support_points().size() == 0) || (fe2.get_unit_support_points().size() == 0)) return; - // likewise for non-primitive elements + // likewise for non-primitive elements if (!fe1.is_primitive() || !fe2.is_primitive()) return; - + FullMatrix m (fe1.dofs_per_cell, fe1.dofs_per_cell); FETools::get_back_interpolation_matrix (fe1, fe2, m); diff --git a/tests/bits/fe_tools_04.cc b/tests/bits/fe_tools_04.cc index d52f21c810..cbc28821e9 100644 --- a/tests/bits/fe_tools_04.cc +++ b/tests/bits/fe_tools_04.cc @@ -31,17 +31,17 @@ void check_this (const FiniteElement &fe1, const FiniteElement &fe2) { - // only check if both elements have - // support points. otherwise, - // interpolation doesn't really - // work + // only check if both elements have + // support points. otherwise, + // interpolation doesn't really + // work if ((fe1.get_unit_support_points().size() == 0) || (fe2.get_unit_support_points().size() == 0)) return; - // likewise for non-primitive elements + // likewise for non-primitive elements if (!fe1.is_primitive() || !fe2.is_primitive()) return; - + FullMatrix m (fe1.dofs_per_cell, fe1.dofs_per_cell); FETools::get_interpolation_difference_matrix (fe1, fe2, m); diff --git a/tests/bits/fe_tools_05.cc b/tests/bits/fe_tools_05.cc index 49a1157266..958e44142d 100644 --- a/tests/bits/fe_tools_05.cc +++ b/tests/bits/fe_tools_05.cc @@ -31,18 +31,18 @@ void check_this (const FiniteElement &fe1, const FiniteElement &fe2) { - // only check if both elements have - // support points. otherwise, - // interpolation doesn't really - // work + // only check if both elements have + // support points. otherwise, + // interpolation doesn't really + // work if ((fe1.get_unit_support_points().size() == 0) || (fe2.get_unit_support_points().size() == 0)) return; - // likewise for non-primitive elements + // likewise for non-primitive elements if (!fe1.is_primitive() || !fe2.is_primitive()) return; - // we need to have dof_constraints - // for this test + // we need to have dof_constraints + // for this test if (!fe2.constraints_are_implemented()) return; @@ -52,11 +52,11 @@ check_this (const FiniteElement &fe1, ConstraintMatrix cm; DoFTools::make_hanging_node_constraints (*dof2, cm); cm.close (); - + Vector in (dof1->n_dofs()); for (unsigned int i=0; i out (dof2->n_dofs()); - + FETools::interpolate (*dof1, in, *dof2, cm, out); output_vector (out); } diff --git a/tests/bits/fe_tools_06.cc b/tests/bits/fe_tools_06.cc index 08153631ce..55136b7a8d 100644 --- a/tests/bits/fe_tools_06.cc +++ b/tests/bits/fe_tools_06.cc @@ -31,18 +31,18 @@ void check_this (const FiniteElement &fe1, const FiniteElement &fe2) { - // only check if both elements have - // support points. otherwise, - // interpolation doesn't really - // work + // only check if both elements have + // support points. otherwise, + // interpolation doesn't really + // work if ((fe1.get_unit_support_points().size() == 0) || (fe2.get_unit_support_points().size() == 0)) return; - // likewise for non-primitive elements + // likewise for non-primitive elements if (!fe1.is_primitive() || !fe2.is_primitive()) return; - // we need to have dof_constraints - // for this test + // we need to have dof_constraints + // for this test if (!fe1.constraints_are_implemented() || !fe2.constraints_are_implemented()) return; @@ -55,11 +55,11 @@ check_this (const FiniteElement &fe1, DoFTools::make_hanging_node_constraints (*dof2, cm2); cm1.close (); cm2.close (); - + Vector in (dof1->n_dofs()); for (unsigned int i=0; i out (dof1->n_dofs()); - + FETools::back_interpolate (*dof1, cm1, in, *dof2, cm2, out); output_vector (out); } diff --git a/tests/bits/fe_tools_06b.cc b/tests/bits/fe_tools_06b.cc index 15877c8097..95e8002f15 100644 --- a/tests/bits/fe_tools_06b.cc +++ b/tests/bits/fe_tools_06b.cc @@ -32,18 +32,18 @@ void check_this (const FiniteElement &fe1, const FiniteElement &fe2) { - // only check if both elements have - // support points. otherwise, - // interpolation doesn't really - // work + // only check if both elements have + // support points. otherwise, + // interpolation doesn't really + // work if ((fe1.get_unit_support_points().size() == 0) || (fe2.get_unit_support_points().size() == 0)) return; - // likewise for non-primitive elements + // likewise for non-primitive elements if (!fe1.is_primitive() || !fe2.is_primitive()) return; - // we need to have dof_constraints - // for this test + // we need to have dof_constraints + // for this test if (!fe1.constraints_are_implemented() || !fe2.constraints_are_implemented()) return; @@ -56,11 +56,11 @@ check_this (const FiniteElement &fe1, DoFTools::make_hanging_node_constraints (*dof2, cm2); cm1.close (); cm2.close (); - + parallel::distributed::Vector in (dof1->n_dofs()); for (unsigned int i=0; i out (dof1->n_dofs()); - + FETools::back_interpolate (*dof1, cm1, in, *dof2, cm2, out); output_vector (out); } diff --git a/tests/bits/fe_tools_07.cc b/tests/bits/fe_tools_07.cc index 3a2796a446..05720ea7cd 100644 --- a/tests/bits/fe_tools_07.cc +++ b/tests/bits/fe_tools_07.cc @@ -31,18 +31,18 @@ void check_this (const FiniteElement &fe1, const FiniteElement &fe2) { - // only check if both elements have - // support points. otherwise, - // interpolation doesn't really - // work + // only check if both elements have + // support points. otherwise, + // interpolation doesn't really + // work if ((fe1.get_unit_support_points().size() == 0) || (fe2.get_unit_support_points().size() == 0)) return; - // likewise for non-primitive elements + // likewise for non-primitive elements if (!fe1.is_primitive() || !fe2.is_primitive()) return; - // we need to have dof_constraints - // for this test + // we need to have dof_constraints + // for this test if (!fe1.constraints_are_implemented() || !fe2.constraints_are_implemented()) return; @@ -55,11 +55,11 @@ check_this (const FiniteElement &fe1, DoFTools::make_hanging_node_constraints (*dof2, cm2); cm1.close (); cm2.close (); - + Vector in (dof1->n_dofs()); for (unsigned int i=0; i out (dof1->n_dofs()); - + FETools::interpolation_difference (*dof1, cm1, in, *dof2, cm2, out); output_vector (out); } diff --git a/tests/bits/fe_tools_08.cc b/tests/bits/fe_tools_08.cc index 02779cf486..8a474a21bc 100644 --- a/tests/bits/fe_tools_08.cc +++ b/tests/bits/fe_tools_08.cc @@ -31,36 +31,36 @@ void check_this (const FiniteElement &fe1, const FiniteElement &fe2) { - // only check if both elements have - // support points. otherwise, - // interpolation doesn't really - // work + // only check if both elements have + // support points. otherwise, + // interpolation doesn't really + // work if ((fe1.get_unit_support_points().size() == 0) || (fe2.get_unit_support_points().size() == 0)) return; - // likewise for non-primitive elements + // likewise for non-primitive elements if (!fe1.is_primitive() || !fe2.is_primitive()) return; - // we need to have dof_constraints - // for this test + // we need to have dof_constraints + // for this test if (!fe2.constraints_are_implemented()) return; - // we need prolongation matrices in - // fe2 + // we need prolongation matrices in + // fe2 if (!fe2.isotropic_restriction_is_implemented()) return; - + std::auto_ptr > tria(make_tria()); std::auto_ptr > dof1(make_dof_handler (*tria, fe1)); std::auto_ptr > dof2(make_dof_handler (*tria, fe2)); ConstraintMatrix cm; DoFTools::make_hanging_node_constraints (*dof2, cm); cm.close (); - + Vector in (dof1->n_dofs()); for (unsigned int i=0; i out (dof2->n_dofs()); - + FETools::extrapolate (*dof1, in, *dof2, cm, out); output_vector (out); } diff --git a/tests/bits/fe_tools_09.cc b/tests/bits/fe_tools_09.cc index 4b9451dd08..2304f0b6bd 100644 --- a/tests/bits/fe_tools_09.cc +++ b/tests/bits/fe_tools_09.cc @@ -33,24 +33,24 @@ check_this (const FiniteElement &fe1, { FiniteElement *p1, *p2; - // check that the name of the fe - // and the name of the fe that we - // re-create from this name are - // identitical. this is also a - // pretty good indication that the - // two FEs are actually the same + // check that the name of the fe + // and the name of the fe that we + // re-create from this name are + // identitical. this is also a + // pretty good indication that the + // two FEs are actually the same deallog << fe1.get_name(); p1 = FETools::get_fe_from_name (fe1.get_name()); Assert (fe1.get_name() == p1->get_name(), - ExcInternalError()); + ExcInternalError()); deallog << " ok" << std::endl; delete p1; - // same for fe2 + // same for fe2 deallog << fe2.get_name(); p2 = FETools::get_fe_from_name (fe2.get_name()); Assert (fe2.get_name() == p2->get_name(), - ExcInternalError()); + ExcInternalError()); deallog << " ok" << std::endl; delete p2; } diff --git a/tests/bits/fe_tools_10.cc b/tests/bits/fe_tools_10.cc index d0cd4d9394..4478ff9fe0 100644 --- a/tests/bits/fe_tools_10.cc +++ b/tests/bits/fe_tools_10.cc @@ -40,7 +40,7 @@ std::string modify_name (const std::string &name) std::string::size_type pos; while ((pos = new_name.find(dim_name)) != std::string::npos) new_name.replace (pos, 3, ""); - + return new_name; } @@ -53,24 +53,24 @@ check_this (const FiniteElement &fe1, { FiniteElement *p1, *p2; - // check that the name of the fe - // and the name of the fe that we - // re-create from this name are - // identitical. this is also a - // pretty good indication that the - // two FEs are actually the same + // check that the name of the fe + // and the name of the fe that we + // re-create from this name are + // identitical. this is also a + // pretty good indication that the + // two FEs are actually the same deallog << modify_name (fe1.get_name()); p1 = FETools::get_fe_from_name (modify_name (fe1.get_name())); Assert (fe1.get_name() == p1->get_name(), - ExcInternalError()); + ExcInternalError()); deallog << " ok" << std::endl; delete p1; - // same for fe2 + // same for fe2 deallog << modify_name (fe2.get_name()); p2 = FETools::get_fe_from_name (modify_name (fe2.get_name())); Assert (fe2.get_name() == p2->get_name(), - ExcInternalError()); + ExcInternalError()); deallog << " ok" << std::endl; delete p2; } diff --git a/tests/bits/fe_tools_11.cc b/tests/bits/fe_tools_11.cc index 36c17b5eb0..39759d64c6 100644 --- a/tests/bits/fe_tools_11.cc +++ b/tests/bits/fe_tools_11.cc @@ -39,7 +39,7 @@ std::string modify_name (const std::string &name) std::string::size_type pos; while ((pos = new_name.find(dim_name)) != std::string::npos) new_name.replace (pos, 3, ""); - + return new_name; } @@ -52,24 +52,24 @@ check_this (const FiniteElement &fe1, { FiniteElement *p1, *p2; - // check that the name of the fe - // and the name of the fe that we - // re-create from this name are - // identitical. this is also a - // pretty good indication that the - // two FEs are actually the same + // check that the name of the fe + // and the name of the fe that we + // re-create from this name are + // identitical. this is also a + // pretty good indication that the + // two FEs are actually the same deallog << modify_name (fe1.get_name()); p1 = FETools::get_fe_from_name (modify_name (fe1.get_name())); Assert (fe1.get_name() == p1->get_name(), - ExcInternalError()); + ExcInternalError()); deallog << " ok" << std::endl; delete p1; - // same for fe2 + // same for fe2 deallog << modify_name (fe2.get_name()); p2 = FETools::get_fe_from_name (modify_name (fe2.get_name())); Assert (fe2.get_name() == p2->get_name(), - ExcInternalError()); + ExcInternalError()); deallog << " ok" << std::endl; delete p2; } diff --git a/tests/bits/fe_tools_12.cc b/tests/bits/fe_tools_12.cc index 9bc2b434ea..6883d675d3 100644 --- a/tests/bits/fe_tools_12.cc +++ b/tests/bits/fe_tools_12.cc @@ -31,22 +31,22 @@ void check_this (const FiniteElement &fe1, const FiniteElement &fe2) { - // use a higher output accuracy for this - // test. the reason is that many of the - // constraints are negative powers of 2, - // which have exact representations with 3 - // or 4 digits of accuracy, but not with - // the usual 2 digits (for example, 0.375, - // which sometimes rounds to 0.38 and - // sometimes to 0.37, depending on how - // intermediate errors have accumulated) + // use a higher output accuracy for this + // test. the reason is that many of the + // constraints are negative powers of 2, + // which have exact representations with 3 + // or 4 digits of accuracy, but not with + // the usual 2 digits (for example, 0.375, + // which sometimes rounds to 0.38 and + // sometimes to 0.37, depending on how + // intermediate errors have accumulated) deallog << std::setprecision (3); if (fe1.n_components() != 1) return; if (fe1.n_components() != fe2.n_components()) return; - + FullMatrix X (fe2.dofs_per_cell, fe1.dofs_per_cell); FETools::get_projection_matrix (fe1, fe2, X); diff --git a/tests/bits/fe_tools_14.cc b/tests/bits/fe_tools_14.cc index 3a3824389e..e38ba066d6 100644 --- a/tests/bits/fe_tools_14.cc +++ b/tests/bits/fe_tools_14.cc @@ -34,8 +34,8 @@ check_this (const FiniteElement &fe1, const FiniteElement &fe2) { deallog << (fe1.hp_constraints_are_implemented () ? "true" : "false") - << std::endl; + << std::endl; deallog << (fe2.hp_constraints_are_implemented () ? "true" : "false") - << std::endl; + << std::endl; } diff --git a/tests/bits/fe_tools_common.h b/tests/bits/fe_tools_common.h index 66051b8a01..a00ed55d1a 100644 --- a/tests/bits/fe_tools_common.h +++ b/tests/bits/fe_tools_common.h @@ -1,6 +1,6 @@ //---------------------------- fe_tools_common.h --------------------------- // $Id$ -// Version: $Name$ +// Version: $Name$ // // Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010, 2013 by the deal.II authors // @@ -48,7 +48,7 @@ check_this (const FiniteElement &fe1, // forward declaration of a variable with the name of the output file extern std::string output_file_name; - + // output some indicators for a given matrix. we don't write out the // entire matrix since this would blow up our output files beyond @@ -61,12 +61,12 @@ output_matrix (const FullMatrix &m) deallog << "(Empty matrix)" << std::endl; return; } - + deallog << m.l1_norm() << ' ' << m.linfty_norm() << std::endl; if (m.m() == m.n()) deallog << m.frobenius_norm() << std::endl; - + for (unsigned int i=0; i(1), - static_cast(v.size()/20))) + static_cast(v.size()/20))) deallog << v(i) << ' '; deallog << std::endl; } @@ -93,7 +93,7 @@ output_vector (const VECTOR &v) template -Triangulation * make_tria () +Triangulation *make_tria () { Triangulation *tria = new Triangulation(); GridGenerator::hyper_cube(*tria, 0., 1.); @@ -109,8 +109,8 @@ Triangulation * make_tria () template -DoFHandler * make_dof_handler (const Triangulation &tria, - const FiniteElement &fe) +DoFHandler *make_dof_handler (const Triangulation &tria, + const FiniteElement &fe) { DoFHandler *dof_handler = new DoFHandler(tria); dof_handler->distribute_dofs (fe); @@ -128,8 +128,8 @@ check (const FiniteElement &fe1, deallog << "Checking " << name << " in " << dim << "d:" << std::endl; - - // call main function in .cc files + + // call main function in .cc files check_this (fe1, fe2); } @@ -138,18 +138,18 @@ check (const FiniteElement &fe1, #define CHECK(EL1,deg1,EL2,deg2,dim)\ - { FE_ ## EL1 fe1(deg1); \ - FE_ ## EL2 fe2(deg2); \ - check(fe1, fe2, #EL1 #deg1 " against " #EL2 #deg2); \ - check(fe2, fe1, #EL2 #deg2 " against " #EL1 #deg1); \ - } + { FE_ ## EL1 fe1(deg1); \ + FE_ ## EL2 fe2(deg2); \ + check(fe1, fe2, #EL1 #deg1 " against " #EL2 #deg2); \ + check(fe2, fe1, #EL2 #deg2 " against " #EL1 #deg1); \ + } #define CHECK_SYS1(sub1_1,N1_1,sub2_1,N2_1,dim) \ - { FESystem fe1(sub1_1, N1_1); \ - FESystem fe2(sub2_1, N2_1); \ - check(fe1, fe2, #sub1_1 #N1_1 " against " #sub2_1 #N2_1); \ - check(fe2, fe1, #sub2_1 #N2_1 " against " #sub1_1 #N1_1); \ - } + { FESystem fe1(sub1_1, N1_1); \ + FESystem fe2(sub2_1, N2_1); \ + check(fe1, fe2, #sub1_1 #N1_1 " against " #sub2_1 #N2_1); \ + check(fe2, fe1, #sub2_1 #N2_1 " against " #sub1_1 #N1_1); \ + } /* #define CHECK_SYS2(sub1,N1,sub2,N2,dim) \ @@ -162,10 +162,10 @@ check (const FiniteElement &fe1, */ #define CHECK_ALL(EL1,deg1,EL2,deg2)\ - { CHECK(EL1,deg1,EL2,deg2,1); \ - CHECK(EL1,deg1,EL2,deg2,2); \ - CHECK(EL1,deg1,EL2,deg2,3); \ - } + { CHECK(EL1,deg1,EL2,deg2,1); \ + CHECK(EL1,deg1,EL2,deg2,2); \ + CHECK(EL1,deg1,EL2,deg2,3); \ + } int @@ -207,10 +207,10 @@ main() CHECK_ALL(DGP,2,DGP,2); CHECK_ALL(DGP,2,DGP,4); CHECK_ALL(DGP,3,DGP,3); - + CHECK(Nedelec, 0, Nedelec, 0, 2); CHECK(Nedelec, 0, Nedelec, 0, 3); - + CHECK_SYS1(FE_Q<1>(1), 3, FE_Q<1>(2), 3, @@ -243,76 +243,76 @@ main() 3); -/* - CHECK_SYS2(FE_Q<1>(1), 3,FE_DGQ<1>(2),2,1); - CHECK_SYS2(FE_DGQ<1>(2),2,FE_DGP<1>(3),1,1); - CHECK_SYS2(FE_DGP<1>(3),1,FE_DGQ<1>(2),2,1); - - CHECK_SYS2(FE_Q<2>(1), 3,FE_DGQ<2>(2),2,2); - CHECK_SYS2(FE_DGQ<2>(2),2,FE_DGP<2>(3),1,2); - CHECK_SYS2(FE_DGP<2>(3),1,FE_DGQ<2>(2),2,2); - - CHECK_SYS2(FE_Q<3>(1) ,3,FE_DGQ<3>(2),2,3); - CHECK_SYS2(FE_DGQ<3>(2),2,FE_DGP<3>(3),1,3); - CHECK_SYS2(FE_DGP<3>(3),1,FE_DGQ<3>(2),2,3); - - - CHECK_SYS3(FE_Q<1>(1), 3,FE_DGP<1>(3),1,FE_Q<1>(1),3,1); - CHECK_SYS3(FE_DGQ<1>(2),2,FE_DGQ<1>(2),2,FE_Q<1>(3),3,1); - CHECK_SYS3(FE_DGP<1>(3),1,FE_DGP<1>(3),1,FE_Q<1>(2),3,1); - - CHECK_SYS3(FE_Q<2>(1), 3,FE_DGP<2>(3),1,FE_Q<2>(1),3,2); - CHECK_SYS3(FE_DGQ<2>(2),2,FE_DGQ<2>(2),2,FE_Q<2>(3),3,2); - CHECK_SYS3(FE_DGP<2>(3),1,FE_DGP<2>(3),1,FE_Q<2>(2),3,2); - - CHECK_SYS3(FE_Q<3>(1), 3,FE_DGP<3>(3),1,FE_Q<3>(1),3,3); - CHECK_SYS3(FE_DGQ<3>(2),2,FE_DGQ<3>(2),2,FE_Q<3>(3),3,3); - CHECK_SYS3(FE_DGP<3>(3),1,FE_DGP<3>(3),1,FE_Q<3>(2),3,3); - - // systems of systems - CHECK_SYS3((FESystem<2>(FE_Q<2>(1),3)), 3, - FE_DGQ<2>(3), 1, - FE_Q<2>(1), 3, - 2); - CHECK_SYS3(FE_DGQ<2>(3), 1, - FESystem<2>(FE_DGQ<2>(3),3), 1, - FESystem<2>(FE_Q<2>(2),3, - FE_DGQ<2>(0),1),2, - 2); - - // systems with Nedelec elements - CHECK_SYS2 (FE_DGQ<2>(3), 1, - FE_Nedelec<2>(0), 2, - 2); - CHECK_SYS3(FE_Nedelec<2>(0), 1, - FESystem<2>(FE_DGQ<2>(3),3), 1, - FESystem<2>(FE_Q<2>(2),3, - FE_Nedelec<2>(0),2),2, - 2); -*/ + /* + CHECK_SYS2(FE_Q<1>(1), 3,FE_DGQ<1>(2),2,1); + CHECK_SYS2(FE_DGQ<1>(2),2,FE_DGP<1>(3),1,1); + CHECK_SYS2(FE_DGP<1>(3),1,FE_DGQ<1>(2),2,1); + + CHECK_SYS2(FE_Q<2>(1), 3,FE_DGQ<2>(2),2,2); + CHECK_SYS2(FE_DGQ<2>(2),2,FE_DGP<2>(3),1,2); + CHECK_SYS2(FE_DGP<2>(3),1,FE_DGQ<2>(2),2,2); + + CHECK_SYS2(FE_Q<3>(1) ,3,FE_DGQ<3>(2),2,3); + CHECK_SYS2(FE_DGQ<3>(2),2,FE_DGP<3>(3),1,3); + CHECK_SYS2(FE_DGP<3>(3),1,FE_DGQ<3>(2),2,3); + + + CHECK_SYS3(FE_Q<1>(1), 3,FE_DGP<1>(3),1,FE_Q<1>(1),3,1); + CHECK_SYS3(FE_DGQ<1>(2),2,FE_DGQ<1>(2),2,FE_Q<1>(3),3,1); + CHECK_SYS3(FE_DGP<1>(3),1,FE_DGP<1>(3),1,FE_Q<1>(2),3,1); + + CHECK_SYS3(FE_Q<2>(1), 3,FE_DGP<2>(3),1,FE_Q<2>(1),3,2); + CHECK_SYS3(FE_DGQ<2>(2),2,FE_DGQ<2>(2),2,FE_Q<2>(3),3,2); + CHECK_SYS3(FE_DGP<2>(3),1,FE_DGP<2>(3),1,FE_Q<2>(2),3,2); + + CHECK_SYS3(FE_Q<3>(1), 3,FE_DGP<3>(3),1,FE_Q<3>(1),3,3); + CHECK_SYS3(FE_DGQ<3>(2),2,FE_DGQ<3>(2),2,FE_Q<3>(3),3,3); + CHECK_SYS3(FE_DGP<3>(3),1,FE_DGP<3>(3),1,FE_Q<3>(2),3,3); + + // systems of systems + CHECK_SYS3((FESystem<2>(FE_Q<2>(1),3)), 3, + FE_DGQ<2>(3), 1, + FE_Q<2>(1), 3, + 2); + CHECK_SYS3(FE_DGQ<2>(3), 1, + FESystem<2>(FE_DGQ<2>(3),3), 1, + FESystem<2>(FE_Q<2>(2),3, + FE_DGQ<2>(0),1),2, + 2); + + // systems with Nedelec elements + CHECK_SYS2 (FE_DGQ<2>(3), 1, + FE_Nedelec<2>(0), 2, + 2); + CHECK_SYS3(FE_Nedelec<2>(0), 1, + FESystem<2>(FE_DGQ<2>(3),3), 1, + FESystem<2>(FE_Q<2>(2),3, + FE_Nedelec<2>(0),2),2, + 2); + */ return 0; } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/fe_tools_cpfqpm_01.cc b/tests/bits/fe_tools_cpfqpm_01.cc index 5961228dfa..99c287499a 100644 --- a/tests/bits/fe_tools_cpfqpm_01.cc +++ b/tests/bits/fe_tools_cpfqpm_01.cc @@ -38,32 +38,32 @@ void check_this (const FiniteElement &fe, const FiniteElement &/*fe2*/) { - // only check if both elements have - // support points. otherwise, - // interpolation doesn't really - // work + // only check if both elements have + // support points. otherwise, + // interpolation doesn't really + // work if (fe.n_components() != 1) return; - // ignore this check if this fe has already - // been treated + // ignore this check if this fe has already + // been treated static std::set already_checked; if (already_checked.find(fe.get_name()) != already_checked.end()) return; already_checked.insert (fe.get_name()); - - // test with different quadrature formulas + + // test with different quadrature formulas QGauss q_lhs(fe.degree+1); QGauss q_rhs(fe.degree+1>2 ? fe.degree+1-2 : 1); - + FullMatrix X (fe.dofs_per_cell, q_rhs.size()); FETools::compute_projection_from_quadrature_points_matrix (fe, q_lhs, q_rhs, X); - + output_matrix (X); } diff --git a/tests/bits/fe_tools_cpfqpm_02.cc b/tests/bits/fe_tools_cpfqpm_02.cc index 7192bbeb7e..60a74547c2 100644 --- a/tests/bits/fe_tools_cpfqpm_02.cc +++ b/tests/bits/fe_tools_cpfqpm_02.cc @@ -39,38 +39,38 @@ void check_this (const FiniteElement &fe, const FiniteElement &/*fe2*/) { - // only check if both elements have - // support points. otherwise, - // interpolation doesn't really - // work + // only check if both elements have + // support points. otherwise, + // interpolation doesn't really + // work if (fe.n_components() != 1) return; - // ignore this check if this fe has already - // been treated + // ignore this check if this fe has already + // been treated static std::set already_checked; if (already_checked.find(fe.get_name()) != already_checked.end()) return; already_checked.insert (fe.get_name()); - - // test with the same quadrature formulas - // of a degree that is high enough to - // exactly capture the data + + // test with the same quadrature formulas + // of a degree that is high enough to + // exactly capture the data QGauss q_lhs(fe.degree+1); QGauss q_rhs(fe.degree+1); - // this test can only succeed if there are - // at least as many degrees of freedom in - // the finite element as there are - // quadrature points + // this test can only succeed if there are + // at least as many degrees of freedom in + // the finite element as there are + // quadrature points if (fe.dofs_per_cell < q_rhs.size()) return; deallog << "dofs_per_cell=" << fe.dofs_per_cell << ", n_q_points=" << q_rhs.size() << std::endl; - + FullMatrix X (fe.dofs_per_cell, q_rhs.size()); @@ -78,9 +78,9 @@ check_this (const FiniteElement &fe, q_lhs, q_rhs, X); - // then compute the matrix that - // interpolates back to the quadrature - // points + // then compute the matrix that + // interpolates back to the quadrature + // points FullMatrix I_q (q_rhs.size(), fe.dofs_per_cell); FETools::compute_interpolation_to_quadrature_points_matrix (fe, q_rhs, I_q); @@ -89,9 +89,9 @@ check_this (const FiniteElement &fe, q_rhs.size()); I_q.mmult (product, X); - // the product should be the identity - // matrix now. make sure that this is - // indeed the case + // the product should be the identity + // matrix now. make sure that this is + // indeed the case for (unsigned int i=0; i &fe, const FiniteElement &/*fe2*/) { - // only check if both elements have - // support points. otherwise, - // interpolation doesn't really - // work + // only check if both elements have + // support points. otherwise, + // interpolation doesn't really + // work if (fe.n_components() != 1) return; - // ignore this check if this fe has already - // been treated + // ignore this check if this fe has already + // been treated static std::set already_checked; if (already_checked.find(fe.get_name()) != already_checked.end()) return; already_checked.insert (fe.get_name()); - - // test with different quadrature formulas + + // test with different quadrature formulas QGauss q_lhs(fe.degree+1); QGauss q_rhs(fe.degree+3); - + FullMatrix X (fe.dofs_per_cell, q_rhs.size()); FETools::compute_projection_from_quadrature_points_matrix (fe, q_lhs, q_rhs, X); - + output_matrix (X); } diff --git a/tests/bits/fe_tools_cpfqpm_04.cc b/tests/bits/fe_tools_cpfqpm_04.cc index 48743a0bc3..09e9146a1c 100644 --- a/tests/bits/fe_tools_cpfqpm_04.cc +++ b/tests/bits/fe_tools_cpfqpm_04.cc @@ -39,35 +39,35 @@ void check_this (const FiniteElement &fe, const FiniteElement &/*fe2*/) { - // only check if both elements have - // support points. otherwise, - // interpolation doesn't really - // work + // only check if both elements have + // support points. otherwise, + // interpolation doesn't really + // work if (fe.n_components() != 1) return; - // ignore this check if this fe has already - // been treated + // ignore this check if this fe has already + // been treated static std::set already_checked; if (already_checked.find(fe.get_name()) != already_checked.end()) return; already_checked.insert (fe.get_name()); - // only test elements with support - // points + // only test elements with support + // points if (fe.has_support_points() == false) return; - // test with different quadrature formulas + // test with different quadrature formulas Quadrature q_rhs(fe.get_unit_support_points(), - std::vector (fe.dofs_per_cell, - 1./fe.dofs_per_cell)); - + std::vector (fe.dofs_per_cell, + 1./fe.dofs_per_cell)); + FullMatrix X (fe.dofs_per_cell, q_rhs.size()); Assert (X.m() == X.n(), ExcInternalError()); - + FETools::compute_projection_from_quadrature_points_matrix (fe, q_rhs, q_rhs, X); diff --git a/tests/bits/find_cell_1.cc b/tests/bits/find_cell_1.cc index 14ba120a23..07876369e6 100644 --- a/tests/bits/find_cell_1.cc +++ b/tests/bits/find_cell_1.cc @@ -36,7 +36,7 @@ void check (Triangulation<2> &tria) { Point<2> p (1./3., 1./2.); - + Triangulation<2>::active_cell_iterator cell = GridTools::find_active_cell_around_point (tria, p); @@ -46,25 +46,25 @@ void check (Triangulation<2> &tria) deallog << std::endl; Assert (p.distance (cell->center()) < cell->diameter()/2, - ExcInternalError()); + ExcInternalError()); } -int main () +int main () { std::ofstream logfile("find_cell_1/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<2> coarse_grid; GridGenerator::hyper_cube (coarse_grid); coarse_grid.refine_global (2); check (coarse_grid); } - - { + + { Triangulation<2> coarse_grid; GridGenerator::hyper_ball (coarse_grid); static const HyperBallBoundary<2> boundary; @@ -74,5 +74,5 @@ int main () } } - - + + diff --git a/tests/bits/find_cell_10.cc b/tests/bits/find_cell_10.cc index 4b66242496..896e0d27cb 100644 --- a/tests/bits/find_cell_10.cc +++ b/tests/bits/find_cell_10.cc @@ -23,17 +23,17 @@ /* #2 0x00007fffed53f20a in __backtrace_symbols (array=0x7fffffffc610, size=9) at ../sysdeps/generic/elf/backtracesyms.c:52 -#3 0x00007ffff585cd9d in dealii::ExceptionBase::set_fields (this=0x7fffffffc870, - f=0x7ffff668dec0 "/scratch/deal-trunk/deal.II/source/fe/mapping_q1.cc", l=1803, +#3 0x00007ffff585cd9d in dealii::ExceptionBase::set_fields (this=0x7fffffffc870, + f=0x7ffff668dec0 "/scratch/deal-trunk/deal.II/source/fe/mapping_q1.cc", l=1803, func=0x7ffff6699be0 "dealii::Point dealii::MappingQ1::transform_real_to_unit_cell_internal(const typename dealii::Triangulation::cell_iterator&, const dealii::Point&, const dea"..., c=0x7ffff668dea5 "false", e=0x7ffff668e1c0 "(typename Mapping::ExcTransformationFailed())") at /scratch/deal-trunk/deal.II/source/base/exceptions.cc:124 -#4 0x00007ffff4663508 in dealii::deal_II_exceptions::internals::issue_error_throw::ExcTransformationFailed> (file=0x7ffff668dec0 "/scratch/deal-trunk/deal.II/source/fe/mapping_q1.cc", line=1803, - function=0x7ffff6699be0 "dealii::Point dealii::MappingQ1::transform_real_to_unit_cell_internal(const typename dealii::Triangulation::cell_iterator&, const dealii::Point&, const dea"..., cond=0x7ffff668dea5 "false", +#4 0x00007ffff4663508 in dealii::deal_II_exceptions::internals::issue_error_throw::ExcTransformationFailed> (file=0x7ffff668dec0 "/scratch/deal-trunk/deal.II/source/fe/mapping_q1.cc", line=1803, + function=0x7ffff6699be0 "dealii::Point dealii::MappingQ1::transform_real_to_unit_cell_internal(const typename dealii::Triangulation::cell_iterator&, const dealii::Point&, const dea"..., cond=0x7ffff668dea5 "false", exc_name=0x7ffff668e1c0 "(typename Mapping::ExcTransformationFailed())", e=...) at /scratch/deal-trunk/deal.II/include/deal.II/base/exceptions.h:245 -#5 0x00007ffff46505cb in dealii::MappingQ1<2, 2>::transform_real_to_unit_cell_internal (this=0x7ffff7dd9560, +#5 0x00007ffff46505cb in dealii::MappingQ1<2, 2>::transform_real_to_unit_cell_internal (this=0x7ffff7dd9560, cell=..., p=..., initial_p_unit=..., mdata=...) at /scratch/deal-trunk/deal.II/source/fe/mapping_q1.cc:1803 -#6 0x00007ffff464dd6b in dealii::MappingQ1<2, 2>::transform_real_to_unit_cell (this=0x7ffff7dd9560, cell=..., +#6 0x00007ffff464dd6b in dealii::MappingQ1<2, 2>::transform_real_to_unit_cell (this=0x7ffff7dd9560, cell=..., p=...) at /scratch/deal-trunk/deal.II/source/fe/mapping_q1.cc:1683 #7 0x00007ffff5a1d467 in dealii::GridTools::find_active_cell_around_point<2, dealii::DoFHandler, 2> ( mapping=..., container=..., p=...) at /scratch/deal-trunk/deal.II/source/grid/grid_tools.cc:892 @@ -75,7 +75,7 @@ using namespace dealii; void test() { - Triangulation<2> triangulation; + Triangulation<2> triangulation; FE_Q<2> fe(1); DoFHandler<2> dof_handler(triangulation); @@ -85,26 +85,26 @@ void test() grid_in1.read_msh(input_file1); dof_handler.distribute_dofs (fe); - + Point< 2 > ePos; ePos(0) = 0.0653630060373507487669897386695; ePos(1) = 1125.59175030825804242340382189; MappingQ<2> mapping(1); - MappingQ1<2> & mapping2 = StaticMappingQ1< 2 >::mapping; + MappingQ1<2> &mapping2 = StaticMappingQ1< 2 >::mapping; deallog << "1:" << std::endl; GridTools::find_active_cell_around_point (mapping, dof_handler, ePos); deallog << "2:" << std::endl; - //this second call seems to hang/crash: + //this second call seems to hang/crash: GridTools::find_active_cell_around_point (mapping2, dof_handler, ePos); deallog << "done" << std::endl; } -int main (int argc, char **argv) +int main (int argc, char **argv) { initlog(__FILE__); test(); - + return 0; } diff --git a/tests/bits/find_cell_2.cc b/tests/bits/find_cell_2.cc index 6237fd4b7b..dec1878db5 100644 --- a/tests/bits/find_cell_2.cc +++ b/tests/bits/find_cell_2.cc @@ -35,7 +35,7 @@ void check (Triangulation<3> &tria) { Point<3> p(1./3.,1./2.,1./5.); - + Triangulation<3>::active_cell_iterator cell = GridTools::find_active_cell_around_point (tria, p); @@ -45,25 +45,25 @@ void check (Triangulation<3> &tria) deallog << std::endl; Assert (p.distance (cell->center()) < cell->diameter()/2, - ExcInternalError()); + ExcInternalError()); } -int main () +int main () { std::ofstream logfile("find_cell_2/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<3> coarse_grid; GridGenerator::hyper_cube (coarse_grid); coarse_grid.refine_global (2); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); static const HyperBallBoundary<3> boundary; @@ -73,5 +73,5 @@ int main () } } - - + + diff --git a/tests/bits/find_cell_3.cc b/tests/bits/find_cell_3.cc index e45e703cc2..7ce01cd8a7 100644 --- a/tests/bits/find_cell_3.cc +++ b/tests/bits/find_cell_3.cc @@ -35,7 +35,7 @@ void check (Triangulation<3> &tria) { Point<3> p(1./3.,1./2.,-1./5.); - + Triangulation<3>::active_cell_iterator cell = GridTools::find_active_cell_around_point (tria, p); @@ -45,39 +45,39 @@ void check (Triangulation<3> &tria) deallog << std::endl; Assert (p.distance (cell->center()) < cell->diameter()/2, - ExcInternalError()); + ExcInternalError()); } -int main () +int main () { std::ofstream logfile("find_cell_3/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<3> coarse_grid; create_two_cubes (coarse_grid); coarse_grid.refine_global (1); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; create_L_shape (coarse_grid); coarse_grid.refine_global (1); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); coarse_grid.refine_global (1); check (coarse_grid); } - + } - - + + diff --git a/tests/bits/find_cell_4.cc b/tests/bits/find_cell_4.cc index 2d2337cb69..028b0c56a6 100644 --- a/tests/bits/find_cell_4.cc +++ b/tests/bits/find_cell_4.cc @@ -36,7 +36,7 @@ void check (Triangulation<3> &tria) { Point<3> p (0.75,0,0); - + Triangulation<3>::active_cell_iterator cell = GridTools::find_active_cell_around_point (tria, p); @@ -47,22 +47,22 @@ void check (Triangulation<3> &tria) // Transform back and forth Point<3> pp = - StaticMappingQ1<3>::mapping.transform_unit_to_real_cell - ( cell, - GeometryInfo<3>::project_to_unit_cell - ( - StaticMappingQ1<3>::mapping.transform_real_to_unit_cell - ( cell, - p - ) - ) - ); - + StaticMappingQ1<3>::mapping.transform_unit_to_real_cell + ( cell, + GeometryInfo<3>::project_to_unit_cell + ( + StaticMappingQ1<3>::mapping.transform_real_to_unit_cell + ( cell, + p + ) + ) + ); + Assert (p.distance (pp) < 1e-15, ExcInternalError()); } -int main () +int main () { std::ofstream logfile("find_cell_4/output"); deallog.attach(logfile); @@ -78,11 +78,11 @@ int main () } catch (const std::exception &exc) { - // we shouldn't get here... + // we shouldn't get here... deallog << "Caught an error..." << std::endl; deallog << exc.what() << std::endl; } } - - + + diff --git a/tests/bits/find_cell_5.cc b/tests/bits/find_cell_5.cc index a79badf990..0abd7967a1 100644 --- a/tests/bits/find_cell_5.cc +++ b/tests/bits/find_cell_5.cc @@ -39,7 +39,7 @@ void check (Triangulation<3> &tria) { Point<3> p (0.75,0.75,0.75); - + Triangulation<3>::active_cell_iterator cell = GridTools::find_active_cell_around_point (tria, p); @@ -50,23 +50,23 @@ void check (Triangulation<3> &tria) // Transform back and forth Point<3> pp = - StaticMappingQ1<3>::mapping.transform_unit_to_real_cell - ( cell, - GeometryInfo<3>::project_to_unit_cell - ( - StaticMappingQ1<3>::mapping.transform_real_to_unit_cell - ( cell, - p - ) - ) - ); - + StaticMappingQ1<3>::mapping.transform_unit_to_real_cell + ( cell, + GeometryInfo<3>::project_to_unit_cell + ( + StaticMappingQ1<3>::mapping.transform_real_to_unit_cell + ( cell, + p + ) + ) + ); + Assert (p.distance (pp) < 1e-15, ExcInternalError()); } -int main () +int main () { std::ofstream logfile("find_cell_5/output"); deallog.attach(logfile); @@ -82,11 +82,11 @@ int main () } catch (const std::exception &exc) { - // we shouldn't get here... + // we shouldn't get here... deallog << "Caught an error..." << std::endl; deallog << exc.what() << std::endl; } } - - + + diff --git a/tests/bits/find_cell_6.cc b/tests/bits/find_cell_6.cc index d3bfb38064..6ba7fdd21f 100644 --- a/tests/bits/find_cell_6.cc +++ b/tests/bits/find_cell_6.cc @@ -35,9 +35,9 @@ bool inside(Triangulation<3> &tria, Point<3> &p) { - for(Triangulation<3>::cell_iterator cell = tria.begin(0); - cell != tria.end(0); ++cell) - if( cell->point_inside (p) ) + for (Triangulation<3>::cell_iterator cell = tria.begin(0); + cell != tria.end(0); ++cell) + if ( cell->point_inside (p) ) return true; return false; @@ -59,7 +59,7 @@ void check2 () for (Triangulation<3>::active_cell_iterator cell = tria.begin_active(); cell!=tria.end(); ++cell, ++idx) { if (idx==21) - cell->set_refine_flag(); + cell->set_refine_flag(); } tria.execute_coarsening_and_refinement (); @@ -74,23 +74,23 @@ void check1 () GridGenerator::hyper_cube (tria); tria.refine_global (3); - for (int i=0;i<3;++i) + for (int i=0; i<3; ++i) { - for (int j=0;j<1000;++j) - { - Point<3> p ((rand()%1000)/1000.0,(rand()%1000)/1000.0,(rand()%1000)/1000.0); - if (!inside(tria, p)) - deallog << "NOT INSIDE" << std::endl; - GridTools::find_active_cell_around_point(tria, p); - } - - for(Triangulation<3>::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() && (rand()%5)==1) - cell->set_refine_flag(); - } + for (int j=0; j<1000; ++j) + { + Point<3> p ((rand()%1000)/1000.0,(rand()%1000)/1000.0,(rand()%1000)/1000.0); + if (!inside(tria, p)) + deallog << "NOT INSIDE" << std::endl; + GridTools::find_active_cell_around_point(tria, p); + } + + for (Triangulation<3>::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() && (rand()%5)==1) + cell->set_refine_flag(); + } tria.execute_coarsening_and_refinement(); } @@ -110,7 +110,7 @@ int main () } catch (const std::exception &exc) { - // we shouldn't get here... + // we shouldn't get here... deallog << "Caught an error..." << std::endl; deallog << exc.what() << std::endl; } diff --git a/tests/bits/find_cell_7.cc b/tests/bits/find_cell_7.cc index aee644dce1..33dd209c69 100644 --- a/tests/bits/find_cell_7.cc +++ b/tests/bits/find_cell_7.cc @@ -43,9 +43,9 @@ bool inside(Triangulation<3> &tria, Point<3> &p) { - for(Triangulation<3>::cell_iterator cell = tria.begin(0); - cell != tria.end(0); ++cell) - if( cell->point_inside (p) ) + for (Triangulation<3>::cell_iterator cell = tria.begin(0); + cell != tria.end(0); ++cell) + if ( cell->point_inside (p) ) return true; return false; @@ -65,7 +65,7 @@ void check2 () for (Triangulation<3>::active_cell_iterator cell = tria.begin_active(); cell!=tria.end(); ++cell, ++idx) { if (idx==21) - cell->set_refine_flag(); + cell->set_refine_flag(); } tria.execute_coarsening_and_refinement (); @@ -99,7 +99,7 @@ int main () } catch (const std::exception &exc) { - // we shouldn't get here... + // we shouldn't get here... deallog << "Caught an error..." << std::endl; deallog << exc.what() << std::endl; } diff --git a/tests/bits/find_cell_8.cc b/tests/bits/find_cell_8.cc index ae90377707..56c307f8ae 100644 --- a/tests/bits/find_cell_8.cc +++ b/tests/bits/find_cell_8.cc @@ -32,50 +32,50 @@ #include -void create_coarse_grid(Triangulation<2>& coarse_grid) +void create_coarse_grid(Triangulation<2> &coarse_grid) { - static const Point<2> vertices_1[] - = { Point<2> (0., 0.),//0 - Point<2> (1., 0.),//1 - Point<2> (1., 1.),//2 - Point<2> (0., 1.),//3 - Point<2> (1.3, 0.),//4 - Point<2> (1.3, 1./2.),//5 - }; - 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<2>::vertices_per_cell] - = {{0, 1, 3, 2}, - {1, 4, 2, 5}, - }; - const unsigned int - n_cells = sizeof(cell_vertices) / sizeof(cell_vertices[0]); - - std::vector > cells (n_cells, CellData<2>()); - for (unsigned int i=0; i::vertices_per_cell; - ++j) - cells[i].vertices[j] = cell_vertices[i][j]; - cells[i].material_id = 0; - } - - coarse_grid.create_triangulation (vertices, - cells, - SubCellData()); + static const Point<2> vertices_1[] + = { Point<2> (0., 0.),//0 + Point<2> (1., 0.),//1 + Point<2> (1., 1.),//2 + Point<2> (0., 1.),//3 + Point<2> (1.3, 0.),//4 + Point<2> (1.3, 1./2.),//5 + }; + 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<2>::vertices_per_cell] + = {{0, 1, 3, 2}, + {1, 4, 2, 5}, + }; + const unsigned int + n_cells = sizeof(cell_vertices) / sizeof(cell_vertices[0]); + + std::vector > cells (n_cells, CellData<2>()); + for (unsigned int i=0; i::vertices_per_cell; + ++j) + cells[i].vertices[j] = cell_vertices[i][j]; + cells[i].material_id = 0; + } + + coarse_grid.create_triangulation (vertices, + cells, + SubCellData()); } void check (Triangulation<2> &tria) { Point<2> p (0.99, 1./2.); - + Triangulation<2>::active_cell_iterator cell = GridTools::find_active_cell_around_point (tria, p); @@ -85,23 +85,23 @@ void check (Triangulation<2> &tria) deallog << std::endl; Assert (p.distance (cell->center()) < cell->diameter()/2, - ExcInternalError()); + ExcInternalError()); } -int main () +int main () { std::ofstream logfile("find_cell_8/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<2> coarse_grid; create_coarse_grid(coarse_grid); check (coarse_grid); } } - - + + diff --git a/tests/bits/find_cell_9.cc b/tests/bits/find_cell_9.cc index 51b009e318..11d1500d82 100644 --- a/tests/bits/find_cell_9.cc +++ b/tests/bits/find_cell_9.cc @@ -32,53 +32,53 @@ #include -void create_coarse_grid(Triangulation<2>& coarse_grid) +void create_coarse_grid(Triangulation<2> &coarse_grid) { - static const Point<2> vertices_1[] - = { Point<2> (0., 0.),//0 - Point<2> (1., 0.),//1 - Point<2> (1., 1.),//2 - Point<2> (0., 1.),//3 - - Point<2> (1.1, 0.),//4 - Point<2> (1.1, 1./2.),//5 - Point<2> (1.3, 0.),//6 - Point<2> (1.3, 1./2.),//7 - }; - 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<2>::vertices_per_cell] - = {{0, 1, 3, 2}, - {4, 6, 5, 7}, - }; - const unsigned int - n_cells = sizeof(cell_vertices) / sizeof(cell_vertices[0]); - - std::vector > cells (n_cells, CellData<2>()); - for (unsigned int i=0; i::vertices_per_cell; - ++j) - cells[i].vertices[j] = cell_vertices[i][j]; - cells[i].material_id = 0; - } - - coarse_grid.create_triangulation (vertices, - cells, - SubCellData()); + static const Point<2> vertices_1[] + = { Point<2> (0., 0.),//0 + Point<2> (1., 0.),//1 + Point<2> (1., 1.),//2 + Point<2> (0., 1.),//3 + + Point<2> (1.1, 0.),//4 + Point<2> (1.1, 1./2.),//5 + Point<2> (1.3, 0.),//6 + Point<2> (1.3, 1./2.),//7 + }; + 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<2>::vertices_per_cell] + = {{0, 1, 3, 2}, + {4, 6, 5, 7}, + }; + const unsigned int + n_cells = sizeof(cell_vertices) / sizeof(cell_vertices[0]); + + std::vector > cells (n_cells, CellData<2>()); + for (unsigned int i=0; i::vertices_per_cell; + ++j) + cells[i].vertices[j] = cell_vertices[i][j]; + cells[i].material_id = 0; + } + + coarse_grid.create_triangulation (vertices, + cells, + SubCellData()); } void check (Triangulation<2> &tria) { Point<2> p (0.99, 1./2.); - + Triangulation<2>::active_cell_iterator cell = GridTools::find_active_cell_around_point (tria, p); @@ -88,23 +88,23 @@ void check (Triangulation<2> &tria) deallog << std::endl; Assert (p.distance (cell->center()) < cell->diameter()/2, - ExcInternalError()); + ExcInternalError()); } -int main () +int main () { std::ofstream logfile("find_cell_9/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<2> coarse_grid; create_coarse_grid(coarse_grid); check (coarse_grid); } } - - + + diff --git a/tests/bits/find_cell_alt_1.cc b/tests/bits/find_cell_alt_1.cc index f36f077b46..5fb137beea 100644 --- a/tests/bits/find_cell_alt_1.cc +++ b/tests/bits/find_cell_alt_1.cc @@ -38,12 +38,12 @@ void check (Triangulation<2> &tria) { - MappingQ<2> map(3); // Let's take a higher order mapping - + MappingQ<2> map(3); // Let's take a higher order mapping + Point<2> p (1./3., 1./2.); - + std::pair::active_cell_iterator, Point<2> > - cell = GridTools::find_active_cell_around_point (map, tria, p); + cell = GridTools::find_active_cell_around_point (map, tria, p); deallog << cell.first << std::endl; for (unsigned int v=0; v::vertices_per_cell; ++v) @@ -52,25 +52,25 @@ void check (Triangulation<2> &tria) deallog << std::endl; Assert (p.distance (cell.first->center()) < cell.first->diameter()/2, - ExcInternalError()); + ExcInternalError()); } -int main () +int main () { std::ofstream logfile("find_cell_alt_1/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<2> coarse_grid; GridGenerator::hyper_cube (coarse_grid); coarse_grid.refine_global (2); check (coarse_grid); } - - { + + { Triangulation<2> coarse_grid; GridGenerator::hyper_ball (coarse_grid); static const HyperBallBoundary<2> boundary; @@ -80,5 +80,5 @@ int main () } } - - + + diff --git a/tests/bits/find_cell_alt_2.cc b/tests/bits/find_cell_alt_2.cc index bec9408eb3..3e398a56f1 100644 --- a/tests/bits/find_cell_alt_2.cc +++ b/tests/bits/find_cell_alt_2.cc @@ -36,10 +36,10 @@ void check (Triangulation<3> &tria) { - MappingQ<3> map(3); - + MappingQ<3> map(3); + Point<3> p(1./3.,1./2.,1./5.); - + std::pair::active_cell_iterator, Point<3> > cell = GridTools::find_active_cell_around_point (map, tria, p); @@ -51,25 +51,25 @@ void check (Triangulation<3> &tria) deallog << std::endl << std::endl; Assert (p.distance (cell.first->center()) < cell.first->diameter()/2, - ExcInternalError()); + ExcInternalError()); } -int main () +int main () { std::ofstream logfile("find_cell_alt_2/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<3> coarse_grid; GridGenerator::hyper_cube (coarse_grid); coarse_grid.refine_global (2); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); static const HyperBallBoundary<3> boundary; @@ -79,5 +79,5 @@ int main () } } - - + + diff --git a/tests/bits/find_cell_alt_3.cc b/tests/bits/find_cell_alt_3.cc index 48d0cf3de6..f1ffd53aaa 100644 --- a/tests/bits/find_cell_alt_3.cc +++ b/tests/bits/find_cell_alt_3.cc @@ -36,10 +36,10 @@ void check (Triangulation<3> &tria) { - MappingQ<3> map(3); - + MappingQ<3> map(3); + Point<3> p(1./3.,1./2.,-1./5.); - + std::pair::active_cell_iterator, Point<3> > cell = GridTools::find_active_cell_around_point (map, tria, p); @@ -50,39 +50,39 @@ void check (Triangulation<3> &tria) deallog << std::endl; Assert (p.distance (cell.first->center()) < cell.first->diameter()/2, - ExcInternalError()); + ExcInternalError()); } -int main () +int main () { std::ofstream logfile("find_cell_alt_3/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<3> coarse_grid; create_two_cubes (coarse_grid); coarse_grid.refine_global (1); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; create_L_shape (coarse_grid); coarse_grid.refine_global (1); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); coarse_grid.refine_global (1); check (coarse_grid); } - + } - - + + diff --git a/tests/bits/find_cell_alt_4.cc b/tests/bits/find_cell_alt_4.cc index e900d77bb0..5330115184 100644 --- a/tests/bits/find_cell_alt_4.cc +++ b/tests/bits/find_cell_alt_4.cc @@ -35,10 +35,10 @@ void check (Triangulation<3> &tria) { - MappingQ1<3> map; - + MappingQ1<3> map; + Point<3> p (0.75,0,0); - + std::pair::active_cell_iterator, Point<3> > cell = GridTools::find_active_cell_around_point (map, tria, p); @@ -56,7 +56,7 @@ void check (Triangulation<3> &tria) } -int main () +int main () { std::ofstream logfile("find_cell_alt_4/output"); deallog.attach(logfile); @@ -72,11 +72,11 @@ int main () } catch (const std::exception &exc) { - // we shouldn't get here... + // we shouldn't get here... deallog << "Caught an error..." << std::endl; deallog << exc.what() << std::endl; } } - - + + diff --git a/tests/bits/find_cell_alt_5.cc b/tests/bits/find_cell_alt_5.cc index fd05c80b34..63840c84e6 100644 --- a/tests/bits/find_cell_alt_5.cc +++ b/tests/bits/find_cell_alt_5.cc @@ -35,9 +35,9 @@ void check (Triangulation<3> &tria) { - MappingQ1<3> map; + MappingQ1<3> map; Point<3> p (0.75,0.75,0.75); - + std::pair::active_cell_iterator, Point<3> > cell = GridTools::find_active_cell_around_point (map, tria, p); @@ -48,11 +48,11 @@ void check (Triangulation<3> &tria) deallog << std::endl; Assert (GeometryInfo<3>::distance_to_unit_cell(cell.second) < 1e-10, - ExcInternalError()); + ExcInternalError()); } -int main () +int main () { std::ofstream logfile("find_cell_alt_5/output"); deallog.attach(logfile); @@ -68,11 +68,11 @@ int main () } catch (const std::exception &exc) { - // we shouldn't get here... + // we shouldn't get here... deallog << "Caught an error..." << std::endl; deallog << exc.what() << std::endl; } } - - + + diff --git a/tests/bits/find_cell_alt_6.cc b/tests/bits/find_cell_alt_6.cc index f2f2dc68bb..baa3591107 100644 --- a/tests/bits/find_cell_alt_6.cc +++ b/tests/bits/find_cell_alt_6.cc @@ -47,23 +47,23 @@ void check (Triangulation<2> &tria) { - const std::vector > &v = tria.get_vertices(); - MappingQ1<2> map; - - for(unsigned i=0; i::active_cell_iterator, Point<2> > - cell = GridTools::find_active_cell_around_point(map, tria, v[i]); - - deallog << "Vertex <" << v[i] << "> found in cell "; - for (unsigned int v=0; v::vertices_per_cell; ++v) - deallog << "<" << cell.first->vertex(v) << "> "; - deallog << " [local: " << cell.second << "]" << std::endl; - } + const std::vector > &v = tria.get_vertices(); + MappingQ1<2> map; + + for (unsigned i=0; i::active_cell_iterator, Point<2> > + cell = GridTools::find_active_cell_around_point(map, tria, v[i]); + + deallog << "Vertex <" << v[i] << "> found in cell "; + for (unsigned int v=0; v::vertices_per_cell; ++v) + deallog << "<" << cell.first->vertex(v) << "> "; + deallog << " [local: " << cell.second << "]" << std::endl; + } } -int main () +int main () { std::ofstream logfile("find_cell_alt_6/output"); deallog.attach(logfile); @@ -81,11 +81,11 @@ int main () } catch (const std::exception &exc) { - // we shouldn't get here... + // we shouldn't get here... deallog << "Caught an error..." << std::endl; deallog << exc.what() << std::endl; } } - - + + diff --git a/tests/bits/find_cell_alt_7.cc b/tests/bits/find_cell_alt_7.cc index e6f1d70459..256c8f7076 100644 --- a/tests/bits/find_cell_alt_7.cc +++ b/tests/bits/find_cell_alt_7.cc @@ -35,41 +35,41 @@ void check (Triangulation<2> &tria) { - MappingQ<2> map(5); - - // Test for a number of points, every ten degrees - for(unsigned int i=0; i<200; i++) - { - Point<2> p(std::sin((double)i/100.*M_PI), std::cos((double)i/100.*M_PI)); - p *= 1.-1e-8; - - std::pair::active_cell_iterator, Point<2> > cell - = GridTools::find_active_cell_around_point (map, tria, p); - - deallog << cell.first << std::endl; - for (unsigned int v=0; v::vertices_per_cell; ++v) - deallog << "<" << cell.first->vertex(v) << "> "; - deallog << "[ " << cell.second << " ] "; - - // Now transform back and check distance - Point<2> pp = map.transform_unit_to_real_cell(cell.first, GeometryInfo<2>::project_to_unit_cell(cell.second)); - deallog << pp.distance(p) << std::endl; - Assert (pp.distance(p) < 1.e-12, - ExcInternalError()); - } - + MappingQ<2> map(5); + + // Test for a number of points, every ten degrees + for (unsigned int i=0; i<200; i++) + { + Point<2> p(std::sin((double)i/100.*M_PI), std::cos((double)i/100.*M_PI)); + p *= 1.-1e-8; + + std::pair::active_cell_iterator, Point<2> > cell + = GridTools::find_active_cell_around_point (map, tria, p); + + deallog << cell.first << std::endl; + for (unsigned int v=0; v::vertices_per_cell; ++v) + deallog << "<" << cell.first->vertex(v) << "> "; + deallog << "[ " << cell.second << " ] "; + + // Now transform back and check distance + Point<2> pp = map.transform_unit_to_real_cell(cell.first, GeometryInfo<2>::project_to_unit_cell(cell.second)); + deallog << pp.distance(p) << std::endl; + Assert (pp.distance(p) < 1.e-12, + ExcInternalError()); + } + } -int main () +int main () { std::ofstream logfile("find_cell_alt_7/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<2> coarse_grid; GridGenerator::hyper_ball (coarse_grid); static const HyperBallBoundary<2> boundary; @@ -79,5 +79,5 @@ int main () } } - - + + diff --git a/tests/bits/find_cells_adjacent_to_vertex_1.cc b/tests/bits/find_cells_adjacent_to_vertex_1.cc index e432a15143..f874d6b109 100644 --- a/tests/bits/find_cells_adjacent_to_vertex_1.cc +++ b/tests/bits/find_cells_adjacent_to_vertex_1.cc @@ -45,18 +45,19 @@ void check (Triangulation<2> &tria) { - for(unsigned i=0; i::active_cell_iterator> - cells = GridTools::find_cells_adjacent_to_vertex(tria, i); + cells = GridTools::find_cells_adjacent_to_vertex(tria, i); deallog << "Vertex " << i << " at " << tria.get_vertices()[i] << ": " << cells.size() << " cells" << std::endl; - for(unsigned c=0; c::vertices_per_cell; ++v) - deallog << "<" << cells[c]->vertex(v) << "> "; - deallog << std::endl; - } + for (unsigned c=0; c::vertices_per_cell; ++v) + deallog << "<" << cells[c]->vertex(v) << "> "; + deallog << std::endl; + } } } @@ -79,7 +80,7 @@ int main () } catch (const std::exception &exc) { - // we shouldn't get here... + // we shouldn't get here... deallog << "Caught an error..." << std::endl; deallog << exc.what() << std::endl; } diff --git a/tests/bits/find_cells_adjacent_to_vertex_2.cc b/tests/bits/find_cells_adjacent_to_vertex_2.cc index 8aa7401f04..fc9e4c486e 100644 --- a/tests/bits/find_cells_adjacent_to_vertex_2.cc +++ b/tests/bits/find_cells_adjacent_to_vertex_2.cc @@ -34,15 +34,15 @@ void check (Triangulation<3> &tria) { - for(unsigned i=0; i::active_cell_iterator> - cells = GridTools::find_cells_adjacent_to_vertex(tria, i); + cells = GridTools::find_cells_adjacent_to_vertex(tria, i); deallog << "Vertex " << i << " at " << tria.get_vertices()[i] << ": " << cells.size() << " cells" << std::endl; - for(unsigned c=0; c &tria) { - for(unsigned i=0; i::active_cell_iterator> - cells = GridTools::find_cells_adjacent_to_vertex(tria, i); + cells = GridTools::find_cells_adjacent_to_vertex(tria, i); deallog << "Vertex " << i << " at " - << tria.get_vertices()[i] << ": " - << cells.size() << " cells" << std::endl; + << tria.get_vertices()[i] << ": " + << cells.size() << " cells" << std::endl; - for(unsigned c=0; c > vertices; vertices.push_back (Point()); for (unsigned int i=0; i<16; ++i) - vertices.push_back (Point(std::cos(i*2*numbers::PI/16), - std::sin(i*2*numbers::PI/16))); + vertices.push_back (Point(std::cos(i*2*numbers::PI/16), + std::sin(i*2*numbers::PI/16))); - // now create the 8 cells + // now create the 8 cells std::vector > cells; for (unsigned int c=0; c<8; ++c) - { - CellData d; - d.vertices[0] = 0; - d.vertices[1] = 1+2*c; - d.vertices[2] = 1+((2*c+2) % 16); - d.vertices[3] = 1+2*c+1; - cells.push_back(d); - } + { + CellData d; + d.vertices[0] = 0; + d.vertices[1] = 1+2*c; + d.vertices[2] = 1+((2*c+2) % 16); + d.vertices[3] = 1+2*c+1; + cells.push_back(d); + } Triangulation coarse_grid; coarse_grid.create_triangulation (vertices, cells, - SubCellData()); + SubCellData()); check (coarse_grid); } catch (const std::exception &exc) { - // we shouldn't get here... + // we shouldn't get here... deallog << "Caught an error..." << std::endl; deallog << exc.what() << std::endl; } diff --git a/tests/bits/find_cells_adjacent_to_vertex_4.cc b/tests/bits/find_cells_adjacent_to_vertex_4.cc index 4562796dca..338813525b 100644 --- a/tests/bits/find_cells_adjacent_to_vertex_4.cc +++ b/tests/bits/find_cells_adjacent_to_vertex_4.cc @@ -34,17 +34,17 @@ void check (Triangulation<2> &tria) { - for(unsigned i=0; i::active_cell_iterator> - cells = GridTools::find_cells_adjacent_to_vertex(tria, i); + cells = GridTools::find_cells_adjacent_to_vertex(tria, i); deallog << "Vertex " << i << " at " - << tria.get_vertices()[i] << ": " - << cells.size() << " cells" << std::endl; + << tria.get_vertices()[i] << ": " + << cells.size() << " cells" << std::endl; - for(unsigned c=0; c > vertices; vertices.push_back (Point()); for (unsigned int i=0; i<16; ++i) - vertices.push_back (Point(std::cos(i*2*numbers::PI/16), - std::sin(i*2*numbers::PI/16))); + vertices.push_back (Point(std::cos(i*2*numbers::PI/16), + std::sin(i*2*numbers::PI/16))); - // now create the 8 cells + // now create the 8 cells std::vector > cells; for (unsigned int c=0; c<8; ++c) - { - CellData d; - d.vertices[0] = 0; - d.vertices[1] = 1+2*c; - d.vertices[2] = 1+((2*c+2) % 16); - d.vertices[3] = 1+2*c+1; - cells.push_back(d); - } + { + CellData d; + d.vertices[0] = 0; + d.vertices[1] = 1+2*c; + d.vertices[2] = 1+((2*c+2) % 16); + d.vertices[3] = 1+2*c+1; + cells.push_back(d); + } Triangulation coarse_grid; coarse_grid.create_triangulation (vertices, cells, - SubCellData()); + SubCellData()); - // now also refine one cell + // now also refine one cell coarse_grid.begin_active()->set_refine_flag(); coarse_grid.execute_coarsening_and_refinement(); @@ -94,7 +94,7 @@ int main () } catch (const std::exception &exc) { - // we shouldn't get here... + // we shouldn't get here... deallog << "Caught an error..." << std::endl; deallog << exc.what() << std::endl; } diff --git a/tests/bits/find_cells_adjacent_to_vertex_5.cc b/tests/bits/find_cells_adjacent_to_vertex_5.cc index 721dc738c5..c595b5be71 100644 --- a/tests/bits/find_cells_adjacent_to_vertex_5.cc +++ b/tests/bits/find_cells_adjacent_to_vertex_5.cc @@ -33,17 +33,17 @@ void check (Triangulation<3> &tria) { - for(unsigned i=0; i::active_cell_iterator> - cells = GridTools::find_cells_adjacent_to_vertex(tria, i); + cells = GridTools::find_cells_adjacent_to_vertex(tria, i); deallog << "Vertex " << i << " at " - << tria.get_vertices()[i] << ": " - << cells.size() << " cells" << std::endl; + << tria.get_vertices()[i] << ": " + << cells.size() << " cells" << std::endl; - for(unsigned c=0; c > vertices; vertices.push_back (Point(0,0,0)); for (unsigned int i=0; i<16; ++i) - vertices.push_back (Point(std::cos(i*2*numbers::PI/16), - std::sin(i*2*numbers::PI/16), - 0)); + vertices.push_back (Point(std::cos(i*2*numbers::PI/16), + std::sin(i*2*numbers::PI/16), + 0)); - // then extrude the mesh into - // z-direction + // then extrude the mesh into + // z-direction for (unsigned int i=0; i<17; ++i) - vertices.push_back (Point(vertices[i][0], - vertices[i][1], - 1)); + vertices.push_back (Point(vertices[i][0], + vertices[i][1], + 1)); - // now create the 8 cells + // now create the 8 cells std::vector > cells; for (unsigned int c=0; c<8; ++c) - { - CellData d; - d.vertices[0] = 0; - d.vertices[1] = 1+2*c; - d.vertices[2] = 1+((2*c+2) % 16); - d.vertices[3] = 1+2*c+1; + { + CellData d; + d.vertices[0] = 0; + d.vertices[1] = 1+2*c; + d.vertices[2] = 1+((2*c+2) % 16); + d.vertices[3] = 1+2*c+1; - for (unsigned int v=4; v<8; ++v) - d.vertices[v] = d.vertices[v-4]+17; + for (unsigned int v=4; v<8; ++v) + d.vertices[v] = d.vertices[v-4]+17; - cells.push_back(d); - } + cells.push_back(d); + } Triangulation coarse_grid; coarse_grid.create_triangulation (vertices, cells, - SubCellData()); + SubCellData()); check (coarse_grid); } catch (const std::exception &exc) { - // we shouldn't get here... + // we shouldn't get here... deallog << "Caught an error..." << std::endl; deallog << exc.what() << std::endl; } diff --git a/tests/bits/find_cells_adjacent_to_vertex_6.cc b/tests/bits/find_cells_adjacent_to_vertex_6.cc index 9fd8179093..f0e6552550 100644 --- a/tests/bits/find_cells_adjacent_to_vertex_6.cc +++ b/tests/bits/find_cells_adjacent_to_vertex_6.cc @@ -38,17 +38,17 @@ void check (Triangulation<3> &tria) { - for(unsigned i=0; i::active_cell_iterator> - cells = GridTools::find_cells_adjacent_to_vertex(tria, i); + cells = GridTools::find_cells_adjacent_to_vertex(tria, i); deallog << "Vertex " << i << " at " - << tria.get_vertices()[i] << ": " - << cells.size() << " cells" << std::endl; + << tria.get_vertices()[i] << ": " + << cells.size() << " cells" << std::endl; - for(unsigned c=0; c > vertices; vertices.push_back (Point(0,0,0)); for (unsigned int i=0; i<16; ++i) - vertices.push_back (Point(std::cos(i*2*numbers::PI/16), - std::sin(i*2*numbers::PI/16), - 0)); + vertices.push_back (Point(std::cos(i*2*numbers::PI/16), + std::sin(i*2*numbers::PI/16), + 0)); - // then extrude the mesh into - // z-direction + // then extrude the mesh into + // z-direction for (unsigned int i=0; i<17; ++i) - vertices.push_back (Point(vertices[i][0], - vertices[i][1], - 1)); + vertices.push_back (Point(vertices[i][0], + vertices[i][1], + 1)); - // now create the 8 cells + // now create the 8 cells std::vector > cells; for (unsigned int c=0; c<8; ++c) - { - CellData d; - d.vertices[0] = 0; - d.vertices[1] = 1+2*c; - d.vertices[2] = 1+((2*c+2) % 16); - d.vertices[3] = 1+2*c+1; + { + CellData d; + d.vertices[0] = 0; + d.vertices[1] = 1+2*c; + d.vertices[2] = 1+((2*c+2) % 16); + d.vertices[3] = 1+2*c+1; - for (unsigned int v=4; v<8; ++v) - d.vertices[v] = d.vertices[v-4]+17; + for (unsigned int v=4; v<8; ++v) + d.vertices[v] = d.vertices[v-4]+17; - cells.push_back(d); - } + cells.push_back(d); + } Triangulation coarse_grid; coarse_grid.create_triangulation (vertices, cells, - SubCellData()); + SubCellData()); - // now also refine one cell + // now also refine one cell coarse_grid.begin_active()->set_refine_flag(); coarse_grid.execute_coarsening_and_refinement(); @@ -110,7 +110,7 @@ int main () } catch (const std::exception &exc) { - // we shouldn't get here... + // we shouldn't get here... deallog << "Caught an error..." << std::endl; deallog << exc.what() << std::endl; } diff --git a/tests/bits/find_closest_vertex_1.cc b/tests/bits/find_closest_vertex_1.cc index ed3ee075fa..6a97f3fef3 100644 --- a/tests/bits/find_closest_vertex_1.cc +++ b/tests/bits/find_closest_vertex_1.cc @@ -36,15 +36,15 @@ void check (Triangulation<3> &tria) { - const std::vector > &v = tria.get_vertices(); - for(unsigned i=0; i(0.01, -0.01, 0.01)) << "] "; - + const std::vector > &v = tria.get_vertices(); + for (unsigned i=0; i(0.01, -0.01, 0.01)) << "] "; + deallog << std::endl; } -int main () +int main () { std::ofstream logfile("find_closest_vertex_1/output"); deallog.attach(logfile); @@ -60,11 +60,11 @@ int main () } catch (const std::exception &exc) { - // we shouldn't get here... + // we shouldn't get here... deallog << "Caught an error..." << std::endl; deallog << exc.what() << std::endl; } } - - + + diff --git a/tests/bits/full_matrix_02.cc b/tests/bits/full_matrix_02.cc index 312b8cb2d1..f7efe96df4 100644 --- a/tests/bits/full_matrix_02.cc +++ b/tests/bits/full_matrix_02.cc @@ -34,9 +34,9 @@ check () make_matrix (m); for (typename FullMatrix::const_iterator - p = m.begin(); p!=m.end(); ++p) + p = m.begin(); p!=m.end(); ++p) deallog << p->row() << ' ' << p->column() << ' ' - << p->value() - << std::endl; + << p->value() + << std::endl; } diff --git a/tests/bits/full_matrix_03.cc b/tests/bits/full_matrix_03.cc index f982cd5ff7..fd06b9fa0e 100644 --- a/tests/bits/full_matrix_03.cc +++ b/tests/bits/full_matrix_03.cc @@ -33,11 +33,11 @@ check () FullMatrix m; make_matrix (m); - + for (typename FullMatrix::const_iterator - p = m.begin(1); p!=m.end(1); ++p) + p = m.begin(1); p!=m.end(1); ++p) deallog << p->row() << ' ' << p->column() << ' ' - << p->value() - << std::endl; + << p->value() + << std::endl; } diff --git a/tests/bits/full_matrix_04.cc b/tests/bits/full_matrix_04.cc index e5dcb7b694..1f6c7b0800 100644 --- a/tests/bits/full_matrix_04.cc +++ b/tests/bits/full_matrix_04.cc @@ -31,11 +31,12 @@ void check () { const number array[] = { 1, 2, 3, 4, 5, - 6, 7, 8, 9, 0, - 1, 2, 3, 4, 5, - 6, 7, 8, 9, 0, - 1, 2, 3, 4, 5 }; - + 6, 7, 8, 9, 0, + 1, 2, 3, 4, 5, + 6, 7, 8, 9, 0, + 1, 2, 3, 4, 5 + }; + FullMatrix m (5,5,array); print_matrix (m); diff --git a/tests/bits/full_matrix_06.cc b/tests/bits/full_matrix_06.cc index 96376b0d5f..cf7ef67294 100644 --- a/tests/bits/full_matrix_06.cc +++ b/tests/bits/full_matrix_06.cc @@ -35,7 +35,7 @@ check () FullMatrix n; n = m; - + print_matrix (n); } diff --git a/tests/bits/full_matrix_08.cc b/tests/bits/full_matrix_08.cc index a1006a185f..544c750f04 100644 --- a/tests/bits/full_matrix_08.cc +++ b/tests/bits/full_matrix_08.cc @@ -35,7 +35,7 @@ check () FullMatrix n; n.copy_from (m); - + print_matrix (n); } diff --git a/tests/bits/full_matrix_1.cc b/tests/bits/full_matrix_1.cc index 3f6431051e..72f0b3c161 100644 --- a/tests/bits/full_matrix_1.cc +++ b/tests/bits/full_matrix_1.cc @@ -26,7 +26,7 @@ #include -int main () +int main () { std::ofstream logfile("full_matrix_1/output"); deallog.attach(logfile); @@ -52,8 +52,8 @@ int main () for (unsigned int i=0; i m(3,3); deallog << m.all_zero() << std::endl; - + make_matrix (m); deallog << m.all_zero() << std::endl; } diff --git a/tests/bits/full_matrix_13.cc b/tests/bits/full_matrix_13.cc index 194f523fe0..5bea78edc2 100644 --- a/tests/bits/full_matrix_13.cc +++ b/tests/bits/full_matrix_13.cc @@ -34,7 +34,7 @@ check () make_matrix (m); Vector v; make_vector (v); - + deallog << m.matrix_norm_square (v) << std::endl; } diff --git a/tests/bits/full_matrix_14.cc b/tests/bits/full_matrix_14.cc index 1e6d21dd23..68c5061beb 100644 --- a/tests/bits/full_matrix_14.cc +++ b/tests/bits/full_matrix_14.cc @@ -37,7 +37,7 @@ check () make_vector (w); for (unsigned int i=0; i m(n,n, array); print_matrix (m); deallog << m.determinant () << std::endl; diff --git a/tests/bits/full_matrix_24.cc b/tests/bits/full_matrix_24.cc index a281117cf5..8c265bdabb 100644 --- a/tests/bits/full_matrix_24.cc +++ b/tests/bits/full_matrix_24.cc @@ -34,7 +34,7 @@ check () make_matrix (m); make_matrix (n); m.add (3.14159, n); - + print_matrix (m); } diff --git a/tests/bits/full_matrix_37.cc b/tests/bits/full_matrix_37.cc index e6e2319106..5f1051242a 100644 --- a/tests/bits/full_matrix_37.cc +++ b/tests/bits/full_matrix_37.cc @@ -34,7 +34,7 @@ check () make_matrix (m); make_matrix (n); m.equ (3.14159, n); - + print_matrix (m); } diff --git a/tests/bits/full_matrix_42.cc b/tests/bits/full_matrix_42.cc index d9c711f424..3ce72436fe 100644 --- a/tests/bits/full_matrix_42.cc +++ b/tests/bits/full_matrix_42.cc @@ -33,11 +33,12 @@ check () for (unsigned int n=1; n<=5; ++n) { const number array[] = { 50, 2, 3, 4, 5, - 6, 50, 8, 9, 0, - 1, 2, 50, 4, 5, - 6, 7, 8, 50, 0, - 1, 2, 3, 4, 50 }; - + 6, 50, 8, 9, 0, + 1, 2, 50, 4, 5, + 6, 7, 8, 50, 0, + 1, 2, 3, 4, 50 + }; + FullMatrix m (n,n,array), p(n,n); p.invert (m); print_matrix (p); diff --git a/tests/bits/full_matrix_53.cc b/tests/bits/full_matrix_53.cc index ad355401dc..f34620fae8 100644 --- a/tests/bits/full_matrix_53.cc +++ b/tests/bits/full_matrix_53.cc @@ -28,11 +28,11 @@ std::string output_file_name = "full_matrix_53/output"; template void calculate(const FullMatrix A, - const FullMatrix B) + const FullMatrix B) { FullMatrix A_r_inv(A.n(),A.m()); - FullMatrix identity(A.m(),A.m()); + FullMatrix identity(A.m(),A.m()); A_r_inv.right_invert(A); deallog<<"A matrix"< void check () { - + FullMatrix A(1,2); - fill_matrix(A); + fill_matrix(A); FullMatrix B(2,1); fill_matrix(B); - calculate(A,B); + calculate(A,B); FullMatrix A1(2,3); - fill_matrix(A1); + fill_matrix(A1); FullMatrix B1(3,2); fill_matrix(B1); - calculate(A1,B1); + calculate(A1,B1); } diff --git a/tests/bits/full_matrix_55.cc b/tests/bits/full_matrix_55.cc index 510afce585..90b27de66f 100644 --- a/tests/bits/full_matrix_55.cc +++ b/tests/bits/full_matrix_55.cc @@ -34,7 +34,7 @@ check () FullMatrix m (5, 7); fill_matrix (m); print_matrix (m); - + m.swap_col (2, 4); print_matrix (m); diff --git a/tests/bits/full_matrix_56.cc b/tests/bits/full_matrix_56.cc index d540e2ef3b..50598ec05a 100644 --- a/tests/bits/full_matrix_56.cc +++ b/tests/bits/full_matrix_56.cc @@ -25,34 +25,36 @@ std::string output_file_name = "full_matrix_56/output"; const double entries2[4] = { 0.814723686393179 , 0.516389376684563, - 0.516389376684563, 0.913375856139019}; + 0.516389376684563, 0.913375856139019 + }; const double entries3[9] = { 1.808621732261680, 0.845866689167942, - 0.667106522517665, 0.845866689167942, - 1.398873167281503, 0.281706853672865, - 0.667106522517665, 0.281706853672865, - 0.741757766593798}; + 0.667106522517665, 0.845866689167942, + 1.398873167281503, 0.281706853672865, + 0.667106522517665, 0.281706853672865, + 0.741757766593798 + }; // Create a positive definite random matrix -void random_matrix(FullMatrix& A) +void random_matrix(FullMatrix &A) { - for (unsigned int i=0; i void check () - { +{ deallog << std::fixed; deallog << std::setprecision(4); // deallog.attach(logfile); @@ -63,25 +65,25 @@ check () FullMatrix T2(2,2,entries2), S2(2,2), R2(2,2); FullMatrixT3(3,3,entries3), S3(3,3), R3(3,3); - // These results for T2, T3, T5 were compared - // against Matlab. + // These results for T2, T3, T5 were compared + // against Matlab. deallog << "Original Matrix:" << std::endl; deallog << "================" << std::endl; - + display_matrix(T2); - deallog << std::endl; + deallog << std::endl; S2.cholesky(T2); deallog << "Cholesky Decomposition Matrix:" << std::endl; deallog << "==============================" << std::endl; display_matrix(S2); - deallog << std::endl; + deallog << std::endl; R2.Tadd(1,S2); // R = S^t deallog << "Transposed Cholesky Decomposition Matrix:" << std::endl; deallog << "=========================================" << std::endl; display_matrix(R2); - deallog << std::endl; + deallog << std::endl; R2.Tmmult(S2, R2, false); // S = R^tR deallog << "Reconstructed Matrix:" << std::endl; @@ -89,11 +91,11 @@ check () display_matrix(S2); deallog << std::endl; S2.add(-1.0,T2); - if (S2.frobenius_norm()>1.0e-10) + if (S2.frobenius_norm()>1.0e-10) { deallog << "NOT the same to 1e-10 tolerance" << std::endl; } - else + else { deallog << "the SAME to 1e-10 tolerance" << std::endl; } @@ -110,24 +112,24 @@ check () deallog << "==============================" << std::endl; display_matrix(S3); deallog << std::endl; - + R3.Tadd(1,S3); // R = S^t deallog << "Transposed Cholesky Decomposition Matrix:" << std::endl; deallog << "=========================================" << std::endl; display_matrix(R3); deallog << std::endl; - + R3.Tmmult(S3, R3, false); // S = R^tR deallog << "Reconstructed Matrix:" << std::endl; deallog << "=====================" << std::endl; display_matrix(S3); deallog << std::endl; S3.add(-1.0,T3); - if (S3.frobenius_norm()>1.0e-10) + if (S3.frobenius_norm()>1.0e-10) { deallog << "NOT the same to 1e-10 tolerance" << std::endl; } - else + else { deallog << "the SAME to 1e-10 tolerance" << std::endl; } @@ -137,43 +139,43 @@ check () FullMatrix T5(5,5), S5(5,5), R5(5,5); random_matrix(T5); T5.symmetrize(); - + deallog << "Original Matrix:" << std::endl; deallog << "================" << std::endl; display_matrix(T5); - deallog << std::endl; + deallog << std::endl; S5.cholesky(T5); deallog << "Cholesky Decomposition Matrix:" << std::endl; deallog << "==============================" << std::endl; display_matrix(S5); - deallog << std::endl; + deallog << std::endl; R5.Tadd(1,S5); // R = S^t deallog << "Transposed Cholesky Decomposition Matrix:" << std::endl; deallog << "=========================================" << std::endl; display_matrix(R5); - deallog << std::endl; + deallog << std::endl; R5.Tmmult(S5, R5, false); // S = R^tR deallog << "Reconstructed Matrix:" << std::endl; deallog << "=====================" << std::endl; display_matrix(S5); - + deallog << std::endl; S5.add(-1.0,T5); - if (S5.frobenius_norm()>1.0e-10) + if (S5.frobenius_norm()>1.0e-10) { deallog << "NOT the same to 1e-10 tolerance" << std::endl; } - else + else { deallog << "the SAME to 1e-10 tolerance" << std::endl; } deallog << std::endl; deallog << std::endl; - + } - + diff --git a/tests/bits/full_matrix_57.cc b/tests/bits/full_matrix_57.cc index 33b97e35a0..8a6749b64f 100644 --- a/tests/bits/full_matrix_57.cc +++ b/tests/bits/full_matrix_57.cc @@ -30,14 +30,14 @@ const double ints[9] = { 0, -1., 1., -2., 2., -3., 3., -4., 4.}; template void check () - { +{ deallog << std::fixed; deallog << std::setprecision(1); deallog.depth_console(0); Vector First4(4), Second4(4), First9(9); FullMatrixF4(4,4), F9(9,9); - + deallog << "Original Vector V" << std::endl; deallog << "=================" << std::endl; @@ -49,7 +49,7 @@ check () } deallog << std::endl; deallog << std::endl; - + deallog << "Original Vector W" << std::endl; deallog << "=================" << std::endl; @@ -62,30 +62,30 @@ check () deallog << std::endl; F4.outer_product(First4, Second4); - + deallog << "Outer_Product of V and W" << std::endl; deallog << "========================" << std::endl; display_matrix(F4); - deallog << std::endl; + deallog << std::endl; deallog << std::endl; deallog << std::endl; - + F4.outer_product(First4, First4); - + deallog << "Outer_Product of V and V" << std::endl; deallog << "========================" << std::endl; display_matrix(F4); - deallog << std::endl; + deallog << std::endl; deallog << std::endl; F4.outer_product(Second4, Second4); - + deallog << "Outer_Product of W and W" << std::endl; deallog << "========================" << std::endl; display_matrix(F4); - deallog << std::endl; + deallog << std::endl; deallog << std::endl; deallog << std::endl; @@ -101,11 +101,11 @@ check () deallog << std::endl; F9.outer_product(First9, First9); - + deallog << "Outer_Product of V and V" << std::endl; deallog << "========================" << std::endl; display_matrix(F9); - deallog << std::endl; + deallog << std::endl; deallog << std::endl; deallog << std::endl; @@ -122,14 +122,14 @@ check () deallog << std::endl; F9.outer_product(First9, First9); - + deallog << "Outer_Product of V and V" << std::endl; deallog << "========================" << std::endl; display_matrix(F9); - deallog << std::endl; + deallog << std::endl; deallog << std::endl; deallog << std::endl; } - + diff --git a/tests/bits/full_matrix_common.h b/tests/bits/full_matrix_common.h index 366d8c351e..0d93df5219 100644 --- a/tests/bits/full_matrix_common.h +++ b/tests/bits/full_matrix_common.h @@ -1,6 +1,6 @@ //---------------------------- full_matrix_common.h --------------------------- // $Id$ -// Version: $Name$ +// Version: $Name$ // // Copyright (C) 2007, 2008 by the deal.II authors // @@ -84,7 +84,7 @@ print_matrix (const FullMatrix &m) for (unsigned int i=0; i &v) { for (unsigned int i=0; i -void +void display_matrix(FullMatrix M) { deallog< -void +void fill_matrix(FullMatrix &A) { - for (unsigned int i=0; i (); check (); - + return 0; } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/full_matrix_iterator_01.cc b/tests/bits/full_matrix_iterator_01.cc index 99079640ef..2558238fbc 100644 --- a/tests/bits/full_matrix_iterator_01.cc +++ b/tests/bits/full_matrix_iterator_01.cc @@ -42,7 +42,7 @@ void test () Assert (k == k, ExcInternalError()); Assert (!(k != k), ExcInternalError()); - + deallog << "OK" << std::endl; } @@ -62,25 +62,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/full_matrix_vector_01.cc b/tests/bits/full_matrix_vector_01.cc index 49b5a84db0..444a2259cc 100644 --- a/tests/bits/full_matrix_vector_01.cc +++ b/tests/bits/full_matrix_vector_01.cc @@ -31,18 +31,18 @@ void test (Vector &v, FullMatrix m(v.size(), v.size()); for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("full_matrix_vector_01/output"); deallog.attach(logfile); @@ -74,25 +74,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/full_matrix_vector_02.cc b/tests/bits/full_matrix_vector_02.cc index 65264726c0..8db2f89992 100644 --- a/tests/bits/full_matrix_vector_02.cc +++ b/tests/bits/full_matrix_vector_02.cc @@ -32,18 +32,18 @@ void test (Vector &v, FullMatrix m(v.size(), v.size()); for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("full_matrix_vector_02/output"); deallog.attach(logfile); @@ -75,25 +75,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/full_matrix_vector_05.cc b/tests/bits/full_matrix_vector_05.cc index a013a43cb0..fb2630149c 100644 --- a/tests/bits/full_matrix_vector_05.cc +++ b/tests/bits/full_matrix_vector_05.cc @@ -32,21 +32,21 @@ void test (Vector &v, FullMatrix m(v.size(), v.size()); for (unsigned int i=0; i + // const double s = m.matrix_scalar_product (w,v); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("full_matrix_vector_05/output"); deallog.attach(logfile); @@ -81,25 +81,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/full_matrix_vector_06.cc b/tests/bits/full_matrix_vector_06.cc index 9aacc6b15f..e141f17e62 100644 --- a/tests/bits/full_matrix_vector_06.cc +++ b/tests/bits/full_matrix_vector_06.cc @@ -31,17 +31,17 @@ void test (Vector &v) FullMatrix m(v.size(), v.size()); for (unsigned int i=0; i + // const double s = m.matrix_norm_square (v); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i &v) -int main () +int main () { std::ofstream logfile("full_matrix_vector_06/output"); deallog.attach(logfile); @@ -72,25 +72,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/full_matrix_vector_07.cc b/tests/bits/full_matrix_vector_07.cc index 01542c2d00..e4b07f4209 100644 --- a/tests/bits/full_matrix_vector_07.cc +++ b/tests/bits/full_matrix_vector_07.cc @@ -33,21 +33,21 @@ void test (Vector &v, FullMatrix m(v.size(), v.size()); for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("full_matrix_vector_07/output"); deallog.attach(logfile); @@ -84,25 +84,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/gerold_1.cc b/tests/bits/gerold_1.cc index f3d800552f..a2e78db04d 100644 --- a/tests/bits/gerold_1.cc +++ b/tests/bits/gerold_1.cc @@ -55,23 +55,23 @@ template -class LaplaceProblem +class LaplaceProblem { - public: - LaplaceProblem (); - void run (); - - private: +public: + LaplaceProblem (); + void run (); - Triangulation triangulation; - FE_Q fe; - DoFHandler dof_handler; +private: - SparsityPattern sparsity_pattern; - SparseMatrix system_matrix; + Triangulation triangulation; + FE_Q fe; + DoFHandler dof_handler; - Vector solution; - Vector system_rhs; + SparsityPattern sparsity_pattern; + SparseMatrix system_matrix; + + Vector solution; + Vector system_rhs; }; @@ -79,24 +79,24 @@ class LaplaceProblem template LaplaceProblem::LaplaceProblem () : - fe (1), - dof_handler (triangulation) + fe (1), + dof_handler (triangulation) {} template -void LaplaceProblem::run () +void LaplaceProblem::run () { deallog << "Solving problem in " << dim << " space dimensions." << std::endl; - - - + + + GridIn grid_in; grid_in.attach_triangulation (triangulation); std::ifstream input_file("gerold_1.inp"); - + deallog << "read ucd data file" << std::endl; @@ -106,13 +106,13 @@ void LaplaceProblem::run () } -int main () +int main () { std::ofstream logfile("gerold_1/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + try { LaplaceProblem<3> laplace_problem_3d; @@ -121,26 +121,26 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; - + return 0; } diff --git a/tests/bits/gerold_2.cc b/tests/bits/gerold_2.cc index 726e7361bb..2dd1b70d0f 100644 --- a/tests/bits/gerold_2.cc +++ b/tests/bits/gerold_2.cc @@ -41,10 +41,10 @@ template class LaplaceProblem { - public: - void run (); - private: - Triangulation triangulation; +public: + void run (); +private: + Triangulation triangulation; }; @@ -59,7 +59,7 @@ void LaplaceProblem::run () SparsityPattern cell_connectivity; GridTools::get_face_connectivity_of_cells (triangulation, - cell_connectivity); + cell_connectivity); std::vector permutation(triangulation.n_active_cells()); SparsityTools::reorder_Cuthill_McKee (cell_connectivity, permutation); @@ -83,24 +83,24 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; diff --git a/tests/bits/get_dof_indices_01.cc b/tests/bits/get_dof_indices_01.cc index 69bbe58034..d32ea5ac81 100644 --- a/tests/bits/get_dof_indices_01.cc +++ b/tests/bits/get_dof_indices_01.cc @@ -49,38 +49,38 @@ void test () Triangulation triangulation; FE_Q fe(1); DoFHandler dof_handler(triangulation); - + GridGenerator::hyper_cube (triangulation); triangulation.refine_global (1); dof_handler.distribute_dofs (fe); - // loop over all cells, active or - // not + // loop over all cells, active or + // not std::vector local_dof_indices (fe.dofs_per_cell); for (typename DoFHandler::cell_iterator cell=dof_handler.begin(); cell != dof_handler.end(); ++cell) { try - { - cell->get_dof_indices (local_dof_indices); - } - catch(...) - { - deallog << "Assertion: cell not active." << std::endl; - continue; - } - - + { + cell->get_dof_indices (local_dof_indices); + } + catch (...) + { + deallog << "Assertion: cell not active." << std::endl; + continue; + } + + deallog << "Cell = " << cell - << ", DoFs="; + << ", DoFs="; for (unsigned int i=0; i::invalid_dof_index, - ExcInternalError()); - deallog << local_dof_indices[i] << ' '; - } - + { + Assert (local_dof_indices[i] != DoFHandler::invalid_dof_index, + ExcInternalError()); + deallog << local_dof_indices[i] << ' '; + } + deallog << std::endl; } } @@ -98,7 +98,7 @@ int main () test<1>(); test<2>(); test<3>(); - + return 0; } diff --git a/tests/bits/get_fe_from_name.cc b/tests/bits/get_fe_from_name.cc index 4eff4b5e95..6cd584de6c 100644 --- a/tests/bits/get_fe_from_name.cc +++ b/tests/bits/get_fe_from_name.cc @@ -21,75 +21,77 @@ #include #include -class Test { +class Test +{ public: - - void generate(const char * myname) { + + void generate(const char *myname) + { std::string name = myname; - + fe1 = FETools::get_fe_from_name<1>(name); fe2 = FETools::get_fe_from_name<2>(name); fe3 = FETools::get_fe_from_name<3>(name); - + deallog << "Read " << name << std::endl; deallog << "Generated :" << std::endl; deallog << fe1->get_name() << std::endl; deallog << fe2->get_name() << std::endl; deallog << fe3->get_name() << std::endl; - + delete fe1; delete fe2; delete fe3; } - - FiniteElement<1> * fe1; - FiniteElement<2> * fe2; - FiniteElement<3> * fe3; - + + FiniteElement<1> *fe1; + FiniteElement<2> *fe2; + FiniteElement<3> *fe3; + }; -int main () -{ +int main () +{ std::ofstream logfile("get_fe_from_name/output"); deallog.attach(logfile); - + deallog.depth_console(0); deallog.threshold_double(1.e-10); - + Test gen; - + gen.generate("FE_Q_Hierarchical(1)"); gen.generate("FE_DGPNonparametric(1)"); gen.generate("FE_DGQ(1)"); gen.generate("FE_Q(1)"); - + gen.generate("FE_Q_Hierarchical(2)"); gen.generate("FE_DGPNonparametric(2)"); gen.generate("FE_DGQ(2)"); gen.generate("FE_Q(2)"); - + gen.generate("FESystem[FE_Q_Hierarchical(1)^2-FE_Q_Hierarchical(1)]"); gen.generate("FESystem[FE_DGPNonparametric(1)^2-FE_Q_Hierarchical(1)]"); gen.generate("FESystem[FE_DGQ(1)^2-FE_Q_Hierarchical(1)]"); gen.generate("FESystem[FE_Q(1)^2-FE_Q_Hierarchical(1)]"); - + gen.generate("FESystem[FE_Q_Hierarchical(1)^2-FE_DGPNonparametric(1)]"); gen.generate("FESystem[FE_DGPNonparametric(1)^2-FE_DGPNonparametric(1)]"); gen.generate("FESystem[FE_DGQ(1)^2-FE_DGPNonparametric(1)]"); gen.generate("FESystem[FE_Q(1)^2-FE_DGPNonparametric(1)]"); - + gen.generate("FESystem[FE_Q_Hierarchical(1)^2-FE_DGQ(1)]"); gen.generate("FESystem[FE_DGPNonparametric(1)^2-FE_DGQ(1)]"); gen.generate("FESystem[FE_DGQ(1)^2-FE_DGQ(1)]"); gen.generate("FESystem[FE_Q(1)^2-FE_DGQ(1)]"); - - + + gen.generate("FESystem[FE_Q_Hierarchical(1)^2-FE_Q(1)]"); gen.generate("FESystem[FE_DGPNonparametric(1)^2-FE_Q(1)]"); gen.generate("FESystem[FE_DGQ(1)^2-FE_Q(1)]"); gen.generate("FESystem[FE_Q(1)^2-FE_Q(1)]"); - - + + return 0; } - + diff --git a/tests/bits/grid_generator_01.cc b/tests/bits/grid_generator_01.cc index 839fb23af4..bffddc6297 100644 --- a/tests/bits/grid_generator_01.cc +++ b/tests/bits/grid_generator_01.cc @@ -30,7 +30,7 @@ template -void test(std::ostream& out) +void test(std::ostream &out) { Point p1; p1[0] = 2.; @@ -44,25 +44,25 @@ void test(std::ostream& out) p3[0] = 2.; if (dim>1) p3[1] = 1.; if (dim>2) p3[2] = 4.; - + GridOut go; GridOutFlags::XFig xfig_flags; xfig_flags.level_color = false; xfig_flags.fill_style = 25; - + go.set_flags(xfig_flags); - + GridOut::OutputFormat format = GridOut::gnuplot; if (dim==2) format = GridOut::xfig; if (dim==3) format = GridOut::dx; - + if (true) { deallog << "hyper_cube" << std::endl; Triangulation tr; GridGenerator::hyper_cube(tr, 3., 7.); if (tr.n_cells() > 0) - go.write(tr, out, format); + go.write(tr, out, format); } if (true) { @@ -70,7 +70,7 @@ void test(std::ostream& out) Triangulation tr; GridGenerator::subdivided_hyper_cube(tr, 3, 1., 7.); if (tr.n_cells() > 0) - go.write(tr, out, format); + go.write(tr, out, format); } if (true) { @@ -78,7 +78,7 @@ void test(std::ostream& out) Triangulation tr; GridGenerator::hyper_rectangle(tr, p1, p2, true); if (tr.n_cells() > 0) - go.write(tr, out, format); + go.write(tr, out, format); } if (true) { @@ -90,7 +90,7 @@ void test(std::ostream& out) if (dim>2) sub[2] = 4; GridGenerator::subdivided_hyper_rectangle(tr, sub, p1, p2, true); if (tr.n_cells() > 0) - go.write(tr, out, format); + go.write(tr, out, format); } if (dim==2) { @@ -102,7 +102,7 @@ void test(std::ostream& out) if (dim>2) corners[2] = p3; GridGenerator::parallelogram(tr, corners, true); if (tr.n_cells() > 0) - go.write(tr, out, format); + go.write(tr, out, format); } if (dim>1) { @@ -110,7 +110,7 @@ void test(std::ostream& out) Triangulation tr; GridGenerator::enclosed_hyper_cube(tr, 3., 7., 1., true); if (tr.n_cells() > 0) - go.write(tr, out, format); + go.write(tr, out, format); } if (dim>1) { @@ -118,64 +118,64 @@ void test(std::ostream& out) Triangulation tr; GridGenerator::hyper_ball(tr, p1, 3.); if (tr.n_cells() > 0) - go.write(tr, out, format); - } + go.write(tr, out, format); + } if (dim>1) { deallog << "cylinder" << std::endl; Triangulation tr; GridGenerator::cylinder(tr, 1., 3.); if (tr.n_cells() > 0) - go.write(tr, out, format); - } + go.write(tr, out, format); + } if (dim>1) { deallog << "hyper_L" << std::endl; Triangulation tr; GridGenerator::hyper_L(tr, -1., 1.); if (tr.n_cells() > 0) - go.write(tr, out, format); - } + go.write(tr, out, format); + } if (dim==2) { deallog << "hyper_cube_slit" << std::endl; Triangulation tr; GridGenerator::hyper_cube_slit(tr, -2., 2., true); if (tr.n_cells() > 0) - go.write(tr, out, format); - } + go.write(tr, out, format); + } if (dim==2) { deallog << "hyper_shell" << std::endl; Triangulation tr; GridGenerator::hyper_shell(tr, p1, 4., 6.); if (tr.n_cells() > 0) - go.write(tr, out, format); - } + go.write(tr, out, format); + } if (dim>2) { deallog << "cylinder_shell" << std::endl; Triangulation tr; GridGenerator::cylinder_shell(tr, 2., 5., 6.); if (tr.n_cells() > 0) - go.write(tr, out, format); - } + go.write(tr, out, format); + } if (dim>1) { deallog << "half_hyper_ball" << std::endl; Triangulation tr; GridGenerator::half_hyper_ball(tr, p1, 3.); if (tr.n_cells() > 0) - go.write(tr, out, format); - } + go.write(tr, out, format); + } if (dim==2) { deallog << "half_hyper_shell" << std::endl; Triangulation tr; GridGenerator::half_hyper_shell(tr, p1, 4., 6.); if (tr.n_cells() > 0) - go.write(tr, out, format); - } + go.write(tr, out, format); + } } @@ -185,7 +185,7 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + deallog.push("1d"); test<1>(logfile); deallog.pop(); diff --git a/tests/bits/grid_generator_01a.cc b/tests/bits/grid_generator_01a.cc index 094c0fc4e0..67cc36f8c9 100644 --- a/tests/bits/grid_generator_01a.cc +++ b/tests/bits/grid_generator_01a.cc @@ -32,7 +32,7 @@ template -void test(std::ostream& out) +void test(std::ostream &out) { Point p1; p1[0] = 2.; @@ -50,16 +50,16 @@ void test(std::ostream& out) HalfHyperBallBoundary boundary_description (p1, 3); GridOut go; GridOut::OutputFormat format = GridOut::gnuplot; - - { - deallog << "half_hyper_ball" << std::endl; - Triangulation tr; - GridGenerator::half_hyper_ball(tr, p1, 3.); - tr.set_boundary (0, boundary_description); - tr.refine_global (2); - go.write(tr, out, format); - } + { + deallog << "half_hyper_ball" << std::endl; + Triangulation tr; + GridGenerator::half_hyper_ball(tr, p1, 3.); + tr.set_boundary (0, boundary_description); + + tr.refine_global (2); + go.write(tr, out, format); + } } @@ -69,7 +69,7 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + deallog.push("3d"); test<3>(logfile); deallog.pop(); diff --git a/tests/bits/grid_generator_02.cc b/tests/bits/grid_generator_02.cc index 0e83a88b58..4b5068eece 100644 --- a/tests/bits/grid_generator_02.cc +++ b/tests/bits/grid_generator_02.cc @@ -31,7 +31,7 @@ template -void test(std::ostream& out) +void test(std::ostream &out) { Point p1; p1[0] = 2.; @@ -45,10 +45,10 @@ void test(std::ostream& out) p3[0] = 2.; if (dim>1) p3[1] = 1.; if (dim>2) p3[2] = 4.; - + GridOut go; - // uniformly subdivided mesh + // uniformly subdivided mesh if (true) { deallog << "subdivided_hyper_rectangle" << std::endl; @@ -59,11 +59,11 @@ void test(std::ostream& out) GridGenerator::subdivided_hyper_rectangle(tr, sub, p1, p2, true); if (tr.n_cells() > 0) - go.write_gnuplot(tr, out); + go.write_gnuplot(tr, out); } - // non-uniformly subdivided mesh + // non-uniformly subdivided mesh if (true) { deallog << "subdivided_hyper_rectangle" << std::endl; @@ -78,7 +78,7 @@ void test(std::ostream& out) GridGenerator::subdivided_hyper_rectangle(tr, sub, p1, p2, true); if (tr.n_cells() > 0) - go.write_gnuplot(tr, out); + go.write_gnuplot(tr, out); } } @@ -89,7 +89,7 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + deallog.push("1d"); test<1>(logfile); deallog.pop(); diff --git a/tests/bits/grid_generator_03.cc b/tests/bits/grid_generator_03.cc index 119d7d975b..ba9ece30f5 100644 --- a/tests/bits/grid_generator_03.cc +++ b/tests/bits/grid_generator_03.cc @@ -48,7 +48,7 @@ template <> Table<2,types::material_id> material_ids<2>() for (unsigned int i=0; i<2; ++i) for (unsigned int j=0; j<3; ++j) t[i][j] = 1; - // produce a hole in the middle + // produce a hole in the middle t[1][1] = (types::material_id)(-1); return t; } @@ -60,8 +60,8 @@ template <> Table<3,types::material_id> material_ids<3>() for (unsigned int i=0; i<2; ++i) for (unsigned int j=0; j<3; ++j) for (unsigned int k=0; k<4; ++k) - t[i][j][k] = 1; - // produce a hole in the middle + t[i][j][k] = 1; + // produce a hole in the middle t[1][1][1] = (types::material_id)(-1); t[1][1][2] = (types::material_id)(-1); return t; @@ -70,7 +70,7 @@ template <> Table<3,types::material_id> material_ids<3>() template -void test(std::ostream& out) +void test(std::ostream &out) { Point p1; p1[0] = 2.; @@ -89,7 +89,7 @@ void test(std::ostream& out) GridOut go; - // uniformly subdivided mesh + // uniformly subdivided mesh if (true) { deallog << "subdivided_hyper_rectangle" << std::endl; @@ -99,13 +99,13 @@ void test(std::ostream& out) sub[i] = std::vector (i+2, (p2[i]-p1[i])/(i+2)); GridGenerator::subdivided_hyper_rectangle(tr, sub, p1, material_ids(), - dim!=1); + dim!=1); if (tr.n_cells() > 0) - go.write_gnuplot(tr, out); + go.write_gnuplot(tr, out); } - // non-uniformly subdivided mesh + // non-uniformly subdivided mesh if (true) { deallog << "subdivided_hyper_rectangle" << std::endl; @@ -119,9 +119,9 @@ void test(std::ostream& out) } GridGenerator::subdivided_hyper_rectangle(tr, sub, p1, material_ids(), - dim!=1); + dim!=1); if (tr.n_cells() > 0) - go.write_gnuplot(tr, out); + go.write_gnuplot(tr, out); } } diff --git a/tests/bits/grid_generator_04.cc b/tests/bits/grid_generator_04.cc index 72f9ef3763..999ce783a6 100644 --- a/tests/bits/grid_generator_04.cc +++ b/tests/bits/grid_generator_04.cc @@ -29,23 +29,23 @@ template -void test(std::ostream& out) +void test(std::ostream &out) { GridOut go; go.set_flags(GridOutFlags::Ucd(false, true)); Triangulation tr; - + std::vector radii; radii.push_back(.2); radii.push_back(.3); radii.push_back(.4); - - + + std::vector radiiext; radiiext.push_back(.3); radiiext.push_back(.4); radiiext.push_back(.5); - + std::vector Ls; Ls.push_back(.1); Ls.push_back(1); @@ -56,40 +56,47 @@ void test(std::ostream& out) Nzs.push_back(3); Nzs.push_back(4); - for(unsigned int i=0; i 0) - go.write_ucd(tr, out); - - tr.clear(); - - out << "Colorize ====================" << std::endl; - try { - GridGenerator::hyper_cube_with_cylindrical_hole(tr, radii[i], radiiext[i], Ls[k], Nzs[l], true); - } catch(...) { - out << "Generation failed." << std::endl; - } - if (tr.n_cells() > 0) - go.write_ucd(tr, out); - tr.clear(); - - out << " ====================" << std::endl; - } + for (unsigned int i=0; i 0) + go.write_ucd(tr, out); + + tr.clear(); + + out << "Colorize ====================" << std::endl; + try + { + GridGenerator::hyper_cube_with_cylindrical_hole(tr, radii[i], radiiext[i], Ls[k], Nzs[l], true); + } + catch (...) + { + out << "Generation failed." << std::endl; + } + if (tr.n_cells() > 0) + go.write_ucd(tr, out); + tr.clear(); + + out << " ====================" << std::endl; + } } diff --git a/tests/bits/grid_generator_05.cc b/tests/bits/grid_generator_05.cc index 9345f6de75..1d96340e72 100644 --- a/tests/bits/grid_generator_05.cc +++ b/tests/bits/grid_generator_05.cc @@ -31,7 +31,7 @@ template -void test(std::ostream& out) +void test(std::ostream &out) { Point p1; p1[0] = 2.; @@ -45,9 +45,9 @@ void test(std::ostream& out) p3[0] = 2.; if (dim>1) p3[1] = 1.; if (dim>2) p3[2] = 4.; - - // loop without rotation + + // loop without rotation if (true) { deallog <<"moebius, no rotation" << std::endl; @@ -58,11 +58,11 @@ void test(std::ostream& out) go.write_ucd(tr, out); } - // loop with quarter rotation (1 * pi/2) + // loop with quarter rotation (1 * pi/2) if (true) { deallog << "---------------------------"< tr; GridGenerator::moebius(tr, 20, 1, 10.0, 2.0); GridOut go; @@ -70,11 +70,11 @@ void test(std::ostream& out) go.write_ucd(tr, out); } - // loop with half rotation (2 * pi/2) + // loop with half rotation (2 * pi/2) if (true) { deallog << "---------------------------"< tr; GridGenerator::moebius(tr, 20, 2, 10.0, 2.0); GridOut go; @@ -82,11 +82,11 @@ void test(std::ostream& out) go.write_ucd(tr, out); } - // loop with three quarter rotation (3 * pi/2) + // loop with three quarter rotation (3 * pi/2) if (true) { deallog << "---------------------------"< tr; GridGenerator::moebius(tr, 20, 3, 10.0, 2.0); GridOut go; @@ -94,11 +94,11 @@ void test(std::ostream& out) go.write_ucd(tr, out); } - // loop with full rotation (1 * pi/2) + // loop with full rotation (1 * pi/2) if (true) { deallog << "---------------------------"< tr; GridGenerator::moebius(tr, 20, 4, 10.0, 2.0); GridOut go; @@ -114,6 +114,6 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + test<3>(logfile); } diff --git a/tests/bits/grid_generator_06.cc b/tests/bits/grid_generator_06.cc index 2bf424fcda..cf96c5a661 100644 --- a/tests/bits/grid_generator_06.cc +++ b/tests/bits/grid_generator_06.cc @@ -31,7 +31,7 @@ template -void test(std::ostream& out) +void test(std::ostream &out) { Triangulation<2> triangulation; Triangulation<3> tr; @@ -50,6 +50,6 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + test<3>(logfile); } diff --git a/tests/bits/grid_in_msh_01.cc b/tests/bits/grid_in_msh_01.cc index 837b17a3e6..de05697699 100644 --- a/tests/bits/grid_in_msh_01.cc +++ b/tests/bits/grid_in_msh_01.cc @@ -25,10 +25,10 @@ #include #include #include - + #include #include - + template void gmsh_grid (const char *name) @@ -38,7 +38,7 @@ void gmsh_grid (const char *name) grid_in.attach_triangulation (tria); std::ifstream input_file(name); grid_in.read_msh(input_file); - + deallog << " " << tria.n_active_cells() << " active cells" << std::endl; int hash = 0; @@ -51,13 +51,13 @@ void gmsh_grid (const char *name) } -int main () +int main () { std::ofstream logfile("grid_in_msh_01/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + try { gmsh_grid<2> ("grid_in_msh_01.2d.msh"); @@ -69,26 +69,26 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; - + return 0; } diff --git a/tests/bits/hp_constraints_are_implemented.cc b/tests/bits/hp_constraints_are_implemented.cc index 55dc331529..5d42cd3553 100644 --- a/tests/bits/hp_constraints_are_implemented.cc +++ b/tests/bits/hp_constraints_are_implemented.cc @@ -33,7 +33,7 @@ void check_this (const DoFHandler &dof_handler) { deallog << dof_handler.get_fe().get_name() - << ": " - << (dof_handler.get_fe().hp_constraints_are_implemented() ? "true" : "false") - << std::endl; + << ": " + << (dof_handler.get_fe().hp_constraints_are_implemented() ? "true" : "false") + << std::endl; } diff --git a/tests/bits/hyper_ball_3d.cc b/tests/bits/hyper_ball_3d.cc index 0c8e63418b..c2397916c4 100644 --- a/tests/bits/hyper_ball_3d.cc +++ b/tests/bits/hyper_ball_3d.cc @@ -32,9 +32,9 @@ #include #include #include - -int main () + +int main () { std::ofstream logfile("hyper_ball_3d/output"); deallog.attach(logfile); @@ -42,17 +42,17 @@ int main () deallog.threshold_double(1.e-10); deallog << std::setprecision (2); - // generate a hyperball in 3d + // generate a hyperball in 3d Triangulation<3> tria; GridGenerator::hyper_ball (tria, Point<3>(), std::sqrt(3.)); - // output all faces. there should - // be 6 external ones, but there - // used to be a bug in the - // triangulation code that - // generated more than that, with - // some of them internal to the - // ball + // output all faces. there should + // be 6 external ones, but there + // used to be a bug in the + // triangulation code that + // generated more than that, with + // some of them internal to the + // ball unsigned int external_faces = 0; for (Triangulation<3>::face_iterator face=tria.begin_face(); face!=tria.end_face(); ++face) @@ -78,6 +78,6 @@ int main () deallog << "External faces: " << external_faces << std::endl; Assert (external_faces == 6, ExcInternalError()); - + return 0; } diff --git a/tests/bits/joa_1.cc b/tests/bits/joa_1.cc index d53c9df891..6f71c94ab9 100644 --- a/tests/bits/joa_1.cc +++ b/tests/bits/joa_1.cc @@ -46,147 +46,147 @@ #include #include - // From the following include file we - // will import the declaration of - // H1-conforming finite element shape - // functions. This family of finite - // elements is called FE_Q, and - // was used in all examples before - // already to define the usual bi- or - // tri-linear elements, but we will - // now use it for bi-quadratic - // elements: +// From the following include file we +// will import the declaration of +// H1-conforming finite element shape +// functions. This family of finite +// elements is called FE_Q, and +// was used in all examples before +// already to define the usual bi- or +// tri-linear elements, but we will +// now use it for bi-quadratic +// elements: #include - // We will not read the grid from a - // file as in the previous example, - // but generate it using a function - // of the library. However, we will - // want to write out the locally - // refined grids (just the grid, not - // the solution) in each step, so we - // need the following include file - // instead of grid_in.h: +// We will not read the grid from a +// file as in the previous example, +// but generate it using a function +// of the library. However, we will +// want to write out the locally +// refined grids (just the grid, not +// the solution) in each step, so we +// need the following include file +// instead of grid_in.h: #include - // When using locally refined grids, - // we will get so-called hanging - // nodes. However, the standard - // finite element methods assumes - // that the discrete solution spaces - // be continuous, so we need to make - // sure that the degrees of freedom - // on hanging nodes conform to some - // constraints such that the global - // solution is continuous. The - // following file contains a class - // which is used to handle these - // constraints: +// When using locally refined grids, +// we will get so-called hanging +// nodes. However, the standard +// finite element methods assumes +// that the discrete solution spaces +// be continuous, so we need to make +// sure that the degrees of freedom +// on hanging nodes conform to some +// constraints such that the global +// solution is continuous. The +// following file contains a class +// which is used to handle these +// constraints: #include - // In order to refine our grids - // locally, we need a function from - // the library that decides which - // cells to flag for refinement or - // coarsening based on the error - // indicators we have computed. This - // function is defined here: +// In order to refine our grids +// locally, we need a function from +// the library that decides which +// cells to flag for refinement or +// coarsening based on the error +// indicators we have computed. This +// function is defined here: #include - // Finally, we need a simple way to - // actually compute the refinement - // indicators based on some error - // estimat. While in general, - // adaptivity is very - // problem-specific, the error - // indicator in the following file - // often yields quite nicely adapted - // grids for a wide class of - // problems. +// Finally, we need a simple way to +// actually compute the refinement +// indicators based on some error +// estimat. While in general, +// adaptivity is very +// problem-specific, the error +// indicator in the following file +// often yields quite nicely adapted +// grids for a wide class of +// problems. #include - // Finally, this is as in previous - // programs: +// Finally, this is as in previous +// programs: using namespace dealii; - // @sect3{The LaplaceProblem class template} - - // The main class is again almost - // unchanged. Two additions, however, - // are made: we have added the - // refine_grid function, which is - // used to adaptively refine the grid - // (instead of the global refinement - // in the previous examples), and a - // variable which will hold the - // constraints associated to the - // hanging nodes. In addition, we - // have added a destructor to the - // class for reasons that will become - // clear when we discuss its - // implementation. +// @sect3{The LaplaceProblem class template} + +// The main class is again almost +// unchanged. Two additions, however, +// are made: we have added the +// refine_grid function, which is +// used to adaptively refine the grid +// (instead of the global refinement +// in the previous examples), and a +// variable which will hold the +// constraints associated to the +// hanging nodes. In addition, we +// have added a destructor to the +// class for reasons that will become +// clear when we discuss its +// implementation. template -class LaplaceProblem +class LaplaceProblem { - public: - LaplaceProblem (); - ~LaplaceProblem (); - - void run (); - - private: - void setup_system (); - void assemble_system (); - void solve (); - void refine_grid (); - void output_results (const unsigned int cycle) const; - - Triangulation triangulation; - - DoFHandler dof_handler; - FE_Q fe; - - // This is the new variable in - // the main class. We need an - // object which holds a list of - // constraints originating from - // the hanging nodes: - ConstraintMatrix hanging_node_constraints; - - SparsityPattern sparsity_pattern; - SparseMatrix system_matrix; - - Vector solution; - Vector system_rhs; +public: + LaplaceProblem (); + ~LaplaceProblem (); + + void run (); + +private: + void setup_system (); + void assemble_system (); + void solve (); + void refine_grid (); + void output_results (const unsigned int cycle) const; + + Triangulation triangulation; + + DoFHandler dof_handler; + FE_Q fe; + + // This is the new variable in + // the main class. We need an + // object which holds a list of + // constraints originating from + // the hanging nodes: + ConstraintMatrix hanging_node_constraints; + + SparsityPattern sparsity_pattern; + SparseMatrix system_matrix; + + Vector solution; + Vector system_rhs; }; - // @sect3{Nonconstant coefficients} +// @sect3{Nonconstant coefficients} - // The implementation of nonconstant - // coefficients is copied verbatim - // from step-5: +// The implementation of nonconstant +// coefficients is copied verbatim +// from step-5: template -class Coefficient : public Function +class Coefficient : public Function { - public: - Coefficient () : Function() {} - - virtual double value (const Point &p, - const unsigned int component = 0) const; - - virtual void value_list (const std::vector > &points, - std::vector &values, - const unsigned int component = 0) const; +public: + Coefficient () : Function() {} + + virtual double value (const Point &p, + const unsigned int component = 0) const; + + virtual void value_list (const std::vector > &points, + std::vector &values, + const unsigned int component = 0) const; }; template double Coefficient::value (const Point &p, - const unsigned int) const + const unsigned int) const { if (p.square() < 0.5*0.5) return 20; @@ -198,365 +198,365 @@ double Coefficient::value (const Point &p, template void Coefficient::value_list (const std::vector > &points, - std::vector &values, - const unsigned int component) const + std::vector &values, + const unsigned int component) const { const unsigned int n_points = points.size(); - Assert (values.size() == n_points, - ExcDimensionMismatch (values.size(), n_points)); - - Assert (component == 0, - ExcIndexRange (component, 0, 1)); - + Assert (values.size() == n_points, + ExcDimensionMismatch (values.size(), n_points)); + + Assert (component == 0, + ExcIndexRange (component, 0, 1)); + for (unsigned int i=0; iLaplaceProblem class implementation} +// @sect3{The LaplaceProblem class implementation} - // @sect4{LaplaceProblem::LaplaceProblem} +// @sect4{LaplaceProblem::LaplaceProblem} - // The constructor of this class is - // mostly the same as before, but - // this time we want to use the - // quadratic element. To do so, we - // only have to replace the - // constructor argument (which was - // 1 in all previous examples) by - // the desired polynomial degree - // (here 2): +// The constructor of this class is +// mostly the same as before, but +// this time we want to use the +// quadratic element. To do so, we +// only have to replace the +// constructor argument (which was +// 1 in all previous examples) by +// the desired polynomial degree +// (here 2): template LaplaceProblem::LaplaceProblem () : - dof_handler (triangulation), - fe (2) + dof_handler (triangulation), + fe (2) {} - // @sect4{LaplaceProblem::~LaplaceProblem} - - // Here comes the added destructor of - // the class. The reason why we want - // to add it is a subtle change in - // the order of data elements in the - // class as compared to all previous - // examples: the dof_handler - // object was defined before and not - // after the fe object. Of course - // we could have left this order - // unchanged, but we would like to - // show what happens if the order is - // reversed since this produces a - // rather nasty side-effect and - // results in an error which is - // difficult to track down if one - // does not know what happens. - // - // Basically what happens is the - // following: when we distribute the - // degrees of freedom using the - // function call - // dof_handler.distribute_dofs(), - // the dof_handler also stores a - // pointer to the finite element in - // use. Since this pointer is used - // every now and then until either - // the degrees of freedom are - // re-distributed using another - // finite element object or until the - // dof_handler object is - // destroyed, it would be unwise if - // we would allow the finite element - // object to be deleted before the - // dof_handler object. To - // disallow this, the DoF handler - // increases a counter inside the - // finite element object which counts - // how many objects use that finite - // element (this is what the - // Subscriptor/SmartPointer - // class pair is used for, in case - // you want something like this for - // your own programs; see step-7 for - // a more complete discussion - // of this topic). The finite - // element object will refuse its - // destruction if that counter is - // larger than zero, since then some - // other objects might rely on the - // persistence of the finite element - // object. An exception will then be - // thrown and the program will - // usually abort upon the attempt to - // destroy the finite element. - // - // To be fair, such exceptions about - // still used objects are not - // particularly popular among - // programmers using deal.II, since - // they only tell us that something - // is wrong, namely that some other - // object is still using the object - // that is presently being - // destructed, but most of the time - // not who this user is. It is - // therefore often rather - // time-consuming to find out where - // the problem exactly is, although - // it is then usually straightforward - // to remedy the situation. However, - // we believe that the effort to find - // invalid references to objects that - // do no longer exist is less if the - // problem is detected once the - // reference becomes invalid, rather - // than when non-existent objects are - // actually accessed again, since - // then usually only invalid data is - // accessed, but no error is - // immediately raised. - // - // Coming back to the present - // situation, if we did not write - // this destructor, the compiler will - // generate code that triggers - // exactly the behavior sketched - // above. The reason is that member - // variables of the - // LaplaceProblem class are - // destructed bottom-up (i.e. in - // reverse order of their declaration - // in the class), as always in - // C++. Thus, the finite element - // object will be destructed before - // the DoF handler object, since its - // declaration is below the one of - // the DoF handler. This triggers the - // situation above, and an exception - // will be raised when the fe - // object is destructed. What needs - // to be done is to tell the - // dof_handler object to release - // its lock to the finite element. Of - // course, the dof_handler will - // only release its lock if it really - // does not need the finite element - // any more, i.e. when all finite - // element related data is deleted - // from it. For this purpose, the - // DoFHandler class has a - // function clear which deletes - // all degrees of freedom, and - // releases its lock to the finite - // element. After this, you can - // safely destruct the finite element - // object since its internal counter - // is then zero. - // - // For completeness, we add the - // output of the exception that would - // have been triggered without this - // destructor, to the end of the - // results section of this example. +// @sect4{LaplaceProblem::~LaplaceProblem} + +// Here comes the added destructor of +// the class. The reason why we want +// to add it is a subtle change in +// the order of data elements in the +// class as compared to all previous +// examples: the dof_handler +// object was defined before and not +// after the fe object. Of course +// we could have left this order +// unchanged, but we would like to +// show what happens if the order is +// reversed since this produces a +// rather nasty side-effect and +// results in an error which is +// difficult to track down if one +// does not know what happens. +// +// Basically what happens is the +// following: when we distribute the +// degrees of freedom using the +// function call +// dof_handler.distribute_dofs(), +// the dof_handler also stores a +// pointer to the finite element in +// use. Since this pointer is used +// every now and then until either +// the degrees of freedom are +// re-distributed using another +// finite element object or until the +// dof_handler object is +// destroyed, it would be unwise if +// we would allow the finite element +// object to be deleted before the +// dof_handler object. To +// disallow this, the DoF handler +// increases a counter inside the +// finite element object which counts +// how many objects use that finite +// element (this is what the +// Subscriptor/SmartPointer +// class pair is used for, in case +// you want something like this for +// your own programs; see step-7 for +// a more complete discussion +// of this topic). The finite +// element object will refuse its +// destruction if that counter is +// larger than zero, since then some +// other objects might rely on the +// persistence of the finite element +// object. An exception will then be +// thrown and the program will +// usually abort upon the attempt to +// destroy the finite element. +// +// To be fair, such exceptions about +// still used objects are not +// particularly popular among +// programmers using deal.II, since +// they only tell us that something +// is wrong, namely that some other +// object is still using the object +// that is presently being +// destructed, but most of the time +// not who this user is. It is +// therefore often rather +// time-consuming to find out where +// the problem exactly is, although +// it is then usually straightforward +// to remedy the situation. However, +// we believe that the effort to find +// invalid references to objects that +// do no longer exist is less if the +// problem is detected once the +// reference becomes invalid, rather +// than when non-existent objects are +// actually accessed again, since +// then usually only invalid data is +// accessed, but no error is +// immediately raised. +// +// Coming back to the present +// situation, if we did not write +// this destructor, the compiler will +// generate code that triggers +// exactly the behavior sketched +// above. The reason is that member +// variables of the +// LaplaceProblem class are +// destructed bottom-up (i.e. in +// reverse order of their declaration +// in the class), as always in +// C++. Thus, the finite element +// object will be destructed before +// the DoF handler object, since its +// declaration is below the one of +// the DoF handler. This triggers the +// situation above, and an exception +// will be raised when the fe +// object is destructed. What needs +// to be done is to tell the +// dof_handler object to release +// its lock to the finite element. Of +// course, the dof_handler will +// only release its lock if it really +// does not need the finite element +// any more, i.e. when all finite +// element related data is deleted +// from it. For this purpose, the +// DoFHandler class has a +// function clear which deletes +// all degrees of freedom, and +// releases its lock to the finite +// element. After this, you can +// safely destruct the finite element +// object since its internal counter +// is then zero. +// +// For completeness, we add the +// output of the exception that would +// have been triggered without this +// destructor, to the end of the +// results section of this example. template -LaplaceProblem::~LaplaceProblem () +LaplaceProblem::~LaplaceProblem () { dof_handler.clear (); } - // @sect4{LaplaceProblem::setup_system} - - // The next function is setting up - // all the variables that describe - // the linear finite element problem, - // such as the DoF handler, the - // matrices, and vectors. The - // difference to what we did in - // step-5 is only that we now also - // have to take care of handing node - // constraints. These constraints are - // handled almost transparently by - // the library, i.e. you only need to - // know that they exist and how to - // get them, but you do not have to - // know how they are formed or what - // exactly is done with them. - // - // At the beginning of the function, - // you find all the things that are - // the same as in step-5: setting up - // the degrees of freedom (this time - // we have quadratic elements, but - // there is no difference from a user - // code perspective to the linear -- - // or cubic, for that matter -- - // case), generating the sparsity - // pattern, and initializing the - // solution and right hand side - // vectors. Note that the sparsity - // pattern will have significantly - // more entries per row now, since - // there are now 9 degrees of freedom - // per cell, not only four, that can - // couple with each other. The - // dof_Handler.max_couplings_between_dofs() - // call will take care of this, - // however: +// @sect4{LaplaceProblem::setup_system} + +// The next function is setting up +// all the variables that describe +// the linear finite element problem, +// such as the DoF handler, the +// matrices, and vectors. The +// difference to what we did in +// step-5 is only that we now also +// have to take care of handing node +// constraints. These constraints are +// handled almost transparently by +// the library, i.e. you only need to +// know that they exist and how to +// get them, but you do not have to +// know how they are formed or what +// exactly is done with them. +// +// At the beginning of the function, +// you find all the things that are +// the same as in step-5: setting up +// the degrees of freedom (this time +// we have quadratic elements, but +// there is no difference from a user +// code perspective to the linear -- +// or cubic, for that matter -- +// case), generating the sparsity +// pattern, and initializing the +// solution and right hand side +// vectors. Note that the sparsity +// pattern will have significantly +// more entries per row now, since +// there are now 9 degrees of freedom +// per cell, not only four, that can +// couple with each other. The +// dof_Handler.max_couplings_between_dofs() +// call will take care of this, +// however: template void LaplaceProblem::setup_system () { dof_handler.distribute_dofs (fe); sparsity_pattern.reinit (dof_handler.n_dofs(), - dof_handler.n_dofs(), - dof_handler.max_couplings_between_dofs()); + dof_handler.n_dofs(), + dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern); solution.reinit (dof_handler.n_dofs()); system_rhs.reinit (dof_handler.n_dofs()); - - // After setting up all the degrees - // of freedoms, here are now the - // differences compared to step-5, - // all of which are related to - // constraints associated with the - // hanging nodes. In the class - // desclaration, we have already - // allocated space for an object - // hanging_node_constraints - // that will hold a list of these - // constraints (they form a matrix, - // which is reflected in the name - // of the class, but that is - // immaterial for the moment). Now - // we have to fill this - // object. This is done using the - // following function calls (the - // first clears the contents of the - // object that may still be left - // over from computations on the - // previous mesh before the last - // adaptive refinement): + + // After setting up all the degrees + // of freedoms, here are now the + // differences compared to step-5, + // all of which are related to + // constraints associated with the + // hanging nodes. In the class + // desclaration, we have already + // allocated space for an object + // hanging_node_constraints + // that will hold a list of these + // constraints (they form a matrix, + // which is reflected in the name + // of the class, but that is + // immaterial for the moment). Now + // we have to fill this + // object. This is done using the + // following function calls (the + // first clears the contents of the + // object that may still be left + // over from computations on the + // previous mesh before the last + // adaptive refinement): hanging_node_constraints.clear (); DoFTools::make_hanging_node_constraints (dof_handler, - hanging_node_constraints); - - // The next step is closing - // this object. For this note that, - // in principle, the - // ConstraintMatrix class can - // hold other constraints as well, - // i.e. constraints that do not - // stem from hanging - // nodes. Sometimes, it is useful - // to use such constraints, in - // which case they may be added to - // the ConstraintMatrix object - // after the hanging node - // constraints were computed. After - // all constraints have been added, - // they need to be sorted and - // rearranged to perform some - // actions more efficiently. This - // postprocessing is done using the - // close() function, after which - // no further constraints may be - // added any more: + hanging_node_constraints); + + // The next step is closing + // this object. For this note that, + // in principle, the + // ConstraintMatrix class can + // hold other constraints as well, + // i.e. constraints that do not + // stem from hanging + // nodes. Sometimes, it is useful + // to use such constraints, in + // which case they may be added to + // the ConstraintMatrix object + // after the hanging node + // constraints were computed. After + // all constraints have been added, + // they need to be sorted and + // rearranged to perform some + // actions more efficiently. This + // postprocessing is done using the + // close() function, after which + // no further constraints may be + // added any more: hanging_node_constraints.close (); - // The constrained hanging nodes - // will later be eliminated from - // the linear system of - // equations. When doing so, some - // additional entries in the global - // matrix will be set to non-zero - // values, so we have to reserve - // some space for them here. Since - // the process of elimination of - // these constrained nodes is - // called condensation, the - // functions that eliminate them - // are called condense for both - // the system matrix and right hand - // side, as well as for the - // sparsity pattern. + // The constrained hanging nodes + // will later be eliminated from + // the linear system of + // equations. When doing so, some + // additional entries in the global + // matrix will be set to non-zero + // values, so we have to reserve + // some space for them here. Since + // the process of elimination of + // these constrained nodes is + // called condensation, the + // functions that eliminate them + // are called condense for both + // the system matrix and right hand + // side, as well as for the + // sparsity pattern. hanging_node_constraints.condense (sparsity_pattern); - // Now all non-zero entries of the - // matrix are known (i.e. those - // from regularly assembling the - // matrix and those that were - // introduced by eliminating - // constraints). We can thus close - // the sparsity pattern and remove - // unneeded space: + // Now all non-zero entries of the + // matrix are known (i.e. those + // from regularly assembling the + // matrix and those that were + // introduced by eliminating + // constraints). We can thus close + // the sparsity pattern and remove + // unneeded space: sparsity_pattern.compress(); - // Finally, the so-constructed - // sparsity pattern serves as the - // basis on top of which we will - // create the sparse matrix: + // Finally, the so-constructed + // sparsity pattern serves as the + // basis on top of which we will + // create the sparse matrix: system_matrix.reinit (sparsity_pattern); } - // @sect4{LaplaceProblem::assemble_system} - - // Next, we have to assemble the - // matrix again. There are no code - // changes compared to step-5 except - // for a single place: We have to use - // a higher-order quadrature formula - // to account for the higher - // polynomial degree in the finite - // element shape functions. This is - // easy to change: the constructor of - // the QGauss class takes the - // number of quadrature points in - // each space direction. Previously, - // we had two points for bilinear - // elements. Now we should use three - // points for biquadratic elements. - // - // The rest of the code that forms - // the local contributions and - // transfers them into the global - // objects remains unchanged. It is - // worth noting, however, that under - // the hood several things are - // different than before. First, the - // variables dofs_per_cell and - // n_q_points now are 9 each, - // where they were 4 - // before. Introducing such variables - // as abbreviations is a good - // strategy to make code work with - // different elements without having - // to change too much code. Secondly, - // the fe_values object of course - // needs to do other things as well, - // since the shape functions are now - // quadratic, rather than linear, in - // each coordinate variable. Again, - // however, this is something that is - // completely transparent to user - // code and nothing that you have to - // worry about. +// @sect4{LaplaceProblem::assemble_system} + +// Next, we have to assemble the +// matrix again. There are no code +// changes compared to step-5 except +// for a single place: We have to use +// a higher-order quadrature formula +// to account for the higher +// polynomial degree in the finite +// element shape functions. This is +// easy to change: the constructor of +// the QGauss class takes the +// number of quadrature points in +// each space direction. Previously, +// we had two points for bilinear +// elements. Now we should use three +// points for biquadratic elements. +// +// The rest of the code that forms +// the local contributions and +// transfers them into the global +// objects remains unchanged. It is +// worth noting, however, that under +// the hood several things are +// different than before. First, the +// variables dofs_per_cell and +// n_q_points now are 9 each, +// where they were 4 +// before. Introducing such variables +// as abbreviations is a good +// strategy to make code work with +// different elements without having +// to change too much code. Secondly, +// the fe_values object of course +// needs to do other things as well, +// since the shape functions are now +// quadratic, rather than linear, in +// each coordinate variable. Again, +// however, this is something that is +// completely transparent to user +// code and nothing that you have to +// worry about. template -void LaplaceProblem::assemble_system () -{ +void LaplaceProblem::assemble_system () +{ const QGauss quadrature_formula(3); - FEValues fe_values (fe, quadrature_formula, - update_values | update_gradients | - update_q_points | update_JxW_values); + FEValues fe_values (fe, quadrature_formula, + update_values | update_gradients | + update_q_points | update_JxW_values); const unsigned int dofs_per_cell = fe.dofs_per_cell; const unsigned int n_q_points = quadrature_formula.size(); @@ -570,8 +570,8 @@ void LaplaceProblem::assemble_system () std::vector coefficient_values (n_q_points); 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) { cell_matrix = 0; @@ -580,120 +580,120 @@ void LaplaceProblem::assemble_system () fe_values.reinit (cell); coefficient.value_list (fe_values.get_quadrature_points(), - coefficient_values); - + coefficient_values); + for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); for (unsigned int i=0; icondense - // function modifies the system so - // that the values in the solution - // corresponding to constrained - // nodes are invalid, but that the - // system still has a well-defined - // solution; we compute the correct - // values for these nodes at the - // end of the solve function). - - // As almost all the stuff before, - // the interpolation of boundary - // values works also for higher - // order elements without the need - // to change your code for that. We - // note that for proper results, it - // is important that the - // elimination of boundary nodes - // from the system of equations - // happens *after* the elimination - // of hanging nodes. + // Using them, degrees of freedom + // associated to hanging nodes have + // been removed from the linear + // system and the independent + // variables are only the regular + // nodes. The constrained nodes are + // still in the linear system + // (there is a one on the diagonal + // of the matrix and all other + // entries for this line are set to + // zero) but the computed values + // are invalid (the condense + // function modifies the system so + // that the values in the solution + // corresponding to constrained + // nodes are invalid, but that the + // system still has a well-defined + // solution; we compute the correct + // values for these nodes at the + // end of the solve function). + + // As almost all the stuff before, + // the interpolation of boundary + // values works also for higher + // order elements without the need + // to change your code for that. We + // note that for proper results, it + // is important that the + // elimination of boundary nodes + // from the system of equations + // happens *after* the elimination + // of hanging nodes. std::map boundary_values; VectorTools::interpolate_boundary_values (dof_handler, - 0, - ZeroFunction(), - boundary_values); + 0, + ZeroFunction(), + boundary_values); MatrixTools::apply_boundary_values (boundary_values, - system_matrix, - solution, - system_rhs); + system_matrix, + solution, + system_rhs); } - // @sect4{LaplaceProblem::solve} - - // We continue with gradual - // improvements. The function that - // solves the linear system again - // uses the SSOR preconditioner, and - // is again unchanged except that we - // have to incorporate hanging node - // constraints. As mentioned above, - // the degrees of freedom - // corresponding to hanging node - // constraints have been removed from - // the linear system by giving the - // rows and columns of the matrix a - // special treatment. This way, the - // values for these degrees of - // freedom have wrong, but - // well-defined values after solving - // the linear system. What we then - // have to do is to use the - // constraints to assign to them the - // values that they should have. This - // process, called distributing - // hanging nodes, computes the values - // of constrained nodes from the - // values of the unconstrained ones, - // and requires only a single - // additional function call that you - // find at the end of this function: +// @sect4{LaplaceProblem::solve} + +// We continue with gradual +// improvements. The function that +// solves the linear system again +// uses the SSOR preconditioner, and +// is again unchanged except that we +// have to incorporate hanging node +// constraints. As mentioned above, +// the degrees of freedom +// corresponding to hanging node +// constraints have been removed from +// the linear system by giving the +// rows and columns of the matrix a +// special treatment. This way, the +// values for these degrees of +// freedom have wrong, but +// well-defined values after solving +// the linear system. What we then +// have to do is to use the +// constraints to assign to them the +// values that they should have. This +// process, called distributing +// hanging nodes, computes the values +// of constrained nodes from the +// values of the unconstrained ones, +// and requires only a single +// additional function call that you +// find at the end of this function: template -void LaplaceProblem::solve () +void LaplaceProblem::solve () { SolverControl solver_control (1000, 1e-12); SolverCG<> cg (solver_control); @@ -702,269 +702,269 @@ void LaplaceProblem::solve () preconditioner.initialize(system_matrix, 1.2); cg.solve (system_matrix, solution, system_rhs, - preconditioner); + preconditioner); hanging_node_constraints.distribute (solution); } - // @sect4{LaplaceProblem::refine_grid} - - // Instead of global refinement, we - // now use a slightly more elaborate - // scheme. We will use the - // KellyErrorEstimator class - // which implements an error - // estimator for the Laplace - // equation; it can in principle - // handle variable coefficients, but - // we will not use these advanced - // features, but rather use its most - // simple form since we are not - // interested in quantitative results - // but only in a quick way to - // generate locally refined grids. - // - // Although the error estimator - // derived by Kelly et al. was - // originally developed for the Laplace - // equation, we have found that it is - // also well suited to quickly - // generate locally refined grids for - // a wide class of - // problems. Basically, it looks at - // the jumps of the gradients of the - // solution over the faces of cells - // (which is a measure for the second - // derivatives) and scales it by the - // size of the cell. It is therefore - // a measure for the local smoothness - // of the solution at the place of - // each cell and it is thus - // understandable that it yields - // reasonable grids also for - // hyperbolic transport problems or - // the wave equation as well, - // although these grids are certainly - // suboptimal compared to approaches - // specially tailored to the - // problem. This error estimator may - // therefore be understood as a quick - // way to test an adaptive program. - // - // The way the estimator works is to - // take a DoFHandler object - // describing the degrees of freedom - // and a vector of values for each - // degree of freedom as input and - // compute a single indicator value - // for each active cell of the - // triangulation (i.e. one value for - // each of the - // triangulation.n_active_cells() - // cells). To do so, it needs two - // additional pieces of information: - // a quadrature formula on the faces - // (i.e. quadrature formula on - // dim-1 dimensional objects. We - // use a 3-point Gauss rule again, a - // pick that is consistent and - // appropriate with the choice - // bi-quadratic finite element shape - // functions in this program. - // (What constitutes a suitable - // quadrature rule here of course - // depends on knowledge of the way - // the error estimator evaluates - // the solution field. As said - // above, the jump of the gradient - // is integrated over each face, - // which would be a quadratic - // function on each face for the - // quadratic elements in use in - // this example. In fact, however, - // it is the square of the jump of - // the gradient, as explained in - // the documentation of that class, - // and that is a quartic function, - // for which a 3 point Gauss - // formula is sufficient since it - // integrates polynomials up to - // order 5 exactly.) - // - // Secondly, the function wants a - // list of boundaries where we have - // imposed Neumann value, and the - // corresponding Neumann values. This - // information is represented by an - // object of type - // FunctionMap@::type that is - // essentially a map from boundary - // indicators to function objects - // describing Neumann boundary values - // (in the present example program, - // we do not use Neumann boundary - // values, so this map is empty, and - // in fact constructed using the - // default constructor of the map in - // the place where the function call - // expects the respective function - // argument). - // - // The output, as mentioned is a - // vector of values for all - // cells. While it may make sense to - // compute the *value* of a degree of - // freedom very accurately, it is - // usually not helpful to compute the - // *error indicator* corresponding to - // a cell particularly accurately. We - // therefore typically use a vector - // of floats instead of a vector of - // doubles to represent error - // indicators. +// @sect4{LaplaceProblem::refine_grid} + +// Instead of global refinement, we +// now use a slightly more elaborate +// scheme. We will use the +// KellyErrorEstimator class +// which implements an error +// estimator for the Laplace +// equation; it can in principle +// handle variable coefficients, but +// we will not use these advanced +// features, but rather use its most +// simple form since we are not +// interested in quantitative results +// but only in a quick way to +// generate locally refined grids. +// +// Although the error estimator +// derived by Kelly et al. was +// originally developed for the Laplace +// equation, we have found that it is +// also well suited to quickly +// generate locally refined grids for +// a wide class of +// problems. Basically, it looks at +// the jumps of the gradients of the +// solution over the faces of cells +// (which is a measure for the second +// derivatives) and scales it by the +// size of the cell. It is therefore +// a measure for the local smoothness +// of the solution at the place of +// each cell and it is thus +// understandable that it yields +// reasonable grids also for +// hyperbolic transport problems or +// the wave equation as well, +// although these grids are certainly +// suboptimal compared to approaches +// specially tailored to the +// problem. This error estimator may +// therefore be understood as a quick +// way to test an adaptive program. +// +// The way the estimator works is to +// take a DoFHandler object +// describing the degrees of freedom +// and a vector of values for each +// degree of freedom as input and +// compute a single indicator value +// for each active cell of the +// triangulation (i.e. one value for +// each of the +// triangulation.n_active_cells() +// cells). To do so, it needs two +// additional pieces of information: +// a quadrature formula on the faces +// (i.e. quadrature formula on +// dim-1 dimensional objects. We +// use a 3-point Gauss rule again, a +// pick that is consistent and +// appropriate with the choice +// bi-quadratic finite element shape +// functions in this program. +// (What constitutes a suitable +// quadrature rule here of course +// depends on knowledge of the way +// the error estimator evaluates +// the solution field. As said +// above, the jump of the gradient +// is integrated over each face, +// which would be a quadratic +// function on each face for the +// quadratic elements in use in +// this example. In fact, however, +// it is the square of the jump of +// the gradient, as explained in +// the documentation of that class, +// and that is a quartic function, +// for which a 3 point Gauss +// formula is sufficient since it +// integrates polynomials up to +// order 5 exactly.) +// +// Secondly, the function wants a +// list of boundaries where we have +// imposed Neumann value, and the +// corresponding Neumann values. This +// information is represented by an +// object of type +// FunctionMap@::type that is +// essentially a map from boundary +// indicators to function objects +// describing Neumann boundary values +// (in the present example program, +// we do not use Neumann boundary +// values, so this map is empty, and +// in fact constructed using the +// default constructor of the map in +// the place where the function call +// expects the respective function +// argument). +// +// The output, as mentioned is a +// vector of values for all +// cells. While it may make sense to +// compute the *value* of a degree of +// freedom very accurately, it is +// usually not helpful to compute the +// *error indicator* corresponding to +// a cell particularly accurately. We +// therefore typically use a vector +// of floats instead of a vector of +// doubles to represent error +// indicators. template void LaplaceProblem::refine_grid () { Vector estimated_error_per_cell (triangulation.n_active_cells()); KellyErrorEstimator::estimate (dof_handler, - QGauss(3), - typename FunctionMap::type(), - solution, - estimated_error_per_cell); - - // The above function returned one - // error indicator value for each - // cell in the - // estimated_error_per_cell - // array. Refinement is now done as - // follows: refine those 30 per - // cent of the cells with the - // highest error values, and - // coarsen the 3 per cent of cells - // with the lowest values. - // - // One can easily verify that if - // the second number were zero, - // this would approximately result - // in a doubling of cells in each - // step in two space dimensions, - // since for each of the 30 per - // cent of cells, four new would be - // replaced, while the remaining 70 - // per cent of cells remain - // untouched. In practice, some - // more cells are usually produced - // since it is disallowed that a - // cell is refined twice while the - // neighbor cell is not refined; in - // that case, the neighbor cell - // would be refined as well. - // - // In many applications, the number - // of cells to be coarsened would - // be set to something larger than - // only three per cent. A non-zero - // value is useful especially if - // for some reason the initial - // (coarse) grid is already rather - // refined. In that case, it might - // be necessary to refine it in - // some regions, while coarsening - // in some other regions is - // useful. In our case here, the - // initial grid is very coarse, so - // coarsening is only necessary in - // a few regions where - // over-refinement may have taken - // place. Thus a small, non-zero - // value is appropriate here. - // - // The following function now takes - // these refinement indicators and - // flags some cells of the - // triangulation for refinement or - // coarsening using the method - // described above. It is from a - // class that implements - // several different algorithms to - // refine a triangulation based on - // cell-wise error indicators. + QGauss(3), + typename FunctionMap::type(), + solution, + estimated_error_per_cell); + + // The above function returned one + // error indicator value for each + // cell in the + // estimated_error_per_cell + // array. Refinement is now done as + // follows: refine those 30 per + // cent of the cells with the + // highest error values, and + // coarsen the 3 per cent of cells + // with the lowest values. + // + // One can easily verify that if + // the second number were zero, + // this would approximately result + // in a doubling of cells in each + // step in two space dimensions, + // since for each of the 30 per + // cent of cells, four new would be + // replaced, while the remaining 70 + // per cent of cells remain + // untouched. In practice, some + // more cells are usually produced + // since it is disallowed that a + // cell is refined twice while the + // neighbor cell is not refined; in + // that case, the neighbor cell + // would be refined as well. + // + // In many applications, the number + // of cells to be coarsened would + // be set to something larger than + // only three per cent. A non-zero + // value is useful especially if + // for some reason the initial + // (coarse) grid is already rather + // refined. In that case, it might + // be necessary to refine it in + // some regions, while coarsening + // in some other regions is + // useful. In our case here, the + // initial grid is very coarse, so + // coarsening is only necessary in + // a few regions where + // over-refinement may have taken + // place. Thus a small, non-zero + // value is appropriate here. + // + // The following function now takes + // these refinement indicators and + // flags some cells of the + // triangulation for refinement or + // coarsening using the method + // described above. It is from a + // class that implements + // several different algorithms to + // refine a triangulation based on + // cell-wise error indicators. GridRefinement::refine_and_coarsen_fixed_number (triangulation, - estimated_error_per_cell, - 0.3, 0.03); - - // After the previous function has - // exited, some cells are flagged - // for refinement, and some other - // for coarsening. The refinement - // or coarsening itself is not - // performed by now, however, since - // there are cases where further - // modifications of these flags is - // useful. Here, we don't want to - // do any such thing, so we can - // tell the triangulation to - // perform the actions for which - // the cells are flagged: + estimated_error_per_cell, + 0.3, 0.03); + + // After the previous function has + // exited, some cells are flagged + // for refinement, and some other + // for coarsening. The refinement + // or coarsening itself is not + // performed by now, however, since + // there are cases where further + // modifications of these flags is + // useful. Here, we don't want to + // do any such thing, so we can + // tell the triangulation to + // perform the actions for which + // the cells are flagged: triangulation.execute_coarsening_and_refinement (); } - // @sect4{LaplaceProblem::output_results} - - // At the end of computations on each - // grid, and just before we continue - // the next cycle with mesh - // refinement, we want to output the - // results from this cycle. - // - // In the present program, we will - // not write the solution (except for - // in the last step, see the next - // function), but only the meshes - // that we generated, as a - // two-dimensional Encapsulated - // Postscript (EPS) file. - // - // We have already seen in step-1 how - // this can be achieved. The only - // thing we have to change is the - // generation of the file name, since - // it should contain the number of - // the present refinement cycle - // provided to this function as an - // argument. The most general way is - // to use the std::stringstream class - // as shown in step-5, but here's a - // little hack that makes it simpler - // if we know that we have less than - // 10 iterations: assume that the - // numbers `0' through `9' are - // represented consecutively in the - // character set used on your machine - // (this is in fact the case in all - // known character sets), then - // '0'+cycle gives the character - // corresponding to the present cycle - // number. Of course, this will only - // work if the number of cycles is - // actually less than 10, and rather - // than waiting for the disaster to - // happen, we safeguard our little - // hack with an explicit assertion at - // the beginning of the function. If - // this assertion is triggered, - // i.e. when cycle is larger than - // or equal to 10, an exception of - // type ExcNotImplemented is - // raised, indicating that some - // functionality is not implemented - // for this case (the functionality - // that is missing, of course, is the - // generation of file names for that - // case): +// @sect4{LaplaceProblem::output_results} + +// At the end of computations on each +// grid, and just before we continue +// the next cycle with mesh +// refinement, we want to output the +// results from this cycle. +// +// In the present program, we will +// not write the solution (except for +// in the last step, see the next +// function), but only the meshes +// that we generated, as a +// two-dimensional Encapsulated +// Postscript (EPS) file. +// +// We have already seen in step-1 how +// this can be achieved. The only +// thing we have to change is the +// generation of the file name, since +// it should contain the number of +// the present refinement cycle +// provided to this function as an +// argument. The most general way is +// to use the std::stringstream class +// as shown in step-5, but here's a +// little hack that makes it simpler +// if we know that we have less than +// 10 iterations: assume that the +// numbers `0' through `9' are +// represented consecutively in the +// character set used on your machine +// (this is in fact the case in all +// known character sets), then +// '0'+cycle gives the character +// corresponding to the present cycle +// number. Of course, this will only +// work if the number of cycles is +// actually less than 10, and rather +// than waiting for the disaster to +// happen, we safeguard our little +// hack with an explicit assertion at +// the beginning of the function. If +// this assertion is triggered, +// i.e. when cycle is larger than +// or equal to 10, an exception of +// type ExcNotImplemented is +// raised, indicating that some +// functionality is not implemented +// for this case (the functionality +// that is missing, of course, is the +// generation of file names for that +// case): template void LaplaceProblem::output_results (const unsigned int cycle) const { @@ -973,7 +973,7 @@ void LaplaceProblem::output_results (const unsigned int cycle) const std::string filename = "grid-"; filename += ('0' + cycle); filename += ".eps"; - + std::ofstream output (filename.c_str()); GridOut grid_out; @@ -982,95 +982,95 @@ void LaplaceProblem::output_results (const unsigned int cycle) const - // @sect4{LaplaceProblem::run} - - // The final function before - // main() is again the main - // driver of the class, run(). It - // is similar to the one of step-5, - // except that we generate a file in - // the program again instead of - // reading it from disk, in that we - // adaptively instead of globally - // refine the mesh, and that we - // output the solution on the final - // mesh in the present function. - // - // The first block in the main loop - // of the function deals with mesh - // generation. If this is the first - // cycle of the program, instead of - // reading the grid from a file on - // disk as in the previous example, - // we now again create it using a - // library function. The domain is - // again a circle, which is why we - // have to provide a suitable - // boundary object as well. We place - // the center of the circle at the - // origin and have the radius be one - // (these are the two hidden - // arguments to the function, which - // have default values). - // - // You will notice by looking at the - // coarse grid that it is of inferior - // quality than the one which we read - // from the file in the previous - // example: the cells are less - // equally formed. However, using the - // library function this program - // works in any space dimension, - // which was not the case before. - // - // In case we find that this is not - // the first cycle, we want to refine - // the grid. Unlike the global - // refinement employed in the last - // example program, we now use the - // adaptive procedure described - // above. - // - // The rest of the loop looks as - // before: +// @sect4{LaplaceProblem::run} + +// The final function before +// main() is again the main +// driver of the class, run(). It +// is similar to the one of step-5, +// except that we generate a file in +// the program again instead of +// reading it from disk, in that we +// adaptively instead of globally +// refine the mesh, and that we +// output the solution on the final +// mesh in the present function. +// +// The first block in the main loop +// of the function deals with mesh +// generation. If this is the first +// cycle of the program, instead of +// reading the grid from a file on +// disk as in the previous example, +// we now again create it using a +// library function. The domain is +// again a circle, which is why we +// have to provide a suitable +// boundary object as well. We place +// the center of the circle at the +// origin and have the radius be one +// (these are the two hidden +// arguments to the function, which +// have default values). +// +// You will notice by looking at the +// coarse grid that it is of inferior +// quality than the one which we read +// from the file in the previous +// example: the cells are less +// equally formed. However, using the +// library function this program +// works in any space dimension, +// which was not the case before. +// +// In case we find that this is not +// the first cycle, we want to refine +// the grid. Unlike the global +// refinement employed in the last +// example program, we now use the +// adaptive procedure described +// above. +// +// The rest of the loop looks as +// before: template -void LaplaceProblem::run () +void LaplaceProblem::run () { for (unsigned int cycle=0; cycle<8; ++cycle) { deallog << "Cycle " << cycle << ':' << std::endl; if (cycle == 0) - { - GridGenerator::hyper_ball (triangulation); + { + GridGenerator::hyper_ball (triangulation); - static const HyperBallBoundary boundary; - triangulation.set_boundary (0, boundary); + static const HyperBallBoundary boundary; + triangulation.set_boundary (0, boundary); - triangulation.refine_global (1); - } + triangulation.refine_global (1); + } else - refine_grid (); - + refine_grid (); + 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 (); } - // try to find a bunch of points that are - // definitely inside the domain (we here - // have a circle of radius 1, so find - // points inside a radius of 0.9) + // try to find a bunch of points that are + // definitely inside the domain (we here + // have a circle of radius 1, so find + // points inside a radius of 0.9) for (int i=0; i<1000; i++) { double r = sqrt((0.9*std::rand()/RAND_MAX)); @@ -1083,140 +1083,140 @@ void LaplaceProblem::run () } - // @sect3{The main function} - - // The main function is unaltered in - // its functionality from the - // previous example, but we have - // taken a step of additional - // caution. Sometimes, something goes - // wrong (such as insufficient disk - // space upon writing an output file, - // not enough memory when trying to - // allocate a vector or a matrix, or - // if we can't read from or write to - // a file for whatever reason), and - // in these cases the library will - // throw exceptions. Since these are - // run-time problems, not programming - // errors that can be fixed once and - // for all, this kind of exceptions - // is not switched off in optimized - // mode, in contrast to the - // Assert macro which we have - // used to test against programming - // errors. If uncaught, these - // exceptions propagate the call tree - // up to the main function, and - // if they are not caught there - // either, the program is aborted. In - // many cases, like if there is not - // enough memory or disk space, we - // can't do anything but we can at - // least print some text trying to - // explain the reason why the program - // failed. A way to do so is shown in - // the following. It is certainly - // useful to write any larger program - // in this way, and you can do so by - // more or less copying this function - // except for the try block that - // actually encodes the functionality - // particular to the present - // application. -int main () +// @sect3{The main function} + +// The main function is unaltered in +// its functionality from the +// previous example, but we have +// taken a step of additional +// caution. Sometimes, something goes +// wrong (such as insufficient disk +// space upon writing an output file, +// not enough memory when trying to +// allocate a vector or a matrix, or +// if we can't read from or write to +// a file for whatever reason), and +// in these cases the library will +// throw exceptions. Since these are +// run-time problems, not programming +// errors that can be fixed once and +// for all, this kind of exceptions +// is not switched off in optimized +// mode, in contrast to the +// Assert macro which we have +// used to test against programming +// errors. If uncaught, these +// exceptions propagate the call tree +// up to the main function, and +// if they are not caught there +// either, the program is aborted. In +// many cases, like if there is not +// enough memory or disk space, we +// can't do anything but we can at +// least print some text trying to +// explain the reason why the program +// failed. A way to do so is shown in +// the following. It is certainly +// useful to write any larger program +// in this way, and you can do so by +// more or less copying this function +// except for the try block that +// actually encodes the functionality +// particular to the present +// application. +int main () { std::ofstream logfile ("joa_1/output"); deallog << std::setprecision (3); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - // The general idea behind the - // layout of this function is as - // follows: let's try to run the - // program as we did before... + // The general idea behind the + // layout of this function is as + // follows: let's try to run the + // program as we did before... try { LaplaceProblem<2> laplace_problem_2d; laplace_problem_2d.run (); } - // ...and if this should fail, try - // to gather as much information as - // possible. Specifically, if the - // exception that was thrown is an - // object of a class that is - // derived from the C++ standard - // class exception, then we can - // use the what member function - // to get a string which describes - // the reason why the exception was - // thrown. - // - // The deal.II exception classes - // are all derived from the - // standard class, and in - // particular, the exc.what() - // function will return - // approximately the same string as - // would be generated if the - // exception was thrown using the - // Assert macro. You have seen - // the output of such an exception - // in the previous example, and you - // then know that it contains the - // file and line number of where - // the exception occured, and some - // other information. This is also - // what the following statements - // would print. - // - // Apart from this, there isn't - // much that we can do except - // exiting the program with an - // error code (this is what the - // return 1; does): + // ...and if this should fail, try + // to gather as much information as + // possible. Specifically, if the + // exception that was thrown is an + // object of a class that is + // derived from the C++ standard + // class exception, then we can + // use the what member function + // to get a string which describes + // the reason why the exception was + // thrown. + // + // The deal.II exception classes + // are all derived from the + // standard class, and in + // particular, the exc.what() + // function will return + // approximately the same string as + // would be generated if the + // exception was thrown using the + // Assert macro. You have seen + // the output of such an exception + // in the previous example, and you + // then know that it contains the + // file and line number of where + // the exception occured, and some + // other information. This is also + // what the following statements + // would print. + // + // Apart from this, there isn't + // much that we can do except + // exiting the program with an + // error code (this is what the + // return 1; does): catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } - // If the exception that was thrown - // somewhere was not an object of a - // class derived from the standard - // exception class, then we - // can't do anything at all. We - // then simply print an error - // message and exit. - catch (...) + // If the exception that was thrown + // somewhere was not an object of a + // class derived from the standard + // exception class, then we + // can't do anything at all. We + // then simply print an error + // message and exit. + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } - // If we got to this point, there - // was no exception which - // propagated up to the main - // function (there may have been - // exceptions, but they were caught - // somewhere in the program or the - // library). Therefore, the program - // performed as was expected and we - // can return without error. + // If we got to this point, there + // was no exception which + // propagated up to the main + // function (there may have been + // exceptions, but they were caught + // somewhere in the program or the + // library). Therefore, the program + // performed as was expected and we + // can return without error. return 0; } diff --git a/tests/bits/make_boundary_constraints_01.cc b/tests/bits/make_boundary_constraints_01.cc index 4c6431022a..982239680b 100644 --- a/tests/bits/make_boundary_constraints_01.cc +++ b/tests/bits/make_boundary_constraints_01.cc @@ -39,40 +39,40 @@ #include #include - + template void test () { deallog << dim << "D" << std::endl; - + Triangulation triangulation; GridGenerator::hyper_cube (triangulation); - // refine the mesh in a random way + // refine the mesh in a random way triangulation.refine_global (4-dim); for (unsigned int i=0; i<11-2*dim; ++i) { typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + cell = triangulation.begin_active(); for (unsigned int index=0; cell != triangulation.end(); ++cell, ++index) if (index % (3*dim) == 0) cell->set_refine_flag(); triangulation.execute_coarsening_and_refinement (); } - deallog << "Number of cells: " - << triangulation.n_active_cells() << std::endl; - - // assign quadrature, set up a - // DoFHandler, and distribute dofs + deallog << "Number of cells: " + << triangulation.n_active_cells() << std::endl; + + // assign quadrature, set up a + // DoFHandler, and distribute dofs FE_Q fe(1); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); - deallog << "Number of dofs : " - << dof_handler.n_dofs() << std::endl; + deallog << "Number of dofs : " + << dof_handler.n_dofs() << std::endl; - // then set up a sparsity pattern - // and two matrices and vectors on - // top of it. + // then set up a sparsity pattern + // and two matrices and vectors on + // top of it. SparsityPattern sparsity (dof_handler.n_dofs(), dof_handler.n_dofs(), dof_handler.max_couplings_between_dofs()); @@ -81,65 +81,65 @@ void test () SparseMatrix A(sparsity), B(sparsity); Vector a1 (dof_handler.n_dofs()); - // initialize object denoting zero - // boundary values and boundary - // constraints + // initialize object denoting zero + // boundary values and boundary + // constraints std::map boundary_values; VectorTools::interpolate_boundary_values (dof_handler, - 0, - ConstantFunction(1.), - boundary_values); + 0, + ConstantFunction(1.), + boundary_values); ConstraintMatrix constraints; constraints.clear(); DoFTools::make_zero_boundary_constraints (dof_handler, - constraints); + constraints); constraints.close(); - // then fill two matrices by - // setting up bogus matrix entries - // and for A applying constraints - // right away and for B applying - // constraints later on + // then fill two matrices by + // setting up bogus matrix entries + // and for A applying constraints + // right away and for B applying + // constraints later on std::vector local_dofs (fe.dofs_per_cell); FullMatrix local_matrix (fe.dofs_per_cell, fe.dofs_per_cell); Vector local_vector (fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) { cell->get_dof_indices (local_dofs); local_matrix = 0; - // create local matrices + // create local matrices for (unsigned int i=0; idistribute_local_to_global (local_matrix, A); cell->distribute_local_to_global (local_vector, a1); - // for matrix B cast constraint - // matrix + // for matrix B cast constraint + // matrix constraints.distribute_local_to_global (local_matrix, - local_dofs, - B); + local_dofs, + B); } - // here comes the check: compare - // the l1_norm of matrices A and B, - // their difference should be zero + // here comes the check: compare + // the l1_norm of matrices A and B, + // their difference should be zero deallog << "|A| = " << A.l1_norm() << std::endl; deallog << "|B| = " << B.l1_norm() << std::endl; Assert (A.l1_norm() - B.l1_norm() == 0, - ExcInternalError()); + ExcInternalError()); } int main () @@ -158,25 +158,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/make_boundary_constraints_02.cc b/tests/bits/make_boundary_constraints_02.cc index 6292e8fb98..a63998aaef 100644 --- a/tests/bits/make_boundary_constraints_02.cc +++ b/tests/bits/make_boundary_constraints_02.cc @@ -50,38 +50,38 @@ void test () Triangulation triangulation; const Point p2 = (dim == 1 ? - Point(1.) : - (dim == 2 ? - Point(1.,1.) : - Point(1.,1.,1.))); + Point(1.) : + (dim == 2 ? + Point(1.,1.) : + Point(1.,1.,1.))); GridGenerator::hyper_rectangle (triangulation, - Point(), p2, true); + Point(), p2, true); - // refine the mesh in a random way + // refine the mesh in a random way triangulation.refine_global (4-dim); for (unsigned int i=0; i<11-2*dim; ++i) { typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + cell = triangulation.begin_active(); for (unsigned int index=0; cell != triangulation.end(); ++cell, ++index) if (index % (3*dim) == 0) cell->set_refine_flag(); triangulation.execute_coarsening_and_refinement (); } deallog << "Number of cells: " - << triangulation.n_active_cells() << std::endl; + << triangulation.n_active_cells() << std::endl; - // assign quadrature, set up a - // DoFHandler, and distribute dofs + // assign quadrature, set up a + // DoFHandler, and distribute dofs FE_Q fe(1); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); deallog << "Number of dofs : " - << dof_handler.n_dofs() << std::endl; + << dof_handler.n_dofs() << std::endl; - // then set up a sparsity pattern - // and two matrices and vectors on - // top of it. + // then set up a sparsity pattern + // and two matrices and vectors on + // top of it. SparsityPattern sparsity (dof_handler.n_dofs(), dof_handler.n_dofs(), dof_handler.max_couplings_between_dofs()); @@ -90,66 +90,66 @@ void test () SparseMatrix A(sparsity), B(sparsity); Vector a1 (dof_handler.n_dofs()); - // initialize object denoting zero - // boundary values and boundary - // constraints + // initialize object denoting zero + // boundary values and boundary + // constraints std::map boundary_values; VectorTools::interpolate_boundary_values (dof_handler, - 1, - ConstantFunction(1.), - boundary_values); + 1, + ConstantFunction(1.), + boundary_values); ConstraintMatrix constraints; constraints.clear(); DoFTools::make_zero_boundary_constraints (dof_handler, - 1, - constraints); + 1, + constraints); constraints.close(); - // then fill two matrices by - // setting up bogus matrix entries - // and for A applying constraints - // right away and for B applying - // constraints later on + // then fill two matrices by + // setting up bogus matrix entries + // and for A applying constraints + // right away and for B applying + // constraints later on std::vector local_dofs (fe.dofs_per_cell); FullMatrix local_matrix (fe.dofs_per_cell, fe.dofs_per_cell); Vector local_vector (fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) { cell->get_dof_indices (local_dofs); local_matrix = 0; - // create local matrices + // create local matrices for (unsigned int i=0; idistribute_local_to_global (local_matrix, A); cell->distribute_local_to_global (local_vector, a1); - // for matrix B cast constraint - // matrix + // for matrix B cast constraint + // matrix constraints.distribute_local_to_global (local_matrix, - local_dofs, - B); + local_dofs, + B); } - // here comes the check: compare - // the l1_norm of matrices A and B, - // their difference should be zero + // here comes the check: compare + // the l1_norm of matrices A and B, + // their difference should be zero deallog << "|A| = " << A.l1_norm() << std::endl; deallog << "|B| = " << B.l1_norm() << std::endl; Assert (A.l1_norm() - B.l1_norm() == 0, - ExcInternalError()); + ExcInternalError()); } int main () @@ -168,25 +168,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/map_dofs_to_support_points_hp_01.cc b/tests/bits/map_dofs_to_support_points_hp_01.cc index 296aa65b9a..deed4a3d97 100644 --- a/tests/bits/map_dofs_to_support_points_hp_01.cc +++ b/tests/bits/map_dofs_to_support_points_hp_01.cc @@ -47,7 +47,7 @@ void test () FE_Q p(1); FESystem fe_system(u, 2, p, 1); - + MappingQ mapping(2); hp::MappingCollection mapping_collection(mapping); @@ -60,25 +60,25 @@ void test () //distribute dofs hp_dof_handler.distribute_dofs(fe_collection); dof_handler.distribute_dofs(fe_system); - + //basically, dof_handler and hp_dof_handler are the same //so they should contain the same number of dofs. Assert(hp_dof_handler.n_dofs() == dof_handler.n_dofs(),ExcInternalError()); - + //now map the dofs to the support points and show them on the screen std::vector > map(dof_handler.n_dofs()); std::vector > hp_map(hp_dof_handler.n_dofs()); - + DoFTools::map_dofs_to_support_points(mapping, dof_handler, map); DoFTools::map_dofs_to_support_points(mapping_collection, hp_dof_handler, hp_map); - // output the elements + // output the elements for (unsigned int i=0; i fe1(1); FE_Q fe2(2); - + MappingQ mapping(1); hp::MappingCollection mapping_collection(mapping); @@ -60,8 +60,8 @@ void test () hp_dof_handler.begin_active()->set_active_fe_index(1); hp_dof_handler.distribute_dofs(fe_collection); - - + + //now map the dofs to the support points and show them on the screen std::vector > hp_map(hp_dof_handler.n_dofs()); @@ -69,9 +69,9 @@ void test () // output the elements for (unsigned int i=0; i &tria) dof_handler.distribute_dofs (fe); QGauss q_face(3); - + FEFaceValues fe_face_values (mapping, fe, q_face, update_normal_vectors); fe_face_values.reinit (dof_handler.begin_active(), 0); @@ -55,25 +55,25 @@ void check (const Triangulation &tria) } -int main () +int main () { std::ofstream logfile("mapping_cartesian_1/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<2> coarse_grid; GridGenerator::hyper_cube (coarse_grid); check (coarse_grid); } - { + { Triangulation<3> coarse_grid; GridGenerator::hyper_cube (coarse_grid); check (coarse_grid); - } + } } - - + + diff --git a/tests/bits/mapping_q1_eulerian_01.cc b/tests/bits/mapping_q1_eulerian_01.cc index 3b0a3dd679..00c472ad4e 100644 --- a/tests/bits/mapping_q1_eulerian_01.cc +++ b/tests/bits/mapping_q1_eulerian_01.cc @@ -64,23 +64,23 @@ using namespace dealii; template class Displacement : public Function { - public: - Displacement() : - Function(dim) - {} - - double value (const Point &p, - const unsigned int component) const - { - return p[component]; - } - - void vector_value (const Point &p, - Vector &v) const - { - for (unsigned int i=0; i(dim) + {} + + double value (const Point &p, + const unsigned int component) const + { + return p[component]; + } + + void vector_value (const Point &p, + Vector &v) const + { + for (unsigned int i=0; i displacements (dof_handler.n_dofs()); VectorTools::interpolate (dof_handler, - Displacement(), - displacements); + Displacement(), + displacements); MappingQ1Eulerian euler(displacements, dof_handler); - // now the actual test + // now the actual test DataOut data_out; data_out.attach_dof_handler(dof_handler); std::vector names (dim, "displacement"); data_out.add_data_vector(displacements,names); - // output with all cells curved + // output with all cells curved data_out.build_patches(euler,1,DataOut::curved_inner_cells); data_out.write_gnuplot(deallog.get_file_stream()); } diff --git a/tests/bits/mapping_q4_3d.cc b/tests/bits/mapping_q4_3d.cc index afd9a40063..db50815465 100644 --- a/tests/bits/mapping_q4_3d.cc +++ b/tests/bits/mapping_q4_3d.cc @@ -35,7 +35,7 @@ #include -int main () +int main () { std::ofstream logfile("mapping_q4_3d/output"); deallog.attach(logfile); @@ -57,9 +57,9 @@ int main () update_JxW_values); fe_face_values.reinit (dof_handler.begin_active(), 0); - // if we got here, we got past the previous - // abort + // if we got here, we got past the previous + // abort deallog << "OK" << std::endl; } - + diff --git a/tests/bits/mapping_q_eulerian_01.cc b/tests/bits/mapping_q_eulerian_01.cc index 3825df9a79..3adbf23aec 100644 --- a/tests/bits/mapping_q_eulerian_01.cc +++ b/tests/bits/mapping_q_eulerian_01.cc @@ -62,23 +62,23 @@ using namespace dealii; template class Displacement : public Function { - public: - Displacement() : - Function(dim) - {} - - double value (const Point &p, - const unsigned int component) const - { - return p[component]; - } - - void vector_value (const Point &p, - Vector &v) const - { - for (unsigned int i=0; i(dim) + {} + + double value (const Point &p, + const unsigned int component) const + { + return p[component]; + } + + void vector_value (const Point &p, + Vector &v) const + { + for (unsigned int i=0; i displacements (dof_handler.n_dofs()); VectorTools::interpolate (dof_handler, - Displacement(), - displacements); + Displacement(), + displacements); MappingQEulerian euler(2, displacements, dof_handler); - // now the actual test + // now the actual test DataOut data_out; data_out.attach_dof_handler(dof_handler); std::vector names (dim, "displacement"); data_out.add_data_vector(displacements,names); - // output with all cells curved + // output with all cells curved data_out.build_patches(euler,1,DataOut::curved_inner_cells); data_out.write_gnuplot(deallog.get_file_stream()); } diff --git a/tests/bits/mapping_q_eulerian_02.cc b/tests/bits/mapping_q_eulerian_02.cc index a4b6cb5064..1cb4e83dcd 100644 --- a/tests/bits/mapping_q_eulerian_02.cc +++ b/tests/bits/mapping_q_eulerian_02.cc @@ -64,23 +64,23 @@ using namespace dealii; template class Displacement : public Function { - public: - Displacement() : - Function(dim) - {} - - double value (const Point &p, - const unsigned int component) const - { - return p[component]*p[0]/2; - } - - void vector_value (const Point &p, - Vector &v) const - { - for (unsigned int i=0; i(dim) + {} + + double value (const Point &p, + const unsigned int component) const + { + return p[component]*p[0]/2; + } + + void vector_value (const Point &p, + Vector &v) const + { + for (unsigned int i=0; i displacements (dof_handler.n_dofs()); VectorTools::interpolate (dof_handler, - Displacement(), - displacements); + Displacement(), + displacements); MappingQEulerian euler(2, displacements, dof_handler); - // now the actual test + // now the actual test DataOut data_out; data_out.attach_dof_handler(dof_handler); std::vector names (dim, "displacement"); data_out.add_data_vector(displacements,names); - // output with all cells curved + // output with all cells curved data_out.build_patches(euler,1,DataOut::curved_inner_cells); data_out.write_gnuplot(deallog.get_file_stream()); } diff --git a/tests/bits/mapping_q_eulerian_03.cc b/tests/bits/mapping_q_eulerian_03.cc index 9e5739ed49..8da0fcb293 100644 --- a/tests/bits/mapping_q_eulerian_03.cc +++ b/tests/bits/mapping_q_eulerian_03.cc @@ -65,23 +65,23 @@ using namespace dealii; template class Displacement : public Function { - public: - Displacement() : - Function(dim) - {} - - double value (const Point &p, - const unsigned int component) const - { - return p[component]*p.square(); - } - - void vector_value (const Point &p, - Vector &v) const - { - for (unsigned int i=0; i(dim) + {} + + double value (const Point &p, + const unsigned int component) const + { + return p[component]*p.square(); + } + + void vector_value (const Point &p, + Vector &v) const + { + for (unsigned int i=0; i displacements (dof_handler.n_dofs()); VectorTools::interpolate (dof_handler, - Displacement(), - displacements); + Displacement(), + displacements); MappingQEulerian euler(2, displacements, dof_handler); - // now the actual test + // now the actual test DataOut data_out; data_out.attach_dof_handler(dof_handler); std::vector names (dim, "displacement"); data_out.add_data_vector(displacements,names); - // output with all cells curved + // output with all cells curved data_out.build_patches(euler,5,DataOut::curved_inner_cells); data_out.write_gnuplot(deallog.get_file_stream()); } diff --git a/tests/bits/mapping_q_eulerian_04.cc b/tests/bits/mapping_q_eulerian_04.cc index 4ad025f1a9..851fb0abe6 100644 --- a/tests/bits/mapping_q_eulerian_04.cc +++ b/tests/bits/mapping_q_eulerian_04.cc @@ -41,7 +41,8 @@ std::ofstream logfile("mapping_q_eulerian_04/output"); template -void test() { +void test() +{ Triangulation tria; GridGenerator::hyper_cube(tria); FE_Q base_fe(1); @@ -50,7 +51,7 @@ void test() { DoFHandler shift_dh(tria); shift_dh.distribute_dofs(fe); - + Vector shift(shift_dh.n_dofs()); shift.add(+1); @@ -61,36 +62,36 @@ void test() { QTrapez quad; MappingQ1Eulerian,spacedim> mapping(shift, shift_dh); - - typename Triangulation::active_cell_iterator cell=tria.begin_active(), - endc=tria.end() ; + + typename Triangulation::active_cell_iterator cell=tria.begin_active(), + endc=tria.end() ; Point real; Point unit; double eps = 1e-10; - for(;cell!=endc;++cell) + for (; cell!=endc; ++cell) { - deallog< " << real << std::endl; - if( (unit-quad.point(q)).norm()>eps) - deallog< " << real << std::endl; + if ( (unit-quad.point(q)).norm()>eps) + deallog< -void test(unsigned int degree) { +void test(unsigned int degree) +{ Triangulation tria; GridGenerator::hyper_cube(tria); FE_Q base_fe(degree); @@ -50,7 +51,7 @@ void test(unsigned int degree) { DoFHandler shift_dh(tria); shift_dh.distribute_dofs(fe); - + Vector shift(shift_dh.n_dofs()); shift.add(+1); @@ -61,39 +62,39 @@ void test(unsigned int degree) { QTrapez quad; MappingQEulerian,spacedim> mapping(degree,shift, shift_dh); - - typename Triangulation::active_cell_iterator cell=tria.begin_active(), - endc=tria.end() ; + + typename Triangulation::active_cell_iterator cell=tria.begin_active(), + endc=tria.end() ; Point real; Point unit; double eps = 1e-10; - for(;cell!=endc;++cell) + for (; cell!=endc; ++cell) { - deallog< " << real << std::endl; - if( (unit-quad.point(q)).norm()>eps) - deallog< " << real << std::endl; + if ( (unit-quad.point(q)).norm()>eps) + deallog< tria; GridGenerator::hyper_cube (tria); tria.refine_global(2); @@ -50,12 +50,12 @@ void test () Vector criteria (tria.n_active_cells()); for (unsigned int i=0; i &coarse_grid) Point<3>(1,1,0), Point<3>(0,1,0), Point<3>(2,0,0), - Point<3>(2,1,0)}; + Point<3>(2,1,0) + }; std::vector > vertices; for (unsigned int i=0; i<6; ++i) vertices.push_back (points[i]); @@ -38,10 +39,11 @@ void create_two_cubes (Triangulation<3> &coarse_grid) vertices.push_back (points[i] + Point<3>(0,0,-1)); std::vector > cells; - + const unsigned int connectivity[2][4] - = { { 0,1,2,3 }, - { 4,5,2,1 } }; + = { { 0,1,2,3 }, + { 4,5,2,1 } + }; for (unsigned int i=0; i<2; ++i) { CellData<3> cell; @@ -53,8 +55,8 @@ void create_two_cubes (Triangulation<3> &coarse_grid) cells.push_back (cell); } - // finally generate a triangulation - // out of this + // finally generate a triangulation + // out of this GridReordering<3>::reorder_cells (cells); coarse_grid.create_triangulation_compatibility (vertices, cells, SubCellData()); } @@ -66,16 +68,17 @@ void create_two_cubes (Triangulation<3> &coarse_grid) // to store the face rotation (and face flip) in each cell void create_two_cubes_rotation (Triangulation<3> &coarse_grid, - const unsigned int n_rotations) + const unsigned int n_rotations) { Assert(n_rotations<4, ExcNotImplemented()); - + const Point<3> points[6] = { Point<3>(0,0,0), Point<3>(1,0,0), Point<3>(1,1,0), Point<3>(0,1,0), Point<3>(2,0,0), - Point<3>(2,1,0)}; + Point<3>(2,1,0) + }; std::vector > vertices; for (unsigned int i=0; i<6; ++i) vertices.push_back (points[i]); @@ -83,25 +86,26 @@ void create_two_cubes_rotation (Triangulation<3> &coarse_grid, vertices.push_back (points[i] + Point<3>(0,0,-1)); std::vector > cells(2); - + const unsigned int connectivity[5][8] - // first row: left cube - // second row: right cube, standard_orientation - // third row: right cube, rotated once - // forth row: right cube, rotated twice - // fifth row: right cube, rotated three times - = { { 0,1,2,3,6,7,8,9 }, - { 1,4,5,2,7,10,11,8}, - { 2,5,11,8,1,4,10,7}, - { 8,11,10,7,2,5,4,1}, - { 7,10,4,1,8,11,5,2} }; + // first row: left cube + // second row: right cube, standard_orientation + // third row: right cube, rotated once + // forth row: right cube, rotated twice + // fifth row: right cube, rotated three times + = { { 0,1,2,3,6,7,8,9 }, + { 1,4,5,2,7,10,11,8}, + { 2,5,11,8,1,4,10,7}, + { 8,11,10,7,2,5,4,1}, + { 7,10,4,1,8,11,5,2} + }; for (unsigned int j=0; j<8; ++j) { cells[0].vertices[j] = connectivity[0][j]; cells[1].vertices[j] = connectivity[1+n_rotations][j]; } - // finally generate a triangulation - // out of this + // finally generate a triangulation + // out of this coarse_grid.create_triangulation_compatibility (vertices, cells, SubCellData()); } @@ -111,23 +115,24 @@ void create_L_shape (Triangulation<3> &coarse_grid) { std::vector > vertices; std::vector > cells; - + const Point<3> outer_points[7] = { Point<3>(-1,0,0), Point<3>(-1,-1,0), Point<3>(0,-1,0), Point<3>(+1,-1,0), Point<3>(+1,0,0), Point<3>(+1,+1,0), - Point<3>(0,+1,0) }; + Point<3>(0,+1,0) + }; - // first the point in the middle - // and the rest of those on the - // upper surface + // first the point in the middle + // and the rest of those on the + // upper surface vertices.push_back (Point<3>(0,0,0)); for (unsigned int i=0; i<7; ++i) vertices.push_back (outer_points[i]); - // then points on lower surface + // then points on lower surface vertices.push_back (Point<3>(0,0,-1)); for (unsigned int i=0; i<7; ++i) vertices.push_back (outer_points[i] @@ -137,11 +142,12 @@ void create_L_shape (Triangulation<3> &coarse_grid) const unsigned int n_vertices_per_surface = 8; Assert (vertices.size() == n_vertices_per_surface*2, ExcInternalError()); - + const unsigned int connectivity[3][4] - = { { 1, 2, 3, 0 }, - { 3, 4, 5, 0 }, - { 0, 5, 6, 7 } }; + = { { 1, 2, 3, 0 }, + { 3, 4, 5, 0 }, + { 0, 5, 6, 7 } + }; for (unsigned int i=0; i<3; ++i) { CellData<3> cell; @@ -153,8 +159,8 @@ void create_L_shape (Triangulation<3> &coarse_grid) cells.push_back (cell); } - // finally generate a triangulation - // out of this + // finally generate a triangulation + // out of this GridReordering<3>::reorder_cells (cells); coarse_grid.create_triangulation_compatibility (vertices, cells, SubCellData()); } diff --git a/tests/bits/mesh_3d_1.cc b/tests/bits/mesh_3d_1.cc index 6bc19bb0a3..436a629dfb 100644 --- a/tests/bits/mesh_3d_1.cc +++ b/tests/bits/mesh_3d_1.cc @@ -36,7 +36,7 @@ -int main () +int main () { std::ofstream logfile("mesh_3d_1/output"); deallog.attach(logfile); @@ -46,7 +46,7 @@ int main () Triangulation<3> coarse_grid; create_L_shape (coarse_grid); - // output all lines and faces + // output all lines and faces for (Triangulation<3>::active_cell_iterator cell=coarse_grid.begin_active(); cell != coarse_grid.end(); ++cell) { @@ -67,5 +67,5 @@ int main () } } - - + + diff --git a/tests/bits/mesh_3d_10.cc b/tests/bits/mesh_3d_10.cc index 2ed76937e0..ebd705aa80 100644 --- a/tests/bits/mesh_3d_10.cc +++ b/tests/bits/mesh_3d_10.cc @@ -62,7 +62,7 @@ void check (Triangulation<3> &tria) { deallog << "Initial check" << std::endl; check_this (tria); - + for (unsigned int r=0; r<3; ++r) { tria.refine_global (1); @@ -73,39 +73,39 @@ void check (Triangulation<3> &tria) coarsen_global (tria); deallog << "Check " << 1 << std::endl; check_this (tria); - + tria.refine_global (1); deallog << "Check " << 2 << std::endl; check_this (tria); } -int main () +int main () { std::ofstream logfile("mesh_3d_10/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<3> coarse_grid; create_two_cubes (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; create_L_shape (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); check (coarse_grid); } - + } - - + + diff --git a/tests/bits/mesh_3d_11.cc b/tests/bits/mesh_3d_11.cc index 576652a5ce..359a19c3f6 100644 --- a/tests/bits/mesh_3d_11.cc +++ b/tests/bits/mesh_3d_11.cc @@ -74,7 +74,7 @@ void check (Triangulation<3> &tria) { deallog << "Initial check" << std::endl; check_this (tria); - + for (unsigned int r=0; r<3; ++r) { tria.refine_global (1); @@ -85,39 +85,39 @@ void check (Triangulation<3> &tria) coarsen_global (tria); deallog << "Check " << 1 << std::endl; check_this (tria); - + tria.refine_global (1); deallog << "Check " << 2 << std::endl; check_this (tria); } -int main () +int main () { std::ofstream logfile("mesh_3d_11/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<3> coarse_grid; create_two_cubes (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; create_L_shape (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); check (coarse_grid); } - + } - - + + diff --git a/tests/bits/mesh_3d_12.cc b/tests/bits/mesh_3d_12.cc index e456c7d6fb..f4851f0350 100644 --- a/tests/bits/mesh_3d_12.cc +++ b/tests/bits/mesh_3d_12.cc @@ -56,7 +56,7 @@ void check_this (Triangulation<3> &tria) VectorTools::interpolate (dof_handler, Functions::SquareFunction<3>(), u); - + KellyErrorEstimator<3>::estimate (dof_handler, QGauss<2>(2), FunctionMap<3>::type(), @@ -73,10 +73,10 @@ void check (Triangulation<3> &tria) { (++tria.begin_active())->set_refine_flag (); tria.execute_coarsening_and_refinement (); - + deallog << "Initial check" << std::endl; check_this (tria); - + for (unsigned int r=0; r<2; ++r) { tria.refine_global (1); @@ -86,32 +86,32 @@ void check (Triangulation<3> &tria) } -int main () +int main () { std::ofstream logfile("mesh_3d_12/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<3> coarse_grid; create_two_cubes (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; create_L_shape (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); check (coarse_grid); } - + } - - + + diff --git a/tests/bits/mesh_3d_13.cc b/tests/bits/mesh_3d_13.cc index 3b97010962..1a04317d16 100644 --- a/tests/bits/mesh_3d_13.cc +++ b/tests/bits/mesh_3d_13.cc @@ -51,12 +51,12 @@ void check_this (Triangulation<3> &tria) subface_no::max_children_per_face; ++subface_no) { - // get an iterator - // pointing to the cell - // behind the present - // subface + // get an iterator + // pointing to the cell + // behind the present + // subface const Triangulation<3>::cell_iterator - neighbor = cell->neighbor(face_no); + neighbor = cell->neighbor(face_no); const unsigned int neighbor_neighbor = cell->neighbor_of_neighbor (face_no); const bool orientation_flag @@ -86,10 +86,10 @@ void check (Triangulation<3> &tria) { (++tria.begin_active())->set_refine_flag (); tria.execute_coarsening_and_refinement (); - + deallog << "Initial check" << std::endl; check_this (tria); - + for (unsigned int r=0; r<3; ++r) { tria.refine_global (1); @@ -100,39 +100,39 @@ void check (Triangulation<3> &tria) coarsen_global (tria); deallog << "Check " << 1 << std::endl; check_this (tria); - + tria.refine_global (1); deallog << "Check " << 2 << std::endl; check_this (tria); } -int main () +int main () { std::ofstream logfile("mesh_3d_13/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<3> coarse_grid; create_two_cubes (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; create_L_shape (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); check (coarse_grid); } - + } - - + + diff --git a/tests/bits/mesh_3d_14.cc b/tests/bits/mesh_3d_14.cc index 6c31c2594a..2370b805f9 100644 --- a/tests/bits/mesh_3d_14.cc +++ b/tests/bits/mesh_3d_14.cc @@ -52,7 +52,7 @@ void check_this (Triangulation<3> &tria) DoFHandler<3> dof_handler (tria); dof_handler.distribute_dofs (fe); - + DoFHandler<3>::active_cell_iterator cell = dof_handler.begin_active(); for (; cell!=dof_handler.end(); ++cell) for (unsigned int face_no=0; face_no::faces_per_cell; @@ -64,14 +64,14 @@ void check_this (Triangulation<3> &tria) subface_no::max_children_per_face; ++subface_no) { - const unsigned int neighbor_neighbor - = cell->neighbor_of_neighbor (face_no); - // get an iterator - // pointing to the cell - // behind the present - // subface - const DoFHandler<3>::active_cell_iterator neighbor_child - = cell->neighbor_child_on_subface(face_no,subface_no); + const unsigned int neighbor_neighbor + = cell->neighbor_of_neighbor (face_no); + // get an iterator + // pointing to the cell + // behind the present + // subface + const DoFHandler<3>::active_cell_iterator neighbor_child + = cell->neighbor_child_on_subface(face_no,subface_no); fe_face_values1.reinit (neighbor_child, neighbor_neighbor); fe_face_values2.reinit (cell, face_no, subface_no); @@ -90,7 +90,7 @@ void check_this (Triangulation<3> &tria) fe_face_values2.normal_vector(q)).square() < 1e-20, ExcInternalError()); - } + } } } @@ -100,10 +100,10 @@ void check (Triangulation<3> &tria) { (++tria.begin_active())->set_refine_flag (); tria.execute_coarsening_and_refinement (); - + deallog << "Initial check" << std::endl; check_this (tria); - + for (unsigned int r=0; r<3; ++r) { tria.refine_global (1); @@ -114,39 +114,39 @@ void check (Triangulation<3> &tria) coarsen_global (tria); deallog << "Check " << 1 << std::endl; check_this (tria); - + tria.refine_global (1); deallog << "Check " << 2 << std::endl; check_this (tria); } -int main () +int main () { std::ofstream logfile("mesh_3d_14/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<3> coarse_grid; create_two_cubes (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; create_L_shape (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); check (coarse_grid); } - + } - - + + diff --git a/tests/bits/mesh_3d_15.cc b/tests/bits/mesh_3d_15.cc index 08705aa713..d826c63bc5 100644 --- a/tests/bits/mesh_3d_15.cc +++ b/tests/bits/mesh_3d_15.cc @@ -42,10 +42,10 @@ void check_this (Triangulation<3> &tria) { FE_Q<3> fe(1); - + DoFHandler<3> dof_handler (tria); dof_handler.distribute_dofs (fe); - + DoFHandler<3>::active_cell_iterator cell = dof_handler.begin_active(); for (; cell!=dof_handler.end(); ++cell) for (unsigned int face_no=0; face_no::faces_per_cell; @@ -57,32 +57,32 @@ void check_this (Triangulation<3> &tria) subface_no::max_children_per_face; ++subface_no) { - // get an iterator - // pointing to the cell - // behind the present - // subface - - // way a) construct it ourselves, - // considering orientation and - // rotation of the face + // get an iterator + // pointing to the cell + // behind the present + // subface + + // way a) construct it ourselves, + // considering orientation and + // rotation of the face const DoFHandler<3>::cell_iterator - neighbor = cell->neighbor(face_no); + neighbor = cell->neighbor(face_no); const unsigned int neighbor_neighbor = cell->neighbor_of_neighbor (face_no); const unsigned int neighbor_child_index = (GeometryInfo<3>:: child_cell_on_face(RefinementCase<3>::isotropic_refinement,neighbor_neighbor, (subface_no), - neighbor->face_orientation(neighbor_neighbor))); + neighbor->face_orientation(neighbor_neighbor))); const DoFHandler<3>::active_cell_iterator neighbor_child = neighbor->child(neighbor_child_index); - // way b) use the convenient - // function - // neighbor_child_on_subface + // way b) use the convenient + // function + // neighbor_child_on_subface - // make sure, that both ways yield - // the same result + // make sure, that both ways yield + // the same result Assert (neighbor_child == cell->neighbor_child_on_subface (face_no, subface_no), @@ -96,7 +96,7 @@ void check (Triangulation<3> &tria) { (++tria.begin_active())->set_refine_flag (); tria.execute_coarsening_and_refinement (); - + deallog << "Initial check" << std::endl; check_this (tria); //TODO:[WB] Is there a reason to do this three times? @@ -111,39 +111,39 @@ void check (Triangulation<3> &tria) coarsen_global (tria); deallog << "Check " << 1 << std::endl; check_this (tria); - + tria.refine_global (1); deallog << "Check " << 2 << std::endl; check_this (tria); } -int main () +int main () { std::ofstream logfile("mesh_3d_15/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<3> coarse_grid; create_two_cubes (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; create_L_shape (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); check (coarse_grid); } - + } - - + + diff --git a/tests/bits/mesh_3d_16.cc b/tests/bits/mesh_3d_16.cc index b86836518b..83e1c767a5 100644 --- a/tests/bits/mesh_3d_16.cc +++ b/tests/bits/mesh_3d_16.cc @@ -47,7 +47,7 @@ void check (Triangulation<3> &tria) dof_handler.distribute_dofs (fe); QGauss<2> q_face(3); - + FEFaceValues<3> fe_face_values (fe, q_face, update_normal_vectors | update_JxW_values); FESubfaceValues<3> fe_subface_values (fe, q_face, @@ -58,10 +58,10 @@ void check (Triangulation<3> &tria) { Tensor<1,3> n1, n2; - // first integrate over faces - // and make sure that the - // result of the integration is - // close to zero + // first integrate over faces + // and make sure that the + // result of the integration is + // close to zero for (unsigned int f=0; f::faces_per_cell; ++f) { fe_face_values.reinit (cell, f); @@ -74,16 +74,16 @@ void check (Triangulation<3> &tria) << std::sqrt (n1*n1) << std::endl; - // now same for subface - // integration + // now same for subface + // integration for (unsigned int f=0; f::faces_per_cell; ++f) for (unsigned int sf=0; sf::max_children_per_face; ++sf) - { - fe_subface_values.reinit (cell, f, sf); - for (unsigned int q=0; q &tria) } -int main () +int main () { std::ofstream logfile("mesh_3d_16/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<3> coarse_grid; create_two_cubes (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; create_L_shape (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); check (coarse_grid); } - + } - - + + diff --git a/tests/bits/mesh_3d_17.cc b/tests/bits/mesh_3d_17.cc index 95807d2051..fbd206e2f3 100644 --- a/tests/bits/mesh_3d_17.cc +++ b/tests/bits/mesh_3d_17.cc @@ -47,30 +47,30 @@ void check (Triangulation<3> &tria) deallog << ' ' << (++tria.begin_active())->vertex_index(i); deallog << std::endl; - + tria.begin_active()->set_refine_flag (); tria.execute_coarsening_and_refinement (); - + const unsigned int dim=3; Triangulation::active_cell_iterator - cell = tria.begin_active(), - endc = tria.end(); - - // loop over all interior faces of active - // cells with children. there should be - // exactly one, namely the middle face of - // the big cell (the middle faces of the - // active cells on the refined side don't - // have any children) + cell = tria.begin_active(), + endc = tria.end(); + + // loop over all interior faces of active + // cells with children. there should be + // exactly one, namely the middle face of + // the big cell (the middle faces of the + // active cells on the refined side don't + // have any children) for (unsigned int cell_no=0; cell!=endc; ++cell, ++cell_no) for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no) { - const Triangulation::face_iterator - face=cell->face(face_no); + const Triangulation::face_iterator + face=cell->face(face_no); - if (!face->at_boundary() && face->has_children()) + if (!face->at_boundary() && face->has_children()) { deallog << "Interior face with children:" << std::endl; deallog << " cell=" << cell << std::endl; @@ -83,21 +83,21 @@ void check (Triangulation<3> &tria) deallog << " face orientation=" << (cell->face_orientation(face_no) ? "true" : "false") << std::endl; - + const Triangulation::cell_iterator neighbor = cell->neighbor(face_no); const unsigned int nb_of_nb = cell->neighbor_of_neighbor(face_no); - // check that - // neighbor_of_neighbor works: + // check that + // neighbor_of_neighbor works: Assert (neighbor->neighbor(nb_of_nb) == cell, ExcInternalError()); const Triangulation::face_iterator neighbor_face = neighbor->face(nb_of_nb); - + deallog << " neighbor face vertices=" << neighbor_face->vertex_index(0) << ' ' << neighbor_face->vertex_index(1) << ' ' @@ -106,7 +106,7 @@ void check (Triangulation<3> &tria) << std::endl; deallog << " neighbor->face_orientation(nb_of_nb)=" << (neighbor->face_orientation(nb_of_nb) ? - "true" : "false") + "true" : "false") << std::endl; @@ -119,30 +119,30 @@ void check (Triangulation<3> &tria) deallog << " center=" << face->child(subface_no)->center() << std::endl; - // we used to abort in the - // following call, due to a - // wrong Assert condition: + // we used to abort in the + // following call, due to a + // wrong Assert condition: cell->neighbor_child_on_subface(face_no, subface_no); } - } + } } } -int main () +int main () { std::ofstream logfile("mesh_3d_17/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + Triangulation<3> coarse_grid; GridIn<3> in; in.attach_triangulation(coarse_grid); std::ifstream ucd_file("two_cubes.inp"); in.read_ucd(ucd_file); ucd_file.close(); - + check (coarse_grid); } diff --git a/tests/bits/mesh_3d_18.cc b/tests/bits/mesh_3d_18.cc index 6bfa0ed20b..bc1d0d67c5 100644 --- a/tests/bits/mesh_3d_18.cc +++ b/tests/bits/mesh_3d_18.cc @@ -55,51 +55,51 @@ void test_with_wrong_face_orientation () deallog << "cell=" << cell << std::endl; deallog << "cell->neighbor(3)=" << cell->neighbor(3) << std::endl; deallog << "cell->face_orientation(3)=" - << (cell->face_orientation(3) ? "true" : "false") - << std::endl; - + << (cell->face_orientation(3) ? "true" : "false") + << std::endl; + const Triangulation<3>::active_cell_iterator neighbor_child = cell->neighbor_child_on_subface (3, 1); deallog << "cell->neighbor_child_on_subface(3,1)=" << neighbor_child << std::endl; deallog << "cell->neighbor_child_on_subface(3,1)->neighbor(5)=" - << neighbor_child->neighbor(5) << std::endl; + << neighbor_child->neighbor(5) << std::endl; deallog << "cell->neighbor_child_on_subface(3,1)->face_orientation(5)=" - << (neighbor_child->face_orientation(5) ? "true" : "false") - << std::endl; - + << (neighbor_child->face_orientation(5) ? "true" : "false") + << std::endl; + deallog << "cell->face(3)=" << cell->face(3) << std::endl; for (unsigned int i=0; i<4; ++i) deallog << "cell->face(3)->child(" << i << ")=" - << cell->face(3)->child(i) << std::endl; - + << cell->face(3)->child(i) << std::endl; + for (unsigned int i=0; i<6; ++i) deallog << "cell->neighbor(3)->face(" << i << ")=" - << cell->neighbor(3)->face(i) << std::endl; + << cell->neighbor(3)->face(i) << std::endl; for (unsigned int i=0; i<6; ++i) deallog << "cell->neighbor_child_on_subface(3,1)->face(" << i << ")=" - << cell->neighbor_child_on_subface(3,1)->face(i) << std::endl; - - // The following assertion was originally in - // make_hanging_node_constraints and - // triggered for the mesh and cell here at - // hand. however, if one carefully reads the - // new comment for - // CellAccessor::neighbor_child_on_subface, - // one realizes that it should be true in any - // case, no matter whether - // cell->face_orientation()==false or not for - // the face we are presently considering. the - // original assertion failed, - // whereas with the new functionality of - // CellAccessor::neighbor_child_on_subface it - // should work. let's make sure we get the - // status we expect. + << cell->neighbor_child_on_subface(3,1)->face(i) << std::endl; + + // The following assertion was originally in + // make_hanging_node_constraints and + // triggered for the mesh and cell here at + // hand. however, if one carefully reads the + // new comment for + // CellAccessor::neighbor_child_on_subface, + // one realizes that it should be true in any + // case, no matter whether + // cell->face_orientation()==false or not for + // the face we are presently considering. the + // original assertion failed, + // whereas with the new functionality of + // CellAccessor::neighbor_child_on_subface it + // should work. let's make sure we get the + // status we expect. Assert (cell->face(3)->child(1) == - neighbor_child->face(cell->neighbor_of_neighbor(3)), - ExcInternalError()); + neighbor_child->face(cell->neighbor_of_neighbor(3)), + ExcInternalError()); } @@ -108,7 +108,7 @@ int main () { std::ofstream logfile(logname); deallog << std::setprecision (3); - + deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); diff --git a/tests/bits/mesh_3d_19.cc b/tests/bits/mesh_3d_19.cc index d06cbb60e0..576c608772 100644 --- a/tests/bits/mesh_3d_19.cc +++ b/tests/bits/mesh_3d_19.cc @@ -55,7 +55,7 @@ void test_with_wrong_face_orientation () for (unsigned int i=0; i<6; ++i) deallog << "cell->neighbor(3)->face(" << i << ")=" - << cell->neighbor(3)->face(i) << std::endl; + << cell->neighbor(3)->face(i) << std::endl; } @@ -64,7 +64,7 @@ int main () { std::ofstream logfile(logname); deallog << std::setprecision (3); - + deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); diff --git a/tests/bits/mesh_3d_2.cc b/tests/bits/mesh_3d_2.cc index f989cf2c4f..41333b1510 100644 --- a/tests/bits/mesh_3d_2.cc +++ b/tests/bits/mesh_3d_2.cc @@ -36,7 +36,7 @@ #include -int main () +int main () { std::ofstream logfile("mesh_3d_2/output"); deallog.attach(logfile); @@ -46,7 +46,7 @@ int main () Triangulation<3> coarse_grid; create_two_cubes (coarse_grid); - // output all lines and faces + // output all lines and faces for (Triangulation<3>::active_cell_iterator cell=coarse_grid.begin_active(); cell != coarse_grid.end(); ++cell) { @@ -69,13 +69,13 @@ int main () << std::endl; } - // we know that from the second - // cell, the common face must have - // wrong orientation. check this + // we know that from the second + // cell, the common face must have + // wrong orientation. check this Assert ((++coarse_grid.begin_active())->face_orientation(5) == false, ExcInternalError()); } - - + + diff --git a/tests/bits/mesh_3d_20.cc b/tests/bits/mesh_3d_20.cc index 755a481a45..604e51f71d 100644 --- a/tests/bits/mesh_3d_20.cc +++ b/tests/bits/mesh_3d_20.cc @@ -46,14 +46,14 @@ void check_this (Triangulation<3> &tria) update_q_points | update_JxW_values); FEFaceValues<3> fe_face_values2 (fe, quadrature, update_q_points | update_JxW_values); - + DoFHandler<3> dof_handler (tria); dof_handler.distribute_dofs (fe); unsigned int global_datum = 0; - // look at all faces, not only - // active ones + // look at all faces, not only + // active ones for (DoFHandler<3>::cell_iterator cell=dof_handler.begin(); cell != dof_handler.end(); ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) @@ -64,35 +64,35 @@ void check_this (Triangulation<3> &tria) fe_face_values1.reinit (cell, f); fe_face_values2.reinit (cell->neighbor(f), nn); - for (unsigned int q=0; q &tria) { deallog << "Initial check" << std::endl; check_this (tria); - - for (unsigned int r=0; r<3; ++r) - { - tria.refine_global (1); - deallog << "Check " << r << std::endl; - check_this (tria); - } - - coarsen_global (tria); - deallog << "Check " << 1 << std::endl; - check_this (tria); - - tria.refine_global (1); - deallog << "Check " << 2 << std::endl; - check_this (tria); + + for (unsigned int r=0; r<3; ++r) + { + tria.refine_global (1); + deallog << "Check " << r << std::endl; + check_this (tria); + } + + coarsen_global (tria); + deallog << "Check " << 1 << std::endl; + check_this (tria); + + tria.refine_global (1); + deallog << "Check " << 2 << std::endl; + check_this (tria); } -int main () +int main () { std::ofstream logfile("mesh_3d_20/output"); deallog.attach(logfile); @@ -144,8 +144,8 @@ int main () create_two_cubes_rotation (coarse_grid,3); check (coarse_grid); } - + } - - + + diff --git a/tests/bits/mesh_3d_21.cc b/tests/bits/mesh_3d_21.cc index 85697326e2..1aef2c8e2b 100644 --- a/tests/bits/mesh_3d_21.cc +++ b/tests/bits/mesh_3d_21.cc @@ -42,53 +42,53 @@ void check_this (Triangulation<3> &tria) FE_Q<3> fe(1); DoFHandler<3> dof_handler (tria); dof_handler.distribute_dofs (fe); - + DoFHandler<3>::active_cell_iterator cell = dof_handler.begin_active(); for (; cell!=dof_handler.end(); ++cell) for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no) if (!cell->at_boundary(face_no)) - { - if (cell->neighbor(face_no)->has_children()) - // we are coarser than the neighbor - for (unsigned int subface_no=0; - subface_noface(face_no)->n_children(); - ++subface_no) - { - // get an iterator - // pointing to the cell - // behind the present - // subface - const unsigned int neighbor_neighbor - = cell->neighbor_of_neighbor (face_no); - - const DoFHandler<3>::active_cell_iterator neighbor_child - = cell->neighbor_child_on_subface(face_no,subface_no); - - // make sure, that we find the - // way back - const unsigned int our_face_no=neighbor_child->neighbor_of_coarser_neighbor(neighbor_neighbor).first; - const unsigned int our_subface_no=neighbor_child->neighbor_of_coarser_neighbor(neighbor_neighbor).second; - - Assert (our_face_no==face_no, ExcInternalError()); - Assert (our_subface_no==subface_no, ExcInternalError()); - deallog << "from coarse to fine and back: OK" <neighbor(face_no)->level()level()) - // the neighbor is coarser - { - const unsigned int neighbor_face_no=cell->neighbor_of_coarser_neighbor(face_no).first; - const unsigned int neighbor_subface_no=cell->neighbor_of_coarser_neighbor(face_no).second; - - // try to find the way back to our cell - const DoFHandler<3>::active_cell_iterator our_cell=cell->neighbor(face_no)->neighbor_child_on_subface(neighbor_face_no, - neighbor_subface_no); - Assert (our_cell==cell, ExcInternalError()); - deallog << "from fine to coarse and back: OK" <neighbor(face_no)->has_children()) + // we are coarser than the neighbor + for (unsigned int subface_no=0; + subface_noface(face_no)->n_children(); + ++subface_no) + { + // get an iterator + // pointing to the cell + // behind the present + // subface + const unsigned int neighbor_neighbor + = cell->neighbor_of_neighbor (face_no); + + const DoFHandler<3>::active_cell_iterator neighbor_child + = cell->neighbor_child_on_subface(face_no,subface_no); + + // make sure, that we find the + // way back + const unsigned int our_face_no=neighbor_child->neighbor_of_coarser_neighbor(neighbor_neighbor).first; + const unsigned int our_subface_no=neighbor_child->neighbor_of_coarser_neighbor(neighbor_neighbor).second; + + Assert (our_face_no==face_no, ExcInternalError()); + Assert (our_subface_no==subface_no, ExcInternalError()); + deallog << "from coarse to fine and back: OK" <neighbor(face_no)->level()level()) + // the neighbor is coarser + { + const unsigned int neighbor_face_no=cell->neighbor_of_coarser_neighbor(face_no).first; + const unsigned int neighbor_subface_no=cell->neighbor_of_coarser_neighbor(face_no).second; + + // try to find the way back to our cell + const DoFHandler<3>::active_cell_iterator our_cell=cell->neighbor(face_no)->neighbor_child_on_subface(neighbor_face_no, + neighbor_subface_no); + Assert (our_cell==cell, ExcInternalError()); + deallog << "from fine to coarse and back: OK" < &tria) { (++tria.begin_active())->set_refine_flag (); tria.execute_coarsening_and_refinement (); - + deallog << "Initial check" << std::endl; check_this (tria); - + for (unsigned int r=0; r<2; ++r) { tria.refine_global (1); @@ -111,26 +111,26 @@ void check (Triangulation<3> &tria) coarsen_global (tria); deallog << "Check " << 1 << std::endl; check_this (tria); - + tria.refine_global (1); deallog << "Check " << 2 << std::endl; check_this (tria); } -int main () +int main () { std::ofstream logfile("mesh_3d_21/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<3> coarse_grid; create_two_cubes (coarse_grid); check (coarse_grid); } - + { Triangulation<3> coarse_grid; create_two_cubes_rotation (coarse_grid,1); @@ -149,19 +149,19 @@ int main () check (coarse_grid); } - { + { Triangulation<3> coarse_grid; create_L_shape (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); check (coarse_grid); } - + } - - + + diff --git a/tests/bits/mesh_3d_22.cc b/tests/bits/mesh_3d_22.cc index 998255695a..fc1aae860a 100644 --- a/tests/bits/mesh_3d_22.cc +++ b/tests/bits/mesh_3d_22.cc @@ -63,27 +63,27 @@ using namespace std; template class F : public Function { - public: - F (const unsigned int q) : q(q) {} - - virtual double value (const Point &p, - const unsigned int) const - { - double v=0; - for (unsigned int d=0; d &p, + const unsigned int) const + { + double v=0; + for (unsigned int d=0; d -void test (Triangulation& triangulation) +void test (Triangulation &triangulation) { MappingQ<3> mapping(3); for (unsigned int p=1; p<7-dim; ++p) @@ -95,26 +95,26 @@ void test (Triangulation& triangulation) Vector interpolant (dof_handler.n_dofs()); Vector error (triangulation.n_active_cells()); for (unsigned int q=0; q<=p+2; ++q) - { - // interpolate the function - VectorTools::interpolate (mapping, dof_handler, - F (q), - interpolant); - - // then compute the interpolation error - VectorTools::integrate_difference (mapping, dof_handler, - interpolant, - F (q), - error, - QGauss(q+2), - VectorTools::L2_norm); - deallog << fe.get_name() << ", P_" << q - << ", rel. error=" << error.l2_norm() / interpolant.l2_norm() - << std::endl; - if (q<=p) - Assert (error.l2_norm() < 1e-12*interpolant.l2_norm(), - ExcInternalError()); - } + { + // interpolate the function + VectorTools::interpolate (mapping, dof_handler, + F (q), + interpolant); + + // then compute the interpolation error + VectorTools::integrate_difference (mapping, dof_handler, + interpolant, + F (q), + error, + QGauss(q+2), + VectorTools::L2_norm); + deallog << fe.get_name() << ", P_" << q + << ", rel. error=" << error.l2_norm() / interpolant.l2_norm() + << std::endl; + if (q<=p) + Assert (error.l2_norm() < 1e-12*interpolant.l2_norm(), + ExcInternalError()); + } } } diff --git a/tests/bits/mesh_3d_24.cc b/tests/bits/mesh_3d_24.cc index d3dfac80b1..f0733995ad 100644 --- a/tests/bits/mesh_3d_24.cc +++ b/tests/bits/mesh_3d_24.cc @@ -80,23 +80,23 @@ int main () for (unsigned int f=0; f<6; ++f) deallog << "face: " << f - << std::endl - << " Face orientation status: " - << cell->face_orientation (f) - << std::endl - << " On boundary: " << cell->at_boundary(f) - << std::endl - << " Neighbor: " - << (cell->at_boundary(f) ? triangulation.end() : cell->neighbor(f)) - << std::endl; - + << std::endl + << " Face orientation status: " + << cell->face_orientation (f) + << std::endl + << " On boundary: " << cell->at_boundary(f) + << std::endl + << " Neighbor: " + << (cell->at_boundary(f) ? triangulation.end() : cell->neighbor(f)) + << std::endl; + for (double x=0; x<=1; x+=1.0/3.0) { const Point<3> p(x, 1./3., 0); deallog << p - << " in unit coordinates maps to real coordinates " - << mapping.transform_unit_to_real_cell(cell,p) - << std::endl; + << " in unit coordinates maps to real coordinates " + << mapping.transform_unit_to_real_cell(cell,p) + << std::endl; } } diff --git a/tests/bits/mesh_3d_25.cc b/tests/bits/mesh_3d_25.cc index edafe3a466..929cd9d400 100644 --- a/tests/bits/mesh_3d_25.cc +++ b/tests/bits/mesh_3d_25.cc @@ -51,27 +51,27 @@ using namespace std; template class F : public Function { - public: - F (const unsigned int q) : q(q) {} - - virtual double value (const Point &p, - const unsigned int) const - { - double v=0; - for (unsigned int d=0; d &p, + const unsigned int) const + { + double v=0; + for (unsigned int d=0; d -void test (Triangulation& triangulation) +void test (Triangulation &triangulation) { MappingQ<3> mapping(3); for (unsigned int p=1; p<7-dim; ++p) @@ -83,26 +83,26 @@ void test (Triangulation& triangulation) Vector interpolant (dof_handler.n_dofs()); Vector error (triangulation.n_active_cells()); for (unsigned int q=0; q<=p+2; ++q) - { - // interpolate the function - VectorTools::interpolate (mapping, dof_handler, - F (q), - interpolant); - - // then compute the interpolation error - VectorTools::integrate_difference (mapping, dof_handler, - interpolant, - F (q), - error, - QGauss(q+2), - VectorTools::L2_norm); - deallog << fe.get_name() << ", P_" << q - << ", rel. error=" << error.l2_norm() / interpolant.l2_norm() - << std::endl; - if (q<=p) - Assert (error.l2_norm() < 1e-12*interpolant.l2_norm(), - ExcInternalError()); - } + { + // interpolate the function + VectorTools::interpolate (mapping, dof_handler, + F (q), + interpolant); + + // then compute the interpolation error + VectorTools::integrate_difference (mapping, dof_handler, + interpolant, + F (q), + error, + QGauss(q+2), + VectorTools::L2_norm); + deallog << fe.get_name() << ", P_" << q + << ", rel. error=" << error.l2_norm() / interpolant.l2_norm() + << std::endl; + if (q<=p) + Assert (error.l2_norm() < 1e-12*interpolant.l2_norm(), + ExcInternalError()); + } } } diff --git a/tests/bits/mesh_3d_26.cc b/tests/bits/mesh_3d_26.cc index 39f2f0f2a5..76434fe4b9 100644 --- a/tests/bits/mesh_3d_26.cc +++ b/tests/bits/mesh_3d_26.cc @@ -51,30 +51,30 @@ using namespace std; template class F : public Function { - public: - F (const unsigned int q) : q(q) {} - - virtual double value (const Point &p, - const unsigned int) const - { - double v=0; - for (unsigned int d=0; d &p, + const unsigned int) const + { + double v=0; + for (unsigned int d=0; d -void test (Triangulation& triangulation) +void test (Triangulation &triangulation) { - // create a MappingQ(3) which is used on ALL - // cells + // create a MappingQ(3) which is used on ALL + // cells MappingQ<3> mapping(3, true); for (unsigned int p=1; p<7-dim; ++p) { @@ -85,26 +85,26 @@ void test (Triangulation& triangulation) Vector interpolant (dof_handler.n_dofs()); Vector error (triangulation.n_active_cells()); for (unsigned int q=0; q<=p+2; ++q) - { - // interpolate the function - VectorTools::interpolate (mapping, dof_handler, - F (q), - interpolant); - - // then compute the interpolation error - VectorTools::integrate_difference (mapping, dof_handler, - interpolant, - F (q), - error, - QGauss(q+2), - VectorTools::L2_norm); - deallog << fe.get_name() << ", P_" << q - << ", rel. error=" << error.l2_norm() / interpolant.l2_norm() - << std::endl; - if (q<=p) - Assert (error.l2_norm() < 1e-12*interpolant.l2_norm(), - ExcInternalError()); - } + { + // interpolate the function + VectorTools::interpolate (mapping, dof_handler, + F (q), + interpolant); + + // then compute the interpolation error + VectorTools::integrate_difference (mapping, dof_handler, + interpolant, + F (q), + error, + QGauss(q+2), + VectorTools::L2_norm); + deallog << fe.get_name() << ", P_" << q + << ", rel. error=" << error.l2_norm() / interpolant.l2_norm() + << std::endl; + if (q<=p) + Assert (error.l2_norm() < 1e-12*interpolant.l2_norm(), + ExcInternalError()); + } } } diff --git a/tests/bits/mesh_3d_3.cc b/tests/bits/mesh_3d_3.cc index 8e952acb23..6dbe32515b 100644 --- a/tests/bits/mesh_3d_3.cc +++ b/tests/bits/mesh_3d_3.cc @@ -35,7 +35,7 @@ #include -int main () +int main () { std::ofstream logfile("mesh_3d_3/output"); deallog.attach(logfile); @@ -46,10 +46,11 @@ int main () create_two_cubes (coarse_grid); const Triangulation<3>::active_cell_iterator - cells[2] = { coarse_grid.begin_active(), - ++coarse_grid.begin_active() }; + cells[2] = { coarse_grid.begin_active(), + ++coarse_grid.begin_active() + }; - // output all vertices + // output all vertices for (unsigned int c=0; c<2; ++c) for (unsigned int v=0; v::vertices_per_cell; ++v) deallog << "Cell " << c << ", vertex " << v @@ -57,8 +58,8 @@ int main () << " @ " << cells[c]->vertex(v) << std::endl; - // make sure by hand that certain - // vertices match up + // make sure by hand that certain + // vertices match up Assert (cells[0]->vertex(1) == cells[1]->vertex(4), ExcInternalError()); Assert (cells[0]->vertex(3) == cells[1]->vertex(6), @@ -69,5 +70,5 @@ int main () ExcInternalError()); } - - + + diff --git a/tests/bits/mesh_3d_4.cc b/tests/bits/mesh_3d_4.cc index d616869444..6bb9324aff 100644 --- a/tests/bits/mesh_3d_4.cc +++ b/tests/bits/mesh_3d_4.cc @@ -35,9 +35,9 @@ unsigned int count_wrong_faces (const Triangulation<3> &tria) { unsigned int count = 0; - - // count faces with "wrong" - // orientation + + // count faces with "wrong" + // orientation for (Triangulation<3>::active_cell_iterator cell=tria.begin_active(); cell != tria.end(); ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) @@ -46,7 +46,7 @@ unsigned int count_wrong_faces (const Triangulation<3> &tria) return count; } - + void check (Triangulation<3> &tria) { @@ -59,7 +59,7 @@ void check (Triangulation<3> &tria) Assert (count == initial_count * (4<<(2*r)), ExcInternalError()); } - + { coarsen_global (tria); const unsigned int count = count_wrong_faces (tria); @@ -67,7 +67,7 @@ void check (Triangulation<3> &tria) Assert (count == initial_count * (4<<(2*1)), ExcInternalError()); } - + { tria.refine_global (1); const unsigned int count = count_wrong_faces (tria); @@ -77,34 +77,34 @@ void check (Triangulation<3> &tria) } } - -int main () + +int main () { std::ofstream logfile("mesh_3d_4/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<3> coarse_grid; create_two_cubes (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; create_L_shape (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); check (coarse_grid); } - + } - - + + diff --git a/tests/bits/mesh_3d_5.cc b/tests/bits/mesh_3d_5.cc index 40a2eeb5e4..b214b77432 100644 --- a/tests/bits/mesh_3d_5.cc +++ b/tests/bits/mesh_3d_5.cc @@ -34,8 +34,8 @@ void check_this (Triangulation<3> &tria) { - // look at all faces, not only - // active ones + // look at all faces, not only + // active ones for (Triangulation<3>::cell_iterator cell=tria.begin(); cell != tria.end(); ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) @@ -58,7 +58,7 @@ void check (Triangulation<3> &tria) { deallog << "Initial check" << std::endl; check_this (tria); - + for (unsigned int r=0; r<3; ++r) { tria.refine_global (1); @@ -69,39 +69,39 @@ void check (Triangulation<3> &tria) coarsen_global (tria); deallog << "Check " << 1 << std::endl; check_this (tria); - + tria.refine_global (1); deallog << "Check " << 2 << std::endl; check_this (tria); } -int main () +int main () { std::ofstream logfile("mesh_3d_5/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<3> coarse_grid; create_two_cubes (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; create_L_shape (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); check (coarse_grid); } - + } - - + + diff --git a/tests/bits/mesh_3d_6.cc b/tests/bits/mesh_3d_6.cc index 7563e67b44..25f93dc96c 100644 --- a/tests/bits/mesh_3d_6.cc +++ b/tests/bits/mesh_3d_6.cc @@ -48,9 +48,9 @@ void check_this (Triangulation<3> &tria) dof_handler.distribute_dofs (fe); unsigned int global_face = 0; - - // look at all faces, not only - // active ones + + // look at all faces, not only + // active ones for (DoFHandler<3>::cell_iterator cell=dof_handler.begin(); cell != dof_handler.end(); ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) @@ -61,30 +61,30 @@ void check_this (Triangulation<3> &tria) fe_face_values1.reinit (cell, f); fe_face_values2.reinit (cell->neighbor(f), nn); - // in order to reduce - // output file size, only - // write every seventeenth - // normal vector. if the - // normals differ anyway, - // then the assertion below - // will catch this, and if - // we compute _all_ normals - // wrongly, then outputting - // some will be ok, I guess + // in order to reduce + // output file size, only + // write every seventeenth + // normal vector. if the + // normals differ anyway, + // then the assertion below + // will catch this, and if + // we compute _all_ normals + // wrongly, then outputting + // some will be ok, I guess if (global_face++ % 17 == 0) deallog << "Cell " << cell << ", face " << f << " n=" << fe_face_values1.normal_vector(0) << std::endl; - // normal vectors should be - // in opposite directions, - // so their sum should be - // close to zero + // normal vectors should be + // in opposite directions, + // so their sum should be + // close to zero Assert ((fe_face_values1.normal_vector(0) + - fe_face_values2.normal_vector(0)).square() + fe_face_values2.normal_vector(0)).square() < 1e-20, ExcInternalError()); - } + } } @@ -92,7 +92,7 @@ void check (Triangulation<3> &tria) { deallog << "Initial check" << std::endl; check_this (tria); - + for (unsigned int r=0; r<3; ++r) { tria.refine_global (1); @@ -103,39 +103,39 @@ void check (Triangulation<3> &tria) coarsen_global (tria); deallog << "Check " << 1 << std::endl; check_this (tria); - + tria.refine_global (1); deallog << "Check " << 2 << std::endl; check_this (tria); } -int main () +int main () { std::ofstream logfile("mesh_3d_6/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<3> coarse_grid; create_two_cubes (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; create_L_shape (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); check (coarse_grid); } - + } - - + + diff --git a/tests/bits/mesh_3d_7.cc b/tests/bits/mesh_3d_7.cc index 77c6ed8b22..327d5d18d3 100644 --- a/tests/bits/mesh_3d_7.cc +++ b/tests/bits/mesh_3d_7.cc @@ -44,14 +44,14 @@ void check_this (Triangulation<3> &tria) update_q_points | update_JxW_values); FEFaceValues<3> fe_face_values2 (fe, quadrature, update_q_points | update_JxW_values); - + DoFHandler<3> dof_handler (tria); dof_handler.distribute_dofs (fe); unsigned int global_datum = 0; - - // look at all faces, not only - // active ones + + // look at all faces, not only + // active ones for (DoFHandler<3>::cell_iterator cell=dof_handler.begin(); cell != dof_handler.end(); ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) @@ -67,23 +67,23 @@ void check_this (Triangulation<3> &tria) for (unsigned int q=0; q &tria) { deallog << "Initial check" << std::endl; check_this (tria); - + for (unsigned int r=0; r<3; ++r) { tria.refine_global (1); @@ -112,39 +112,39 @@ void check (Triangulation<3> &tria) coarsen_global (tria); deallog << "Check " << 1 << std::endl; check_this (tria); - + tria.refine_global (1); deallog << "Check " << 2 << std::endl; check_this (tria); } -int main () +int main () { std::ofstream logfile("mesh_3d_7/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<3> coarse_grid; create_two_cubes (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; create_L_shape (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); check (coarse_grid); } - + } - - + + diff --git a/tests/bits/mesh_3d_8.cc b/tests/bits/mesh_3d_8.cc index d3f41e96c5..1c3827cba7 100644 --- a/tests/bits/mesh_3d_8.cc +++ b/tests/bits/mesh_3d_8.cc @@ -59,7 +59,7 @@ void check (Triangulation<3> &tria) { deallog << "Initial check" << std::endl; check_this (tria); - + for (unsigned int r=0; r<3; ++r) { tria.refine_global (1); @@ -70,39 +70,39 @@ void check (Triangulation<3> &tria) coarsen_global (tria); deallog << "Check " << 1 << std::endl; check_this (tria); - + tria.refine_global (1); deallog << "Check " << 2 << std::endl; check_this (tria); } -int main () +int main () { std::ofstream logfile("mesh_3d_8/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<3> coarse_grid; create_two_cubes (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; create_L_shape (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); check (coarse_grid); } - + } - - + + diff --git a/tests/bits/mesh_3d_9.cc b/tests/bits/mesh_3d_9.cc index 91bf4ba659..051f66158c 100644 --- a/tests/bits/mesh_3d_9.cc +++ b/tests/bits/mesh_3d_9.cc @@ -60,7 +60,7 @@ void check (Triangulation<3> &tria) { deallog << "Initial check" << std::endl; check_this (tria); - + for (unsigned int r=0; r<3; ++r) { tria.refine_global (1); @@ -71,39 +71,39 @@ void check (Triangulation<3> &tria) coarsen_global (tria); deallog << "Check " << 1 << std::endl; check_this (tria); - + tria.refine_global (1); deallog << "Check " << 2 << std::endl; check_this (tria); } -int main () +int main () { std::ofstream logfile("mesh_3d_9/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<3> coarse_grid; create_two_cubes (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; create_L_shape (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); check (coarse_grid); } - + } - - + + diff --git a/tests/bits/multiple_parameter_loop_01.cc b/tests/bits/multiple_parameter_loop_01.cc index 8e0ed407b3..6e444a9e7f 100644 --- a/tests/bits/multiple_parameter_loop_01.cc +++ b/tests/bits/multiple_parameter_loop_01.cc @@ -24,18 +24,20 @@ #include - // Take the example from the - // documentation but instead of - // running anything simply print - // parameters +// Take the example from the +// documentation but instead of +// running anything simply print +// parameters class HelperClass : public MultipleParameterLoop::UserClass { - public: - virtual void create_new (unsigned int run_no) - { this->run_no = run_no; } - virtual void declare_parameters (ParameterHandler &prm); - virtual void run (ParameterHandler &prm); - unsigned int run_no; +public: + virtual void create_new (unsigned int run_no) + { + this->run_no = run_no; + } + virtual void declare_parameters (ParameterHandler &prm); + virtual void run (ParameterHandler &prm); + unsigned int run_no; }; @@ -43,16 +45,16 @@ void HelperClass::declare_parameters (ParameterHandler &prm) { prm.enter_subsection ("Testing"); prm.declare_entry ("string list", - "a", - Patterns::List(Patterns::Selection("a|b|c|d|e|f|g|h")), - "docs 1"); + "a", + Patterns::List(Patterns::Selection("a|b|c|d|e|f|g|h")), + "docs 1"); prm.declare_entry ("int", - "1", - Patterns::Integer()); + "1", + Patterns::Integer()); prm.declare_entry ("double", - "3.1415926", - Patterns::Double(), - "docs 3"); + "3.1415926", + Patterns::Double(), + "docs 3"); prm.leave_subsection (); } diff --git a/tests/bits/multiple_parameter_loop_02.cc b/tests/bits/multiple_parameter_loop_02.cc index aa4ab0852b..d10891c91b 100644 --- a/tests/bits/multiple_parameter_loop_02.cc +++ b/tests/bits/multiple_parameter_loop_02.cc @@ -24,18 +24,20 @@ #include - // Take the example from the - // documentation but instead of - // running anything simply print - // parameters +// Take the example from the +// documentation but instead of +// running anything simply print +// parameters class HelperClass : public MultipleParameterLoop::UserClass { - public: - virtual void create_new (unsigned int run_no) - { this->run_no = run_no; } - virtual void declare_parameters (ParameterHandler &prm); - virtual void run (ParameterHandler &prm); - unsigned int run_no; +public: + virtual void create_new (unsigned int run_no) + { + this->run_no = run_no; + } + virtual void declare_parameters (ParameterHandler &prm); + virtual void run (ParameterHandler &prm); + unsigned int run_no; }; @@ -43,16 +45,16 @@ void HelperClass::declare_parameters (ParameterHandler &prm) { prm.enter_subsection ("Testing"); prm.declare_entry ("string list", - "a", - Patterns::List(Patterns::Selection("a|b|c|d|e|f|g|h")), - "docs 1"); + "a", + Patterns::List(Patterns::Selection("a|b|c|d|e|f|g|h")), + "docs 1"); prm.declare_entry ("int", - "1", - Patterns::Integer()); + "1", + Patterns::Integer()); prm.declare_entry ("double", - "3.1415926", - Patterns::Double(), - "docs 3"); + "3.1415926", + Patterns::Double(), + "docs 3"); prm.leave_subsection (); } diff --git a/tests/bits/n_dofs_per_object.cc b/tests/bits/n_dofs_per_object.cc index 9cace590b1..46f170cc2c 100644 --- a/tests/bits/n_dofs_per_object.cc +++ b/tests/bits/n_dofs_per_object.cc @@ -33,11 +33,11 @@ check_this (const DoFHandler &dof_handler) { const FiniteElement &fe = dof_handler.get_fe(); deallog << fe.dofs_per_vertex << ' ' - << fe.dofs_per_line << ' ' - << fe.dofs_per_quad << ' ' - << fe.dofs_per_hex << std::endl; + << fe.dofs_per_line << ' ' + << fe.dofs_per_quad << ' ' + << fe.dofs_per_hex << std::endl; deallog << fe.template n_dofs_per_object<0>() << ' ' - << fe.template n_dofs_per_object<1>() << ' ' - << fe.template n_dofs_per_object<2>() << ' ' - << fe.template n_dofs_per_object<3>() << std::endl; + << fe.template n_dofs_per_object<1>() << ' ' + << fe.template n_dofs_per_object<2>() << ' ' + << fe.template n_dofs_per_object<3>() << std::endl; } diff --git a/tests/bits/nedelec_1.cc b/tests/bits/nedelec_1.cc index 687ffff074..3ba18235e1 100644 --- a/tests/bits/nedelec_1.cc +++ b/tests/bits/nedelec_1.cc @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include @@ -54,7 +54,7 @@ void test () } -int main () +int main () { std::ofstream logfile("nedelec_1/output"); deallog.attach(logfile); @@ -63,6 +63,6 @@ int main () test<2> (); test<3> (); - + return 0; } diff --git a/tests/bits/neighboring_cells_at_two_faces.cc b/tests/bits/neighboring_cells_at_two_faces.cc index da0eeba54d..ed8832f532 100644 --- a/tests/bits/neighboring_cells_at_two_faces.cc +++ b/tests/bits/neighboring_cells_at_two_faces.cc @@ -49,12 +49,13 @@ void create_grid (Triangulation<2> &tria) { const unsigned int n_points=5; - + const Point<2> points[n_points] = { Point<2>(0.0,0.0), - Point<2>(1.0,1.0), - Point<2>(2.0,2.0), - Point<2>(0.0,2.0), - Point<2>(2.0,0.0)}; + Point<2>(1.0,1.0), + Point<2>(2.0,2.0), + Point<2>(0.0,2.0), + Point<2>(2.0,0.0) + }; std::vector > vertices(n_points); vertices.assign(points,points+n_points); @@ -68,8 +69,8 @@ void create_grid (Triangulation<2> &tria) cells[1].vertices[2] = 2; cells[1].vertices[3] = 1; - // generate a triangulation - // out of this + // generate a triangulation + // out of this GridReordering<2>::reorder_cells (cells); try { @@ -77,7 +78,7 @@ void create_grid (Triangulation<2> &tria) } catch (Triangulation<2>::DistortedCellList &dcv) { - // ignore the exception + // ignore the exception } } @@ -88,11 +89,11 @@ void check_neighbors (const Triangulation<2> &tria) for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->neighbor(f).state()==IteratorState::valid) { - const unsigned int neighbor_neighbor=cell->neighbor_of_neighbor(f); - deallog << "At face " << f << ": neighbor_of_neighbor=" - << neighbor_neighbor << std::endl; - Assert(cell->face(f)==cell->neighbor(f)->face(neighbor_neighbor), - ExcMessage("Error in neighbor_of_neighbor() function!")); + const unsigned int neighbor_neighbor=cell->neighbor_of_neighbor(f); + deallog << "At face " << f << ": neighbor_of_neighbor=" + << neighbor_neighbor << std::endl; + Assert(cell->face(f)==cell->neighbor(f)->face(neighbor_neighbor), + ExcMessage("Error in neighbor_of_neighbor() function!")); } } @@ -104,7 +105,7 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + Triangulation<2> tria; create_grid(tria); check_neighbors(tria); diff --git a/tests/bits/normals_1.cc b/tests/bits/normals_1.cc index 13cfbec85c..f7fbeebb14 100644 --- a/tests/bits/normals_1.cc +++ b/tests/bits/normals_1.cc @@ -44,22 +44,22 @@ void check (const Triangulation &tria) dof_handler.distribute_dofs (fe); QGauss q_face(3); - + FEFaceValues fe_face_values (fe, q_face, update_normal_vectors | update_JxW_values); FESubfaceValues fe_subface_values (fe, q_face, update_normal_vectors | update_JxW_values); for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell!=dof_handler.end(); ++cell) { Tensor<1,dim> n1, n2; - // first integrate over faces - // and make sure that the - // result of the integration is - // close to zero + // first integrate over faces + // and make sure that the + // result of the integration is + // close to zero for (unsigned int f=0; f::faces_per_cell; ++f) { fe_face_values.reinit (cell, f); @@ -72,8 +72,8 @@ void check (const Triangulation &tria) << std::sqrt (n1*n1) << std::endl; - // now same for subface - // integration + // now same for subface + // integration for (unsigned int f=0; f::faces_per_cell; ++f) for (unsigned int sf=0; sf::max_children_per_face; ++sf) { @@ -90,39 +90,39 @@ void check (const Triangulation &tria) } -int main () +int main () { std::ofstream logfile("normals_1/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<2> coarse_grid; GridGenerator::hyper_cube (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_cube (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<2> coarse_grid; GridGenerator::hyper_ball (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); check (coarse_grid); } - + } - - + + diff --git a/tests/bits/normals_2.cc b/tests/bits/normals_2.cc index 6fe4138588..573ca6dee5 100644 --- a/tests/bits/normals_2.cc +++ b/tests/bits/normals_2.cc @@ -54,22 +54,22 @@ void check (const Triangulation &tria, deallog.threshold_double(1.e-10); QGauss q_face(3); - + FEFaceValues fe_face_values (mapping, fe, q_face, update_normal_vectors | update_JxW_values); FESubfaceValues fe_subface_values (mapping, fe, q_face, update_normal_vectors | update_JxW_values); for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell!=dof_handler.end(); ++cell) { Tensor<1,dim> n1, n2; - // first integrate over faces - // and make sure that the - // result of the integration is - // close to zero + // first integrate over faces + // and make sure that the + // result of the integration is + // close to zero for (unsigned int f=0; f::faces_per_cell; ++f) { fe_face_values.reinit (cell, f); @@ -82,8 +82,8 @@ void check (const Triangulation &tria, << std::sqrt (n1*n1) << std::endl; - // now same for subface - // integration + // now same for subface + // integration for (unsigned int f=0; f::faces_per_cell; ++f) for (unsigned int sf=0; sf::max_children_per_face; ++sf) { @@ -100,14 +100,14 @@ void check (const Triangulation &tria, } -int main () +int main () { std::ofstream logfile("normals_2/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<2> coarse_grid; GridGenerator::hyper_ball (coarse_grid); static const HyperBallBoundary<2> boundary; @@ -116,8 +116,8 @@ int main () check (coarse_grid, 2); check (coarse_grid, 4); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); static const HyperBallBoundary<3> boundary; @@ -126,8 +126,8 @@ int main () check (coarse_grid, 2); check (coarse_grid, 3); } - + } - - + + diff --git a/tests/bits/normals_3.cc b/tests/bits/normals_3.cc index 0eafcac2ea..8e274e8645 100644 --- a/tests/bits/normals_3.cc +++ b/tests/bits/normals_3.cc @@ -49,22 +49,22 @@ void check (const Triangulation &tria) dof_handler.distribute_dofs (fe); QGauss q_face(3); - + FEFaceValues fe_face_values (mapping, fe, q_face, update_normal_vectors | update_JxW_values); FESubfaceValues fe_subface_values (mapping, fe, q_face, update_normal_vectors | update_JxW_values); for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell!=dof_handler.end(); ++cell) { Tensor<1,dim> n1, n2; - // first integrate over faces - // and make sure that the - // result of the integration is - // close to zero + // first integrate over faces + // and make sure that the + // result of the integration is + // close to zero for (unsigned int f=0; f::faces_per_cell; ++f) { fe_face_values.reinit (cell, f); @@ -77,8 +77,8 @@ void check (const Triangulation &tria) << std::sqrt (n1*n1) << std::endl; - // now same for subface - // integration + // now same for subface + // integration for (unsigned int f=0; f::faces_per_cell; ++f) for (unsigned int sf=0; sf::max_children_per_face; ++sf) { @@ -95,14 +95,14 @@ void check (const Triangulation &tria) } -int main () +int main () { std::ofstream logfile("normals_3/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<2> coarse_grid; GridGenerator::hyper_ball (coarse_grid); static const HyperBallBoundary<2> boundary; @@ -110,16 +110,16 @@ int main () check (coarse_grid); } - // the C1 mapping is not fully - // implemented in 3d, unfortunately -// { + // the C1 mapping is not fully + // implemented in 3d, unfortunately +// { // Triangulation<3> coarse_grid; // GridGenerator::hyper_ball (coarse_grid); // static const HyperBallBoundary<3> boundary; // coarse_grid.set_boundary (0, boundary); // check (coarse_grid); -// } +// } } - - + + diff --git a/tests/bits/normals_4.cc b/tests/bits/normals_4.cc index d892d62056..db145a7895 100644 --- a/tests/bits/normals_4.cc +++ b/tests/bits/normals_4.cc @@ -49,22 +49,22 @@ void check (const Triangulation &tria) dof_handler.distribute_dofs (fe); QGauss q_face(3); - + FEFaceValues fe_face_values (mapping, fe, q_face, update_normal_vectors | update_JxW_values); FESubfaceValues fe_subface_values (mapping, fe, q_face, update_normal_vectors | update_JxW_values); for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell!=dof_handler.end(); ++cell) { Tensor<1,dim> n1, n2; - // first integrate over faces - // and make sure that the - // result of the integration is - // close to zero + // first integrate over faces + // and make sure that the + // result of the integration is + // close to zero for (unsigned int f=0; f::faces_per_cell; ++f) { fe_face_values.reinit (cell, f); @@ -77,8 +77,8 @@ void check (const Triangulation &tria) << std::sqrt (n1*n1) << std::endl; - // now same for subface - // integration + // now same for subface + // integration for (unsigned int f=0; f::faces_per_cell; ++f) for (unsigned int sf=0; sf::max_children_per_face; ++sf) { @@ -95,25 +95,25 @@ void check (const Triangulation &tria) } -int main () +int main () { std::ofstream logfile("normals_4/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<2> coarse_grid; GridGenerator::hyper_cube (coarse_grid); check (coarse_grid); } - { + { Triangulation<3> coarse_grid; GridGenerator::hyper_cube (coarse_grid); check (coarse_grid); - } + } } - - + + diff --git a/tests/bits/oliver_01.cc b/tests/bits/oliver_01.cc index 9f7f78ca0d..20c3c1b680 100644 --- a/tests/bits/oliver_01.cc +++ b/tests/bits/oliver_01.cc @@ -28,14 +28,14 @@ #include -int main () +int main () { std::ofstream logfile("oliver_01/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - // this test only needs to compile, not run + // this test only needs to compile, not run if (false) { SparseMatrix::iterator *i; @@ -43,6 +43,6 @@ int main () } deallog << "OK" << std::endl; - + return 0; } diff --git a/tests/bits/parameter_handler_1.cc b/tests/bits/parameter_handler_1.cc index d5d1709565..85ca4bd718 100644 --- a/tests/bits/parameter_handler_1.cc +++ b/tests/bits/parameter_handler_1.cc @@ -36,7 +36,7 @@ void check (const char *p) } -int main () +int main () { std::ofstream logfile("parameter_handler_1/output"); deallog.attach(logfile); @@ -44,6 +44,6 @@ int main () deallog.threshold_double(1.e-10); check ("parameter_handler_1/prm"); - + return 0; } diff --git a/tests/bits/parameter_handler_10.cc b/tests/bits/parameter_handler_10.cc index cb3c1a247e..0ed8009aec 100644 --- a/tests/bits/parameter_handler_10.cc +++ b/tests/bits/parameter_handler_10.cc @@ -37,7 +37,7 @@ void check (const char *p) } -int main () +int main () { std::ofstream logfile("parameter_handler_10/output"); deallog.attach(logfile); @@ -45,6 +45,6 @@ int main () deallog.threshold_double(1.e-10); check ("parameter_handler_10/prm"); - + return 0; } diff --git a/tests/bits/parameter_handler_11.cc b/tests/bits/parameter_handler_11.cc index 7712ea29e1..5096921c0e 100644 --- a/tests/bits/parameter_handler_11.cc +++ b/tests/bits/parameter_handler_11.cc @@ -36,7 +36,7 @@ void check (const char *p) } -int main () +int main () { std::ofstream logfile("parameter_handler_11/output"); deallog.attach(logfile); @@ -44,6 +44,6 @@ int main () deallog.threshold_double(1.e-10); check ("parameter_handler_11/prm"); - + return 0; } diff --git a/tests/bits/parameter_handler_13.cc b/tests/bits/parameter_handler_13.cc index 9605b6891a..a33b7f1df1 100644 --- a/tests/bits/parameter_handler_13.cc +++ b/tests/bits/parameter_handler_13.cc @@ -28,8 +28,8 @@ void check (const char *p) ParameterHandler prm; prm.declare_entry ("test_13", "-1:a, 0:b, 1:c", Patterns::Map(Patterns::Integer(-1,1), - Patterns::Selection("a|b|c"), - 2,3)); + Patterns::Selection("a|b|c"), + 2,3)); std::ifstream in(p); prm.read_input (in); diff --git a/tests/bits/parameter_handler_14.cc b/tests/bits/parameter_handler_14.cc index 3c6f2110d3..37c7cb3157 100644 --- a/tests/bits/parameter_handler_14.cc +++ b/tests/bits/parameter_handler_14.cc @@ -39,7 +39,7 @@ void check () catch (...) { deallog << "Exception caught, but none should happen here!!!" - << std::endl; + << std::endl; } foo.enter_subsection("bar"); diff --git a/tests/bits/parameter_handler_2.cc b/tests/bits/parameter_handler_2.cc index de53de4f8b..387bd6dc59 100644 --- a/tests/bits/parameter_handler_2.cc +++ b/tests/bits/parameter_handler_2.cc @@ -25,7 +25,7 @@ #include -int main () +int main () { std::ofstream logfile("parameter_handler_2/output"); deallog.attach(logfile); @@ -47,6 +47,6 @@ int main () prm.leave_subsection (); deallog << list << std::endl; - + return 0; } diff --git a/tests/bits/parameter_handler_3.cc b/tests/bits/parameter_handler_3.cc index 3caab5e603..139461825e 100644 --- a/tests/bits/parameter_handler_3.cc +++ b/tests/bits/parameter_handler_3.cc @@ -25,15 +25,15 @@ #include -int main () +int main () { - try + try { std::ofstream logfile("parameter_handler_3/output"); deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); - + deallog.threshold_double(1.e-10); + ParameterHandler prm; prm.enter_subsection ("Testing"); prm.declare_entry ("string list", @@ -48,35 +48,35 @@ int main () Patterns::Double(), "docs 3"); prm.leave_subsection (); - - // read and then write parameters + + // read and then write parameters prm.read_input("parameter_handler_3/prm"); prm.print_parameters (logfile, ParameterHandler::Text); } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; - + return 0; } diff --git a/tests/bits/parameter_handler_4.cc b/tests/bits/parameter_handler_4.cc index 985a5e6e26..965039bd20 100644 --- a/tests/bits/parameter_handler_4.cc +++ b/tests/bits/parameter_handler_4.cc @@ -25,14 +25,14 @@ #include -int main () +int main () { try { std::ofstream logfile("parameter_handler_4/output"); deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); ParameterHandler prm; prm.enter_subsection ("Testing"); @@ -49,37 +49,37 @@ int main () "docs 3"); prm.leave_subsection (); - // read and then write - // parameters. take same input file - // as for parameter_handler_3, but - // use different output format + // read and then write + // parameters. take same input file + // as for parameter_handler_3, but + // use different output format prm.read_input("parameter_handler_3/prm"); prm.print_parameters (logfile, ParameterHandler::LaTeX); } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; - + return 0; } diff --git a/tests/bits/parameter_handler_4a.cc b/tests/bits/parameter_handler_4a.cc index 0d9002f53e..5f16e569c4 100644 --- a/tests/bits/parameter_handler_4a.cc +++ b/tests/bits/parameter_handler_4a.cc @@ -39,65 +39,65 @@ int main () ParameterHandler prm; prm.enter_subsection ("Testing"); { - prm.enter_subsection ("Testing 2"); - { - prm.declare_entry ("string list 2", - "a", - Patterns::List(Patterns::Selection("a|b|c|d|e|f|g|h")), - "docs 1"); - prm.declare_entry ("int 2", - "1", - Patterns::Integer()); - prm.declare_entry ("double 2", - "3.1415926", - Patterns::Double(), - "docs 3"); - } - prm.leave_subsection (); + prm.enter_subsection ("Testing 2"); + { + prm.declare_entry ("string list 2", + "a", + Patterns::List(Patterns::Selection("a|b|c|d|e|f|g|h")), + "docs 1"); + prm.declare_entry ("int 2", + "1", + Patterns::Integer()); + prm.declare_entry ("double 2", + "3.1415926", + Patterns::Double(), + "docs 3"); + } + prm.leave_subsection (); - prm.declare_entry ("string list", - "a", - Patterns::List(Patterns::Selection("a|b|c|d|e|f|g|h")), - "docs 1"); - prm.declare_entry ("int", - "1", - Patterns::Integer()); - prm.declare_entry ("double", - "3.1415926", - Patterns::Double(), - "docs 3"); + prm.declare_entry ("string list", + "a", + Patterns::List(Patterns::Selection("a|b|c|d|e|f|g|h")), + "docs 1"); + prm.declare_entry ("int", + "1", + Patterns::Integer()); + prm.declare_entry ("double", + "3.1415926", + Patterns::Double(), + "docs 3"); } prm.leave_subsection (); - // read and then write - // parameters. take same input file - // as for parameter_handler_3, but - // use different output format + // read and then write + // parameters. take same input file + // as for parameter_handler_3, but + // use different output format prm.read_input("parameter_handler_3/prm"); prm.print_parameters (logfile, ParameterHandler::LaTeX); } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; diff --git a/tests/bits/parameter_handler_4b.cc b/tests/bits/parameter_handler_4b.cc index 16ee49d02f..a91f7944cd 100644 --- a/tests/bits/parameter_handler_4b.cc +++ b/tests/bits/parameter_handler_4b.cc @@ -45,25 +45,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; diff --git a/tests/bits/parameter_handler_5.cc b/tests/bits/parameter_handler_5.cc index 0ea7f9d975..8e967a0540 100644 --- a/tests/bits/parameter_handler_5.cc +++ b/tests/bits/parameter_handler_5.cc @@ -26,14 +26,14 @@ #include -int main () +int main () { try { std::ofstream logfile("parameter_handler_5/output"); deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); ParameterHandler prm; prm.declare_entry ("int", @@ -48,27 +48,27 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; - + return 0; } diff --git a/tests/bits/parameter_handler_6.cc b/tests/bits/parameter_handler_6.cc index faab50efc0..3a71d1cd22 100644 --- a/tests/bits/parameter_handler_6.cc +++ b/tests/bits/parameter_handler_6.cc @@ -25,16 +25,16 @@ #include -int main () +int main () { - try + try { std::ofstream logfile("parameter_handler_6/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - // same as parameter_handler_3 + // same as parameter_handler_3 ParameterHandler prm; prm.enter_subsection ("Testing"); prm.declare_entry ("string list", @@ -49,44 +49,44 @@ int main () Patterns::Double(), "docs 3"); prm.leave_subsection (); - + prm.read_input("parameter_handler_3/prm"); - // now set some of the entries to - // different values + // now set some of the entries to + // different values prm.enter_subsection ("Testing"); prm.set ("string list", "a, c, b"); prm.set ("int", "5"); prm.set ("double", "2.71828"); prm.leave_subsection (); - - // then write + + // then write prm.print_parameters (logfile, ParameterHandler::Text); } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; - + return 0; } diff --git a/tests/bits/parameter_handler_6_bool.cc b/tests/bits/parameter_handler_6_bool.cc index 11061bdb99..13c7a1593d 100644 --- a/tests/bits/parameter_handler_6_bool.cc +++ b/tests/bits/parameter_handler_6_bool.cc @@ -25,16 +25,16 @@ #include -int main () +int main () { - try + try { std::ofstream logfile("parameter_handler_6_bool/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - // same as parameter_handler_3 + // same as parameter_handler_3 ParameterHandler prm; prm.enter_subsection ("Testing"); prm.declare_entry ("bool", @@ -42,51 +42,51 @@ int main () Patterns::Bool(), "docs 1"); prm.leave_subsection (); - + prm.read_input("parameter_handler_6_bool/prm"); - // now set the parameter to a different - // value + // now set the parameter to a different + // value prm.enter_subsection ("Testing"); prm.set ("bool", true); prm.leave_subsection (); - - // then write + + // then write prm.print_parameters (logfile, ParameterHandler::Text); - // and do it again with the opposite - // value + // and do it again with the opposite + // value prm.enter_subsection ("Testing"); prm.set ("bool", false); prm.leave_subsection (); - - // then write + + // then write prm.print_parameters (logfile, ParameterHandler::Text); } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; - + return 0; } diff --git a/tests/bits/parameter_handler_7.cc b/tests/bits/parameter_handler_7.cc index 095411f8b6..19a97e4678 100644 --- a/tests/bits/parameter_handler_7.cc +++ b/tests/bits/parameter_handler_7.cc @@ -49,35 +49,35 @@ int main () "docs 3"); prm.leave_subsection (); - // read and then write - // parameters. take same input file - // as for parameter_handler_3, but - // use different output format + // read and then write + // parameters. take same input file + // as for parameter_handler_3, but + // use different output format prm.read_input("parameter_handler_3/prm"); prm.print_parameters (logfile, ParameterHandler::Description); } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; diff --git a/tests/bits/parameter_handler_8.cc b/tests/bits/parameter_handler_8.cc index 8493d34872..7c6face436 100644 --- a/tests/bits/parameter_handler_8.cc +++ b/tests/bits/parameter_handler_8.cc @@ -39,65 +39,65 @@ int main () ParameterHandler prm; prm.enter_subsection ("Testing testing"); { - prm.declare_entry ("string list", - "a", - Patterns::List(Patterns::Selection("a|b|c|d|e|f|g|h")), - "docs 1"); - prm.declare_entry ("int/int", - "1", - Patterns::Integer()); - prm.declare_entry ("double_double", - "3.1415926", - Patterns::Double(), - "docs 3"); + prm.declare_entry ("string list", + "a", + Patterns::List(Patterns::Selection("a|b|c|d|e|f|g|h")), + "docs 1"); + prm.declare_entry ("int/int", + "1", + Patterns::Integer()); + prm.declare_entry ("double_double", + "3.1415926", + Patterns::Double(), + "docs 3"); - prm.enter_subsection ("Testing%testing"); - { - prm.declare_entry ("string&list", - "a,b,c", - Patterns::List(Patterns::Selection("a|b|c|d|e|f|g|h")), - "docs 1"); - prm.declare_entry ("int*int", - "2", - Patterns::Integer()); - prm.declare_entry ("double+double", - "6.1415926", - Patterns::Double(), - "docs 3"); - } - prm.leave_subsection (); + prm.enter_subsection ("Testing%testing"); + { + prm.declare_entry ("string&list", + "a,b,c", + Patterns::List(Patterns::Selection("a|b|c|d|e|f|g|h")), + "docs 1"); + prm.declare_entry ("int*int", + "2", + Patterns::Integer()); + prm.declare_entry ("double+double", + "6.1415926", + Patterns::Double(), + "docs 3"); + } + prm.leave_subsection (); } prm.leave_subsection (); - // read and then write - // parameters. take same input file - // as for parameter_handler_3, but - // use different output format + // read and then write + // parameters. take same input file + // as for parameter_handler_3, but + // use different output format prm.read_input("parameter_handler_8/prm"); prm.print_parameters (logfile, ParameterHandler::Text); } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; diff --git a/tests/bits/parameter_handler_9.cc b/tests/bits/parameter_handler_9.cc index 5bf6e9f47b..deb35ad2a3 100644 --- a/tests/bits/parameter_handler_9.cc +++ b/tests/bits/parameter_handler_9.cc @@ -37,65 +37,65 @@ int main () ParameterHandler prm; prm.enter_subsection ("Testing testing"); { - prm.declare_entry ("string list", - "a", - Patterns::List(Patterns::Selection("a|b|c|d|e|f|g|h")), - "docs 1"); - prm.declare_entry ("int/int", - "1", - Patterns::Integer()); - prm.declare_entry ("double_double", - "3.1415926", - Patterns::Double(), - "docs 3"); + prm.declare_entry ("string list", + "a", + Patterns::List(Patterns::Selection("a|b|c|d|e|f|g|h")), + "docs 1"); + prm.declare_entry ("int/int", + "1", + Patterns::Integer()); + prm.declare_entry ("double_double", + "3.1415926", + Patterns::Double(), + "docs 3"); - prm.enter_subsection ("Testing%testing"); - { - prm.declare_entry ("string&list", - "a,b,c", - Patterns::List(Patterns::Selection("a|b|c|d|e|f|g|h")), - "docs 1"); - prm.declare_entry ("int*int", - "2", - Patterns::Integer()); - prm.declare_entry ("double+double", - "6.1415926", - Patterns::Double(), - "docs 3"); - } - prm.leave_subsection (); + prm.enter_subsection ("Testing%testing"); + { + prm.declare_entry ("string&list", + "a,b,c", + Patterns::List(Patterns::Selection("a|b|c|d|e|f|g|h")), + "docs 1"); + prm.declare_entry ("int*int", + "2", + Patterns::Integer()); + prm.declare_entry ("double+double", + "6.1415926", + Patterns::Double(), + "docs 3"); + } + prm.leave_subsection (); } prm.leave_subsection (); - // read and then write - // parameters. take same input file - // as for parameter_handler_3, but - // use different output format + // read and then write + // parameters. take same input file + // as for parameter_handler_3, but + // use different output format prm.read_input("parameter_handler_8/prm"); prm.log_parameters (deallog); } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; diff --git a/tests/bits/parameter_handler_read_xml.cc b/tests/bits/parameter_handler_read_xml.cc index a367a26625..d15f07c9ee 100644 --- a/tests/bits/parameter_handler_read_xml.cc +++ b/tests/bits/parameter_handler_read_xml.cc @@ -33,54 +33,54 @@ int main () ParameterHandler prm; prm.declare_entry ("int1", - "1", - Patterns::Integer(), - "doc 1"); + "1", + Patterns::Integer(), + "doc 1"); prm.declare_entry ("int2", - "2", - Patterns::Integer(), - "doc 2"); + "2", + Patterns::Integer(), + "doc 2"); prm.enter_subsection ("ss1"); { prm.declare_entry ("double 1", - "1.234", - Patterns::Double(), - "doc 3"); + "1.234", + Patterns::Double(), + "doc 3"); prm.enter_subsection ("ss2"); { prm.declare_entry ("double 2", - "4.321", - Patterns::Double(), - "doc 4"); + "4.321", + Patterns::Double(), + "doc 4"); } prm.leave_subsection (); } prm.leave_subsection (); - // things with strange characters + // things with strange characters prm.enter_subsection ("Testing%testing"); { prm.declare_entry ("string&list", - "< & > ; /", - Patterns::Anything(), - "docs 1"); + "< & > ; /", + Patterns::Anything(), + "docs 1"); prm.declare_entry ("int*int", - "2", - Patterns::Integer()); + "2", + Patterns::Integer()); prm.declare_entry ("double+double", - "6.1415926", - Patterns::Double(), - "docs 3"); + "6.1415926", + Patterns::Double(), + "docs 3"); } prm.leave_subsection (); - // read from XML + // read from XML std::ifstream in ("parameter_handler_read_xml/prm"); bool result = prm.read_input_from_xml (in); Assert (result == true, ExcInternalError()); - // write it out again + // write it out again prm.print_parameters (deallog.get_file_stream(), ParameterHandler::XML); logfile << std::endl; diff --git a/tests/bits/parameter_handler_read_xml_error_01.cc b/tests/bits/parameter_handler_read_xml_error_01.cc index e13ba6b442..0b5770f7af 100644 --- a/tests/bits/parameter_handler_read_xml_error_01.cc +++ b/tests/bits/parameter_handler_read_xml_error_01.cc @@ -34,54 +34,54 @@ int main () ParameterHandler prm; prm.declare_entry ("int1", - "1", - Patterns::Integer(), - "doc 1"); + "1", + Patterns::Integer(), + "doc 1"); prm.declare_entry ("int2", - "2", - Patterns::Integer(), - "doc 2"); + "2", + Patterns::Integer(), + "doc 2"); prm.enter_subsection ("ss1"); { prm.declare_entry ("double 1", - "1.234", - Patterns::Double(), - "doc 3"); + "1.234", + Patterns::Double(), + "doc 3"); prm.enter_subsection ("ss2"); { prm.declare_entry ("double 2", - "4.321", - Patterns::Double(), - "doc 4"); + "4.321", + Patterns::Double(), + "doc 4"); } prm.leave_subsection (); } prm.leave_subsection (); - // things with strange characters + // things with strange characters prm.enter_subsection ("Testing%testing"); { prm.declare_entry ("string&list", - "< & > ; /", - Patterns::Anything(), - "docs 1"); + "< & > ; /", + Patterns::Anything(), + "docs 1"); prm.declare_entry ("int*int", - "2", - Patterns::Integer()); + "2", + Patterns::Integer()); prm.declare_entry ("double+double", - "6.1415926", - Patterns::Double(), - "docs 3"); + "6.1415926", + Patterns::Double(), + "docs 3"); } prm.leave_subsection (); - // read from XML + // read from XML std::ifstream in ("parameter_handler_read_xml_error_01/prm"); bool result = prm.read_input_from_xml (in); Assert (result == false, ExcInternalError()); deallog << "OK" << std::endl; - + return 0; } diff --git a/tests/bits/parameter_handler_read_xml_error_02.cc b/tests/bits/parameter_handler_read_xml_error_02.cc index 1e443fbf5a..beedd2face 100644 --- a/tests/bits/parameter_handler_read_xml_error_02.cc +++ b/tests/bits/parameter_handler_read_xml_error_02.cc @@ -34,54 +34,54 @@ int main () ParameterHandler prm; prm.declare_entry ("int1", - "1", - Patterns::Integer(), - "doc 1"); + "1", + Patterns::Integer(), + "doc 1"); prm.declare_entry ("int2", - "2", - Patterns::Integer(), - "doc 2"); + "2", + Patterns::Integer(), + "doc 2"); prm.enter_subsection ("ss1"); { prm.declare_entry ("double 1", - "1.234", - Patterns::Double(), - "doc 3"); + "1.234", + Patterns::Double(), + "doc 3"); prm.enter_subsection ("ss2"); { prm.declare_entry ("double 2", - "4.321", - Patterns::Double(), - "doc 4"); + "4.321", + Patterns::Double(), + "doc 4"); } prm.leave_subsection (); } prm.leave_subsection (); - // things with strange characters + // things with strange characters prm.enter_subsection ("Testing%testing"); { prm.declare_entry ("string&list", - "< & > ; /", - Patterns::Anything(), - "docs 1"); + "< & > ; /", + Patterns::Anything(), + "docs 1"); prm.declare_entry ("int*int", - "2", - Patterns::Integer()); + "2", + Patterns::Integer()); prm.declare_entry ("double+double", - "6.1415926", - Patterns::Double(), - "docs 3"); + "6.1415926", + Patterns::Double(), + "docs 3"); } prm.leave_subsection (); - // read from XML + // read from XML std::ifstream in ("parameter_handler_read_xml_error_02/prm"); bool result = prm.read_input_from_xml (in); Assert (result == false, ExcInternalError()); deallog << "OK" << std::endl; - + return 0; } diff --git a/tests/bits/parameter_handler_read_xml_error_03.cc b/tests/bits/parameter_handler_read_xml_error_03.cc index fc86216e30..b1387c8db8 100644 --- a/tests/bits/parameter_handler_read_xml_error_03.cc +++ b/tests/bits/parameter_handler_read_xml_error_03.cc @@ -34,54 +34,54 @@ int main () ParameterHandler prm; prm.declare_entry ("int1", - "1", - Patterns::Integer(), - "doc 1"); + "1", + Patterns::Integer(), + "doc 1"); prm.declare_entry ("int2", - "2", - Patterns::Integer(), - "doc 2"); + "2", + Patterns::Integer(), + "doc 2"); prm.enter_subsection ("ss1"); { prm.declare_entry ("double 1", - "1.234", - Patterns::Double(), - "doc 3"); + "1.234", + Patterns::Double(), + "doc 3"); prm.enter_subsection ("ss2"); { prm.declare_entry ("double 2", - "4.321", - Patterns::Double(), - "doc 4"); + "4.321", + Patterns::Double(), + "doc 4"); } prm.leave_subsection (); } prm.leave_subsection (); - // things with strange characters + // things with strange characters prm.enter_subsection ("Testing%testing"); { prm.declare_entry ("string&list", - "< & > ; /", - Patterns::Anything(), - "docs 1"); + "< & > ; /", + Patterns::Anything(), + "docs 1"); prm.declare_entry ("int*int", - "2", - Patterns::Integer()); + "2", + Patterns::Integer()); prm.declare_entry ("double+double", - "6.1415926", - Patterns::Double(), - "docs 3"); + "6.1415926", + Patterns::Double(), + "docs 3"); } prm.leave_subsection (); - // read from XML + // read from XML std::ifstream in ("parameter_handler_read_xml_error_03/prm"); bool result = prm.read_input_from_xml (in); Assert (result == false, ExcInternalError()); deallog << "OK" << std::endl; - + return 0; } diff --git a/tests/bits/parameter_handler_read_xml_error_04.cc b/tests/bits/parameter_handler_read_xml_error_04.cc index e5d54a3ecb..00cfff3941 100644 --- a/tests/bits/parameter_handler_read_xml_error_04.cc +++ b/tests/bits/parameter_handler_read_xml_error_04.cc @@ -34,54 +34,54 @@ int main () ParameterHandler prm; prm.declare_entry ("int1", - "1", - Patterns::Integer(), - "doc 1"); + "1", + Patterns::Integer(), + "doc 1"); prm.declare_entry ("int2", - "2", - Patterns::Integer(), - "doc 2"); + "2", + Patterns::Integer(), + "doc 2"); prm.enter_subsection ("ss1"); { prm.declare_entry ("double 1", - "1.234", - Patterns::Double(), - "doc 3"); + "1.234", + Patterns::Double(), + "doc 3"); prm.enter_subsection ("ss2"); { prm.declare_entry ("double 2", - "4.321", - Patterns::Double(), - "doc 4"); + "4.321", + Patterns::Double(), + "doc 4"); } prm.leave_subsection (); } prm.leave_subsection (); - // things with strange characters + // things with strange characters prm.enter_subsection ("Testing%testing"); { prm.declare_entry ("string&list", - "< & > ; /", - Patterns::Anything(), - "docs 1"); + "< & > ; /", + Patterns::Anything(), + "docs 1"); prm.declare_entry ("int*int", - "2", - Patterns::Integer()); + "2", + Patterns::Integer()); prm.declare_entry ("double+double", - "6.1415926", - Patterns::Double(), - "docs 3"); + "6.1415926", + Patterns::Double(), + "docs 3"); } prm.leave_subsection (); - // read from XML + // read from XML std::ifstream in ("parameter_handler_read_xml_error_04/prm"); bool result = prm.read_input_from_xml (in); Assert (result == false, ExcInternalError()); deallog << "OK" << std::endl; - + return 0; } diff --git a/tests/bits/parameter_handler_write_json.cc b/tests/bits/parameter_handler_write_json.cc index 0330f91f04..ddcd9aec63 100644 --- a/tests/bits/parameter_handler_write_json.cc +++ b/tests/bits/parameter_handler_write_json.cc @@ -34,45 +34,45 @@ int main () ParameterHandler prm; prm.declare_entry ("int1", - "1", - Patterns::Integer(), - "doc 1"); + "1", + Patterns::Integer(), + "doc 1"); prm.declare_entry ("int2", - "2", - Patterns::Integer(), - "doc 2"); + "2", + Patterns::Integer(), + "doc 2"); prm.enter_subsection ("ss1"); { prm.declare_entry ("double 1", - "1.234", - Patterns::Double(), - "doc 3"); + "1.234", + Patterns::Double(), + "doc 3"); prm.enter_subsection ("ss2"); { prm.declare_entry ("double 2", - "4.321", - Patterns::Double(), - "doc 4"); + "4.321", + Patterns::Double(), + "doc 4"); } prm.leave_subsection (); } prm.leave_subsection (); - // things with strange characters + // things with strange characters prm.enter_subsection ("Testing%testing"); { prm.declare_entry ("string&list", - "< & > ; /", - Patterns::Anything(), - "docs 1"); + "< & > ; /", + Patterns::Anything(), + "docs 1"); prm.declare_entry ("int*int", - "2", - Patterns::Integer()); + "2", + Patterns::Integer()); prm.declare_entry ("double+double", - "6.1415926", - Patterns::Double(), - "docs 3"); + "6.1415926", + Patterns::Double(), + "docs 3"); } prm.leave_subsection (); diff --git a/tests/bits/parameter_handler_write_xml.cc b/tests/bits/parameter_handler_write_xml.cc index cebea3acdf..cb75994780 100644 --- a/tests/bits/parameter_handler_write_xml.cc +++ b/tests/bits/parameter_handler_write_xml.cc @@ -34,45 +34,45 @@ int main () ParameterHandler prm; prm.declare_entry ("int1", - "1", - Patterns::Integer(), - "doc 1"); + "1", + Patterns::Integer(), + "doc 1"); prm.declare_entry ("int2", - "2", - Patterns::Integer(), - "doc 2"); + "2", + Patterns::Integer(), + "doc 2"); prm.enter_subsection ("ss1"); { prm.declare_entry ("double 1", - "1.234", - Patterns::Double(), - "doc 3"); + "1.234", + Patterns::Double(), + "doc 3"); prm.enter_subsection ("ss2"); { prm.declare_entry ("double 2", - "4.321", - Patterns::Double(), - "doc 4"); + "4.321", + Patterns::Double(), + "doc 4"); } prm.leave_subsection (); } prm.leave_subsection (); - // things with strange characters + // things with strange characters prm.enter_subsection ("Testing%testing"); { prm.declare_entry ("string&list", - "< & > ; /", - Patterns::Anything(), - "docs 1"); + "< & > ; /", + Patterns::Anything(), + "docs 1"); prm.declare_entry ("int*int", - "2", - Patterns::Integer()); + "2", + Patterns::Integer()); prm.declare_entry ("double+double", - "6.1415926", - Patterns::Double(), - "docs 3"); + "6.1415926", + Patterns::Double(), + "docs 3"); } prm.leave_subsection (); diff --git a/tests/bits/parsed_function.cc b/tests/bits/parsed_function.cc index 7b99b56b53..310082492c 100644 --- a/tests/bits/parsed_function.cc +++ b/tests/bits/parsed_function.cc @@ -17,7 +17,7 @@ // This program tests the functionality of the function parser -// wrapper. +// wrapper. #include "../tests.h" #include @@ -32,64 +32,69 @@ #include #include -template -void Test() { +template +void Test() +{ // A parameter handler ParameterHandler prm; - + // A triangulation Triangulation tria; GridGenerator::hyper_cube(tria,0,1); tria.refine_global(3); - + // Vertices const std::vector > &vertices = tria.get_vertices(); - + // Test vector declaration - for(unsigned int i=0; i::declare_parameters(prm, i+1); - prm.set("Function constants", "f=" + Utilities::int_to_string(i+1)); - - // It is cos(pi f x_i) *t^i, numbering from zero - std::string expr = "cos(pi*f*x)*t"; - if(i>0) expr+= "; cos(pi*f*y)*t"; - if(i>1) expr+= "; cos(pi*f*z)*t"; - - prm.set("Function expression", expr); - - Functions::ParsedFunction function(i+1); - function.parse_parameters(prm); - - prm.leave_subsection(); - - // Now test the difference from t=0 to t=1 - for(double t=0.; t<1; t+= .1) { - function.set_time(t); - Point p; - std::vector > values(vertices.size(), - Vector(i+1)); - function.vector_value_list(vertices, values); - for(unsigned int j=0; j 1e-10) - deallog << "p(" << di << "): " << vertices[j] << ", delta: " - << delta << std::endl; - } - } + for (unsigned int i=0; i::declare_parameters(prm, i+1); + prm.set("Function constants", "f=" + Utilities::int_to_string(i+1)); + + // It is cos(pi f x_i) *t^i, numbering from zero + std::string expr = "cos(pi*f*x)*t"; + if (i>0) expr+= "; cos(pi*f*y)*t"; + if (i>1) expr+= "; cos(pi*f*z)*t"; + + prm.set("Function expression", expr); + + Functions::ParsedFunction function(i+1); + function.parse_parameters(prm); + + prm.leave_subsection(); + + // Now test the difference from t=0 to t=1 + for (double t=0.; t<1; t+= .1) + { + function.set_time(t); + Point p; + std::vector > values(vertices.size(), + Vector(i+1)); + function.vector_value_list(vertices, values); + for (unsigned int j=0; j 1e-10) + deallog << "p(" << di << "): " << vertices[j] << ", delta: " + << delta << std::endl; + } + } + } } - } deallog << "Tested on: " << std::endl; prm.log_parameters(deallog); } -int main () +int main () { std::ofstream logfile("parsed_function/output"); deallog.attach(logfile); @@ -101,6 +106,6 @@ int main () Test<3>(); } - - + + diff --git a/tests/bits/periodicity_01.cc b/tests/bits/periodicity_01.cc index 1133486c08..1c85517598 100644 --- a/tests/bits/periodicity_01.cc +++ b/tests/bits/periodicity_01.cc @@ -38,33 +38,33 @@ template -void test () +void test () { // create a 2x1 (or 2x1x1) mesh Triangulation triangulation; std::vector repetitions (dim, 1); repetitions[0] = 2; GridGenerator::subdivided_hyper_rectangle (triangulation, - repetitions, - Point(), - (dim == 2 ? - Point(2,1) : - Point(2,1,1))); - + repetitions, + Point(), + (dim == 2 ? + Point(2,1) : + Point(2,1,1))); + FE_Q fe(1); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); ConstraintMatrix cm; DoFTools::make_periodicity_constraints (dof_handler.begin(0)->face(0), - (++dof_handler.begin(0))->face(1), - cm); + (++dof_handler.begin(0))->face(1), + cm); cm.print (deallog.get_file_stream()); } - -int main () + +int main () { std::ofstream logfile("periodicity_01/output"); deallog.attach(logfile); diff --git a/tests/bits/periodicity_02.cc b/tests/bits/periodicity_02.cc index 7793f48976..bb6abea3e4 100644 --- a/tests/bits/periodicity_02.cc +++ b/tests/bits/periodicity_02.cc @@ -39,37 +39,37 @@ template -void test () +void test () { deallog << dim << "D" << std::endl; - + // create a 2x1 (or 2x1x1) mesh and refine the leftmost cell Triangulation triangulation; std::vector repetitions (dim, 1); repetitions[0] = 2; GridGenerator::subdivided_hyper_rectangle (triangulation, - repetitions, - Point(), - (dim == 2 ? - Point(2,1) : - Point(2,1,1))); + repetitions, + Point(), + (dim == 2 ? + Point(2,1) : + Point(2,1,1))); triangulation.begin_active()->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); - + FE_Q fe(1); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); ConstraintMatrix cm; DoFTools::make_periodicity_constraints (dof_handler.begin(0)->face(0), - (++dof_handler.begin(0))->face(1), - cm); + (++dof_handler.begin(0))->face(1), + cm); cm.print (deallog.get_file_stream()); } - -int main () + +int main () { std::ofstream logfile("periodicity_02/output"); deallog.attach(logfile); diff --git a/tests/bits/periodicity_03.cc b/tests/bits/periodicity_03.cc index 76033b4398..ff833ea093 100644 --- a/tests/bits/periodicity_03.cc +++ b/tests/bits/periodicity_03.cc @@ -39,39 +39,39 @@ template -void test () +void test () { deallog << dim << "D" << std::endl; - + // create a 2x1 (or 2x1x1) mesh and refine the leftmost cell twice Triangulation triangulation; std::vector repetitions (dim, 1); repetitions[0] = 2; GridGenerator::subdivided_hyper_rectangle (triangulation, - repetitions, - Point(), - (dim == 2 ? - Point(2,1) : - Point(2,1,1))); + repetitions, + Point(), + (dim == 2 ? + Point(2,1) : + Point(2,1,1))); triangulation.begin_active()->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); triangulation.begin_active(1)->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); - + FE_Q fe(1); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); ConstraintMatrix cm; DoFTools::make_periodicity_constraints (dof_handler.begin(0)->face(0), - (++dof_handler.begin(0))->face(1), - cm); + (++dof_handler.begin(0))->face(1), + cm); cm.print (deallog.get_file_stream()); } - -int main () + +int main () { std::ofstream logfile("periodicity_03/output"); deallog.attach(logfile); diff --git a/tests/bits/periodicity_04.cc b/tests/bits/periodicity_04.cc index 05f7da5918..5e8f0271b9 100644 --- a/tests/bits/periodicity_04.cc +++ b/tests/bits/periodicity_04.cc @@ -43,20 +43,20 @@ template -void test () +void test () { deallog << dim << "D" << std::endl; - + // create a 2x1 (or 2x1x1) mesh and refine the leftmost cell twice Triangulation triangulation; std::vector repetitions (dim, 1); repetitions[0] = 2; GridGenerator::subdivided_hyper_rectangle (triangulation, - repetitions, - Point(), - (dim == 2 ? - Point(2,1) : - Point(2,1,1))); + repetitions, + Point(), + (dim == 2 ? + Point(2,1) : + Point(2,1,1))); triangulation.begin_active()->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); triangulation.begin_active(1)->set_refine_flag (); @@ -71,15 +71,15 @@ void test () mask[1] = false; ConstraintMatrix cm; DoFTools::make_periodicity_constraints (dof_handler.begin(0)->face(0), - (++dof_handler.begin(0))->face(1), - cm, - mask); + (++dof_handler.begin(0))->face(1), + cm, + mask); cm.print (deallog.get_file_stream()); } - -int main () + +int main () { std::ofstream logfile("periodicity_04/output"); deallog.attach(logfile); diff --git a/tests/bits/point_difference_01.cc b/tests/bits/point_difference_01.cc index 55cf5317a1..36748c8446 100644 --- a/tests/bits/point_difference_01.cc +++ b/tests/bits/point_difference_01.cc @@ -41,32 +41,40 @@ template class MySquareFunction : public Function { - public: - MySquareFunction () : Function () {} - - virtual double value (const Point &p, - const unsigned int component) const - { return (component+1)*p.square()+1; } - - virtual void vector_value (const Point &p, - Vector &values) const - { values(0) = value(p,0); } +public: + MySquareFunction () : Function () {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return (component+1)*p.square()+1; + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + values(0) = value(p,0); + } }; template class MyExpFunction : public Function { - public: - MyExpFunction () : Function () {} - - virtual double value (const Point &p, - const unsigned int component) const - { return std::exp (p(0)); } - - virtual void vector_value (const Point &p, - Vector &values) const - { values(0) = value(p,0); } +public: + MyExpFunction () : Function () {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return std::exp (p(0)); + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + values(0) = value(p,0); + } }; @@ -74,18 +82,18 @@ class MyExpFunction : public Function template void make_mesh (Triangulation &tria) { - + GridGenerator::hyper_cube(tria, -1, 1); - // refine the mesh in a random way so as to - // generate as many cells with - // hanging nodes as possible + // refine the mesh in a random way so as to + // generate as many cells with + // hanging nodes as possible tria.refine_global (4-dim); const double steps[4] = { /*d=0*/ 0, 7, 3, 3 }; for (unsigned int i=0; i::active_cell_iterator - cell = tria.begin_active(); + cell = tria.begin_active(); for (unsigned int index=0; cell != tria.end(); ++cell, ++index) if (index % (3*dim) == 0) cell->set_refine_flag(); @@ -102,36 +110,36 @@ check () { Triangulation tria; make_mesh (tria); - + FE_Q element(3); DoFHandler dof(tria); dof.distribute_dofs(element); - // test with two different functions: one - // that is exactly representable on the - // chosen finite element space, and one - // that isn't + // test with two different functions: one + // that is exactly representable on the + // chosen finite element space, and one + // that isn't for (unsigned int i=0; i<2; ++i) { static const MySquareFunction function_1; static const Functions::CosineFunction function_2; const Function & - function = (i==0 ? - static_cast&>(function_1) : - static_cast&>(function_2)); - + function = (i==0 ? + static_cast&>(function_1) : + static_cast&>(function_2)); + Vector v (dof.n_dofs()); VectorTools::interpolate (dof, function, v); - // for the following points, check the - // function value, output it, and - // verify that the value retrieved from - // the interpolated function is close - // enough to that of the real function - // - // also verify that the actual value is - // roughly correct + // for the following points, check the + // function value, output it, and + // verify that the value retrieved from + // the interpolated function is close + // enough to that of the real function + // + // also verify that the actual value is + // roughly correct Point p[3]; for (unsigned int d=0; d class MySquareFunction : public Function { - public: - MySquareFunction () : Function () {} - - virtual double value (const Point &p, - const unsigned int component) const - { return (component+1)*p.square()+1; } - - virtual void vector_value (const Point &p, - Vector &values) const - { values(0) = value(p,0); } +public: + MySquareFunction () : Function () {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return (component+1)*p.square()+1; + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + values(0) = value(p,0); + } }; template class MyExpFunction : public Function { - public: - MyExpFunction () : Function () {} - - virtual double value (const Point &p, - const unsigned int component) const - { return std::exp (p(0)); } - - virtual void vector_value (const Point &p, - Vector &values) const - { values(0) = value(p,0); } +public: + MyExpFunction () : Function () {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return std::exp (p(0)); + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + values(0) = value(p,0); + } }; @@ -78,18 +86,18 @@ class MyExpFunction : public Function template void make_mesh (Triangulation &tria) { - + GridGenerator::hyper_cube(tria, -1, 1); - // refine the mesh in a random way so as to - // generate as many cells with - // hanging nodes as possible + // refine the mesh in a random way so as to + // generate as many cells with + // hanging nodes as possible tria.refine_global (4-dim); const double steps[4] = { /*d=0*/ 0, 7, 3, 3 }; for (unsigned int i=0; i::active_cell_iterator - cell = tria.begin_active(); + cell = tria.begin_active(); for (unsigned int index=0; cell != tria.end(); ++cell, ++index) if (index % (3*dim) == 0) cell->set_refine_flag(); @@ -107,36 +115,36 @@ check () MappingQ1 mapping; Triangulation tria; make_mesh (tria); - + FE_Q element(3); DoFHandler dof(tria); dof.distribute_dofs(element); - // test with two different functions: one - // that is exactly representable on the - // chosen finite element space, and one - // that isn't + // test with two different functions: one + // that is exactly representable on the + // chosen finite element space, and one + // that isn't for (unsigned int i=0; i<2; ++i) { static const MySquareFunction function_1; static const Functions::CosineFunction function_2; const Function & - function = (i==0 ? - static_cast&>(function_1) : - static_cast&>(function_2)); - + function = (i==0 ? + static_cast&>(function_1) : + static_cast&>(function_2)); + Vector v (dof.n_dofs()); VectorTools::interpolate (dof, function, v); - // for the following points, check the - // function value, output it, and - // verify that the value retrieved from - // the interpolated function is close - // enough to that of the real function - // - // also verify that the actual value is - // roughly correct + // for the following points, check the + // function value, output it, and + // verify that the value retrieved from + // the interpolated function is close + // enough to that of the real function + // + // also verify that the actual value is + // roughly correct Point p[3]; for (unsigned int d=0; d void check () { Triangulation triangulation; - + GridGenerator::hyper_cube (triangulation); - - // Now get the cell + + // Now get the cell const typename Triangulation::cell_iterator - cell = triangulation.begin(); - + cell = triangulation.begin(); + double testcoord[11][3] = {{0.5,0.5,0.5}, - {2,0.5,0.5}, - {0.5,2,0.5}, - {0.5,0.5,2}, - {-2,0.5,0.5}, - {0.5,-2,0.5}, - {0.5,0.5,-2}, - {0.9,0.9,0.9}, - {1.0,0.5,0.5}, - {0.9999999,0.5,0.5}, - {1.0000001,0.5,0.5} }; - + {2,0.5,0.5}, + {0.5,2,0.5}, + {0.5,0.5,2}, + {-2,0.5,0.5}, + {0.5,-2,0.5}, + {0.5,0.5,-2}, + {0.9,0.9,0.9}, + {1.0,0.5,0.5}, + {0.9999999,0.5,0.5}, + {1.0000001,0.5,0.5} + }; + const bool expected2d[] = {1,0,0,1,0,0,1,1,1,1,0}; const bool expected3d[] = {1,0,0,0,0,0,0,1,1,1,0}; - const bool *expected=dim==2 ? expected2d : expected3d; + const bool *expected=dim==2 ? expected2d : expected3d; for (int i=0; i<11; i++) { Point testpoint; testpoint(0)=testcoord[i][0]; testpoint(1)=testcoord[i][1]; if (dim==3) - testpoint(2)=testcoord[i][2]; + testpoint(2)=testcoord[i][2]; bool res = cell->point_inside(testpoint); deallog << testpoint << " inside " << res < void check () { - // use a rather complicated way to - // generate a new mesh with one - // moved vertex -- one could move - // it by hand in the original - // triangulation, but this is how - // the original testcase came in, - // and it tests some more stuff, so - // why change things + // use a rather complicated way to + // generate a new mesh with one + // moved vertex -- one could move + // it by hand in the original + // triangulation, but this is how + // the original testcase came in, + // and it tests some more stuff, so + // why change things Triangulation triangulation; - - // we generate a hyper_cube and - // modify one vertex. + + // we generate a hyper_cube and + // modify one vertex. GridGenerator::hyper_cube (triangulation); - - // Now get the cell + + // Now get the cell const typename Triangulation::cell_iterator - cell = triangulation.begin(); + cell = triangulation.begin(); cell->vertex(0)(0)=-1.; - - // and test it. + + // and test it. double testcoord[14][3] = {{0.5,0.5,0.5}, - {2,0.5,0.5}, - {0.5,2,0.5}, - {0.5,0.5,2}, - {-2,0.5,0.5}, - {0.5,-2,0.5}, - {0.5,0.5,-2}, - {0.9,0.9,0.9}, - {1.0,0.5,0.5}, - {0.9999999,0.5,0.5}, - {1.0000001,0.5,0.5}, - {-0.1,0.1,0.1}, - {-0.24,0.5,0.5}, - {-0.26,0.5,0.5} - }; - + {2,0.5,0.5}, + {0.5,2,0.5}, + {0.5,0.5,2}, + {-2,0.5,0.5}, + {0.5,-2,0.5}, + {0.5,0.5,-2}, + {0.9,0.9,0.9}, + {1.0,0.5,0.5}, + {0.9999999,0.5,0.5}, + {1.0000001,0.5,0.5}, + {-0.1,0.1,0.1}, + {-0.24,0.5,0.5}, + {-0.26,0.5,0.5} + }; + const bool expected2d[] = {1,0,0,1,0,0,1,1,1,1,0,1,1,1}; const bool expected3d[] = {1,0,0,0,0,0,0,1,1,1,0,1,1,0}; const bool *expected=dim==2 ? expected2d : expected3d; @@ -79,17 +79,17 @@ void check () testpoint(0)=testcoord[i][0]; testpoint(1)=testcoord[i][1]; if (dim==3) - testpoint(2)=testcoord[i][2]; + testpoint(2)=testcoord[i][2]; bool res = cell->point_inside(testpoint); - deallog << testpoint << " \t inside " << res - << " expected " << expected[i] << std::endl; + deallog << testpoint << " \t inside " << res + << " expected " << expected[i] << std::endl; Assert (res == expected[i], ExcInternalError()); - } + } } -int main () +int main () { std::ofstream logfile("point_inside_2/output"); deallog.attach(logfile); diff --git a/tests/bits/point_value_01.cc b/tests/bits/point_value_01.cc index e48dd34357..a529122c4e 100644 --- a/tests/bits/point_value_01.cc +++ b/tests/bits/point_value_01.cc @@ -40,32 +40,40 @@ template class MySquareFunction : public Function { - public: - MySquareFunction () : Function () {} - - virtual double value (const Point &p, - const unsigned int component) const - { return (component+1)*p.square()+1; } - - virtual void vector_value (const Point &p, - Vector &values) const - { values(0) = value(p,0); } +public: + MySquareFunction () : Function () {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return (component+1)*p.square()+1; + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + values(0) = value(p,0); + } }; template class MyExpFunction : public Function { - public: - MyExpFunction () : Function () {} - - virtual double value (const Point &p, - const unsigned int component) const - { return std::exp (p(0)); } - - virtual void vector_value (const Point &p, - Vector &values) const - { values(0) = value(p,0); } +public: + MyExpFunction () : Function () {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return std::exp (p(0)); + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + values(0) = value(p,0); + } }; @@ -73,18 +81,18 @@ class MyExpFunction : public Function template void make_mesh (Triangulation &tria) { - + GridGenerator::hyper_cube(tria, -1, 1); - // refine the mesh in a random way so as to - // generate as many cells with - // hanging nodes as possible + // refine the mesh in a random way so as to + // generate as many cells with + // hanging nodes as possible tria.refine_global (4-dim); const double steps[4] = { /*d=0*/ 0, 7, 3, 3 }; for (unsigned int i=0; i::active_cell_iterator - cell = tria.begin_active(); + cell = tria.begin_active(); for (unsigned int index=0; cell != tria.end(); ++cell, ++index) if (index % (3*dim) == 0) cell->set_refine_flag(); @@ -101,36 +109,36 @@ check () { Triangulation tria; make_mesh (tria); - + FE_Q element(3); DoFHandler dof(tria); dof.distribute_dofs(element); - // test with two different functions: one - // that is exactly representable on the - // chosen finite element space, and one - // that isn't + // test with two different functions: one + // that is exactly representable on the + // chosen finite element space, and one + // that isn't for (unsigned int i=0; i<2; ++i) { static const MySquareFunction function_1; static const Functions::CosineFunction function_2; const Function & - function = (i==0 ? - static_cast&>(function_1) : - static_cast&>(function_2)); - + function = (i==0 ? + static_cast&>(function_1) : + static_cast&>(function_2)); + Vector v (dof.n_dofs()); VectorTools::interpolate (dof, function, v); - // for the following points, check the - // function value, output it, and - // verify that the value retrieved from - // the interpolated function is close - // enough to that of the real function - // - // also verify that the actual value is - // roughly correct + // for the following points, check the + // function value, output it, and + // verify that the value retrieved from + // the interpolated function is close + // enough to that of the real function + // + // also verify that the actual value is + // roughly correct Point p[3]; for (unsigned int d=0; d class MySquareFunction : public Function { - public: - MySquareFunction () : Function () {} - - virtual double value (const Point &p, - const unsigned int component) const - { return (component+1)*p.square()+1; } - - virtual void vector_value (const Point &p, - Vector &values) const - { values(0) = value(p,0); } +public: + MySquareFunction () : Function () {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return (component+1)*p.square()+1; + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + values(0) = value(p,0); + } }; template class MyExpFunction : public Function { - public: - MyExpFunction () : Function () {} - - virtual double value (const Point &p, - const unsigned int component) const - { return std::exp (p(0)); } - - virtual void vector_value (const Point &p, - Vector &values) const - { values(0) = value(p,0); } +public: + MyExpFunction () : Function () {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return std::exp (p(0)); + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + values(0) = value(p,0); + } }; @@ -74,18 +82,18 @@ class MyExpFunction : public Function template void make_mesh (Triangulation &tria) { - + GridGenerator::hyper_cube(tria, -1, 1); - // refine the mesh in a random way so as to - // generate as many cells with - // hanging nodes as possible + // refine the mesh in a random way so as to + // generate as many cells with + // hanging nodes as possible tria.refine_global (4-dim); const double steps[4] = { /*d=0*/ 0, 7, 3, 3 }; for (unsigned int i=0; i::active_cell_iterator - cell = tria.begin_active(); + cell = tria.begin_active(); for (unsigned int index=0; cell != tria.end(); ++cell, ++index) if (index % (3*dim) == 0) cell->set_refine_flag(); @@ -102,37 +110,37 @@ check () { Triangulation tria; make_mesh (tria); - + FE_Q element(3); DoFHandler dof(tria); MappingQ1 mapping; dof.distribute_dofs(element); - // test with two different functions: one - // that is exactly representable on the - // chosen finite element space, and one - // that isn't + // test with two different functions: one + // that is exactly representable on the + // chosen finite element space, and one + // that isn't for (unsigned int i=0; i<2; ++i) { static const MySquareFunction function_1; static const Functions::CosineFunction function_2; const Function & - function = (i==0 ? - static_cast&>(function_1) : - static_cast&>(function_2)); - + function = (i==0 ? + static_cast&>(function_1) : + static_cast&>(function_2)); + Vector v (dof.n_dofs()); VectorTools::interpolate (dof, function, v); - // for the following points, check the - // function value, output it, and - // verify that the value retrieved from - // the interpolated function is close - // enough to that of the real function - // - // also verify that the actual value is - // roughly correct + // for the following points, check the + // function value, output it, and + // verify that the value retrieved from + // the interpolated function is close + // enough to that of the real function + // + // also verify that the actual value is + // roughly correct Point p[3]; for (unsigned int d=0; d class MySquareFunction : public Function { - public: - MySquareFunction () : Function () {} - - virtual double value (const Point &p, - const unsigned int component) const - { return (component+1)*p.square()+1; } - - virtual void vector_value (const Point &p, - Vector &values) const - { values(0) = value(p,0); } +public: + MySquareFunction () : Function () {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return (component+1)*p.square()+1; + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + values(0) = value(p,0); + } }; template class MyExpFunction : public Function { - public: - MyExpFunction () : Function () {} - - virtual double value (const Point &p, - const unsigned int component) const - { return std::exp (p(0)); } - - virtual void vector_value (const Point &p, - Vector &values) const - { values(0) = value(p,0); } +public: + MyExpFunction () : Function () {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return std::exp (p(0)); + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + values(0) = value(p,0); + } }; @@ -74,18 +82,18 @@ class MyExpFunction : public Function template void make_mesh (Triangulation &tria) { - + GridGenerator::hyper_cube(tria, -1, 1); - // refine the mesh in a random way so as to - // generate as many cells with - // hanging nodes as possible + // refine the mesh in a random way so as to + // generate as many cells with + // hanging nodes as possible tria.refine_global (4-dim); const double steps[4] = { /*d=0*/ 0, 7, 3, 3 }; for (unsigned int i=0; i::active_cell_iterator - cell = tria.begin_active(); + cell = tria.begin_active(); for (unsigned int index=0; cell != tria.end(); ++cell, ++index) if (index % (3*dim) == 0) cell->set_refine_flag(); @@ -102,7 +110,7 @@ check () { Triangulation tria; make_mesh (tria); - + hp::FECollection fe; fe.push_back (FE_Q(3)); fe.push_back (FE_Q(4)); @@ -111,8 +119,8 @@ check () hp::DoFHandler dof_handler (tria); 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 (; cell!=endc; ++cell) { cell->set_active_fe_index (std::rand() % fe.size()); @@ -120,31 +128,31 @@ check () dof_handler.distribute_dofs (fe); - // test with two different functions: one - // that is exactly representable on the - // chosen finite element space, and one - // that isn't + // test with two different functions: one + // that is exactly representable on the + // chosen finite element space, and one + // that isn't for (unsigned int i=0; i<2; ++i) { static const MySquareFunction function_1; static const Functions::CosineFunction function_2; const Function & - function = (i==0 ? - static_cast&>(function_1) : - static_cast&>(function_2)); - + function = (i==0 ? + static_cast&>(function_1) : + static_cast&>(function_2)); + Vector v (dof_handler.n_dofs()); VectorTools::interpolate (dof_handler, function, v); - // for the following points, check the - // function value, output it, and - // verify that the value retrieved from - // the interpolated function is close - // enough to that of the real function - // - // also verify that the actual value is - // roughly correct + // for the following points, check the + // function value, output it, and + // verify that the value retrieved from + // the interpolated function is close + // enough to that of the real function + // + // also verify that the actual value is + // roughly correct Point p[3]; for (unsigned int d=0; d class MySquareFunction : public Function { - public: - MySquareFunction () : Function () {} - - virtual double value (const Point &p, - const unsigned int component) const - { return (component+1)*p.square()+1; } - - virtual void vector_value (const Point &p, - Vector &values) const - { values(0) = value(p,0); } +public: + MySquareFunction () : Function () {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return (component+1)*p.square()+1; + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + values(0) = value(p,0); + } }; template class MyExpFunction : public Function { - public: - MyExpFunction () : Function () {} - - virtual double value (const Point &p, - const unsigned int component) const - { return std::exp (p(0)); } - - virtual void vector_value (const Point &p, - Vector &values) const - { values(0) = value(p,0); } +public: + MyExpFunction () : Function () {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return std::exp (p(0)); + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + values(0) = value(p,0); + } }; @@ -75,18 +83,18 @@ class MyExpFunction : public Function template void make_mesh (Triangulation &tria) { - + GridGenerator::hyper_cube(tria, -1, 1); - // refine the mesh in a random way so as to - // generate as many cells with - // hanging nodes as possible + // refine the mesh in a random way so as to + // generate as many cells with + // hanging nodes as possible tria.refine_global (4-dim); const double steps[4] = { /*d=0*/ 0, 7, 3, 3 }; for (unsigned int i=0; i::active_cell_iterator - cell = tria.begin_active(); + cell = tria.begin_active(); for (unsigned int index=0; cell != tria.end(); ++cell, ++index) if (index % (3*dim) == 0) cell->set_refine_flag(); @@ -103,7 +111,7 @@ check () { Triangulation tria; make_mesh (tria); - + hp::FECollection fe; fe.push_back (FE_Q(3)); fe.push_back (FE_Q(4)); @@ -120,8 +128,8 @@ check () hp::DoFHandler dof_handler (tria); 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 (; cell!=endc; ++cell) { cell->set_active_fe_index (std::rand() % fe.size()); @@ -129,31 +137,31 @@ check () dof_handler.distribute_dofs (fe); - // test with two different functions: one - // that is exactly representable on the - // chosen finite element space, and one - // that isn't + // test with two different functions: one + // that is exactly representable on the + // chosen finite element space, and one + // that isn't for (unsigned int i=0; i<2; ++i) { static const MySquareFunction function_1; static const Functions::CosineFunction function_2; const Function & - function = (i==0 ? - static_cast&>(function_1) : - static_cast&>(function_2)); - + function = (i==0 ? + static_cast&>(function_1) : + static_cast&>(function_2)); + Vector v (dof_handler.n_dofs()); VectorTools::interpolate (dof_handler, function, v); - // for the following points, check the - // function value, output it, and - // verify that the value retrieved from - // the interpolated function is close - // enough to that of the real function - // - // also verify that the actual value is - // roughly correct + // for the following points, check the + // function value, output it, and + // verify that the value retrieved from + // the interpolated function is close + // enough to that of the real function + // + // also verify that the actual value is + // roughly correct Point p[3]; for (unsigned int d=0; d &tria) dof_handler.distribute_dofs (fe); QGauss q_face(3); - + FEFaceValues fe_face_values (fe, q_face, update_q_points | update_JxW_values); FESubfaceValues fe_subface_values (fe, q_face, @@ -50,13 +50,13 @@ void check (const Triangulation &tria) Point n1, n2; for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell!=dof_handler.end(); ++cell) { - // first integrate over faces - // and make sure that the - // result of the integration is - // close to zero + // first integrate over faces + // and make sure that the + // result of the integration is + // close to zero for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f)) { @@ -65,9 +65,9 @@ void check (const Triangulation &tria) n1 += fe_face_values.quadrature_point(q) * fe_face_values.JxW(q); } - - // now same for subface - // integration + + // now same for subface + // integration for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f)) for (unsigned int sf=0; sf::max_children_per_face; ++sf) @@ -78,7 +78,7 @@ void check (const Triangulation &tria) fe_subface_values.JxW(q); } } - + Assert (n1*n1 < 1e-24, ExcInternalError()); deallog << " face integration is ok: " << std::sqrt (n1*n1) @@ -90,39 +90,39 @@ void check (const Triangulation &tria) } -int main () +int main () { std::ofstream logfile("q_point_sum_1/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<2> coarse_grid; GridGenerator::hyper_cube (coarse_grid, -1, 1); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_cube (coarse_grid, -1, 1); check (coarse_grid); } - - { + + { Triangulation<2> coarse_grid; GridGenerator::hyper_ball (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); check (coarse_grid); } - + } - - + + diff --git a/tests/bits/q_point_sum_2.cc b/tests/bits/q_point_sum_2.cc index 186b092f93..23a588eab8 100644 --- a/tests/bits/q_point_sum_2.cc +++ b/tests/bits/q_point_sum_2.cc @@ -50,7 +50,7 @@ void check (const Triangulation &tria, dof_handler.distribute_dofs (fe); QGauss q_face(3); - + FEFaceValues fe_face_values (mapping, fe, q_face, update_q_points | update_JxW_values); FESubfaceValues fe_subface_values (mapping, fe, q_face, @@ -58,13 +58,13 @@ void check (const Triangulation &tria, Point n1, n2; for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell!=dof_handler.end(); ++cell) { - // first integrate over faces - // and make sure that the - // result of the integration is - // close to zero + // first integrate over faces + // and make sure that the + // result of the integration is + // close to zero for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f)) { @@ -73,9 +73,9 @@ void check (const Triangulation &tria, n1 += fe_face_values.quadrature_point(q) * fe_face_values.JxW(q); } - - // now same for subface - // integration + + // now same for subface + // integration for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f)) for (unsigned int sf=0; sf::max_children_per_face; ++sf) @@ -86,7 +86,7 @@ void check (const Triangulation &tria, fe_subface_values.JxW(q); } } - + Assert (n1*n1 < 1e-24, ExcInternalError()); deallog << " face integration is ok: " << std::sqrt (n1*n1) @@ -98,22 +98,22 @@ void check (const Triangulation &tria, } -int main () +int main () { std::ofstream logfile("q_point_sum_2/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<2> coarse_grid; GridGenerator::hyper_cube (coarse_grid, -1, 1); check (coarse_grid, 1); check (coarse_grid, 2); check (coarse_grid, 4); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_cube (coarse_grid, -1, 1); check (coarse_grid, 1); @@ -121,8 +121,8 @@ int main () check (coarse_grid, 3); } - - { + + { Triangulation<2> coarse_grid; GridGenerator::hyper_ball (coarse_grid); static const HyperBallBoundary<2> boundary; @@ -131,8 +131,8 @@ int main () check (coarse_grid, 2); check (coarse_grid, 4); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); static const HyperBallBoundary<3> boundary; @@ -141,8 +141,8 @@ int main () check (coarse_grid, 2); check (coarse_grid, 3); } - + } - - + + diff --git a/tests/bits/q_point_sum_3.cc b/tests/bits/q_point_sum_3.cc index 32cb93baaf..8cb1071a9f 100644 --- a/tests/bits/q_point_sum_3.cc +++ b/tests/bits/q_point_sum_3.cc @@ -49,7 +49,7 @@ void check (const Triangulation &tria) dof_handler.distribute_dofs (fe); QGauss q_face(3); - + FEFaceValues fe_face_values (mapping, fe, q_face, update_q_points | update_JxW_values); FESubfaceValues fe_subface_values (mapping, fe, q_face, @@ -57,13 +57,13 @@ void check (const Triangulation &tria) Point n1, n2; for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell!=dof_handler.end(); ++cell) { - // first integrate over faces - // and make sure that the - // result of the integration is - // close to zero + // first integrate over faces + // and make sure that the + // result of the integration is + // close to zero for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f)) { @@ -72,9 +72,9 @@ void check (const Triangulation &tria) n1 += fe_face_values.quadrature_point(q) * fe_face_values.JxW(q); } - - // now same for subface - // integration + + // now same for subface + // integration for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f)) for (unsigned int sf=0; sf::max_children_per_face; ++sf) @@ -85,7 +85,7 @@ void check (const Triangulation &tria) fe_subface_values.JxW(q); } } - + Assert (n1*n1 < 1e-24, ExcInternalError()); deallog << " face integration is ok: " << std::sqrt (n1*n1) @@ -97,29 +97,29 @@ void check (const Triangulation &tria) } -int main () +int main () { std::ofstream logfile("q_point_sum_3/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<2> coarse_grid; GridGenerator::hyper_cube (coarse_grid, -1, 1); check (coarse_grid); } - - // the C1 mapping is not fully - // implemented in 3d, unfortunately -// { + + // the C1 mapping is not fully + // implemented in 3d, unfortunately +// { // Triangulation<3> coarse_grid; // GridGenerator::hyper_cube (coarse_grid, -1, 1); // check (coarse_grid); // } - - { + + { Triangulation<2> coarse_grid; GridGenerator::hyper_ball (coarse_grid); static const HyperBallBoundary<2> boundary; @@ -127,17 +127,17 @@ int main () check (coarse_grid); } - // the C1 mapping is not fully - // implemented in 3d, unfortunately -// { + // the C1 mapping is not fully + // implemented in 3d, unfortunately +// { // Triangulation<3> coarse_grid; // GridGenerator::hyper_ball (coarse_grid); // static const HyperBallBoundary<3> boundary; // coarse_grid.set_boundary (0, boundary); // check (coarse_grid); // } - + } - - + + diff --git a/tests/bits/q_point_sum_4.cc b/tests/bits/q_point_sum_4.cc index 6d3aa8d7aa..4968743b6a 100644 --- a/tests/bits/q_point_sum_4.cc +++ b/tests/bits/q_point_sum_4.cc @@ -49,7 +49,7 @@ void check (const Triangulation &tria) dof_handler.distribute_dofs (fe); QGauss q_face(3); - + FEFaceValues fe_face_values (mapping, fe, q_face, update_q_points | update_JxW_values); FESubfaceValues fe_subface_values (mapping, fe, q_face, @@ -57,13 +57,13 @@ void check (const Triangulation &tria) Point n1, n2; for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell!=dof_handler.end(); ++cell) { - // first integrate over faces - // and make sure that the - // result of the integration is - // close to zero + // first integrate over faces + // and make sure that the + // result of the integration is + // close to zero for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f)) { @@ -72,9 +72,9 @@ void check (const Triangulation &tria) n1 += fe_face_values.quadrature_point(q) * fe_face_values.JxW(q); } - - // now same for subface - // integration + + // now same for subface + // integration for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f)) for (unsigned int sf=0; sf::max_children_per_face; ++sf) @@ -85,7 +85,7 @@ void check (const Triangulation &tria) fe_subface_values.JxW(q); } } - + Assert (n1*n1 < 1e-24, ExcInternalError()); deallog << " face integration is ok: " << std::sqrt (n1*n1) @@ -97,25 +97,25 @@ void check (const Triangulation &tria) } -int main () +int main () { std::ofstream logfile("q_point_sum_4/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<2> coarse_grid; GridGenerator::hyper_cube (coarse_grid, -1, 1); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_cube (coarse_grid, -1, 1); check (coarse_grid); } } - - + + diff --git a/tests/bits/q_points.cc b/tests/bits/q_points.cc index c3ce9d9778..c460e162c1 100644 --- a/tests/bits/q_points.cc +++ b/tests/bits/q_points.cc @@ -44,7 +44,8 @@ void create_two_cubes (Triangulation<3> &coarse_grid) Point<3>(1,1,0), Point<3>(0,1,0), Point<3>(2,0,0), - Point<3>(2,1,0)}; + Point<3>(2,1,0) + }; std::vector > vertices; for (unsigned int i=0; i<6; ++i) vertices.push_back (points[i]); @@ -52,10 +53,11 @@ void create_two_cubes (Triangulation<3> &coarse_grid) vertices.push_back (points[i] + Point<3>(0,0,-1)); std::vector > cells; - + const unsigned int connectivity[2][4] - = { { 0,1,2,3 }, - { 1,4,5,2 } }; + = { { 0,1,2,3 }, + { 1,4,5,2 } + }; for (unsigned int i=0; i<2; ++i) { CellData<3> cell; @@ -67,8 +69,8 @@ void create_two_cubes (Triangulation<3> &coarse_grid) cells.push_back (cell); } - // finally generate a triangulation - // out of this + // finally generate a triangulation + // out of this GridReordering<3>::reorder_cells (cells); coarse_grid.create_triangulation_compatibility (vertices, cells, SubCellData()); } @@ -82,7 +84,7 @@ void check (Triangulation<3> &tria) update_q_points | update_JxW_values); FEFaceValues<3> fe_face_values2 (fe, quadrature, update_q_points | update_JxW_values); - + DoFHandler<3> dof_handler (tria); dof_handler.distribute_dofs (fe); @@ -94,15 +96,15 @@ void check (Triangulation<3> &tria) const unsigned int nn = cell->neighbor_of_neighbor (f); - // this test is about - // properly oriented - // faces. mesh_3d_7 does it - // for mis-oriented faces + // this test is about + // properly oriented + // faces. mesh_3d_7 does it + // for mis-oriented faces Assert (cell->face_orientation(f) == true, ExcInternalError()); Assert (cell->neighbor(f)->face_orientation(nn) == true, ExcInternalError()); - + fe_face_values1.reinit (cell, f); fe_face_values2.reinit (cell->neighbor(f), nn); @@ -122,7 +124,7 @@ void check (Triangulation<3> &tria) } -int main () +int main () { std::ofstream logfile("q_points/output"); deallog.attach(logfile); @@ -134,8 +136,8 @@ int main () check (coarse_grid); coarse_grid.refine_global (1); - check (coarse_grid); + check (coarse_grid); } - - + + diff --git a/tests/bits/refine_and_coarsen_1d.cc b/tests/bits/refine_and_coarsen_1d.cc index dd1c9089ff..a1ab72d81c 100644 --- a/tests/bits/refine_and_coarsen_1d.cc +++ b/tests/bits/refine_and_coarsen_1d.cc @@ -44,7 +44,7 @@ void check () tria.begin_active()->set_refine_flag(); tria.execute_coarsening_and_refinement (); - // store which cells we have here + // store which cells we have here std::vector::active_cell_iterator> cells; for (typename Triangulation::active_cell_iterator cell=tria.begin_active(); cell != tria.end(); ++cell) @@ -53,8 +53,8 @@ void check () const unsigned int n_cells = tria.n_active_cells(); deallog << n_cells << std::endl; - // refine the mesh globally, then coarsen - // it again globally + // refine the mesh globally, then coarsen + // it again globally tria.refine_global (1); for (typename Triangulation::active_cell_iterator cell=tria.begin_active(); @@ -63,23 +63,23 @@ void check () tria.execute_coarsening_and_refinement (); - // verify that we get the same cells again + // verify that we get the same cells again deallog << n_cells << ' ' << tria.n_active_cells() - << std::endl; - + << std::endl; + Assert (tria.n_active_cells() == n_cells, - ExcInternalError()); + ExcInternalError()); unsigned int index = 0; for (typename Triangulation::active_cell_iterator cell=tria.begin_active(); cell != tria.end(); ++cell, ++index) Assert (cells[index] == cell, - ExcInternalError()); + ExcInternalError()); } -int main () +int main () { std::ofstream logfile("refine_and_coarsen_1d/output"); deallog.attach(logfile); @@ -89,5 +89,5 @@ int main () check<1> (); } - - + + diff --git a/tests/bits/refine_and_coarsen_2d.cc b/tests/bits/refine_and_coarsen_2d.cc index ff1bf67636..ba5d94da4f 100644 --- a/tests/bits/refine_and_coarsen_2d.cc +++ b/tests/bits/refine_and_coarsen_2d.cc @@ -44,7 +44,7 @@ void check () tria.begin_active()->set_refine_flag(); tria.execute_coarsening_and_refinement (); - // store which cells we have here + // store which cells we have here std::vector::active_cell_iterator> cells; for (typename Triangulation::active_cell_iterator cell=tria.begin_active(); cell != tria.end(); ++cell) @@ -53,8 +53,8 @@ void check () const unsigned int n_cells = tria.n_active_cells(); deallog << n_cells << std::endl; - // refine the mesh globally, then coarsen - // it again globally + // refine the mesh globally, then coarsen + // it again globally tria.refine_global (1); for (typename Triangulation::active_cell_iterator cell=tria.begin_active(); @@ -63,23 +63,23 @@ void check () tria.execute_coarsening_and_refinement (); - // verify that we get the same cells again + // verify that we get the same cells again deallog << n_cells << ' ' << tria.n_active_cells() - << std::endl; - + << std::endl; + Assert (tria.n_active_cells() == n_cells, - ExcInternalError()); + ExcInternalError()); unsigned int index = 0; for (typename Triangulation::active_cell_iterator cell=tria.begin_active(); cell != tria.end(); ++cell, ++index) Assert (cells[index] == cell, - ExcInternalError()); + ExcInternalError()); } -int main () +int main () { std::ofstream logfile("refine_and_coarsen_2d/output"); deallog.attach(logfile); @@ -89,5 +89,5 @@ int main () check<2> (); } - - + + diff --git a/tests/bits/refine_and_coarsen_3d.cc b/tests/bits/refine_and_coarsen_3d.cc index c2d34194d5..01ed970ddc 100644 --- a/tests/bits/refine_and_coarsen_3d.cc +++ b/tests/bits/refine_and_coarsen_3d.cc @@ -46,7 +46,7 @@ void check () tria.begin_active()->set_refine_flag(); tria.execute_coarsening_and_refinement (); - // store which cells we have here + // store which cells we have here std::vector::active_cell_iterator> cells; for (typename Triangulation::active_cell_iterator cell=tria.begin_active(); cell != tria.end(); ++cell) @@ -55,8 +55,8 @@ void check () const unsigned int n_cells = tria.n_active_cells(); deallog << n_cells << std::endl; - // refine the mesh globally, then coarsen - // it again globally + // refine the mesh globally, then coarsen + // it again globally tria.refine_global (1); for (typename Triangulation::active_cell_iterator cell=tria.begin_active(); @@ -65,23 +65,23 @@ void check () tria.execute_coarsening_and_refinement (); - // verify that we get the same cells again + // verify that we get the same cells again deallog << n_cells << ' ' << tria.n_active_cells() - << std::endl; - + << std::endl; + Assert (tria.n_active_cells() == n_cells, - ExcInternalError()); + ExcInternalError()); unsigned int index = 0; for (typename Triangulation::active_cell_iterator cell=tria.begin_active(); cell != tria.end(); ++cell, ++index) Assert (cells[index] == cell, - ExcInternalError()); + ExcInternalError()); } -int main () +int main () { std::ofstream logfile("refine_and_coarsen_3d/output"); deallog.attach(logfile); @@ -91,5 +91,5 @@ int main () check<3> (); } - - + + diff --git a/tests/bits/refine_and_coarsen_for_parents.cc b/tests/bits/refine_and_coarsen_for_parents.cc index 06bb44e22e..c01f5483c6 100644 --- a/tests/bits/refine_and_coarsen_for_parents.cc +++ b/tests/bits/refine_and_coarsen_for_parents.cc @@ -35,7 +35,7 @@ void do_refine (Triangulation<1> &tria) { const int dim = 1; - + tria.refine_global (2); tria.begin_active()->set_refine_flag(); tria.execute_coarsening_and_refinement (); @@ -45,7 +45,7 @@ void do_refine (Triangulation<1> &tria) void do_refine (Triangulation<2> &tria) { const int dim = 2; - + tria.refine_global (2); tria.begin_active()->set_refine_flag(); tria.execute_coarsening_and_refinement (); @@ -59,7 +59,7 @@ void do_refine (Triangulation<2> &tria) void do_refine (Triangulation<3> &tria) { const int dim = 3; - + tria.refine_global (2); tria.begin_active()->set_refine_flag(); tria.execute_coarsening_and_refinement (); @@ -84,9 +84,9 @@ void check () Triangulation tria; GridGenerator::hyper_cube (tria); do_refine (tria); - // refine the mesh globally and - // verify that the parent relation - // holds + // refine the mesh globally and + // verify that the parent relation + // holds tria.refine_global (1); for (typename Triangulation::cell_iterator cell = tria.begin(); @@ -94,27 +94,27 @@ void check () for (unsigned int child = 0; child < cell->n_children (); ++child) Assert (cell->child (child)->parent () == cell, ExcInternalError ()); - - // coarsen the mesh globally and - // verify that the parent relation - // holds + + // coarsen the mesh globally and + // verify that the parent relation + // holds for (typename Triangulation::active_cell_iterator cell = tria.begin_active (); cell != tria.end (); ++cell) cell->set_coarsen_flag (); - + tria.execute_coarsening_and_refinement (); - + for (typename Triangulation::cell_iterator cell = tria.begin (); cell != tria.end(); ++cell) for (unsigned int child = 0; child < cell->n_children (); ++child) Assert (cell->child (child)->parent () == cell, - ExcInternalError()); - + ExcInternalError()); + deallog << "OK for " << dim << "d" << std::endl; } -int main () +int main () { std::ofstream logfile("refine_and_coarsen_for_parents/output"); deallog.attach(logfile); @@ -126,5 +126,5 @@ int main () check<3> (); } - - + + diff --git a/tests/bits/refine_and_coarsen_for_parents_02.cc b/tests/bits/refine_and_coarsen_for_parents_02.cc index 37afabd676..7c5ceacf40 100644 --- a/tests/bits/refine_and_coarsen_for_parents_02.cc +++ b/tests/bits/refine_and_coarsen_for_parents_02.cc @@ -44,7 +44,7 @@ void do_refine (Triangulation<1> &tria) void do_refine (Triangulation<2> &tria) { const int dim = 2; - + tria.refine_global (2); tria.begin_active()->set_refine_flag(); tria.execute_coarsening_and_refinement (); @@ -58,7 +58,7 @@ void do_refine (Triangulation<2> &tria) void do_refine (Triangulation<3> &tria) { const int dim = 3; - + tria.refine_global (2); tria.begin_active()->set_refine_flag(); tria.execute_coarsening_and_refinement (); @@ -83,11 +83,11 @@ void check () Triangulation tria; GridGenerator::hyper_cube (tria); do_refine (tria); - // refine the mesh globally and - // verify that the parent relation - // holds + // refine the mesh globally and + // verify that the parent relation + // holds tria.refine_global (1); - + DoFHandler dof_handler (tria); for (typename DoFHandler::cell_iterator cell = dof_handler.begin(); @@ -95,27 +95,27 @@ void check () for (unsigned int child = 0; child < cell->n_children (); ++child) Assert (cell->child (child)->parent () == cell, ExcInternalError ()); - - // coarsen the mesh globally and - // verify that the parent relation - // holds + + // coarsen the mesh globally and + // verify that the parent relation + // holds for (typename Triangulation::active_cell_iterator cell = tria.begin_active (); cell != tria.end (); ++cell) cell->set_coarsen_flag (); - + tria.execute_coarsening_and_refinement (); - + for (typename DoFHandler::cell_iterator cell = dof_handler.begin (); cell != dof_handler.end(); ++cell) for (unsigned int child = 0; child < cell->n_children (); ++child) Assert (cell->child (child)->parent () == cell, - ExcInternalError()); - + ExcInternalError()); + deallog << "OK for " << dim << "d" << std::endl; } -int main () +int main () { std::ofstream logfile("refine_and_coarsen_for_parents_02/output"); deallog.attach(logfile); @@ -127,5 +127,5 @@ int main () check<3> (); } - - + + diff --git a/tests/bits/refine_and_coarsen_for_parents_03.cc b/tests/bits/refine_and_coarsen_for_parents_03.cc index 51313e31ca..20efc5ce7e 100644 --- a/tests/bits/refine_and_coarsen_for_parents_03.cc +++ b/tests/bits/refine_and_coarsen_for_parents_03.cc @@ -44,7 +44,7 @@ void do_refine (Triangulation<1> &tria) void do_refine (Triangulation<2> &tria) { const int dim = 2; - + tria.refine_global (2); tria.begin_active()->set_refine_flag(); tria.execute_coarsening_and_refinement (); @@ -58,7 +58,7 @@ void do_refine (Triangulation<2> &tria) void do_refine (Triangulation<3> &tria) { const int dim = 3; - + tria.refine_global (2); tria.begin_active()->set_refine_flag(); tria.execute_coarsening_and_refinement (); @@ -83,11 +83,11 @@ void check () Triangulation tria; GridGenerator::hyper_cube (tria); do_refine (tria); - // refine the mesh globally and - // verify that the parent relation - // holds + // refine the mesh globally and + // verify that the parent relation + // holds tria.refine_global (1); - + MGDoFHandler dof_handler (tria); for (typename MGDoFHandler::cell_iterator cell = dof_handler.begin(); @@ -95,27 +95,27 @@ void check () for (unsigned int child = 0; child < cell->n_children (); ++child) Assert (cell->child (child)->parent () == cell, ExcInternalError ()); - - // coarsen the mesh globally and - // verify that the parent relation - // holds + + // coarsen the mesh globally and + // verify that the parent relation + // holds for (typename Triangulation::active_cell_iterator cell = tria.begin_active (); cell != tria.end (); ++cell) cell->set_coarsen_flag (); - + tria.execute_coarsening_and_refinement (); - + for (typename MGDoFHandler::cell_iterator cell = dof_handler.begin (); cell != dof_handler.end(); ++cell) for (unsigned int child = 0; child < cell->n_children (); ++child) Assert (cell->child (child)->parent () == cell, - ExcInternalError()); - + ExcInternalError()); + deallog << "OK for " << dim << "d" << std::endl; } -int main () +int main () { std::ofstream logfile("refine_and_coarsen_for_parents_03/output"); deallog.attach(logfile); @@ -127,5 +127,5 @@ int main () check<3> (); } - - + + diff --git a/tests/bits/roy_1.cc b/tests/bits/roy_1.cc index b35328a44e..ad6add9c2e 100644 --- a/tests/bits/roy_1.cc +++ b/tests/bits/roy_1.cc @@ -18,7 +18,7 @@ // check has_support_on_face for some elements // -// this program is a modified version of one by Roy Stogner, +// this program is a modified version of one by Roy Stogner, // University of Texas at Austin #include "../tests.h" @@ -32,20 +32,21 @@ template -void check (const FiniteElement &fe) { - for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; - face++) - for (unsigned int i = 0; i < fe.dofs_per_cell; i++) - if (fe.has_support_on_face(i, face)) - deallog << "Basis function " << i - << " has support on face " << face << std::endl; +void check (const FiniteElement &fe) +{ + for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; + face++) + for (unsigned int i = 0; i < fe.dofs_per_cell; i++) + if (fe.has_support_on_face(i, face)) + deallog << "Basis function " << i + << " has support on face " << face << std::endl; } #define check_el(fe) { deallog << #fe << std::endl; check(fe); } template -void check () +void check () { deallog << "************ dim = " << dim << std::endl; check_el (FE_Q(1)); @@ -73,7 +74,7 @@ void check () } -int main () +int main () { std::ofstream logfile("roy_1/output"); deallog.attach(logfile); @@ -82,7 +83,7 @@ int main () // check<1> (); check<2> (); -// check<3> (); - +// check<3> (); + return 0; } diff --git a/tests/bits/rt_1.cc b/tests/bits/rt_1.cc index 191b571f16..f708940252 100644 --- a/tests/bits/rt_1.cc +++ b/tests/bits/rt_1.cc @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include @@ -59,7 +59,7 @@ void test (const unsigned int degree, } -int main () +int main () { std::ofstream logfile("rt_1/output"); deallog.attach(logfile); diff --git a/tests/bits/rt_2.cc b/tests/bits/rt_2.cc index a3554c5c24..8548d9d811 100644 --- a/tests/bits/rt_2.cc +++ b/tests/bits/rt_2.cc @@ -51,83 +51,83 @@ void evaluate_normal (DoFHandler<2> &dof_handler, - Vector &solution) + Vector &solution) { - // This quadrature rule determines - // the points, where the continuity - // will be tested. + // This quadrature rule determines + // the points, where the continuity + // will be tested. QGauss<1> quad (6); - FEFaceValues<2> fe_v_face (dof_handler.get_fe (), quad, - UpdateFlags(update_values | - update_q_points | - update_gradients | - update_normal_vectors | - update_JxW_values)); - - FEFaceValues<2> fe_v_face_n (dof_handler.get_fe (), quad, - UpdateFlags(update_values | - update_q_points | - update_gradients | - update_normal_vectors | - update_JxW_values)); + FEFaceValues<2> fe_v_face (dof_handler.get_fe (), quad, + UpdateFlags(update_values | + update_q_points | + update_gradients | + update_normal_vectors | + update_JxW_values)); + + FEFaceValues<2> fe_v_face_n (dof_handler.get_fe (), quad, + UpdateFlags(update_values | + update_q_points | + update_gradients | + update_normal_vectors | + update_JxW_values)); const unsigned int n_q_face = quad.size(); const unsigned int n_components = dof_handler.get_fe().n_components(); - // Cell iterators + // Cell iterators DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active(), - endc = dof_handler.end(); + endc = dof_handler.end(); for (; cell!=endc; ++cell) { for (unsigned int f = 0; f < GeometryInfo<2>::faces_per_cell; ++f) - { - if (!cell->face(f)->at_boundary ()) - { - deallog << "cell=" << cell - << ", face=" << f - << std::endl; - - fe_v_face.reinit (cell, f); - - const unsigned int neighbor=cell->neighbor_of_neighbor(f); - fe_v_face_n.reinit (cell->neighbor (f), neighbor); - - // Get values from - // solution vector (For - // Trap.Rule) - std::vector > this_value - (n_q_face, Vector(n_components)); - fe_v_face.get_function_values (solution, this_value); - - // Same for neighbor cell - std::vector > this_value_n - (n_q_face, Vector(n_components)); - fe_v_face_n.get_function_values (solution, this_value_n); - - for (unsigned int q_point=0; q_point vn = fe_v_face.normal_vector (q_point); - double nx = vn(0); - double ny = vn(1); - - double u = this_value[q_point](0); - double v = this_value[q_point](1); - - double u_n = this_value_n[q_point](0); - double v_n = this_value_n[q_point](1); - - deallog << "quadrature point " << q_point - << " (u-u_n)*nx+(v-v_n)*ny=" - << (u-u_n) * nx + (v-v_n) * ny - << ", u*nx+v*ny=" - << u * nx + v * ny - << ", u_n*nx+v_n*ny=" - << u_n * nx + v_n * ny - << std::endl; - } - } - } + { + if (!cell->face(f)->at_boundary ()) + { + deallog << "cell=" << cell + << ", face=" << f + << std::endl; + + fe_v_face.reinit (cell, f); + + const unsigned int neighbor=cell->neighbor_of_neighbor(f); + fe_v_face_n.reinit (cell->neighbor (f), neighbor); + + // Get values from + // solution vector (For + // Trap.Rule) + std::vector > this_value + (n_q_face, Vector(n_components)); + fe_v_face.get_function_values (solution, this_value); + + // Same for neighbor cell + std::vector > this_value_n + (n_q_face, Vector(n_components)); + fe_v_face_n.get_function_values (solution, this_value_n); + + for (unsigned int q_point=0; q_point vn = fe_v_face.normal_vector (q_point); + double nx = vn(0); + double ny = vn(1); + + double u = this_value[q_point](0); + double v = this_value[q_point](1); + + double u_n = this_value_n[q_point](0); + double v_n = this_value_n[q_point](1); + + deallog << "quadrature point " << q_point + << " (u-u_n)*nx+(v-v_n)*ny=" + << (u-u_n) * nx + (v-v_n) * ny + << ", u*nx+v*ny=" + << u *nx + v *ny + << ", u_n*nx+v_n*ny=" + << u_n *nx + v_n *ny + << std::endl; + } + } + } } } @@ -141,7 +141,7 @@ int main () Triangulation<2> tria_test; Point<2> p1 (0,0), - p2 (1, 1); + p2 (1, 1); std::vector sub_div; sub_div.push_back (1); @@ -154,20 +154,20 @@ int main () DoFHandler<2> dof_handler(tria_test); dof_handler.distribute_dofs (fe); - // Fill solution vector with random - // values between 0 and 1. + // Fill solution vector with random + // values between 0 and 1. Vector solution(dof_handler.n_dofs ()); for (unsigned int i = 0; i < dof_handler.n_dofs (); ++i) solution(i) = (double) rand () / (double) RAND_MAX; - // Now check if the function is - // continuous in normal direction - // on uniform mesh: + // Now check if the function is + // continuous in normal direction + // on uniform mesh: deallog << "Uniform mesh test" << std::endl; evaluate_normal (dof_handler, solution); - // Then test same on distorted mesh + // Then test same on distorted mesh tria_test.distort_random (0.05); deallog << "Distorted mesh test" << std::endl; evaluate_normal (dof_handler, solution); diff --git a/tests/bits/solution_transfer.cc b/tests/bits/solution_transfer.cc index 029ce0817c..d88bdf0257 100644 --- a/tests/bits/solution_transfer.cc +++ b/tests/bits/solution_transfer.cc @@ -43,18 +43,19 @@ template class MyFunction : public Function { - public: - MyFunction () : Function() {}; - - virtual double value (const Point &p, - const unsigned int) const - { double f=sin(p[0]*4); - if (dim>1) - f*=cos(p[1]*4); - if (dim>2) - f*=exp(p[2]*4); - return f; - }; +public: + MyFunction () : Function() {}; + + virtual double value (const Point &p, + const unsigned int) const + { + double f=sin(p[0]*4); + if (dim>1) + f*=cos(p[1]*4); + if (dim>2) + f*=exp(p[2]*4); + return f; + }; }; @@ -75,7 +76,7 @@ void transfer(std::ostream &out) DataOut q_data_out, dgq_data_out; ConstraintMatrix cm; cm.close(); - + q_dof_handler.distribute_dofs (fe_q); q_solution.reinit(q_dof_handler.n_dofs()); @@ -84,7 +85,7 @@ void transfer(std::ostream &out) VectorTools::interpolate (mapping, q_dof_handler, function, q_solution); VectorTools::project (mapping, dgq_dof_handler, cm, - QGauss(3), function, dgq_solution); + QGauss(3), function, dgq_solution); q_data_out.attach_dof_handler (q_dof_handler); q_data_out.add_data_vector (q_solution, "solution"); @@ -101,9 +102,9 @@ void transfer(std::ostream &out) SolutionTransfer q_soltrans(q_dof_handler); SolutionTransfer dgq_soltrans(dgq_dof_handler); - // test a): pure refinement + // test a): pure refinement typename Triangulation::active_cell_iterator cell=tria.begin_active(), - endc=tria.end(); + endc=tria.end(); ++cell; ++cell; for (; cell!=endc; ++cell) @@ -120,7 +121,7 @@ void transfer(std::ostream &out) q_soltrans.refine_interpolate(q_solution, tmp_q); q_solution.reinit (q_dof_handler.n_dofs()); q_solution = tmp_q; - + Vector tmp_dgq (dgq_dof_handler.n_dofs()); dgq_soltrans.refine_interpolate(dgq_solution, tmp_dgq); dgq_solution.reinit (dgq_dof_handler.n_dofs()); @@ -131,20 +132,20 @@ void transfer(std::ostream &out) q_data_out.add_data_vector (q_solution, "solution"); q_data_out.build_patches (); deallog << "Interpolated/tranferred solution after pure refinement, FE_Q" - << std::endl << std::endl; + << std::endl << std::endl; q_data_out.write_gnuplot (out); dgq_data_out.clear_data_vectors(); dgq_data_out.add_data_vector (dgq_solution, "solution"); dgq_data_out.build_patches (); deallog << "Interpolated/tranferred solution after pure refinement, FE_DGQ" - << std::endl << std::endl; + << std::endl << std::endl; dgq_data_out.write_gnuplot (out); - // test b): with coarsening + // test b): with coarsening q_soltrans.clear(); dgq_soltrans.clear(); - + cell=tria.begin_active(tria.n_levels()-1); endc=tria.end(tria.n_levels()-1); cell->set_refine_flag(); @@ -152,7 +153,7 @@ void transfer(std::ostream &out) for (; cell!=endc; ++cell) cell->set_coarsen_flag(); Vector q_old_solution=q_solution, - dgq_old_solution=dgq_solution; + dgq_old_solution=dgq_solution; tria.prepare_coarsening_and_refinement(); q_soltrans.prepare_for_coarsening_and_refinement(q_old_solution); dgq_soltrans.prepare_for_coarsening_and_refinement(dgq_old_solution); @@ -168,14 +169,14 @@ void transfer(std::ostream &out) q_data_out.add_data_vector (q_solution, "solution"); q_data_out.build_patches (); deallog << "Interpolated/tranferred solution after coarsening and refinement, FE_Q" - << std::endl << std::endl; + << std::endl << std::endl; q_data_out.write_gnuplot (out); dgq_data_out.clear_data_vectors(); dgq_data_out.add_data_vector (dgq_solution, "solution"); dgq_data_out.build_patches (); deallog << "Interpolated/tranferred solution after coarsening and refinement, FE_DGQ" - << std::endl << std::endl; + << std::endl << std::endl; dgq_data_out.write_gnuplot (out); } diff --git a/tests/bits/solver_01.cc b/tests/bits/solver_01.cc index c08faf42d9..5c532b5870 100644 --- a/tests/bits/solver_01.cc +++ b/tests/bits/solver_01.cc @@ -35,9623 +35,9624 @@ struct Entry { - int row; - int col; - double val; + int row; + int col; + double val; }; const Entry entries[] = { - {0,0,1.87e-01}, - {0,1,3.65e-02}, - {0,2,3.65e-02}, - {0,3,-1.03e-02}, - {0,289,-1.93e-04}, - {0,290,-9.67e-05}, - {0,291,-9.67e-05}, - {0,292,-4.84e-05}, - {1,1,2.08e-01}, - {1,0,3.65e-02}, - {1,2,-1.03e-02}, - {1,3,-1.03e-02}, - {1,4,3.65e-02}, - {1,6,-1.03e-02}, - {1,289,-9.67e-05}, - {1,290,-3.87e-04}, - {1,291,-4.84e-05}, - {1,292,-1.93e-04}, - {1,293,-9.67e-05}, - {1,295,-4.84e-05}, - {2,2,2.08e-01}, - {2,0,3.65e-02}, - {2,1,-1.03e-02}, - {2,3,-1.03e-02}, - {2,5,3.65e-02}, - {2,8,-1.03e-02}, - {2,289,-9.67e-05}, - {2,290,-4.84e-05}, - {2,291,-3.87e-04}, - {2,292,-1.93e-04}, - {2,294,-9.67e-05}, - {2,297,-4.84e-05}, - {3,3,8.29e-02}, - {3,0,-1.03e-02}, - {3,1,-1.03e-02}, - {3,2,-1.03e-02}, - {3,4,-1.03e-02}, - {3,5,-1.03e-02}, - {3,6,-1.03e-02}, - {3,7,-1.03e-02}, - {3,8,-1.03e-02}, - {3,289,-4.84e-05}, - {3,290,-1.93e-04}, - {3,291,-1.93e-04}, - {3,292,-7.74e-04}, - {3,293,-4.84e-05}, - {3,294,-4.84e-05}, - {3,295,-1.93e-04}, - {3,296,-4.84e-05}, - {3,297,-1.93e-04}, - {4,4,2.08e-01}, - {4,1,3.65e-02}, - {4,3,-1.03e-02}, - {4,6,-1.03e-02}, - {4,9,3.65e-02}, - {4,11,-1.03e-02}, - {4,290,-9.67e-05}, - {4,292,-4.84e-05}, - {4,293,-3.87e-04}, - {4,295,-1.93e-04}, - {4,298,-9.67e-05}, - {4,300,-4.84e-05}, - {5,5,2.08e-01}, - {5,2,3.65e-02}, - {5,3,-1.03e-02}, - {5,8,-1.03e-02}, - {5,10,3.65e-02}, - {5,15,-1.03e-02}, - {5,291,-9.67e-05}, - {5,292,-4.84e-05}, - {5,294,-3.87e-04}, - {5,297,-1.93e-04}, - {5,299,-9.67e-05}, - {5,304,-4.84e-05}, - {6,6,8.29e-02}, - {6,1,-1.03e-02}, - {6,3,-1.03e-02}, - {6,4,-1.03e-02}, - {6,7,-1.03e-02}, - {6,8,-1.03e-02}, - {6,9,-1.03e-02}, - {6,11,-1.03e-02}, - {6,12,-1.03e-02}, - {6,290,-4.84e-05}, - {6,292,-1.93e-04}, - {6,293,-1.93e-04}, - {6,295,-7.74e-04}, - {6,296,-1.93e-04}, - {6,297,-4.84e-05}, - {6,298,-4.84e-05}, - {6,300,-1.93e-04}, - {6,301,-4.84e-05}, - {7,7,8.29e-02}, - {7,3,-1.03e-02}, - {7,6,-1.03e-02}, - {7,8,-1.03e-02}, - {7,11,-1.03e-02}, - {7,12,-1.03e-02}, - {7,13,-1.03e-02}, - {7,14,-1.03e-02}, - {7,15,-1.03e-02}, - {7,292,-4.84e-05}, - {7,295,-1.93e-04}, - {7,296,-7.74e-04}, - {7,297,-1.93e-04}, - {7,300,-4.84e-05}, - {7,301,-1.93e-04}, - {7,302,-4.84e-05}, - {7,303,-1.93e-04}, - {7,304,-4.84e-05}, - {8,8,8.29e-02}, - {8,2,-1.03e-02}, - {8,3,-1.03e-02}, - {8,5,-1.03e-02}, - {8,6,-1.03e-02}, - {8,7,-1.03e-02}, - {8,10,-1.03e-02}, - {8,14,-1.03e-02}, - {8,15,-1.03e-02}, - {8,291,-4.84e-05}, - {8,292,-1.93e-04}, - {8,294,-1.93e-04}, - {8,295,-4.84e-05}, - {8,296,-1.93e-04}, - {8,297,-7.74e-04}, - {8,299,-4.84e-05}, - {8,303,-4.84e-05}, - {8,304,-1.93e-04}, - {9,9,2.08e-01}, - {9,4,3.65e-02}, - {9,6,-1.03e-02}, - {9,11,-1.03e-02}, - {9,16,3.65e-02}, - {9,18,-1.03e-02}, - {9,293,-9.67e-05}, - {9,295,-4.84e-05}, - {9,298,-3.87e-04}, - {9,300,-1.93e-04}, - {9,305,-9.67e-05}, - {9,307,-4.84e-05}, - {10,10,2.08e-01}, - {10,5,3.65e-02}, - {10,8,-1.03e-02}, - {10,15,-1.03e-02}, - {10,17,3.65e-02}, - {10,24,-1.03e-02}, - {10,294,-9.67e-05}, - {10,297,-4.84e-05}, - {10,299,-3.87e-04}, - {10,304,-1.93e-04}, - {10,306,-9.67e-05}, - {10,313,-4.84e-05}, - {11,11,8.29e-02}, - {11,4,-1.03e-02}, - {11,6,-1.03e-02}, - {11,7,-1.03e-02}, - {11,9,-1.03e-02}, - {11,12,-1.03e-02}, - {11,16,-1.03e-02}, - {11,18,-1.03e-02}, - {11,19,-1.03e-02}, - {11,293,-4.84e-05}, - {11,295,-1.93e-04}, - {11,296,-4.84e-05}, - {11,298,-1.93e-04}, - {11,300,-7.74e-04}, - {11,301,-1.93e-04}, - {11,305,-4.84e-05}, - {11,307,-1.93e-04}, - {11,308,-4.84e-05}, - {12,12,8.29e-02}, - {12,6,-1.03e-02}, - {12,7,-1.03e-02}, - {12,11,-1.03e-02}, - {12,13,-1.03e-02}, - {12,14,-1.03e-02}, - {12,18,-1.03e-02}, - {12,19,-1.03e-02}, - {12,20,-1.03e-02}, - {12,295,-4.84e-05}, - {12,296,-1.93e-04}, - {12,300,-1.93e-04}, - {12,301,-7.74e-04}, - {12,302,-1.93e-04}, - {12,303,-4.84e-05}, - {12,307,-4.84e-05}, - {12,308,-1.93e-04}, - {12,309,-4.84e-05}, - {13,13,8.29e-02}, - {13,7,-1.03e-02}, - {13,12,-1.03e-02}, - {13,14,-1.03e-02}, - {13,19,-1.03e-02}, - {13,20,-1.03e-02}, - {13,21,-1.03e-02}, - {13,22,-1.03e-02}, - {13,23,-1.03e-02}, - {13,296,-4.84e-05}, - {13,301,-1.93e-04}, - {13,302,-7.74e-04}, - {13,303,-1.93e-04}, - {13,308,-4.84e-05}, - {13,309,-1.93e-04}, - {13,310,-4.84e-05}, - {13,311,-1.93e-04}, - {13,312,-4.84e-05}, - {14,14,8.29e-02}, - {14,7,-1.03e-02}, - {14,8,-1.03e-02}, - {14,12,-1.03e-02}, - {14,13,-1.03e-02}, - {14,15,-1.03e-02}, - {14,22,-1.03e-02}, - {14,23,-1.03e-02}, - {14,24,-1.03e-02}, - {14,296,-1.93e-04}, - {14,297,-4.84e-05}, - {14,301,-4.84e-05}, - {14,302,-1.93e-04}, - {14,303,-7.74e-04}, - {14,304,-1.93e-04}, - {14,311,-4.84e-05}, - {14,312,-1.93e-04}, - {14,313,-4.84e-05}, - {15,15,8.29e-02}, - {15,5,-1.03e-02}, - {15,7,-1.03e-02}, - {15,8,-1.03e-02}, - {15,10,-1.03e-02}, - {15,14,-1.03e-02}, - {15,17,-1.03e-02}, - {15,23,-1.03e-02}, - {15,24,-1.03e-02}, - {15,294,-4.84e-05}, - {15,296,-4.84e-05}, - {15,297,-1.93e-04}, - {15,299,-1.93e-04}, - {15,303,-1.93e-04}, - {15,304,-7.74e-04}, - {15,306,-4.84e-05}, - {15,312,-4.84e-05}, - {15,313,-1.93e-04}, - {16,16,2.08e-01}, - {16,9,3.65e-02}, - {16,11,-1.03e-02}, - {16,18,-1.03e-02}, - {16,25,3.65e-02}, - {16,27,-1.03e-02}, - {16,298,-9.67e-05}, - {16,300,-4.84e-05}, - {16,305,-3.87e-04}, - {16,307,-1.93e-04}, - {16,314,-9.67e-05}, - {16,316,-4.84e-05}, - {17,17,2.08e-01}, - {17,10,3.65e-02}, - {17,15,-1.03e-02}, - {17,24,-1.03e-02}, - {17,26,3.65e-02}, - {17,33,-1.03e-02}, - {17,299,-9.67e-05}, - {17,304,-4.84e-05}, - {17,306,-3.87e-04}, - {17,313,-1.93e-04}, - {17,315,-9.67e-05}, - {17,322,-4.84e-05}, - {18,18,8.29e-02}, - {18,9,-1.03e-02}, - {18,11,-1.03e-02}, - {18,12,-1.03e-02}, - {18,16,-1.03e-02}, - {18,19,-1.03e-02}, - {18,25,-1.03e-02}, - {18,27,-1.03e-02}, - {18,28,-1.03e-02}, - {18,298,-4.84e-05}, - {18,300,-1.93e-04}, - {18,301,-4.84e-05}, - {18,305,-1.93e-04}, - {18,307,-7.74e-04}, - {18,308,-1.93e-04}, - {18,314,-4.84e-05}, - {18,316,-1.93e-04}, - {18,317,-4.84e-05}, - {19,19,8.29e-02}, - {19,11,-1.03e-02}, - {19,12,-1.03e-02}, - {19,13,-1.03e-02}, - {19,18,-1.03e-02}, - {19,20,-1.03e-02}, - {19,27,-1.03e-02}, - {19,28,-1.03e-02}, - {19,29,-1.03e-02}, - {19,300,-4.84e-05}, - {19,301,-1.93e-04}, - {19,302,-4.84e-05}, - {19,307,-1.93e-04}, - {19,308,-7.74e-04}, - {19,309,-1.93e-04}, - {19,316,-4.84e-05}, - {19,317,-1.93e-04}, - {19,318,-4.84e-05}, - {20,20,8.29e-02}, - {20,12,-1.03e-02}, - {20,13,-1.03e-02}, - {20,19,-1.03e-02}, - {20,21,-1.03e-02}, - {20,22,-1.03e-02}, - {20,28,-1.03e-02}, - {20,29,-1.03e-02}, - {20,30,-1.03e-02}, - {20,301,-4.84e-05}, - {20,302,-1.93e-04}, - {20,308,-1.93e-04}, - {20,309,-7.74e-04}, - {20,310,-1.93e-04}, - {20,311,-4.84e-05}, - {20,317,-4.84e-05}, - {20,318,-1.93e-04}, - {20,319,-4.84e-05}, - {21,21,8.29e-02}, - {21,13,-1.03e-02}, - {21,20,-1.03e-02}, - {21,22,-1.03e-02}, - {21,29,-1.03e-02}, - {21,30,-1.03e-02}, - {21,31,-1.03e-02}, - {21,32,-1.03e-02}, - {21,35,-1.03e-02}, - {21,302,-4.84e-05}, - {21,309,-1.93e-04}, - {21,310,-7.74e-04}, - {21,311,-1.93e-04}, - {21,318,-4.84e-05}, - {21,319,-1.93e-04}, - {21,320,-4.84e-05}, - {21,321,-1.93e-04}, - {21,324,-4.84e-05}, - {22,22,8.29e-02}, - {22,13,-1.03e-02}, - {22,14,-1.03e-02}, - {22,20,-1.03e-02}, - {22,21,-1.03e-02}, - {22,23,-1.03e-02}, - {22,32,-1.03e-02}, - {22,34,-1.03e-02}, - {22,35,-1.03e-02}, - {22,302,-1.93e-04}, - {22,303,-4.84e-05}, - {22,309,-4.84e-05}, - {22,310,-1.93e-04}, - {22,311,-7.74e-04}, - {22,312,-1.93e-04}, - {22,321,-4.84e-05}, - {22,323,-4.84e-05}, - {22,324,-1.93e-04}, - {23,23,8.29e-02}, - {23,13,-1.03e-02}, - {23,14,-1.03e-02}, - {23,15,-1.03e-02}, - {23,22,-1.03e-02}, - {23,24,-1.03e-02}, - {23,33,-1.03e-02}, - {23,34,-1.03e-02}, - {23,35,-1.03e-02}, - {23,302,-4.84e-05}, - {23,303,-1.93e-04}, - {23,304,-4.84e-05}, - {23,311,-1.93e-04}, - {23,312,-7.74e-04}, - {23,313,-1.93e-04}, - {23,322,-4.84e-05}, - {23,323,-1.93e-04}, - {23,324,-4.84e-05}, - {24,24,8.29e-02}, - {24,10,-1.03e-02}, - {24,14,-1.03e-02}, - {24,15,-1.03e-02}, - {24,17,-1.03e-02}, - {24,23,-1.03e-02}, - {24,26,-1.03e-02}, - {24,33,-1.03e-02}, - {24,34,-1.03e-02}, - {24,299,-4.84e-05}, - {24,303,-4.84e-05}, - {24,304,-1.93e-04}, - {24,306,-1.93e-04}, - {24,312,-1.93e-04}, - {24,313,-7.74e-04}, - {24,315,-4.84e-05}, - {24,322,-1.93e-04}, - {24,323,-4.84e-05}, - {25,25,2.08e-01}, - {25,16,3.65e-02}, - {25,18,-1.03e-02}, - {25,27,-1.03e-02}, - {25,36,3.65e-02}, - {25,38,-1.03e-02}, - {25,305,-9.67e-05}, - {25,307,-4.84e-05}, - {25,314,-3.87e-04}, - {25,316,-1.93e-04}, - {25,325,-9.67e-05}, - {25,327,-4.84e-05}, - {26,26,2.08e-01}, - {26,17,3.65e-02}, - {26,24,-1.03e-02}, - {26,33,-1.03e-02}, - {26,37,3.65e-02}, - {26,47,-1.03e-02}, - {26,306,-9.67e-05}, - {26,313,-4.84e-05}, - {26,315,-3.87e-04}, - {26,322,-1.93e-04}, - {26,326,-9.67e-05}, - {26,336,-4.84e-05}, - {27,27,8.29e-02}, - {27,16,-1.03e-02}, - {27,18,-1.03e-02}, - {27,19,-1.03e-02}, - {27,25,-1.03e-02}, - {27,28,-1.03e-02}, - {27,36,-1.03e-02}, - {27,38,-1.03e-02}, - {27,39,-1.03e-02}, - {27,305,-4.84e-05}, - {27,307,-1.93e-04}, - {27,308,-4.84e-05}, - {27,314,-1.93e-04}, - {27,316,-7.74e-04}, - {27,317,-1.93e-04}, - {27,325,-4.84e-05}, - {27,327,-1.93e-04}, - {27,328,-4.84e-05}, - {28,28,8.29e-02}, - {28,18,-1.03e-02}, - {28,19,-1.03e-02}, - {28,20,-1.03e-02}, - {28,27,-1.03e-02}, - {28,29,-1.03e-02}, - {28,38,-1.03e-02}, - {28,39,-1.03e-02}, - {28,40,-1.03e-02}, - {28,307,-4.84e-05}, - {28,308,-1.93e-04}, - {28,309,-4.84e-05}, - {28,316,-1.93e-04}, - {28,317,-7.74e-04}, - {28,318,-1.93e-04}, - {28,327,-4.84e-05}, - {28,328,-1.93e-04}, - {28,329,-4.84e-05}, - {29,29,8.29e-02}, - {29,19,-1.03e-02}, - {29,20,-1.03e-02}, - {29,21,-1.03e-02}, - {29,28,-1.03e-02}, - {29,30,-1.03e-02}, - {29,39,-1.03e-02}, - {29,40,-1.03e-02}, - {29,41,-1.03e-02}, - {29,308,-4.84e-05}, - {29,309,-1.93e-04}, - {29,310,-4.84e-05}, - {29,317,-1.93e-04}, - {29,318,-7.74e-04}, - {29,319,-1.93e-04}, - {29,328,-4.84e-05}, - {29,329,-1.93e-04}, - {29,330,-4.84e-05}, - {30,30,8.29e-02}, - {30,20,-1.03e-02}, - {30,21,-1.03e-02}, - {30,29,-1.03e-02}, - {30,31,-1.03e-02}, - {30,32,-1.03e-02}, - {30,40,-1.03e-02}, - {30,41,-1.03e-02}, - {30,42,-1.03e-02}, - {30,309,-4.84e-05}, - {30,310,-1.93e-04}, - {30,318,-1.93e-04}, - {30,319,-7.74e-04}, - {30,320,-1.93e-04}, - {30,321,-4.84e-05}, - {30,329,-4.84e-05}, - {30,330,-1.93e-04}, - {30,331,-4.84e-05}, - {31,31,8.29e-02}, - {31,21,-1.03e-02}, - {31,30,-1.03e-02}, - {31,32,-1.03e-02}, - {31,41,-1.03e-02}, - {31,42,-1.03e-02}, - {31,43,-1.03e-02}, - {31,44,-1.03e-02}, - {31,45,-1.03e-02}, - {31,310,-4.84e-05}, - {31,319,-1.93e-04}, - {31,320,-7.74e-04}, - {31,321,-1.93e-04}, - {31,330,-4.84e-05}, - {31,331,-1.93e-04}, - {31,332,-4.84e-05}, - {31,333,-1.93e-04}, - {31,334,-4.84e-05}, - {32,32,8.29e-02}, - {32,21,-1.03e-02}, - {32,22,-1.03e-02}, - {32,30,-1.03e-02}, - {32,31,-1.03e-02}, - {32,35,-1.03e-02}, - {32,44,-1.03e-02}, - {32,45,-1.03e-02}, - {32,48,-1.03e-02}, - {32,310,-1.93e-04}, - {32,311,-4.84e-05}, - {32,319,-4.84e-05}, - {32,320,-1.93e-04}, - {32,321,-7.74e-04}, - {32,324,-1.93e-04}, - {32,333,-4.84e-05}, - {32,334,-1.93e-04}, - {32,337,-4.84e-05}, - {33,33,8.29e-02}, - {33,17,-1.03e-02}, - {33,23,-1.03e-02}, - {33,24,-1.03e-02}, - {33,26,-1.03e-02}, - {33,34,-1.03e-02}, - {33,37,-1.03e-02}, - {33,46,-1.03e-02}, - {33,47,-1.03e-02}, - {33,306,-4.84e-05}, - {33,312,-4.84e-05}, - {33,313,-1.93e-04}, - {33,315,-1.93e-04}, - {33,322,-7.74e-04}, - {33,323,-1.93e-04}, - {33,326,-4.84e-05}, - {33,335,-4.84e-05}, - {33,336,-1.93e-04}, - {34,34,8.29e-02}, - {34,22,-1.03e-02}, - {34,23,-1.03e-02}, - {34,24,-1.03e-02}, - {34,33,-1.03e-02}, - {34,35,-1.03e-02}, - {34,46,-1.03e-02}, - {34,47,-1.03e-02}, - {34,48,-1.03e-02}, - {34,311,-4.84e-05}, - {34,312,-1.93e-04}, - {34,313,-4.84e-05}, - {34,322,-1.93e-04}, - {34,323,-7.74e-04}, - {34,324,-1.93e-04}, - {34,335,-1.93e-04}, - {34,336,-4.84e-05}, - {34,337,-4.84e-05}, - {35,35,8.29e-02}, - {35,21,-1.03e-02}, - {35,22,-1.03e-02}, - {35,23,-1.03e-02}, - {35,32,-1.03e-02}, - {35,34,-1.03e-02}, - {35,45,-1.03e-02}, - {35,46,-1.03e-02}, - {35,48,-1.03e-02}, - {35,310,-4.84e-05}, - {35,311,-1.93e-04}, - {35,312,-4.84e-05}, - {35,321,-1.93e-04}, - {35,323,-1.93e-04}, - {35,324,-7.74e-04}, - {35,334,-4.84e-05}, - {35,335,-4.84e-05}, - {35,337,-1.93e-04}, - {36,36,2.08e-01}, - {36,25,3.65e-02}, - {36,27,-1.03e-02}, - {36,38,-1.03e-02}, - {36,49,3.65e-02}, - {36,51,-1.03e-02}, - {36,314,-9.67e-05}, - {36,316,-4.84e-05}, - {36,325,-3.87e-04}, - {36,327,-1.93e-04}, - {36,338,-9.67e-05}, - {36,340,-4.84e-05}, - {37,37,2.08e-01}, - {37,26,3.65e-02}, - {37,33,-1.03e-02}, - {37,47,-1.03e-02}, - {37,50,3.65e-02}, - {37,63,-1.03e-02}, - {37,315,-9.67e-05}, - {37,322,-4.84e-05}, - {37,326,-3.87e-04}, - {37,336,-1.93e-04}, - {37,339,-9.67e-05}, - {37,352,-4.84e-05}, - {38,38,8.29e-02}, - {38,25,-1.03e-02}, - {38,27,-1.03e-02}, - {38,28,-1.03e-02}, - {38,36,-1.03e-02}, - {38,39,-1.03e-02}, - {38,49,-1.03e-02}, - {38,51,-1.03e-02}, - {38,52,-1.03e-02}, - {38,314,-4.84e-05}, - {38,316,-1.93e-04}, - {38,317,-4.84e-05}, - {38,325,-1.93e-04}, - {38,327,-7.74e-04}, - {38,328,-1.93e-04}, - {38,338,-4.84e-05}, - {38,340,-1.93e-04}, - {38,341,-4.84e-05}, - {39,39,8.29e-02}, - {39,27,-1.03e-02}, - {39,28,-1.03e-02}, - {39,29,-1.03e-02}, - {39,38,-1.03e-02}, - {39,40,-1.03e-02}, - {39,51,-1.03e-02}, - {39,52,-1.03e-02}, - {39,53,-1.03e-02}, - {39,316,-4.84e-05}, - {39,317,-1.93e-04}, - {39,318,-4.84e-05}, - {39,327,-1.93e-04}, - {39,328,-7.74e-04}, - {39,329,-1.93e-04}, - {39,340,-4.84e-05}, - {39,341,-1.93e-04}, - {39,342,-4.84e-05}, - {40,40,8.29e-02}, - {40,28,-1.03e-02}, - {40,29,-1.03e-02}, - {40,30,-1.03e-02}, - {40,39,-1.03e-02}, - {40,41,-1.03e-02}, - {40,52,-1.03e-02}, - {40,53,-1.03e-02}, - {40,54,-1.03e-02}, - {40,317,-4.84e-05}, - {40,318,-1.93e-04}, - {40,319,-4.84e-05}, - {40,328,-1.93e-04}, - {40,329,-7.74e-04}, - {40,330,-1.93e-04}, - {40,341,-4.84e-05}, - {40,342,-1.93e-04}, - {40,343,-4.84e-05}, - {41,41,8.29e-02}, - {41,29,-1.03e-02}, - {41,30,-1.03e-02}, - {41,31,-1.03e-02}, - {41,40,-1.03e-02}, - {41,42,-1.03e-02}, - {41,53,-1.03e-02}, - {41,54,-1.03e-02}, - {41,55,-1.03e-02}, - {41,318,-4.84e-05}, - {41,319,-1.93e-04}, - {41,320,-4.84e-05}, - {41,329,-1.93e-04}, - {41,330,-7.74e-04}, - {41,331,-1.93e-04}, - {41,342,-4.84e-05}, - {41,343,-1.93e-04}, - {41,344,-4.84e-05}, - {42,42,8.29e-02}, - {42,30,-1.03e-02}, - {42,31,-1.03e-02}, - {42,41,-1.03e-02}, - {42,43,-1.03e-02}, - {42,44,-1.03e-02}, - {42,54,-1.03e-02}, - {42,55,-1.03e-02}, - {42,56,-1.03e-02}, - {42,319,-4.84e-05}, - {42,320,-1.93e-04}, - {42,330,-1.93e-04}, - {42,331,-7.74e-04}, - {42,332,-1.93e-04}, - {42,333,-4.84e-05}, - {42,343,-4.84e-05}, - {42,344,-1.93e-04}, - {42,345,-4.84e-05}, - {43,43,8.29e-02}, - {43,31,-1.03e-02}, - {43,42,-1.03e-02}, - {43,44,-1.03e-02}, - {43,55,-1.03e-02}, - {43,56,-1.03e-02}, - {43,57,-1.03e-02}, - {43,58,-1.03e-02}, - {43,59,-1.03e-02}, - {43,320,-4.84e-05}, - {43,331,-1.93e-04}, - {43,332,-7.74e-04}, - {43,333,-1.93e-04}, - {43,344,-4.84e-05}, - {43,345,-1.93e-04}, - {43,346,-4.84e-05}, - {43,347,-1.93e-04}, - {43,348,-4.84e-05}, - {44,44,8.29e-02}, - {44,31,-1.03e-02}, - {44,32,-1.03e-02}, - {44,42,-1.03e-02}, - {44,43,-1.03e-02}, - {44,45,-1.03e-02}, - {44,58,-1.03e-02}, - {44,59,-1.03e-02}, - {44,60,-1.03e-02}, - {44,320,-1.93e-04}, - {44,321,-4.84e-05}, - {44,331,-4.84e-05}, - {44,332,-1.93e-04}, - {44,333,-7.74e-04}, - {44,334,-1.93e-04}, - {44,347,-4.84e-05}, - {44,348,-1.93e-04}, - {44,349,-4.84e-05}, - {45,45,8.29e-02}, - {45,31,-1.03e-02}, - {45,32,-1.03e-02}, - {45,35,-1.03e-02}, - {45,44,-1.03e-02}, - {45,48,-1.03e-02}, - {45,59,-1.03e-02}, - {45,60,-1.03e-02}, - {45,61,-1.03e-02}, - {45,320,-4.84e-05}, - {45,321,-1.93e-04}, - {45,324,-4.84e-05}, - {45,333,-1.93e-04}, - {45,334,-7.74e-04}, - {45,337,-1.93e-04}, - {45,348,-4.84e-05}, - {45,349,-1.93e-04}, - {45,350,-4.84e-05}, - {46,46,8.29e-02}, - {46,33,-1.03e-02}, - {46,34,-1.03e-02}, - {46,35,-1.03e-02}, - {46,47,-1.03e-02}, - {46,48,-1.03e-02}, - {46,61,-1.03e-02}, - {46,62,-1.03e-02}, - {46,63,-1.03e-02}, - {46,322,-4.84e-05}, - {46,323,-1.93e-04}, - {46,324,-4.84e-05}, - {46,335,-7.74e-04}, - {46,336,-1.93e-04}, - {46,337,-1.93e-04}, - {46,350,-4.84e-05}, - {46,351,-1.93e-04}, - {46,352,-4.84e-05}, - {47,47,8.29e-02}, - {47,26,-1.03e-02}, - {47,33,-1.03e-02}, - {47,34,-1.03e-02}, - {47,37,-1.03e-02}, - {47,46,-1.03e-02}, - {47,50,-1.03e-02}, - {47,62,-1.03e-02}, - {47,63,-1.03e-02}, - {47,315,-4.84e-05}, - {47,322,-1.93e-04}, - {47,323,-4.84e-05}, - {47,326,-1.93e-04}, - {47,335,-1.93e-04}, - {47,336,-7.74e-04}, - {47,339,-4.84e-05}, - {47,351,-4.84e-05}, - {47,352,-1.93e-04}, - {48,48,8.29e-02}, - {48,32,-1.03e-02}, - {48,34,-1.03e-02}, - {48,35,-1.03e-02}, - {48,45,-1.03e-02}, - {48,46,-1.03e-02}, - {48,60,-1.03e-02}, - {48,61,-1.03e-02}, - {48,62,-1.03e-02}, - {48,321,-4.84e-05}, - {48,323,-4.84e-05}, - {48,324,-1.93e-04}, - {48,334,-1.93e-04}, - {48,335,-1.93e-04}, - {48,337,-7.74e-04}, - {48,349,-4.84e-05}, - {48,350,-1.93e-04}, - {48,351,-4.84e-05}, - {49,49,2.08e-01}, - {49,36,3.65e-02}, - {49,38,-1.03e-02}, - {49,51,-1.03e-02}, - {49,64,3.65e-02}, - {49,66,-1.03e-02}, - {49,325,-9.67e-05}, - {49,327,-4.84e-05}, - {49,338,-3.87e-04}, - {49,340,-1.93e-04}, - {49,353,-9.67e-05}, - {49,355,-4.84e-05}, - {50,50,2.08e-01}, - {50,37,3.65e-02}, - {50,47,-1.03e-02}, - {50,63,-1.03e-02}, - {50,65,3.65e-02}, - {50,80,-1.03e-02}, - {50,326,-9.67e-05}, - {50,336,-4.84e-05}, - {50,339,-3.87e-04}, - {50,352,-1.93e-04}, - {50,354,-9.67e-05}, - {50,369,-4.84e-05}, - {51,51,8.29e-02}, - {51,36,-1.03e-02}, - {51,38,-1.03e-02}, - {51,39,-1.03e-02}, - {51,49,-1.03e-02}, - {51,52,-1.03e-02}, - {51,64,-1.03e-02}, - {51,66,-1.03e-02}, - {51,67,-1.03e-02}, - {51,325,-4.84e-05}, - {51,327,-1.93e-04}, - {51,328,-4.84e-05}, - {51,338,-1.93e-04}, - {51,340,-7.74e-04}, - {51,341,-1.93e-04}, - {51,353,-4.84e-05}, - {51,355,-1.93e-04}, - {51,356,-4.84e-05}, - {52,52,8.29e-02}, - {52,38,-1.03e-02}, - {52,39,-1.03e-02}, - {52,40,-1.03e-02}, - {52,51,-1.03e-02}, - {52,53,-1.03e-02}, - {52,66,-1.03e-02}, - {52,67,-1.03e-02}, - {52,68,-1.03e-02}, - {52,327,-4.84e-05}, - {52,328,-1.93e-04}, - {52,329,-4.84e-05}, - {52,340,-1.93e-04}, - {52,341,-7.74e-04}, - {52,342,-1.93e-04}, - {52,355,-4.84e-05}, - {52,356,-1.93e-04}, - {52,357,-4.84e-05}, - {53,53,8.29e-02}, - {53,39,-1.03e-02}, - {53,40,-1.03e-02}, - {53,41,-1.03e-02}, - {53,52,-1.03e-02}, - {53,54,-1.03e-02}, - {53,67,-1.03e-02}, - {53,68,-1.03e-02}, - {53,69,-1.03e-02}, - {53,328,-4.84e-05}, - {53,329,-1.93e-04}, - {53,330,-4.84e-05}, - {53,341,-1.93e-04}, - {53,342,-7.74e-04}, - {53,343,-1.93e-04}, - {53,356,-4.84e-05}, - {53,357,-1.93e-04}, - {53,358,-4.84e-05}, - {54,54,8.29e-02}, - {54,40,-1.03e-02}, - {54,41,-1.03e-02}, - {54,42,-1.03e-02}, - {54,53,-1.03e-02}, - {54,55,-1.03e-02}, - {54,68,-1.03e-02}, - {54,69,-1.03e-02}, - {54,70,-1.03e-02}, - {54,329,-4.84e-05}, - {54,330,-1.93e-04}, - {54,331,-4.84e-05}, - {54,342,-1.93e-04}, - {54,343,-7.74e-04}, - {54,344,-1.93e-04}, - {54,357,-4.84e-05}, - {54,358,-1.93e-04}, - {54,359,-4.84e-05}, - {55,55,8.29e-02}, - {55,41,-1.03e-02}, - {55,42,-1.03e-02}, - {55,43,-1.03e-02}, - {55,54,-1.03e-02}, - {55,56,-1.03e-02}, - {55,69,-1.03e-02}, - {55,70,-1.03e-02}, - {55,71,-1.03e-02}, - {55,330,-4.84e-05}, - {55,331,-1.93e-04}, - {55,332,-4.84e-05}, - {55,343,-1.93e-04}, - {55,344,-7.74e-04}, - {55,345,-1.93e-04}, - {55,358,-4.84e-05}, - {55,359,-1.93e-04}, - {55,360,-4.84e-05}, - {56,56,8.29e-02}, - {56,42,-1.03e-02}, - {56,43,-1.03e-02}, - {56,55,-1.03e-02}, - {56,57,-1.03e-02}, - {56,58,-1.03e-02}, - {56,70,-1.03e-02}, - {56,71,-1.03e-02}, - {56,72,-1.03e-02}, - {56,331,-4.84e-05}, - {56,332,-1.93e-04}, - {56,344,-1.93e-04}, - {56,345,-7.74e-04}, - {56,346,-1.93e-04}, - {56,347,-4.84e-05}, - {56,359,-4.84e-05}, - {56,360,-1.93e-04}, - {56,361,-4.84e-05}, - {57,57,8.29e-02}, - {57,43,-1.03e-02}, - {57,56,-1.03e-02}, - {57,58,-1.03e-02}, - {57,71,-1.03e-02}, - {57,72,-1.03e-02}, - {57,73,-1.03e-02}, - {57,74,-1.03e-02}, - {57,75,-1.03e-02}, - {57,332,-4.84e-05}, - {57,345,-1.93e-04}, - {57,346,-7.74e-04}, - {57,347,-1.93e-04}, - {57,360,-4.84e-05}, - {57,361,-1.93e-04}, - {57,362,-4.84e-05}, - {57,363,-1.93e-04}, - {57,364,-4.84e-05}, - {58,58,8.29e-02}, - {58,43,-1.03e-02}, - {58,44,-1.03e-02}, - {58,56,-1.03e-02}, - {58,57,-1.03e-02}, - {58,59,-1.03e-02}, - {58,74,-1.03e-02}, - {58,75,-1.03e-02}, - {58,76,-1.03e-02}, - {58,332,-1.93e-04}, - {58,333,-4.84e-05}, - {58,345,-4.84e-05}, - {58,346,-1.93e-04}, - {58,347,-7.74e-04}, - {58,348,-1.93e-04}, - {58,363,-4.84e-05}, - {58,364,-1.93e-04}, - {58,365,-4.84e-05}, - {59,59,8.29e-02}, - {59,43,-1.03e-02}, - {59,44,-1.03e-02}, - {59,45,-1.03e-02}, - {59,58,-1.03e-02}, - {59,60,-1.03e-02}, - {59,75,-1.03e-02}, - {59,76,-1.03e-02}, - {59,77,-1.03e-02}, - {59,332,-4.84e-05}, - {59,333,-1.93e-04}, - {59,334,-4.84e-05}, - {59,347,-1.93e-04}, - {59,348,-7.74e-04}, - {59,349,-1.93e-04}, - {59,364,-4.84e-05}, - {59,365,-1.93e-04}, - {59,366,-4.84e-05}, - {60,60,8.29e-02}, - {60,44,-1.03e-02}, - {60,45,-1.03e-02}, - {60,48,-1.03e-02}, - {60,59,-1.03e-02}, - {60,61,-1.03e-02}, - {60,76,-1.03e-02}, - {60,77,-1.03e-02}, - {60,78,-1.03e-02}, - {60,333,-4.84e-05}, - {60,334,-1.93e-04}, - {60,337,-4.84e-05}, - {60,348,-1.93e-04}, - {60,349,-7.74e-04}, - {60,350,-1.93e-04}, - {60,365,-4.84e-05}, - {60,366,-1.93e-04}, - {60,367,-4.84e-05}, - {61,61,8.29e-02}, - {61,45,-1.03e-02}, - {61,46,-1.03e-02}, - {61,48,-1.03e-02}, - {61,60,-1.03e-02}, - {61,62,-1.03e-02}, - {61,77,-1.03e-02}, - {61,78,-1.03e-02}, - {61,79,-1.03e-02}, - {61,334,-4.84e-05}, - {61,335,-4.84e-05}, - {61,337,-1.93e-04}, - {61,349,-1.93e-04}, - {61,350,-7.74e-04}, - {61,351,-1.93e-04}, - {61,366,-4.84e-05}, - {61,367,-1.93e-04}, - {61,368,-4.84e-05}, - {62,62,8.29e-02}, - {62,46,-1.03e-02}, - {62,47,-1.03e-02}, - {62,48,-1.03e-02}, - {62,61,-1.03e-02}, - {62,63,-1.03e-02}, - {62,78,-1.03e-02}, - {62,79,-1.03e-02}, - {62,80,-1.03e-02}, - {62,335,-1.93e-04}, - {62,336,-4.84e-05}, - {62,337,-4.84e-05}, - {62,350,-1.93e-04}, - {62,351,-7.74e-04}, - {62,352,-1.93e-04}, - {62,367,-4.84e-05}, - {62,368,-1.93e-04}, - {62,369,-4.84e-05}, - {63,63,8.29e-02}, - {63,37,-1.03e-02}, - {63,46,-1.03e-02}, - {63,47,-1.03e-02}, - {63,50,-1.03e-02}, - {63,62,-1.03e-02}, - {63,65,-1.03e-02}, - {63,79,-1.03e-02}, - {63,80,-1.03e-02}, - {63,326,-4.84e-05}, - {63,335,-4.84e-05}, - {63,336,-1.93e-04}, - {63,339,-1.93e-04}, - {63,351,-1.93e-04}, - {63,352,-7.74e-04}, - {63,354,-4.84e-05}, - {63,368,-4.84e-05}, - {63,369,-1.93e-04}, - {64,64,2.08e-01}, - {64,49,3.65e-02}, - {64,51,-1.03e-02}, - {64,66,-1.03e-02}, - {64,81,3.65e-02}, - {64,83,-1.03e-02}, - {64,338,-9.67e-05}, - {64,340,-4.84e-05}, - {64,353,-3.87e-04}, - {64,355,-1.93e-04}, - {64,370,-9.67e-05}, - {64,372,-4.84e-05}, - {65,65,2.08e-01}, - {65,50,3.65e-02}, - {65,63,-1.03e-02}, - {65,80,-1.03e-02}, - {65,82,3.65e-02}, - {65,93,-1.03e-02}, - {65,339,-9.67e-05}, - {65,352,-4.84e-05}, - {65,354,-3.87e-04}, - {65,369,-1.93e-04}, - {65,371,-9.67e-05}, - {65,382,-4.84e-05}, - {66,66,8.29e-02}, - {66,49,-1.03e-02}, - {66,51,-1.03e-02}, - {66,52,-1.03e-02}, - {66,64,-1.03e-02}, - {66,67,-1.03e-02}, - {66,81,-1.03e-02}, - {66,83,-1.03e-02}, - {66,84,-1.03e-02}, - {66,338,-4.84e-05}, - {66,340,-1.93e-04}, - {66,341,-4.84e-05}, - {66,353,-1.93e-04}, - {66,355,-7.74e-04}, - {66,356,-1.93e-04}, - {66,370,-4.84e-05}, - {66,372,-1.93e-04}, - {66,373,-4.84e-05}, - {67,67,8.29e-02}, - {67,51,-1.03e-02}, - {67,52,-1.03e-02}, - {67,53,-1.03e-02}, - {67,66,-1.03e-02}, - {67,68,-1.03e-02}, - {67,83,-1.03e-02}, - {67,84,-1.03e-02}, - {67,85,-1.03e-02}, - {67,340,-4.84e-05}, - {67,341,-1.93e-04}, - {67,342,-4.84e-05}, - {67,355,-1.93e-04}, - {67,356,-7.74e-04}, - {67,357,-1.93e-04}, - {67,372,-4.84e-05}, - {67,373,-1.93e-04}, - {67,374,-4.84e-05}, - {68,68,8.29e-02}, - {68,52,-1.03e-02}, - {68,53,-1.03e-02}, - {68,54,-1.03e-02}, - {68,67,-1.03e-02}, - {68,69,-1.03e-02}, - {68,84,-1.03e-02}, - {68,85,-1.03e-02}, - {68,86,-1.03e-02}, - {68,341,-4.84e-05}, - {68,342,-1.93e-04}, - {68,343,-4.84e-05}, - {68,356,-1.93e-04}, - {68,357,-7.74e-04}, - {68,358,-1.93e-04}, - {68,373,-4.84e-05}, - {68,374,-1.93e-04}, - {68,375,-4.84e-05}, - {69,69,8.29e-02}, - {69,53,-1.03e-02}, - {69,54,-1.03e-02}, - {69,55,-1.03e-02}, - {69,68,-1.03e-02}, - {69,70,-1.03e-02}, - {69,85,-1.03e-02}, - {69,86,-1.03e-02}, - {69,87,-1.03e-02}, - {69,342,-4.84e-05}, - {69,343,-1.93e-04}, - {69,344,-4.84e-05}, - {69,357,-1.93e-04}, - {69,358,-7.74e-04}, - {69,359,-1.93e-04}, - {69,374,-4.84e-05}, - {69,375,-1.93e-04}, - {69,376,-4.84e-05}, - {70,70,8.29e-02}, - {70,54,-1.03e-02}, - {70,55,-1.03e-02}, - {70,56,-1.03e-02}, - {70,69,-1.03e-02}, - {70,71,-1.03e-02}, - {70,86,-1.03e-02}, - {70,87,-1.03e-02}, - {70,88,-1.03e-02}, - {70,343,-4.84e-05}, - {70,344,-1.93e-04}, - {70,345,-4.84e-05}, - {70,358,-1.93e-04}, - {70,359,-7.74e-04}, - {70,360,-1.93e-04}, - {70,375,-4.84e-05}, - {70,376,-1.93e-04}, - {70,377,-4.84e-05}, - {71,71,8.29e-02}, - {71,55,-1.03e-02}, - {71,56,-1.03e-02}, - {71,57,-1.03e-02}, - {71,70,-1.03e-02}, - {71,72,-1.03e-02}, - {71,87,-1.03e-02}, - {71,88,-1.03e-02}, - {71,89,-1.03e-02}, - {71,344,-4.84e-05}, - {71,345,-1.93e-04}, - {71,346,-4.84e-05}, - {71,359,-1.93e-04}, - {71,360,-7.74e-04}, - {71,361,-1.93e-04}, - {71,376,-4.84e-05}, - {71,377,-1.93e-04}, - {71,378,-4.84e-05}, - {72,72,8.29e-02}, - {72,56,-1.03e-02}, - {72,57,-1.03e-02}, - {72,71,-1.03e-02}, - {72,73,-1.03e-02}, - {72,74,-1.03e-02}, - {72,88,-1.03e-02}, - {72,89,-1.03e-02}, - {72,90,-1.03e-02}, - {72,345,-4.84e-05}, - {72,346,-1.93e-04}, - {72,360,-1.93e-04}, - {72,361,-7.74e-04}, - {72,362,-1.93e-04}, - {72,363,-4.84e-05}, - {72,377,-4.84e-05}, - {72,378,-1.93e-04}, - {72,379,-4.84e-05}, - {73,73,8.29e-02}, - {73,57,-1.03e-02}, - {73,72,-1.03e-02}, - {73,74,-1.03e-02}, - {73,89,-1.03e-02}, - {73,90,-1.03e-02}, - {73,91,-1.03e-02}, - {73,92,-1.03e-02}, - {73,99,-1.03e-02}, - {73,346,-4.84e-05}, - {73,361,-1.93e-04}, - {73,362,-7.74e-04}, - {73,363,-1.93e-04}, - {73,378,-4.84e-05}, - {73,379,-1.93e-04}, - {73,380,-4.84e-05}, - {73,381,-1.93e-04}, - {73,388,-4.84e-05}, - {74,74,8.29e-02}, - {74,57,-1.03e-02}, - {74,58,-1.03e-02}, - {74,72,-1.03e-02}, - {74,73,-1.03e-02}, - {74,75,-1.03e-02}, - {74,92,-1.03e-02}, - {74,98,-1.03e-02}, - {74,99,-1.03e-02}, - {74,346,-1.93e-04}, - {74,347,-4.84e-05}, - {74,361,-4.84e-05}, - {74,362,-1.93e-04}, - {74,363,-7.74e-04}, - {74,364,-1.93e-04}, - {74,381,-4.84e-05}, - {74,387,-4.84e-05}, - {74,388,-1.93e-04}, - {75,75,8.29e-02}, - {75,57,-1.03e-02}, - {75,58,-1.03e-02}, - {75,59,-1.03e-02}, - {75,74,-1.03e-02}, - {75,76,-1.03e-02}, - {75,97,-1.03e-02}, - {75,98,-1.03e-02}, - {75,99,-1.03e-02}, - {75,346,-4.84e-05}, - {75,347,-1.93e-04}, - {75,348,-4.84e-05}, - {75,363,-1.93e-04}, - {75,364,-7.74e-04}, - {75,365,-1.93e-04}, - {75,386,-4.84e-05}, - {75,387,-1.93e-04}, - {75,388,-4.84e-05}, - {76,76,8.29e-02}, - {76,58,-1.03e-02}, - {76,59,-1.03e-02}, - {76,60,-1.03e-02}, - {76,75,-1.03e-02}, - {76,77,-1.03e-02}, - {76,96,-1.03e-02}, - {76,97,-1.03e-02}, - {76,98,-1.03e-02}, - {76,347,-4.84e-05}, - {76,348,-1.93e-04}, - {76,349,-4.84e-05}, - {76,364,-1.93e-04}, - {76,365,-7.74e-04}, - {76,366,-1.93e-04}, - {76,385,-4.84e-05}, - {76,386,-1.93e-04}, - {76,387,-4.84e-05}, - {77,77,8.29e-02}, - {77,59,-1.03e-02}, - {77,60,-1.03e-02}, - {77,61,-1.03e-02}, - {77,76,-1.03e-02}, - {77,78,-1.03e-02}, - {77,95,-1.03e-02}, - {77,96,-1.03e-02}, - {77,97,-1.03e-02}, - {77,348,-4.84e-05}, - {77,349,-1.93e-04}, - {77,350,-4.84e-05}, - {77,365,-1.93e-04}, - {77,366,-7.74e-04}, - {77,367,-1.93e-04}, - {77,384,-4.84e-05}, - {77,385,-1.93e-04}, - {77,386,-4.84e-05}, - {78,78,8.29e-02}, - {78,60,-1.03e-02}, - {78,61,-1.03e-02}, - {78,62,-1.03e-02}, - {78,77,-1.03e-02}, - {78,79,-1.03e-02}, - {78,94,-1.03e-02}, - {78,95,-1.03e-02}, - {78,96,-1.03e-02}, - {78,349,-4.84e-05}, - {78,350,-1.93e-04}, - {78,351,-4.84e-05}, - {78,366,-1.93e-04}, - {78,367,-7.74e-04}, - {78,368,-1.93e-04}, - {78,383,-4.84e-05}, - {78,384,-1.93e-04}, - {78,385,-4.84e-05}, - {79,79,8.29e-02}, - {79,61,-1.03e-02}, - {79,62,-1.03e-02}, - {79,63,-1.03e-02}, - {79,78,-1.03e-02}, - {79,80,-1.03e-02}, - {79,93,-1.03e-02}, - {79,94,-1.03e-02}, - {79,95,-1.03e-02}, - {79,350,-4.84e-05}, - {79,351,-1.93e-04}, - {79,352,-4.84e-05}, - {79,367,-1.93e-04}, - {79,368,-7.74e-04}, - {79,369,-1.93e-04}, - {79,382,-4.84e-05}, - {79,383,-1.93e-04}, - {79,384,-4.84e-05}, - {80,80,8.29e-02}, - {80,50,-1.03e-02}, - {80,62,-1.03e-02}, - {80,63,-1.03e-02}, - {80,65,-1.03e-02}, - {80,79,-1.03e-02}, - {80,82,-1.03e-02}, - {80,93,-1.03e-02}, - {80,94,-1.03e-02}, - {80,339,-4.84e-05}, - {80,351,-4.84e-05}, - {80,352,-1.93e-04}, - {80,354,-1.93e-04}, - {80,368,-1.93e-04}, - {80,369,-7.74e-04}, - {80,371,-4.84e-05}, - {80,382,-1.93e-04}, - {80,383,-4.84e-05}, - {81,81,2.08e-01}, - {81,64,3.65e-02}, - {81,66,-1.03e-02}, - {81,83,-1.03e-02}, - {81,100,3.65e-02}, - {81,102,-1.03e-02}, - {81,353,-9.67e-05}, - {81,355,-4.84e-05}, - {81,370,-3.87e-04}, - {81,372,-1.93e-04}, - {81,389,-9.67e-05}, - {81,391,-4.84e-05}, - {82,82,2.08e-01}, - {82,65,3.65e-02}, - {82,80,-1.03e-02}, - {82,93,-1.03e-02}, - {82,101,3.65e-02}, - {82,115,-1.03e-02}, - {82,354,-9.67e-05}, - {82,369,-4.84e-05}, - {82,371,-3.87e-04}, - {82,382,-1.93e-04}, - {82,390,-9.67e-05}, - {82,404,-4.84e-05}, - {83,83,8.29e-02}, - {83,64,-1.03e-02}, - {83,66,-1.03e-02}, - {83,67,-1.03e-02}, - {83,81,-1.03e-02}, - {83,84,-1.03e-02}, - {83,100,-1.03e-02}, - {83,102,-1.03e-02}, - {83,103,-1.03e-02}, - {83,353,-4.84e-05}, - {83,355,-1.93e-04}, - {83,356,-4.84e-05}, - {83,370,-1.93e-04}, - {83,372,-7.74e-04}, - {83,373,-1.93e-04}, - {83,389,-4.84e-05}, - {83,391,-1.93e-04}, - {83,392,-4.84e-05}, - {84,84,8.29e-02}, - {84,66,-1.03e-02}, - {84,67,-1.03e-02}, - {84,68,-1.03e-02}, - {84,83,-1.03e-02}, - {84,85,-1.03e-02}, - {84,102,-1.03e-02}, - {84,103,-1.03e-02}, - {84,104,-1.03e-02}, - {84,355,-4.84e-05}, - {84,356,-1.93e-04}, - {84,357,-4.84e-05}, - {84,372,-1.93e-04}, - {84,373,-7.74e-04}, - {84,374,-1.93e-04}, - {84,391,-4.84e-05}, - {84,392,-1.93e-04}, - {84,393,-4.84e-05}, - {85,85,8.29e-02}, - {85,67,-1.03e-02}, - {85,68,-1.03e-02}, - {85,69,-1.03e-02}, - {85,84,-1.03e-02}, - {85,86,-1.03e-02}, - {85,103,-1.03e-02}, - {85,104,-1.03e-02}, - {85,105,-1.03e-02}, - {85,356,-4.84e-05}, - {85,357,-1.93e-04}, - {85,358,-4.84e-05}, - {85,373,-1.93e-04}, - {85,374,-7.74e-04}, - {85,375,-1.93e-04}, - {85,392,-4.84e-05}, - {85,393,-1.93e-04}, - {85,394,-4.84e-05}, - {86,86,8.29e-02}, - {86,68,-1.03e-02}, - {86,69,-1.03e-02}, - {86,70,-1.03e-02}, - {86,85,-1.03e-02}, - {86,87,-1.03e-02}, - {86,104,-1.03e-02}, - {86,105,-1.03e-02}, - {86,106,-1.03e-02}, - {86,357,-4.84e-05}, - {86,358,-1.93e-04}, - {86,359,-4.84e-05}, - {86,374,-1.93e-04}, - {86,375,-7.74e-04}, - {86,376,-1.93e-04}, - {86,393,-4.84e-05}, - {86,394,-1.93e-04}, - {86,395,-4.84e-05}, - {87,87,8.29e-02}, - {87,69,-1.03e-02}, - {87,70,-1.03e-02}, - {87,71,-1.03e-02}, - {87,86,-1.03e-02}, - {87,88,-1.03e-02}, - {87,105,-1.03e-02}, - {87,106,-1.03e-02}, - {87,107,-1.03e-02}, - {87,358,-4.84e-05}, - {87,359,-1.93e-04}, - {87,360,-4.84e-05}, - {87,375,-1.93e-04}, - {87,376,-7.74e-04}, - {87,377,-1.93e-04}, - {87,394,-4.84e-05}, - {87,395,-1.93e-04}, - {87,396,-4.84e-05}, - {88,88,8.29e-02}, - {88,70,-1.03e-02}, - {88,71,-1.03e-02}, - {88,72,-1.03e-02}, - {88,87,-1.03e-02}, - {88,89,-1.03e-02}, - {88,106,-1.03e-02}, - {88,107,-1.03e-02}, - {88,108,-1.03e-02}, - {88,359,-4.84e-05}, - {88,360,-1.93e-04}, - {88,361,-4.84e-05}, - {88,376,-1.93e-04}, - {88,377,-7.74e-04}, - {88,378,-1.93e-04}, - {88,395,-4.84e-05}, - {88,396,-1.93e-04}, - {88,397,-4.84e-05}, - {89,89,8.29e-02}, - {89,71,-1.03e-02}, - {89,72,-1.03e-02}, - {89,73,-1.03e-02}, - {89,88,-1.03e-02}, - {89,90,-1.03e-02}, - {89,107,-1.03e-02}, - {89,108,-1.03e-02}, - {89,109,-1.03e-02}, - {89,360,-4.84e-05}, - {89,361,-1.93e-04}, - {89,362,-4.84e-05}, - {89,377,-1.93e-04}, - {89,378,-7.74e-04}, - {89,379,-1.93e-04}, - {89,396,-4.84e-05}, - {89,397,-1.93e-04}, - {89,398,-4.84e-05}, - {90,90,8.29e-02}, - {90,72,-1.03e-02}, - {90,73,-1.03e-02}, - {90,89,-1.03e-02}, - {90,91,-1.03e-02}, - {90,92,-1.03e-02}, - {90,108,-1.03e-02}, - {90,109,-1.03e-02}, - {90,110,-1.03e-02}, - {90,361,-4.84e-05}, - {90,362,-1.93e-04}, - {90,378,-1.93e-04}, - {90,379,-7.74e-04}, - {90,380,-1.93e-04}, - {90,381,-4.84e-05}, - {90,397,-4.84e-05}, - {90,398,-1.93e-04}, - {90,399,-4.84e-05}, - {91,91,8.29e-02}, - {91,73,-1.03e-02}, - {91,90,-1.03e-02}, - {91,92,-1.03e-02}, - {91,109,-1.03e-02}, - {91,110,-1.03e-02}, - {91,111,-1.03e-02}, - {91,112,-1.03e-02}, - {91,113,-1.03e-02}, - {91,362,-4.84e-05}, - {91,379,-1.93e-04}, - {91,380,-7.74e-04}, - {91,381,-1.93e-04}, - {91,398,-4.84e-05}, - {91,399,-1.93e-04}, - {91,400,-4.84e-05}, - {91,401,-1.93e-04}, - {91,402,-4.84e-05}, - {92,92,8.29e-02}, - {92,73,-1.03e-02}, - {92,74,-1.03e-02}, - {92,90,-1.03e-02}, - {92,91,-1.03e-02}, - {92,99,-1.03e-02}, - {92,112,-1.03e-02}, - {92,113,-1.03e-02}, - {92,120,-1.03e-02}, - {92,362,-1.93e-04}, - {92,363,-4.84e-05}, - {92,379,-4.84e-05}, - {92,380,-1.93e-04}, - {92,381,-7.74e-04}, - {92,388,-1.93e-04}, - {92,401,-4.84e-05}, - {92,402,-1.93e-04}, - {92,409,-4.84e-05}, - {93,93,8.29e-02}, - {93,65,-1.03e-02}, - {93,79,-1.03e-02}, - {93,80,-1.03e-02}, - {93,82,-1.03e-02}, - {93,94,-1.03e-02}, - {93,101,-1.03e-02}, - {93,114,-1.03e-02}, - {93,115,-1.03e-02}, - {93,354,-4.84e-05}, - {93,368,-4.84e-05}, - {93,369,-1.93e-04}, - {93,371,-1.93e-04}, - {93,382,-7.74e-04}, - {93,383,-1.93e-04}, - {93,390,-4.84e-05}, - {93,403,-4.84e-05}, - {93,404,-1.93e-04}, - {94,94,8.29e-02}, - {94,78,-1.03e-02}, - {94,79,-1.03e-02}, - {94,80,-1.03e-02}, - {94,93,-1.03e-02}, - {94,95,-1.03e-02}, - {94,114,-1.03e-02}, - {94,115,-1.03e-02}, - {94,117,-1.03e-02}, - {94,367,-4.84e-05}, - {94,368,-1.93e-04}, - {94,369,-4.84e-05}, - {94,382,-1.93e-04}, - {94,383,-7.74e-04}, - {94,384,-1.93e-04}, - {94,403,-1.93e-04}, - {94,404,-4.84e-05}, - {94,406,-4.84e-05}, - {95,95,8.29e-02}, - {95,77,-1.03e-02}, - {95,78,-1.03e-02}, - {95,79,-1.03e-02}, - {95,94,-1.03e-02}, - {95,96,-1.03e-02}, - {95,114,-1.03e-02}, - {95,116,-1.03e-02}, - {95,117,-1.03e-02}, - {95,366,-4.84e-05}, - {95,367,-1.93e-04}, - {95,368,-4.84e-05}, - {95,383,-1.93e-04}, - {95,384,-7.74e-04}, - {95,385,-1.93e-04}, - {95,403,-4.84e-05}, - {95,405,-4.84e-05}, - {95,406,-1.93e-04}, - {96,96,8.29e-02}, - {96,76,-1.03e-02}, - {96,77,-1.03e-02}, - {96,78,-1.03e-02}, - {96,95,-1.03e-02}, - {96,97,-1.03e-02}, - {96,116,-1.03e-02}, - {96,117,-1.03e-02}, - {96,119,-1.03e-02}, - {96,365,-4.84e-05}, - {96,366,-1.93e-04}, - {96,367,-4.84e-05}, - {96,384,-1.93e-04}, - {96,385,-7.74e-04}, - {96,386,-1.93e-04}, - {96,405,-1.93e-04}, - {96,406,-4.84e-05}, - {96,408,-4.84e-05}, - {97,97,8.29e-02}, - {97,75,-1.03e-02}, - {97,76,-1.03e-02}, - {97,77,-1.03e-02}, - {97,96,-1.03e-02}, - {97,98,-1.03e-02}, - {97,116,-1.03e-02}, - {97,118,-1.03e-02}, - {97,119,-1.03e-02}, - {97,364,-4.84e-05}, - {97,365,-1.93e-04}, - {97,366,-4.84e-05}, - {97,385,-1.93e-04}, - {97,386,-7.74e-04}, - {97,387,-1.93e-04}, - {97,405,-4.84e-05}, - {97,407,-4.84e-05}, - {97,408,-1.93e-04}, - {98,98,8.29e-02}, - {98,74,-1.03e-02}, - {98,75,-1.03e-02}, - {98,76,-1.03e-02}, - {98,97,-1.03e-02}, - {98,99,-1.03e-02}, - {98,118,-1.03e-02}, - {98,119,-1.03e-02}, - {98,120,-1.03e-02}, - {98,363,-4.84e-05}, - {98,364,-1.93e-04}, - {98,365,-4.84e-05}, - {98,386,-1.93e-04}, - {98,387,-7.74e-04}, - {98,388,-1.93e-04}, - {98,407,-1.93e-04}, - {98,408,-4.84e-05}, - {98,409,-4.84e-05}, - {99,99,8.29e-02}, - {99,73,-1.03e-02}, - {99,74,-1.03e-02}, - {99,75,-1.03e-02}, - {99,92,-1.03e-02}, - {99,98,-1.03e-02}, - {99,113,-1.03e-02}, - {99,118,-1.03e-02}, - {99,120,-1.03e-02}, - {99,362,-4.84e-05}, - {99,363,-1.93e-04}, - {99,364,-4.84e-05}, - {99,381,-1.93e-04}, - {99,387,-1.93e-04}, - {99,388,-7.74e-04}, - {99,402,-4.84e-05}, - {99,407,-4.84e-05}, - {99,409,-1.93e-04}, - {100,100,2.08e-01}, - {100,81,3.65e-02}, - {100,83,-1.03e-02}, - {100,102,-1.03e-02}, - {100,121,3.65e-02}, - {100,123,-1.03e-02}, - {100,370,-9.67e-05}, - {100,372,-4.84e-05}, - {100,389,-3.87e-04}, - {100,391,-1.93e-04}, - {100,410,-9.67e-05}, - {100,412,-4.84e-05}, - {101,101,2.08e-01}, - {101,82,3.65e-02}, - {101,93,-1.03e-02}, - {101,115,-1.03e-02}, - {101,122,3.65e-02}, - {101,140,-1.03e-02}, - {101,371,-9.67e-05}, - {101,382,-4.84e-05}, - {101,390,-3.87e-04}, - {101,404,-1.93e-04}, - {101,411,-9.67e-05}, - {101,429,-4.84e-05}, - {102,102,8.29e-02}, - {102,81,-1.03e-02}, - {102,83,-1.03e-02}, - {102,84,-1.03e-02}, - {102,100,-1.03e-02}, - {102,103,-1.03e-02}, - {102,121,-1.03e-02}, - {102,123,-1.03e-02}, - {102,124,-1.03e-02}, - {102,370,-4.84e-05}, - {102,372,-1.93e-04}, - {102,373,-4.84e-05}, - {102,389,-1.93e-04}, - {102,391,-7.74e-04}, - {102,392,-1.93e-04}, - {102,410,-4.84e-05}, - {102,412,-1.93e-04}, - {102,413,-4.84e-05}, - {103,103,8.29e-02}, - {103,83,-1.03e-02}, - {103,84,-1.03e-02}, - {103,85,-1.03e-02}, - {103,102,-1.03e-02}, - {103,104,-1.03e-02}, - {103,123,-1.03e-02}, - {103,124,-1.03e-02}, - {103,125,-1.03e-02}, - {103,372,-4.84e-05}, - {103,373,-1.93e-04}, - {103,374,-4.84e-05}, - {103,391,-1.93e-04}, - {103,392,-7.74e-04}, - {103,393,-1.93e-04}, - {103,412,-4.84e-05}, - {103,413,-1.93e-04}, - {103,414,-4.84e-05}, - {104,104,8.29e-02}, - {104,84,-1.03e-02}, - {104,85,-1.03e-02}, - {104,86,-1.03e-02}, - {104,103,-1.03e-02}, - {104,105,-1.03e-02}, - {104,124,-1.03e-02}, - {104,125,-1.03e-02}, - {104,126,-1.03e-02}, - {104,373,-4.84e-05}, - {104,374,-1.93e-04}, - {104,375,-4.84e-05}, - {104,392,-1.93e-04}, - {104,393,-7.74e-04}, - {104,394,-1.93e-04}, - {104,413,-4.84e-05}, - {104,414,-1.93e-04}, - {104,415,-4.84e-05}, - {105,105,8.29e-02}, - {105,85,-1.03e-02}, - {105,86,-1.03e-02}, - {105,87,-1.03e-02}, - {105,104,-1.03e-02}, - {105,106,-1.03e-02}, - {105,125,-1.03e-02}, - {105,126,-1.03e-02}, - {105,127,-1.03e-02}, - {105,374,-4.84e-05}, - {105,375,-1.93e-04}, - {105,376,-4.84e-05}, - {105,393,-1.93e-04}, - {105,394,-7.74e-04}, - {105,395,-1.93e-04}, - {105,414,-4.84e-05}, - {105,415,-1.93e-04}, - {105,416,-4.84e-05}, - {106,106,8.29e-02}, - {106,86,-1.03e-02}, - {106,87,-1.03e-02}, - {106,88,-1.03e-02}, - {106,105,-1.03e-02}, - {106,107,-1.03e-02}, - {106,126,-1.03e-02}, - {106,127,-1.03e-02}, - {106,128,-1.03e-02}, - {106,375,-4.84e-05}, - {106,376,-1.93e-04}, - {106,377,-4.84e-05}, - {106,394,-1.93e-04}, - {106,395,-7.74e-04}, - {106,396,-1.93e-04}, - {106,415,-4.84e-05}, - {106,416,-1.93e-04}, - {106,417,-4.84e-05}, - {107,107,8.29e-02}, - {107,87,-1.03e-02}, - {107,88,-1.03e-02}, - {107,89,-1.03e-02}, - {107,106,-1.03e-02}, - {107,108,-1.03e-02}, - {107,127,-1.03e-02}, - {107,128,-1.03e-02}, - {107,129,-1.03e-02}, - {107,376,-4.84e-05}, - {107,377,-1.93e-04}, - {107,378,-4.84e-05}, - {107,395,-1.93e-04}, - {107,396,-7.74e-04}, - {107,397,-1.93e-04}, - {107,416,-4.84e-05}, - {107,417,-1.93e-04}, - {107,418,-4.84e-05}, - {108,108,8.29e-02}, - {108,88,-1.03e-02}, - {108,89,-1.03e-02}, - {108,90,-1.03e-02}, - {108,107,-1.03e-02}, - {108,109,-1.03e-02}, - {108,128,-1.03e-02}, - {108,129,-1.03e-02}, - {108,130,-1.03e-02}, - {108,377,-4.84e-05}, - {108,378,-1.93e-04}, - {108,379,-4.84e-05}, - {108,396,-1.93e-04}, - {108,397,-7.74e-04}, - {108,398,-1.93e-04}, - {108,417,-4.84e-05}, - {108,418,-1.93e-04}, - {108,419,-4.84e-05}, - {109,109,8.29e-02}, - {109,89,-1.03e-02}, - {109,90,-1.03e-02}, - {109,91,-1.03e-02}, - {109,108,-1.03e-02}, - {109,110,-1.03e-02}, - {109,129,-1.03e-02}, - {109,130,-1.03e-02}, - {109,131,-1.03e-02}, - {109,378,-4.84e-05}, - {109,379,-1.93e-04}, - {109,380,-4.84e-05}, - {109,397,-1.93e-04}, - {109,398,-7.74e-04}, - {109,399,-1.93e-04}, - {109,418,-4.84e-05}, - {109,419,-1.93e-04}, - {109,420,-4.84e-05}, - {110,110,8.29e-02}, - {110,90,-1.03e-02}, - {110,91,-1.03e-02}, - {110,109,-1.03e-02}, - {110,111,-1.03e-02}, - {110,112,-1.03e-02}, - {110,130,-1.03e-02}, - {110,131,-1.03e-02}, - {110,132,-1.03e-02}, - {110,379,-4.84e-05}, - {110,380,-1.93e-04}, - {110,398,-1.93e-04}, - {110,399,-7.74e-04}, - {110,400,-1.93e-04}, - {110,401,-4.84e-05}, - {110,419,-4.84e-05}, - {110,420,-1.93e-04}, - {110,421,-4.84e-05}, - {111,111,8.29e-02}, - {111,91,-1.03e-02}, - {111,110,-1.03e-02}, - {111,112,-1.03e-02}, - {111,131,-1.03e-02}, - {111,132,-1.03e-02}, - {111,133,-1.03e-02}, - {111,134,-1.03e-02}, - {111,135,-1.03e-02}, - {111,380,-4.84e-05}, - {111,399,-1.93e-04}, - {111,400,-7.74e-04}, - {111,401,-1.93e-04}, - {111,420,-4.84e-05}, - {111,421,-1.93e-04}, - {111,422,-4.84e-05}, - {111,423,-1.93e-04}, - {111,424,-4.84e-05}, - {112,112,8.29e-02}, - {112,91,-1.03e-02}, - {112,92,-1.03e-02}, - {112,110,-1.03e-02}, - {112,111,-1.03e-02}, - {112,113,-1.03e-02}, - {112,134,-1.03e-02}, - {112,135,-1.03e-02}, - {112,136,-1.03e-02}, - {112,380,-1.93e-04}, - {112,381,-4.84e-05}, - {112,399,-4.84e-05}, - {112,400,-1.93e-04}, - {112,401,-7.74e-04}, - {112,402,-1.93e-04}, - {112,423,-4.84e-05}, - {112,424,-1.93e-04}, - {112,425,-4.84e-05}, - {113,113,8.29e-02}, - {113,91,-1.03e-02}, - {113,92,-1.03e-02}, - {113,99,-1.03e-02}, - {113,112,-1.03e-02}, - {113,120,-1.03e-02}, - {113,135,-1.03e-02}, - {113,136,-1.03e-02}, - {113,141,-1.03e-02}, - {113,380,-4.84e-05}, - {113,381,-1.93e-04}, - {113,388,-4.84e-05}, - {113,401,-1.93e-04}, - {113,402,-7.74e-04}, - {113,409,-1.93e-04}, - {113,424,-4.84e-05}, - {113,425,-1.93e-04}, - {113,430,-4.84e-05}, - {114,114,8.29e-02}, - {114,93,-1.03e-02}, - {114,94,-1.03e-02}, - {114,95,-1.03e-02}, - {114,115,-1.03e-02}, - {114,117,-1.03e-02}, - {114,137,-1.03e-02}, - {114,138,-1.03e-02}, - {114,140,-1.03e-02}, - {114,382,-4.84e-05}, - {114,383,-1.93e-04}, - {114,384,-4.84e-05}, - {114,403,-7.74e-04}, - {114,404,-1.93e-04}, - {114,406,-1.93e-04}, - {114,426,-4.84e-05}, - {114,427,-1.93e-04}, - {114,429,-4.84e-05}, - {115,115,8.29e-02}, - {115,82,-1.03e-02}, - {115,93,-1.03e-02}, - {115,94,-1.03e-02}, - {115,101,-1.03e-02}, - {115,114,-1.03e-02}, - {115,122,-1.03e-02}, - {115,138,-1.03e-02}, - {115,140,-1.03e-02}, - {115,371,-4.84e-05}, - {115,382,-1.93e-04}, - {115,383,-4.84e-05}, - {115,390,-1.93e-04}, - {115,403,-1.93e-04}, - {115,404,-7.74e-04}, - {115,411,-4.84e-05}, - {115,427,-4.84e-05}, - {115,429,-1.93e-04}, - {116,116,8.29e-02}, - {116,95,-1.03e-02}, - {116,96,-1.03e-02}, - {116,97,-1.03e-02}, - {116,117,-1.03e-02}, - {116,119,-1.03e-02}, - {116,137,-1.03e-02}, - {116,139,-1.03e-02}, - {116,143,-1.03e-02}, - {116,384,-4.84e-05}, - {116,385,-1.93e-04}, - {116,386,-4.84e-05}, - {116,405,-7.74e-04}, - {116,406,-1.93e-04}, - {116,408,-1.93e-04}, - {116,426,-4.84e-05}, - {116,428,-1.93e-04}, - {116,432,-4.84e-05}, - {117,117,8.29e-02}, - {117,94,-1.03e-02}, - {117,95,-1.03e-02}, - {117,96,-1.03e-02}, - {117,114,-1.03e-02}, - {117,116,-1.03e-02}, - {117,137,-1.03e-02}, - {117,138,-1.03e-02}, - {117,139,-1.03e-02}, - {117,383,-4.84e-05}, - {117,384,-1.93e-04}, - {117,385,-4.84e-05}, - {117,403,-1.93e-04}, - {117,405,-1.93e-04}, - {117,406,-7.74e-04}, - {117,426,-1.93e-04}, - {117,427,-4.84e-05}, - {117,428,-4.84e-05}, - {118,118,8.29e-02}, - {118,97,-1.03e-02}, - {118,98,-1.03e-02}, - {118,99,-1.03e-02}, - {118,119,-1.03e-02}, - {118,120,-1.03e-02}, - {118,141,-1.03e-02}, - {118,142,-1.03e-02}, - {118,143,-1.03e-02}, - {118,386,-4.84e-05}, - {118,387,-1.93e-04}, - {118,388,-4.84e-05}, - {118,407,-7.74e-04}, - {118,408,-1.93e-04}, - {118,409,-1.93e-04}, - {118,430,-4.84e-05}, - {118,431,-1.93e-04}, - {118,432,-4.84e-05}, - {119,119,8.29e-02}, - {119,96,-1.03e-02}, - {119,97,-1.03e-02}, - {119,98,-1.03e-02}, - {119,116,-1.03e-02}, - {119,118,-1.03e-02}, - {119,139,-1.03e-02}, - {119,142,-1.03e-02}, - {119,143,-1.03e-02}, - {119,385,-4.84e-05}, - {119,386,-1.93e-04}, - {119,387,-4.84e-05}, - {119,405,-1.93e-04}, - {119,407,-1.93e-04}, - {119,408,-7.74e-04}, - {119,428,-4.84e-05}, - {119,431,-4.84e-05}, - {119,432,-1.93e-04}, - {120,120,8.29e-02}, - {120,92,-1.03e-02}, - {120,98,-1.03e-02}, - {120,99,-1.03e-02}, - {120,113,-1.03e-02}, - {120,118,-1.03e-02}, - {120,136,-1.03e-02}, - {120,141,-1.03e-02}, - {120,142,-1.03e-02}, - {120,381,-4.84e-05}, - {120,387,-4.84e-05}, - {120,388,-1.93e-04}, - {120,402,-1.93e-04}, - {120,407,-1.93e-04}, - {120,409,-7.74e-04}, - {120,425,-4.84e-05}, - {120,430,-1.93e-04}, - {120,431,-4.84e-05}, - {121,121,2.08e-01}, - {121,100,3.65e-02}, - {121,102,-1.03e-02}, - {121,123,-1.03e-02}, - {121,144,3.65e-02}, - {121,146,-1.03e-02}, - {121,389,-9.67e-05}, - {121,391,-4.84e-05}, - {121,410,-3.87e-04}, - {121,412,-1.93e-04}, - {121,433,-9.67e-05}, - {121,435,-4.84e-05}, - {122,122,2.08e-01}, - {122,101,3.65e-02}, - {122,115,-1.03e-02}, - {122,140,-1.03e-02}, - {122,145,3.65e-02}, - {122,165,-1.03e-02}, - {122,390,-9.67e-05}, - {122,404,-4.84e-05}, - {122,411,-3.87e-04}, - {122,429,-1.93e-04}, - {122,434,-9.67e-05}, - {122,454,-4.84e-05}, - {123,123,8.29e-02}, - {123,100,-1.03e-02}, - {123,102,-1.03e-02}, - {123,103,-1.03e-02}, - {123,121,-1.03e-02}, - {123,124,-1.03e-02}, - {123,144,-1.03e-02}, - {123,146,-1.03e-02}, - {123,147,-1.03e-02}, - {123,389,-4.84e-05}, - {123,391,-1.93e-04}, - {123,392,-4.84e-05}, - {123,410,-1.93e-04}, - {123,412,-7.74e-04}, - {123,413,-1.93e-04}, - {123,433,-4.84e-05}, - {123,435,-1.93e-04}, - {123,436,-4.84e-05}, - {124,124,8.29e-02}, - {124,102,-1.03e-02}, - {124,103,-1.03e-02}, - {124,104,-1.03e-02}, - {124,123,-1.03e-02}, - {124,125,-1.03e-02}, - {124,146,-1.03e-02}, - {124,147,-1.03e-02}, - {124,148,-1.03e-02}, - {124,391,-4.84e-05}, - {124,392,-1.93e-04}, - {124,393,-4.84e-05}, - {124,412,-1.93e-04}, - {124,413,-7.74e-04}, - {124,414,-1.93e-04}, - {124,435,-4.84e-05}, - {124,436,-1.93e-04}, - {124,437,-4.84e-05}, - {125,125,8.29e-02}, - {125,103,-1.03e-02}, - {125,104,-1.03e-02}, - {125,105,-1.03e-02}, - {125,124,-1.03e-02}, - {125,126,-1.03e-02}, - {125,147,-1.03e-02}, - {125,148,-1.03e-02}, - {125,149,-1.03e-02}, - {125,392,-4.84e-05}, - {125,393,-1.93e-04}, - {125,394,-4.84e-05}, - {125,413,-1.93e-04}, - {125,414,-7.74e-04}, - {125,415,-1.93e-04}, - {125,436,-4.84e-05}, - {125,437,-1.93e-04}, - {125,438,-4.84e-05}, - {126,126,8.29e-02}, - {126,104,-1.03e-02}, - {126,105,-1.03e-02}, - {126,106,-1.03e-02}, - {126,125,-1.03e-02}, - {126,127,-1.03e-02}, - {126,148,-1.03e-02}, - {126,149,-1.03e-02}, - {126,150,-1.03e-02}, - {126,393,-4.84e-05}, - {126,394,-1.93e-04}, - {126,395,-4.84e-05}, - {126,414,-1.93e-04}, - {126,415,-7.74e-04}, - {126,416,-1.93e-04}, - {126,437,-4.84e-05}, - {126,438,-1.93e-04}, - {126,439,-4.84e-05}, - {127,127,8.29e-02}, - {127,105,-1.03e-02}, - {127,106,-1.03e-02}, - {127,107,-1.03e-02}, - {127,126,-1.03e-02}, - {127,128,-1.03e-02}, - {127,149,-1.03e-02}, - {127,150,-1.03e-02}, - {127,151,-1.03e-02}, - {127,394,-4.84e-05}, - {127,395,-1.93e-04}, - {127,396,-4.84e-05}, - {127,415,-1.93e-04}, - {127,416,-7.74e-04}, - {127,417,-1.93e-04}, - {127,438,-4.84e-05}, - {127,439,-1.93e-04}, - {127,440,-4.84e-05}, - {128,128,8.29e-02}, - {128,106,-1.03e-02}, - {128,107,-1.03e-02}, - {128,108,-1.03e-02}, - {128,127,-1.03e-02}, - {128,129,-1.03e-02}, - {128,150,-1.03e-02}, - {128,151,-1.03e-02}, - {128,152,-1.03e-02}, - {128,395,-4.84e-05}, - {128,396,-1.93e-04}, - {128,397,-4.84e-05}, - {128,416,-1.93e-04}, - {128,417,-7.74e-04}, - {128,418,-1.93e-04}, - {128,439,-4.84e-05}, - {128,440,-1.93e-04}, - {128,441,-4.84e-05}, - {129,129,8.29e-02}, - {129,107,-1.03e-02}, - {129,108,-1.03e-02}, - {129,109,-1.03e-02}, - {129,128,-1.03e-02}, - {129,130,-1.03e-02}, - {129,151,-1.03e-02}, - {129,152,-1.03e-02}, - {129,153,-1.03e-02}, - {129,396,-4.84e-05}, - {129,397,-1.93e-04}, - {129,398,-4.84e-05}, - {129,417,-1.93e-04}, - {129,418,-7.74e-04}, - {129,419,-1.93e-04}, - {129,440,-4.84e-05}, - {129,441,-1.93e-04}, - {129,442,-4.84e-05}, - {130,130,8.29e-02}, - {130,108,-1.03e-02}, - {130,109,-1.03e-02}, - {130,110,-1.03e-02}, - {130,129,-1.03e-02}, - {130,131,-1.03e-02}, - {130,152,-1.03e-02}, - {130,153,-1.03e-02}, - {130,154,-1.03e-02}, - {130,397,-4.84e-05}, - {130,398,-1.93e-04}, - {130,399,-4.84e-05}, - {130,418,-1.93e-04}, - {130,419,-7.74e-04}, - {130,420,-1.93e-04}, - {130,441,-4.84e-05}, - {130,442,-1.93e-04}, - {130,443,-4.84e-05}, - {131,131,8.29e-02}, - {131,109,-1.03e-02}, - {131,110,-1.03e-02}, - {131,111,-1.03e-02}, - {131,130,-1.03e-02}, - {131,132,-1.03e-02}, - {131,153,-1.03e-02}, - {131,154,-1.03e-02}, - {131,155,-1.03e-02}, - {131,398,-4.84e-05}, - {131,399,-1.93e-04}, - {131,400,-4.84e-05}, - {131,419,-1.93e-04}, - {131,420,-7.74e-04}, - {131,421,-1.93e-04}, - {131,442,-4.84e-05}, - {131,443,-1.93e-04}, - {131,444,-4.84e-05}, - {132,132,8.29e-02}, - {132,110,-1.03e-02}, - {132,111,-1.03e-02}, - {132,131,-1.03e-02}, - {132,133,-1.03e-02}, - {132,134,-1.03e-02}, - {132,154,-1.03e-02}, - {132,155,-1.03e-02}, - {132,156,-1.03e-02}, - {132,399,-4.84e-05}, - {132,400,-1.93e-04}, - {132,420,-1.93e-04}, - {132,421,-7.74e-04}, - {132,422,-1.93e-04}, - {132,423,-4.84e-05}, - {132,443,-4.84e-05}, - {132,444,-1.93e-04}, - {132,445,-4.84e-05}, - {133,133,8.29e-02}, - {133,111,-1.03e-02}, - {133,132,-1.03e-02}, - {133,134,-1.03e-02}, - {133,155,-1.03e-02}, - {133,156,-1.03e-02}, - {133,157,-1.03e-02}, - {133,158,-1.03e-02}, - {133,159,-1.03e-02}, - {133,400,-4.84e-05}, - {133,421,-1.93e-04}, - {133,422,-7.74e-04}, - {133,423,-1.93e-04}, - {133,444,-4.84e-05}, - {133,445,-1.93e-04}, - {133,446,-4.84e-05}, - {133,447,-1.93e-04}, - {133,448,-4.84e-05}, - {134,134,8.29e-02}, - {134,111,-1.03e-02}, - {134,112,-1.03e-02}, - {134,132,-1.03e-02}, - {134,133,-1.03e-02}, - {134,135,-1.03e-02}, - {134,158,-1.03e-02}, - {134,159,-1.03e-02}, - {134,160,-1.03e-02}, - {134,400,-1.93e-04}, - {134,401,-4.84e-05}, - {134,421,-4.84e-05}, - {134,422,-1.93e-04}, - {134,423,-7.74e-04}, - {134,424,-1.93e-04}, - {134,447,-4.84e-05}, - {134,448,-1.93e-04}, - {134,449,-4.84e-05}, - {135,135,8.29e-02}, - {135,111,-1.03e-02}, - {135,112,-1.03e-02}, - {135,113,-1.03e-02}, - {135,134,-1.03e-02}, - {135,136,-1.03e-02}, - {135,159,-1.03e-02}, - {135,160,-1.03e-02}, - {135,161,-1.03e-02}, - {135,400,-4.84e-05}, - {135,401,-1.93e-04}, - {135,402,-4.84e-05}, - {135,423,-1.93e-04}, - {135,424,-7.74e-04}, - {135,425,-1.93e-04}, - {135,448,-4.84e-05}, - {135,449,-1.93e-04}, - {135,450,-4.84e-05}, - {136,136,8.29e-02}, - {136,112,-1.03e-02}, - {136,113,-1.03e-02}, - {136,120,-1.03e-02}, - {136,135,-1.03e-02}, - {136,141,-1.03e-02}, - {136,160,-1.03e-02}, - {136,161,-1.03e-02}, - {136,166,-1.03e-02}, - {136,401,-4.84e-05}, - {136,402,-1.93e-04}, - {136,409,-4.84e-05}, - {136,424,-1.93e-04}, - {136,425,-7.74e-04}, - {136,430,-1.93e-04}, - {136,449,-4.84e-05}, - {136,450,-1.93e-04}, - {136,455,-4.84e-05}, - {137,137,8.29e-02}, - {137,114,-1.03e-02}, - {137,116,-1.03e-02}, - {137,117,-1.03e-02}, - {137,138,-1.03e-02}, - {137,139,-1.03e-02}, - {137,162,-1.03e-02}, - {137,163,-1.03e-02}, - {137,164,-1.03e-02}, - {137,403,-4.84e-05}, - {137,405,-4.84e-05}, - {137,406,-1.93e-04}, - {137,426,-7.74e-04}, - {137,427,-1.93e-04}, - {137,428,-1.93e-04}, - {137,451,-4.84e-05}, - {137,452,-1.93e-04}, - {137,453,-4.84e-05}, - {138,138,8.29e-02}, - {138,114,-1.03e-02}, - {138,115,-1.03e-02}, - {138,117,-1.03e-02}, - {138,137,-1.03e-02}, - {138,140,-1.03e-02}, - {138,163,-1.03e-02}, - {138,164,-1.03e-02}, - {138,165,-1.03e-02}, - {138,403,-1.93e-04}, - {138,404,-4.84e-05}, - {138,406,-4.84e-05}, - {138,426,-1.93e-04}, - {138,427,-7.74e-04}, - {138,429,-1.93e-04}, - {138,452,-4.84e-05}, - {138,453,-1.93e-04}, - {138,454,-4.84e-05}, - {139,139,8.29e-02}, - {139,116,-1.03e-02}, - {139,117,-1.03e-02}, - {139,119,-1.03e-02}, - {139,137,-1.03e-02}, - {139,143,-1.03e-02}, - {139,162,-1.03e-02}, - {139,163,-1.03e-02}, - {139,168,-1.03e-02}, - {139,405,-1.93e-04}, - {139,406,-4.84e-05}, - {139,408,-4.84e-05}, - {139,426,-1.93e-04}, - {139,428,-7.74e-04}, - {139,432,-1.93e-04}, - {139,451,-1.93e-04}, - {139,452,-4.84e-05}, - {139,457,-4.84e-05}, - {140,140,8.29e-02}, - {140,101,-1.03e-02}, - {140,114,-1.03e-02}, - {140,115,-1.03e-02}, - {140,122,-1.03e-02}, - {140,138,-1.03e-02}, - {140,145,-1.03e-02}, - {140,164,-1.03e-02}, - {140,165,-1.03e-02}, - {140,390,-4.84e-05}, - {140,403,-4.84e-05}, - {140,404,-1.93e-04}, - {140,411,-1.93e-04}, - {140,427,-1.93e-04}, - {140,429,-7.74e-04}, - {140,434,-4.84e-05}, - {140,453,-4.84e-05}, - {140,454,-1.93e-04}, - {141,141,8.29e-02}, - {141,113,-1.03e-02}, - {141,118,-1.03e-02}, - {141,120,-1.03e-02}, - {141,136,-1.03e-02}, - {141,142,-1.03e-02}, - {141,161,-1.03e-02}, - {141,166,-1.03e-02}, - {141,167,-1.03e-02}, - {141,402,-4.84e-05}, - {141,407,-4.84e-05}, - {141,409,-1.93e-04}, - {141,425,-1.93e-04}, - {141,430,-7.74e-04}, - {141,431,-1.93e-04}, - {141,450,-4.84e-05}, - {141,455,-1.93e-04}, - {141,456,-4.84e-05}, - {142,142,8.29e-02}, - {142,118,-1.03e-02}, - {142,119,-1.03e-02}, - {142,120,-1.03e-02}, - {142,141,-1.03e-02}, - {142,143,-1.03e-02}, - {142,166,-1.03e-02}, - {142,167,-1.03e-02}, - {142,168,-1.03e-02}, - {142,407,-1.93e-04}, - {142,408,-4.84e-05}, - {142,409,-4.84e-05}, - {142,430,-1.93e-04}, - {142,431,-7.74e-04}, - {142,432,-1.93e-04}, - {142,455,-4.84e-05}, - {142,456,-1.93e-04}, - {142,457,-4.84e-05}, - {143,143,8.29e-02}, - {143,116,-1.03e-02}, - {143,118,-1.03e-02}, - {143,119,-1.03e-02}, - {143,139,-1.03e-02}, - {143,142,-1.03e-02}, - {143,162,-1.03e-02}, - {143,167,-1.03e-02}, - {143,168,-1.03e-02}, - {143,405,-4.84e-05}, - {143,407,-4.84e-05}, - {143,408,-1.93e-04}, - {143,428,-1.93e-04}, - {143,431,-1.93e-04}, - {143,432,-7.74e-04}, - {143,451,-4.84e-05}, - {143,456,-4.84e-05}, - {143,457,-1.93e-04}, - {144,144,2.08e-01}, - {144,121,3.65e-02}, - {144,123,-1.03e-02}, - {144,146,-1.03e-02}, - {144,169,3.65e-02}, - {144,171,-1.03e-02}, - {144,410,-9.67e-05}, - {144,412,-4.84e-05}, - {144,433,-3.87e-04}, - {144,435,-1.93e-04}, - {144,458,-9.67e-05}, - {144,460,-4.84e-05}, - {145,145,2.08e-01}, - {145,122,3.65e-02}, - {145,140,-1.03e-02}, - {145,165,-1.03e-02}, - {145,170,3.65e-02}, - {145,193,-1.03e-02}, - {145,411,-9.67e-05}, - {145,429,-4.84e-05}, - {145,434,-3.87e-04}, - {145,454,-1.93e-04}, - {145,459,-9.67e-05}, - {145,482,-4.84e-05}, - {146,146,8.29e-02}, - {146,121,-1.03e-02}, - {146,123,-1.03e-02}, - {146,124,-1.03e-02}, - {146,144,-1.03e-02}, - {146,147,-1.03e-02}, - {146,169,-1.03e-02}, - {146,171,-1.03e-02}, - {146,172,-1.03e-02}, - {146,410,-4.84e-05}, - {146,412,-1.93e-04}, - {146,413,-4.84e-05}, - {146,433,-1.93e-04}, - {146,435,-7.74e-04}, - {146,436,-1.93e-04}, - {146,458,-4.84e-05}, - {146,460,-1.93e-04}, - {146,461,-4.84e-05}, - {147,147,8.29e-02}, - {147,123,-1.03e-02}, - {147,124,-1.03e-02}, - {147,125,-1.03e-02}, - {147,146,-1.03e-02}, - {147,148,-1.03e-02}, - {147,171,-1.03e-02}, - {147,172,-1.03e-02}, - {147,173,-1.03e-02}, - {147,412,-4.84e-05}, - {147,413,-1.93e-04}, - {147,414,-4.84e-05}, - {147,435,-1.93e-04}, - {147,436,-7.74e-04}, - {147,437,-1.93e-04}, - {147,460,-4.84e-05}, - {147,461,-1.93e-04}, - {147,462,-4.84e-05}, - {148,148,8.29e-02}, - {148,124,-1.03e-02}, - {148,125,-1.03e-02}, - {148,126,-1.03e-02}, - {148,147,-1.03e-02}, - {148,149,-1.03e-02}, - {148,172,-1.03e-02}, - {148,173,-1.03e-02}, - {148,174,-1.03e-02}, - {148,413,-4.84e-05}, - {148,414,-1.93e-04}, - {148,415,-4.84e-05}, - {148,436,-1.93e-04}, - {148,437,-7.74e-04}, - {148,438,-1.93e-04}, - {148,461,-4.84e-05}, - {148,462,-1.93e-04}, - {148,463,-4.84e-05}, - {149,149,8.29e-02}, - {149,125,-1.03e-02}, - {149,126,-1.03e-02}, - {149,127,-1.03e-02}, - {149,148,-1.03e-02}, - {149,150,-1.03e-02}, - {149,173,-1.03e-02}, - {149,174,-1.03e-02}, - {149,175,-1.03e-02}, - {149,414,-4.84e-05}, - {149,415,-1.93e-04}, - {149,416,-4.84e-05}, - {149,437,-1.93e-04}, - {149,438,-7.74e-04}, - {149,439,-1.93e-04}, - {149,462,-4.84e-05}, - {149,463,-1.93e-04}, - {149,464,-4.84e-05}, - {150,150,8.29e-02}, - {150,126,-1.03e-02}, - {150,127,-1.03e-02}, - {150,128,-1.03e-02}, - {150,149,-1.03e-02}, - {150,151,-1.03e-02}, - {150,174,-1.03e-02}, - {150,175,-1.03e-02}, - {150,176,-1.03e-02}, - {150,415,-4.84e-05}, - {150,416,-1.93e-04}, - {150,417,-4.84e-05}, - {150,438,-1.93e-04}, - {150,439,-7.74e-04}, - {150,440,-1.93e-04}, - {150,463,-4.84e-05}, - {150,464,-1.93e-04}, - {150,465,-4.84e-05}, - {151,151,8.29e-02}, - {151,127,-1.03e-02}, - {151,128,-1.03e-02}, - {151,129,-1.03e-02}, - {151,150,-1.03e-02}, - {151,152,-1.03e-02}, - {151,175,-1.03e-02}, - {151,176,-1.03e-02}, - {151,177,-1.03e-02}, - {151,416,-4.84e-05}, - {151,417,-1.93e-04}, - {151,418,-4.84e-05}, - {151,439,-1.93e-04}, - {151,440,-7.74e-04}, - {151,441,-1.93e-04}, - {151,464,-4.84e-05}, - {151,465,-1.93e-04}, - {151,466,-4.84e-05}, - {152,152,8.29e-02}, - {152,128,-1.03e-02}, - {152,129,-1.03e-02}, - {152,130,-1.03e-02}, - {152,151,-1.03e-02}, - {152,153,-1.03e-02}, - {152,176,-1.03e-02}, - {152,177,-1.03e-02}, - {152,178,-1.03e-02}, - {152,417,-4.84e-05}, - {152,418,-1.93e-04}, - {152,419,-4.84e-05}, - {152,440,-1.93e-04}, - {152,441,-7.74e-04}, - {152,442,-1.93e-04}, - {152,465,-4.84e-05}, - {152,466,-1.93e-04}, - {152,467,-4.84e-05}, - {153,153,8.29e-02}, - {153,129,-1.03e-02}, - {153,130,-1.03e-02}, - {153,131,-1.03e-02}, - {153,152,-1.03e-02}, - {153,154,-1.03e-02}, - {153,177,-1.03e-02}, - {153,178,-1.03e-02}, - {153,179,-1.03e-02}, - {153,418,-4.84e-05}, - {153,419,-1.93e-04}, - {153,420,-4.84e-05}, - {153,441,-1.93e-04}, - {153,442,-7.74e-04}, - {153,443,-1.93e-04}, - {153,466,-4.84e-05}, - {153,467,-1.93e-04}, - {153,468,-4.84e-05}, - {154,154,8.29e-02}, - {154,130,-1.03e-02}, - {154,131,-1.03e-02}, - {154,132,-1.03e-02}, - {154,153,-1.03e-02}, - {154,155,-1.03e-02}, - {154,178,-1.03e-02}, - {154,179,-1.03e-02}, - {154,180,-1.03e-02}, - {154,419,-4.84e-05}, - {154,420,-1.93e-04}, - {154,421,-4.84e-05}, - {154,442,-1.93e-04}, - {154,443,-7.74e-04}, - {154,444,-1.93e-04}, - {154,467,-4.84e-05}, - {154,468,-1.93e-04}, - {154,469,-4.84e-05}, - {155,155,8.29e-02}, - {155,131,-1.03e-02}, - {155,132,-1.03e-02}, - {155,133,-1.03e-02}, - {155,154,-1.03e-02}, - {155,156,-1.03e-02}, - {155,179,-1.03e-02}, - {155,180,-1.03e-02}, - {155,181,-1.03e-02}, - {155,420,-4.84e-05}, - {155,421,-1.93e-04}, - {155,422,-4.84e-05}, - {155,443,-1.93e-04}, - {155,444,-7.74e-04}, - {155,445,-1.93e-04}, - {155,468,-4.84e-05}, - {155,469,-1.93e-04}, - {155,470,-4.84e-05}, - {156,156,8.29e-02}, - {156,132,-1.03e-02}, - {156,133,-1.03e-02}, - {156,155,-1.03e-02}, - {156,157,-1.03e-02}, - {156,158,-1.03e-02}, - {156,180,-1.03e-02}, - {156,181,-1.03e-02}, - {156,182,-1.03e-02}, - {156,421,-4.84e-05}, - {156,422,-1.93e-04}, - {156,444,-1.93e-04}, - {156,445,-7.74e-04}, - {156,446,-1.93e-04}, - {156,447,-4.84e-05}, - {156,469,-4.84e-05}, - {156,470,-1.93e-04}, - {156,471,-4.84e-05}, - {157,157,8.29e-02}, - {157,133,-1.03e-02}, - {157,156,-1.03e-02}, - {157,158,-1.03e-02}, - {157,181,-1.03e-02}, - {157,182,-1.03e-02}, - {157,183,-1.03e-02}, - {157,184,-1.03e-02}, - {157,188,-1.03e-02}, - {157,422,-4.84e-05}, - {157,445,-1.93e-04}, - {157,446,-7.74e-04}, - {157,447,-1.93e-04}, - {157,470,-4.84e-05}, - {157,471,-1.93e-04}, - {157,472,-4.84e-05}, - {157,473,-1.93e-04}, - {157,477,-4.84e-05}, - {158,158,8.29e-02}, - {158,133,-1.03e-02}, - {158,134,-1.03e-02}, - {158,156,-1.03e-02}, - {158,157,-1.03e-02}, - {158,159,-1.03e-02}, - {158,184,-1.03e-02}, - {158,187,-1.03e-02}, - {158,188,-1.03e-02}, - {158,422,-1.93e-04}, - {158,423,-4.84e-05}, - {158,445,-4.84e-05}, - {158,446,-1.93e-04}, - {158,447,-7.74e-04}, - {158,448,-1.93e-04}, - {158,473,-4.84e-05}, - {158,476,-4.84e-05}, - {158,477,-1.93e-04}, - {159,159,8.29e-02}, - {159,133,-1.03e-02}, - {159,134,-1.03e-02}, - {159,135,-1.03e-02}, - {159,158,-1.03e-02}, - {159,160,-1.03e-02}, - {159,185,-1.03e-02}, - {159,187,-1.03e-02}, - {159,188,-1.03e-02}, - {159,422,-4.84e-05}, - {159,423,-1.93e-04}, - {159,424,-4.84e-05}, - {159,447,-1.93e-04}, - {159,448,-7.74e-04}, - {159,449,-1.93e-04}, - {159,474,-4.84e-05}, - {159,476,-1.93e-04}, - {159,477,-4.84e-05}, - {160,160,8.29e-02}, - {160,134,-1.03e-02}, - {160,135,-1.03e-02}, - {160,136,-1.03e-02}, - {160,159,-1.03e-02}, - {160,161,-1.03e-02}, - {160,185,-1.03e-02}, - {160,186,-1.03e-02}, - {160,187,-1.03e-02}, - {160,423,-4.84e-05}, - {160,424,-1.93e-04}, - {160,425,-4.84e-05}, - {160,448,-1.93e-04}, - {160,449,-7.74e-04}, - {160,450,-1.93e-04}, - {160,474,-1.93e-04}, - {160,475,-4.84e-05}, - {160,476,-4.84e-05}, - {161,161,8.29e-02}, - {161,135,-1.03e-02}, - {161,136,-1.03e-02}, - {161,141,-1.03e-02}, - {161,160,-1.03e-02}, - {161,166,-1.03e-02}, - {161,185,-1.03e-02}, - {161,186,-1.03e-02}, - {161,192,-1.03e-02}, - {161,424,-4.84e-05}, - {161,425,-1.93e-04}, - {161,430,-4.84e-05}, - {161,449,-1.93e-04}, - {161,450,-7.74e-04}, - {161,455,-1.93e-04}, - {161,474,-4.84e-05}, - {161,475,-1.93e-04}, - {161,481,-4.84e-05}, - {162,162,8.29e-02}, - {162,137,-1.03e-02}, - {162,139,-1.03e-02}, - {162,143,-1.03e-02}, - {162,163,-1.03e-02}, - {162,168,-1.03e-02}, - {162,189,-1.03e-02}, - {162,190,-1.03e-02}, - {162,195,-1.03e-02}, - {162,426,-4.84e-05}, - {162,428,-1.93e-04}, - {162,432,-4.84e-05}, - {162,451,-7.74e-04}, - {162,452,-1.93e-04}, - {162,457,-1.93e-04}, - {162,478,-4.84e-05}, - {162,479,-1.93e-04}, - {162,484,-4.84e-05}, - {163,163,8.29e-02}, - {163,137,-1.03e-02}, - {163,138,-1.03e-02}, - {163,139,-1.03e-02}, - {163,162,-1.03e-02}, - {163,164,-1.03e-02}, - {163,190,-1.03e-02}, - {163,194,-1.03e-02}, - {163,195,-1.03e-02}, - {163,426,-1.93e-04}, - {163,427,-4.84e-05}, - {163,428,-4.84e-05}, - {163,451,-1.93e-04}, - {163,452,-7.74e-04}, - {163,453,-1.93e-04}, - {163,479,-4.84e-05}, - {163,483,-4.84e-05}, - {163,484,-1.93e-04}, - {164,164,8.29e-02}, - {164,137,-1.03e-02}, - {164,138,-1.03e-02}, - {164,140,-1.03e-02}, - {164,163,-1.03e-02}, - {164,165,-1.03e-02}, - {164,193,-1.03e-02}, - {164,194,-1.03e-02}, - {164,195,-1.03e-02}, - {164,426,-4.84e-05}, - {164,427,-1.93e-04}, - {164,429,-4.84e-05}, - {164,452,-1.93e-04}, - {164,453,-7.74e-04}, - {164,454,-1.93e-04}, - {164,482,-4.84e-05}, - {164,483,-1.93e-04}, - {164,484,-4.84e-05}, - {165,165,8.29e-02}, - {165,122,-1.03e-02}, - {165,138,-1.03e-02}, - {165,140,-1.03e-02}, - {165,145,-1.03e-02}, - {165,164,-1.03e-02}, - {165,170,-1.03e-02}, - {165,193,-1.03e-02}, - {165,194,-1.03e-02}, - {165,411,-4.84e-05}, - {165,427,-4.84e-05}, - {165,429,-1.93e-04}, - {165,434,-1.93e-04}, - {165,453,-1.93e-04}, - {165,454,-7.74e-04}, - {165,459,-4.84e-05}, - {165,482,-1.93e-04}, - {165,483,-4.84e-05}, - {166,166,8.29e-02}, - {166,136,-1.03e-02}, - {166,141,-1.03e-02}, - {166,142,-1.03e-02}, - {166,161,-1.03e-02}, - {166,167,-1.03e-02}, - {166,186,-1.03e-02}, - {166,191,-1.03e-02}, - {166,192,-1.03e-02}, - {166,425,-4.84e-05}, - {166,430,-1.93e-04}, - {166,431,-4.84e-05}, - {166,450,-1.93e-04}, - {166,455,-7.74e-04}, - {166,456,-1.93e-04}, - {166,475,-4.84e-05}, - {166,480,-4.84e-05}, - {166,481,-1.93e-04}, - {167,167,8.29e-02}, - {167,141,-1.03e-02}, - {167,142,-1.03e-02}, - {167,143,-1.03e-02}, - {167,166,-1.03e-02}, - {167,168,-1.03e-02}, - {167,189,-1.03e-02}, - {167,191,-1.03e-02}, - {167,192,-1.03e-02}, - {167,430,-4.84e-05}, - {167,431,-1.93e-04}, - {167,432,-4.84e-05}, - {167,455,-1.93e-04}, - {167,456,-7.74e-04}, - {167,457,-1.93e-04}, - {167,478,-4.84e-05}, - {167,480,-1.93e-04}, - {167,481,-4.84e-05}, - {168,168,8.29e-02}, - {168,139,-1.03e-02}, - {168,142,-1.03e-02}, - {168,143,-1.03e-02}, - {168,162,-1.03e-02}, - {168,167,-1.03e-02}, - {168,189,-1.03e-02}, - {168,190,-1.03e-02}, - {168,191,-1.03e-02}, - {168,428,-4.84e-05}, - {168,431,-4.84e-05}, - {168,432,-1.93e-04}, - {168,451,-1.93e-04}, - {168,456,-1.93e-04}, - {168,457,-7.74e-04}, - {168,478,-1.93e-04}, - {168,479,-4.84e-05}, - {168,480,-4.84e-05}, - {169,169,2.08e-01}, - {169,144,3.65e-02}, - {169,146,-1.03e-02}, - {169,171,-1.03e-02}, - {169,196,3.65e-02}, - {169,198,-1.03e-02}, - {169,433,-9.67e-05}, - {169,435,-4.84e-05}, - {169,458,-3.87e-04}, - {169,460,-1.93e-04}, - {169,485,-9.67e-05}, - {169,487,-4.84e-05}, - {170,170,2.08e-01}, - {170,145,3.65e-02}, - {170,165,-1.03e-02}, - {170,193,-1.03e-02}, - {170,197,3.65e-02}, - {170,223,-1.03e-02}, - {170,434,-9.67e-05}, - {170,454,-4.84e-05}, - {170,459,-3.87e-04}, - {170,482,-1.93e-04}, - {170,486,-9.67e-05}, - {170,512,-4.84e-05}, - {171,171,8.29e-02}, - {171,144,-1.03e-02}, - {171,146,-1.03e-02}, - {171,147,-1.03e-02}, - {171,169,-1.03e-02}, - {171,172,-1.03e-02}, - {171,196,-1.03e-02}, - {171,198,-1.03e-02}, - {171,199,-1.03e-02}, - {171,433,-4.84e-05}, - {171,435,-1.93e-04}, - {171,436,-4.84e-05}, - {171,458,-1.93e-04}, - {171,460,-7.74e-04}, - {171,461,-1.93e-04}, - {171,485,-4.84e-05}, - {171,487,-1.93e-04}, - {171,488,-4.84e-05}, - {172,172,8.29e-02}, - {172,146,-1.03e-02}, - {172,147,-1.03e-02}, - {172,148,-1.03e-02}, - {172,171,-1.03e-02}, - {172,173,-1.03e-02}, - {172,198,-1.03e-02}, - {172,199,-1.03e-02}, - {172,200,-1.03e-02}, - {172,435,-4.84e-05}, - {172,436,-1.93e-04}, - {172,437,-4.84e-05}, - {172,460,-1.93e-04}, - {172,461,-7.74e-04}, - {172,462,-1.93e-04}, - {172,487,-4.84e-05}, - {172,488,-1.93e-04}, - {172,489,-4.84e-05}, - {173,173,8.29e-02}, - {173,147,-1.03e-02}, - {173,148,-1.03e-02}, - {173,149,-1.03e-02}, - {173,172,-1.03e-02}, - {173,174,-1.03e-02}, - {173,199,-1.03e-02}, - {173,200,-1.03e-02}, - {173,201,-1.03e-02}, - {173,436,-4.84e-05}, - {173,437,-1.93e-04}, - {173,438,-4.84e-05}, - {173,461,-1.93e-04}, - {173,462,-7.74e-04}, - {173,463,-1.93e-04}, - {173,488,-4.84e-05}, - {173,489,-1.93e-04}, - {173,490,-4.84e-05}, - {174,174,8.29e-02}, - {174,148,-1.03e-02}, - {174,149,-1.03e-02}, - {174,150,-1.03e-02}, - {174,173,-1.03e-02}, - {174,175,-1.03e-02}, - {174,200,-1.03e-02}, - {174,201,-1.03e-02}, - {174,202,-1.03e-02}, - {174,437,-4.84e-05}, - {174,438,-1.93e-04}, - {174,439,-4.84e-05}, - {174,462,-1.93e-04}, - {174,463,-7.74e-04}, - {174,464,-1.93e-04}, - {174,489,-4.84e-05}, - {174,490,-1.93e-04}, - {174,491,-4.84e-05}, - {175,175,8.29e-02}, - {175,149,-1.03e-02}, - {175,150,-1.03e-02}, - {175,151,-1.03e-02}, - {175,174,-1.03e-02}, - {175,176,-1.03e-02}, - {175,201,-1.03e-02}, - {175,202,-1.03e-02}, - {175,203,-1.03e-02}, - {175,438,-4.84e-05}, - {175,439,-1.93e-04}, - {175,440,-4.84e-05}, - {175,463,-1.93e-04}, - {175,464,-7.74e-04}, - {175,465,-1.93e-04}, - {175,490,-4.84e-05}, - {175,491,-1.93e-04}, - {175,492,-4.84e-05}, - {176,176,8.29e-02}, - {176,150,-1.03e-02}, - {176,151,-1.03e-02}, - {176,152,-1.03e-02}, - {176,175,-1.03e-02}, - {176,177,-1.03e-02}, - {176,202,-1.03e-02}, - {176,203,-1.03e-02}, - {176,204,-1.03e-02}, - {176,439,-4.84e-05}, - {176,440,-1.93e-04}, - {176,441,-4.84e-05}, - {176,464,-1.93e-04}, - {176,465,-7.74e-04}, - {176,466,-1.93e-04}, - {176,491,-4.84e-05}, - {176,492,-1.93e-04}, - {176,493,-4.84e-05}, - {177,177,8.29e-02}, - {177,151,-1.03e-02}, - {177,152,-1.03e-02}, - {177,153,-1.03e-02}, - {177,176,-1.03e-02}, - {177,178,-1.03e-02}, - {177,203,-1.03e-02}, - {177,204,-1.03e-02}, - {177,205,-1.03e-02}, - {177,440,-4.84e-05}, - {177,441,-1.93e-04}, - {177,442,-4.84e-05}, - {177,465,-1.93e-04}, - {177,466,-7.74e-04}, - {177,467,-1.93e-04}, - {177,492,-4.84e-05}, - {177,493,-1.93e-04}, - {177,494,-4.84e-05}, - {178,178,8.29e-02}, - {178,152,-1.03e-02}, - {178,153,-1.03e-02}, - {178,154,-1.03e-02}, - {178,177,-1.03e-02}, - {178,179,-1.03e-02}, - {178,204,-1.03e-02}, - {178,205,-1.03e-02}, - {178,206,-1.03e-02}, - {178,441,-4.84e-05}, - {178,442,-1.93e-04}, - {178,443,-4.84e-05}, - {178,466,-1.93e-04}, - {178,467,-7.74e-04}, - {178,468,-1.93e-04}, - {178,493,-4.84e-05}, - {178,494,-1.93e-04}, - {178,495,-4.84e-05}, - {179,179,8.29e-02}, - {179,153,-1.03e-02}, - {179,154,-1.03e-02}, - {179,155,-1.03e-02}, - {179,178,-1.03e-02}, - {179,180,-1.03e-02}, - {179,205,-1.03e-02}, - {179,206,-1.03e-02}, - {179,207,-1.03e-02}, - {179,442,-4.84e-05}, - {179,443,-1.93e-04}, - {179,444,-4.84e-05}, - {179,467,-1.93e-04}, - {179,468,-7.74e-04}, - {179,469,-1.93e-04}, - {179,494,-4.84e-05}, - {179,495,-1.93e-04}, - {179,496,-4.84e-05}, - {180,180,8.29e-02}, - {180,154,-1.03e-02}, - {180,155,-1.03e-02}, - {180,156,-1.03e-02}, - {180,179,-1.03e-02}, - {180,181,-1.03e-02}, - {180,206,-1.03e-02}, - {180,207,-1.03e-02}, - {180,208,-1.03e-02}, - {180,443,-4.84e-05}, - {180,444,-1.93e-04}, - {180,445,-4.84e-05}, - {180,468,-1.93e-04}, - {180,469,-7.74e-04}, - {180,470,-1.93e-04}, - {180,495,-4.84e-05}, - {180,496,-1.93e-04}, - {180,497,-4.84e-05}, - {181,181,8.29e-02}, - {181,155,-1.03e-02}, - {181,156,-1.03e-02}, - {181,157,-1.03e-02}, - {181,180,-1.03e-02}, - {181,182,-1.03e-02}, - {181,207,-1.03e-02}, - {181,208,-1.03e-02}, - {181,209,-1.03e-02}, - {181,444,-4.84e-05}, - {181,445,-1.93e-04}, - {181,446,-4.84e-05}, - {181,469,-1.93e-04}, - {181,470,-7.74e-04}, - {181,471,-1.93e-04}, - {181,496,-4.84e-05}, - {181,497,-1.93e-04}, - {181,498,-4.84e-05}, - {182,182,8.29e-02}, - {182,156,-1.03e-02}, - {182,157,-1.03e-02}, - {182,181,-1.03e-02}, - {182,183,-1.03e-02}, - {182,184,-1.03e-02}, - {182,208,-1.03e-02}, - {182,209,-1.03e-02}, - {182,210,-1.03e-02}, - {182,445,-4.84e-05}, - {182,446,-1.93e-04}, - {182,470,-1.93e-04}, - {182,471,-7.74e-04}, - {182,472,-1.93e-04}, - {182,473,-4.84e-05}, - {182,497,-4.84e-05}, - {182,498,-1.93e-04}, - {182,499,-4.84e-05}, - {183,183,8.29e-02}, - {183,157,-1.03e-02}, - {183,182,-1.03e-02}, - {183,184,-1.03e-02}, - {183,209,-1.03e-02}, - {183,210,-1.03e-02}, - {183,211,-1.03e-02}, - {183,212,-1.03e-02}, - {183,213,-1.03e-02}, - {183,446,-4.84e-05}, - {183,471,-1.93e-04}, - {183,472,-7.74e-04}, - {183,473,-1.93e-04}, - {183,498,-4.84e-05}, - {183,499,-1.93e-04}, - {183,500,-4.84e-05}, - {183,501,-1.93e-04}, - {183,502,-4.84e-05}, - {184,184,8.29e-02}, - {184,157,-1.03e-02}, - {184,158,-1.03e-02}, - {184,182,-1.03e-02}, - {184,183,-1.03e-02}, - {184,188,-1.03e-02}, - {184,212,-1.03e-02}, - {184,213,-1.03e-02}, - {184,217,-1.03e-02}, - {184,446,-1.93e-04}, - {184,447,-4.84e-05}, - {184,471,-4.84e-05}, - {184,472,-1.93e-04}, - {184,473,-7.74e-04}, - {184,477,-1.93e-04}, - {184,501,-4.84e-05}, - {184,502,-1.93e-04}, - {184,506,-4.84e-05}, - {185,185,8.29e-02}, - {185,159,-1.03e-02}, - {185,160,-1.03e-02}, - {185,161,-1.03e-02}, - {185,186,-1.03e-02}, - {185,187,-1.03e-02}, - {185,214,-1.03e-02}, - {185,215,-1.03e-02}, - {185,216,-1.03e-02}, - {185,448,-4.84e-05}, - {185,449,-1.93e-04}, - {185,450,-4.84e-05}, - {185,474,-7.74e-04}, - {185,475,-1.93e-04}, - {185,476,-1.93e-04}, - {185,503,-4.84e-05}, - {185,504,-1.93e-04}, - {185,505,-4.84e-05}, - {186,186,8.29e-02}, - {186,160,-1.03e-02}, - {186,161,-1.03e-02}, - {186,166,-1.03e-02}, - {186,185,-1.03e-02}, - {186,192,-1.03e-02}, - {186,215,-1.03e-02}, - {186,216,-1.03e-02}, - {186,221,-1.03e-02}, - {186,449,-4.84e-05}, - {186,450,-1.93e-04}, - {186,455,-4.84e-05}, - {186,474,-1.93e-04}, - {186,475,-7.74e-04}, - {186,481,-1.93e-04}, - {186,504,-4.84e-05}, - {186,505,-1.93e-04}, - {186,510,-4.84e-05}, - {187,187,8.29e-02}, - {187,158,-1.03e-02}, - {187,159,-1.03e-02}, - {187,160,-1.03e-02}, - {187,185,-1.03e-02}, - {187,188,-1.03e-02}, - {187,214,-1.03e-02}, - {187,215,-1.03e-02}, - {187,217,-1.03e-02}, - {187,447,-4.84e-05}, - {187,448,-1.93e-04}, - {187,449,-4.84e-05}, - {187,474,-1.93e-04}, - {187,476,-7.74e-04}, - {187,477,-1.93e-04}, - {187,503,-1.93e-04}, - {187,504,-4.84e-05}, - {187,506,-4.84e-05}, - {188,188,8.29e-02}, - {188,157,-1.03e-02}, - {188,158,-1.03e-02}, - {188,159,-1.03e-02}, - {188,184,-1.03e-02}, - {188,187,-1.03e-02}, - {188,213,-1.03e-02}, - {188,214,-1.03e-02}, - {188,217,-1.03e-02}, - {188,446,-4.84e-05}, - {188,447,-1.93e-04}, - {188,448,-4.84e-05}, - {188,473,-1.93e-04}, - {188,476,-1.93e-04}, - {188,477,-7.74e-04}, - {188,502,-4.84e-05}, - {188,503,-4.84e-05}, - {188,506,-1.93e-04}, - {189,189,8.29e-02}, - {189,162,-1.03e-02}, - {189,167,-1.03e-02}, - {189,168,-1.03e-02}, - {189,190,-1.03e-02}, - {189,191,-1.03e-02}, - {189,218,-1.03e-02}, - {189,219,-1.03e-02}, - {189,220,-1.03e-02}, - {189,451,-4.84e-05}, - {189,456,-4.84e-05}, - {189,457,-1.93e-04}, - {189,478,-7.74e-04}, - {189,479,-1.93e-04}, - {189,480,-1.93e-04}, - {189,507,-4.84e-05}, - {189,508,-1.93e-04}, - {189,509,-4.84e-05}, - {190,190,8.29e-02}, - {190,162,-1.03e-02}, - {190,163,-1.03e-02}, - {190,168,-1.03e-02}, - {190,189,-1.03e-02}, - {190,195,-1.03e-02}, - {190,219,-1.03e-02}, - {190,220,-1.03e-02}, - {190,224,-1.03e-02}, - {190,451,-1.93e-04}, - {190,452,-4.84e-05}, - {190,457,-4.84e-05}, - {190,478,-1.93e-04}, - {190,479,-7.74e-04}, - {190,484,-1.93e-04}, - {190,508,-4.84e-05}, - {190,509,-1.93e-04}, - {190,513,-4.84e-05}, - {191,191,8.29e-02}, - {191,166,-1.03e-02}, - {191,167,-1.03e-02}, - {191,168,-1.03e-02}, - {191,189,-1.03e-02}, - {191,192,-1.03e-02}, - {191,218,-1.03e-02}, - {191,219,-1.03e-02}, - {191,221,-1.03e-02}, - {191,455,-4.84e-05}, - {191,456,-1.93e-04}, - {191,457,-4.84e-05}, - {191,478,-1.93e-04}, - {191,480,-7.74e-04}, - {191,481,-1.93e-04}, - {191,507,-1.93e-04}, - {191,508,-4.84e-05}, - {191,510,-4.84e-05}, - {192,192,8.29e-02}, - {192,161,-1.03e-02}, - {192,166,-1.03e-02}, - {192,167,-1.03e-02}, - {192,186,-1.03e-02}, - {192,191,-1.03e-02}, - {192,216,-1.03e-02}, - {192,218,-1.03e-02}, - {192,221,-1.03e-02}, - {192,450,-4.84e-05}, - {192,455,-1.93e-04}, - {192,456,-4.84e-05}, - {192,475,-1.93e-04}, - {192,480,-1.93e-04}, - {192,481,-7.74e-04}, - {192,505,-4.84e-05}, - {192,507,-4.84e-05}, - {192,510,-1.93e-04}, - {193,193,8.29e-02}, - {193,145,-1.03e-02}, - {193,164,-1.03e-02}, - {193,165,-1.03e-02}, - {193,170,-1.03e-02}, - {193,194,-1.03e-02}, - {193,197,-1.03e-02}, - {193,222,-1.03e-02}, - {193,223,-1.03e-02}, - {193,434,-4.84e-05}, - {193,453,-4.84e-05}, - {193,454,-1.93e-04}, - {193,459,-1.93e-04}, - {193,482,-7.74e-04}, - {193,483,-1.93e-04}, - {193,486,-4.84e-05}, - {193,511,-4.84e-05}, - {193,512,-1.93e-04}, - {194,194,8.29e-02}, - {194,163,-1.03e-02}, - {194,164,-1.03e-02}, - {194,165,-1.03e-02}, - {194,193,-1.03e-02}, - {194,195,-1.03e-02}, - {194,222,-1.03e-02}, - {194,223,-1.03e-02}, - {194,224,-1.03e-02}, - {194,452,-4.84e-05}, - {194,453,-1.93e-04}, - {194,454,-4.84e-05}, - {194,482,-1.93e-04}, - {194,483,-7.74e-04}, - {194,484,-1.93e-04}, - {194,511,-1.93e-04}, - {194,512,-4.84e-05}, - {194,513,-4.84e-05}, - {195,195,8.29e-02}, - {195,162,-1.03e-02}, - {195,163,-1.03e-02}, - {195,164,-1.03e-02}, - {195,190,-1.03e-02}, - {195,194,-1.03e-02}, - {195,220,-1.03e-02}, - {195,222,-1.03e-02}, - {195,224,-1.03e-02}, - {195,451,-4.84e-05}, - {195,452,-1.93e-04}, - {195,453,-4.84e-05}, - {195,479,-1.93e-04}, - {195,483,-1.93e-04}, - {195,484,-7.74e-04}, - {195,509,-4.84e-05}, - {195,511,-4.84e-05}, - {195,513,-1.93e-04}, - {196,196,2.08e-01}, - {196,169,3.65e-02}, - {196,171,-1.03e-02}, - {196,198,-1.03e-02}, - {196,225,3.65e-02}, - {196,227,-1.03e-02}, - {196,458,-9.67e-05}, - {196,460,-4.84e-05}, - {196,485,-3.87e-04}, - {196,487,-1.93e-04}, - {196,514,-9.67e-05}, - {196,516,-4.84e-05}, - {197,197,2.08e-01}, - {197,170,3.65e-02}, - {197,193,-1.03e-02}, - {197,223,-1.03e-02}, - {197,226,3.65e-02}, - {197,255,-1.03e-02}, - {197,459,-9.67e-05}, - {197,482,-4.84e-05}, - {197,486,-3.87e-04}, - {197,512,-1.93e-04}, - {197,515,-9.67e-05}, - {197,544,-4.84e-05}, - {198,198,8.29e-02}, - {198,169,-1.03e-02}, - {198,171,-1.03e-02}, - {198,172,-1.03e-02}, - {198,196,-1.03e-02}, - {198,199,-1.03e-02}, - {198,225,-1.03e-02}, - {198,227,-1.03e-02}, - {198,228,-1.03e-02}, - {198,458,-4.84e-05}, - {198,460,-1.93e-04}, - {198,461,-4.84e-05}, - {198,485,-1.93e-04}, - {198,487,-7.74e-04}, - {198,488,-1.93e-04}, - {198,514,-4.84e-05}, - {198,516,-1.93e-04}, - {198,517,-4.84e-05}, - {199,199,8.29e-02}, - {199,171,-1.03e-02}, - {199,172,-1.03e-02}, - {199,173,-1.03e-02}, - {199,198,-1.03e-02}, - {199,200,-1.03e-02}, - {199,227,-1.03e-02}, - {199,228,-1.03e-02}, - {199,229,-1.03e-02}, - {199,460,-4.84e-05}, - {199,461,-1.93e-04}, - {199,462,-4.84e-05}, - {199,487,-1.93e-04}, - {199,488,-7.74e-04}, - {199,489,-1.93e-04}, - {199,516,-4.84e-05}, - {199,517,-1.93e-04}, - {199,518,-4.84e-05}, - {200,200,8.29e-02}, - {200,172,-1.03e-02}, - {200,173,-1.03e-02}, - {200,174,-1.03e-02}, - {200,199,-1.03e-02}, - {200,201,-1.03e-02}, - {200,228,-1.03e-02}, - {200,229,-1.03e-02}, - {200,230,-1.03e-02}, - {200,461,-4.84e-05}, - {200,462,-1.93e-04}, - {200,463,-4.84e-05}, - {200,488,-1.93e-04}, - {200,489,-7.74e-04}, - {200,490,-1.93e-04}, - {200,517,-4.84e-05}, - {200,518,-1.93e-04}, - {200,519,-4.84e-05}, - {201,201,8.29e-02}, - {201,173,-1.03e-02}, - {201,174,-1.03e-02}, - {201,175,-1.03e-02}, - {201,200,-1.03e-02}, - {201,202,-1.03e-02}, - {201,229,-1.03e-02}, - {201,230,-1.03e-02}, - {201,231,-1.03e-02}, - {201,462,-4.84e-05}, - {201,463,-1.93e-04}, - {201,464,-4.84e-05}, - {201,489,-1.93e-04}, - {201,490,-7.74e-04}, - {201,491,-1.93e-04}, - {201,518,-4.84e-05}, - {201,519,-1.93e-04}, - {201,520,-4.84e-05}, - {202,202,8.29e-02}, - {202,174,-1.03e-02}, - {202,175,-1.03e-02}, - {202,176,-1.03e-02}, - {202,201,-1.03e-02}, - {202,203,-1.03e-02}, - {202,230,-1.03e-02}, - {202,231,-1.03e-02}, - {202,232,-1.03e-02}, - {202,463,-4.84e-05}, - {202,464,-1.93e-04}, - {202,465,-4.84e-05}, - {202,490,-1.93e-04}, - {202,491,-7.74e-04}, - {202,492,-1.93e-04}, - {202,519,-4.84e-05}, - {202,520,-1.93e-04}, - {202,521,-4.84e-05}, - {203,203,8.29e-02}, - {203,175,-1.03e-02}, - {203,176,-1.03e-02}, - {203,177,-1.03e-02}, - {203,202,-1.03e-02}, - {203,204,-1.03e-02}, - {203,231,-1.03e-02}, - {203,232,-1.03e-02}, - {203,233,-1.03e-02}, - {203,464,-4.84e-05}, - {203,465,-1.93e-04}, - {203,466,-4.84e-05}, - {203,491,-1.93e-04}, - {203,492,-7.74e-04}, - {203,493,-1.93e-04}, - {203,520,-4.84e-05}, - {203,521,-1.93e-04}, - {203,522,-4.84e-05}, - {204,204,8.29e-02}, - {204,176,-1.03e-02}, - {204,177,-1.03e-02}, - {204,178,-1.03e-02}, - {204,203,-1.03e-02}, - {204,205,-1.03e-02}, - {204,232,-1.03e-02}, - {204,233,-1.03e-02}, - {204,234,-1.03e-02}, - {204,465,-4.84e-05}, - {204,466,-1.93e-04}, - {204,467,-4.84e-05}, - {204,492,-1.93e-04}, - {204,493,-7.74e-04}, - {204,494,-1.93e-04}, - {204,521,-4.84e-05}, - {204,522,-1.93e-04}, - {204,523,-4.84e-05}, - {205,205,8.29e-02}, - {205,177,-1.03e-02}, - {205,178,-1.03e-02}, - {205,179,-1.03e-02}, - {205,204,-1.03e-02}, - {205,206,-1.03e-02}, - {205,233,-1.03e-02}, - {205,234,-1.03e-02}, - {205,235,-1.03e-02}, - {205,466,-4.84e-05}, - {205,467,-1.93e-04}, - {205,468,-4.84e-05}, - {205,493,-1.93e-04}, - {205,494,-7.74e-04}, - {205,495,-1.93e-04}, - {205,522,-4.84e-05}, - {205,523,-1.93e-04}, - {205,524,-4.84e-05}, - {206,206,8.29e-02}, - {206,178,-1.03e-02}, - {206,179,-1.03e-02}, - {206,180,-1.03e-02}, - {206,205,-1.03e-02}, - {206,207,-1.03e-02}, - {206,234,-1.03e-02}, - {206,235,-1.03e-02}, - {206,236,-1.03e-02}, - {206,467,-4.84e-05}, - {206,468,-1.93e-04}, - {206,469,-4.84e-05}, - {206,494,-1.93e-04}, - {206,495,-7.74e-04}, - {206,496,-1.93e-04}, - {206,523,-4.84e-05}, - {206,524,-1.93e-04}, - {206,525,-4.84e-05}, - {207,207,8.29e-02}, - {207,179,-1.03e-02}, - {207,180,-1.03e-02}, - {207,181,-1.03e-02}, - {207,206,-1.03e-02}, - {207,208,-1.03e-02}, - {207,235,-1.03e-02}, - {207,236,-1.03e-02}, - {207,237,-1.03e-02}, - {207,468,-4.84e-05}, - {207,469,-1.93e-04}, - {207,470,-4.84e-05}, - {207,495,-1.93e-04}, - {207,496,-7.74e-04}, - {207,497,-1.93e-04}, - {207,524,-4.84e-05}, - {207,525,-1.93e-04}, - {207,526,-4.84e-05}, - {208,208,8.29e-02}, - {208,180,-1.03e-02}, - {208,181,-1.03e-02}, - {208,182,-1.03e-02}, - {208,207,-1.03e-02}, - {208,209,-1.03e-02}, - {208,236,-1.03e-02}, - {208,237,-1.03e-02}, - {208,238,-1.03e-02}, - {208,469,-4.84e-05}, - {208,470,-1.93e-04}, - {208,471,-4.84e-05}, - {208,496,-1.93e-04}, - {208,497,-7.74e-04}, - {208,498,-1.93e-04}, - {208,525,-4.84e-05}, - {208,526,-1.93e-04}, - {208,527,-4.84e-05}, - {209,209,8.29e-02}, - {209,181,-1.03e-02}, - {209,182,-1.03e-02}, - {209,183,-1.03e-02}, - {209,208,-1.03e-02}, - {209,210,-1.03e-02}, - {209,237,-1.03e-02}, - {209,238,-1.03e-02}, - {209,239,-1.03e-02}, - {209,470,-4.84e-05}, - {209,471,-1.93e-04}, - {209,472,-4.84e-05}, - {209,497,-1.93e-04}, - {209,498,-7.74e-04}, - {209,499,-1.93e-04}, - {209,526,-4.84e-05}, - {209,527,-1.93e-04}, - {209,528,-4.84e-05}, - {210,210,8.29e-02}, - {210,182,-1.03e-02}, - {210,183,-1.03e-02}, - {210,209,-1.03e-02}, - {210,211,-1.03e-02}, - {210,212,-1.03e-02}, - {210,238,-1.03e-02}, - {210,239,-1.03e-02}, - {210,240,-1.03e-02}, - {210,471,-4.84e-05}, - {210,472,-1.93e-04}, - {210,498,-1.93e-04}, - {210,499,-7.74e-04}, - {210,500,-1.93e-04}, - {210,501,-4.84e-05}, - {210,527,-4.84e-05}, - {210,528,-1.93e-04}, - {210,529,-4.84e-05}, - {211,211,8.29e-02}, - {211,183,-1.03e-02}, - {211,210,-1.03e-02}, - {211,212,-1.03e-02}, - {211,239,-1.03e-02}, - {211,240,-1.03e-02}, - {211,241,-1.03e-02}, - {211,242,-1.03e-02}, - {211,243,-1.03e-02}, - {211,472,-4.84e-05}, - {211,499,-1.93e-04}, - {211,500,-7.74e-04}, - {211,501,-1.93e-04}, - {211,528,-4.84e-05}, - {211,529,-1.93e-04}, - {211,530,-4.84e-05}, - {211,531,-1.93e-04}, - {211,532,-4.84e-05}, - {212,212,8.29e-02}, - {212,183,-1.03e-02}, - {212,184,-1.03e-02}, - {212,210,-1.03e-02}, - {212,211,-1.03e-02}, - {212,213,-1.03e-02}, - {212,242,-1.03e-02}, - {212,243,-1.03e-02}, - {212,244,-1.03e-02}, - {212,472,-1.93e-04}, - {212,473,-4.84e-05}, - {212,499,-4.84e-05}, - {212,500,-1.93e-04}, - {212,501,-7.74e-04}, - {212,502,-1.93e-04}, - {212,531,-4.84e-05}, - {212,532,-1.93e-04}, - {212,533,-4.84e-05}, - {213,213,8.29e-02}, - {213,183,-1.03e-02}, - {213,184,-1.03e-02}, - {213,188,-1.03e-02}, - {213,212,-1.03e-02}, - {213,217,-1.03e-02}, - {213,243,-1.03e-02}, - {213,244,-1.03e-02}, - {213,245,-1.03e-02}, - {213,472,-4.84e-05}, - {213,473,-1.93e-04}, - {213,477,-4.84e-05}, - {213,501,-1.93e-04}, - {213,502,-7.74e-04}, - {213,506,-1.93e-04}, - {213,532,-4.84e-05}, - {213,533,-1.93e-04}, - {213,534,-4.84e-05}, - {214,214,8.29e-02}, - {214,185,-1.03e-02}, - {214,187,-1.03e-02}, - {214,188,-1.03e-02}, - {214,215,-1.03e-02}, - {214,217,-1.03e-02}, - {214,245,-1.03e-02}, - {214,246,-1.03e-02}, - {214,247,-1.03e-02}, - {214,474,-4.84e-05}, - {214,476,-1.93e-04}, - {214,477,-4.84e-05}, - {214,503,-7.74e-04}, - {214,504,-1.93e-04}, - {214,506,-1.93e-04}, - {214,534,-4.84e-05}, - {214,535,-1.93e-04}, - {214,536,-4.84e-05}, - {215,215,8.29e-02}, - {215,185,-1.03e-02}, - {215,186,-1.03e-02}, - {215,187,-1.03e-02}, - {215,214,-1.03e-02}, - {215,216,-1.03e-02}, - {215,246,-1.03e-02}, - {215,247,-1.03e-02}, - {215,248,-1.03e-02}, - {215,474,-1.93e-04}, - {215,475,-4.84e-05}, - {215,476,-4.84e-05}, - {215,503,-1.93e-04}, - {215,504,-7.74e-04}, - {215,505,-1.93e-04}, - {215,535,-4.84e-05}, - {215,536,-1.93e-04}, - {215,537,-4.84e-05}, - {216,216,8.29e-02}, - {216,185,-1.03e-02}, - {216,186,-1.03e-02}, - {216,192,-1.03e-02}, - {216,215,-1.03e-02}, - {216,221,-1.03e-02}, - {216,247,-1.03e-02}, - {216,248,-1.03e-02}, - {216,249,-1.03e-02}, - {216,474,-4.84e-05}, - {216,475,-1.93e-04}, - {216,481,-4.84e-05}, - {216,504,-1.93e-04}, - {216,505,-7.74e-04}, - {216,510,-1.93e-04}, - {216,536,-4.84e-05}, - {216,537,-1.93e-04}, - {216,538,-4.84e-05}, - {217,217,8.29e-02}, - {217,184,-1.03e-02}, - {217,187,-1.03e-02}, - {217,188,-1.03e-02}, - {217,213,-1.03e-02}, - {217,214,-1.03e-02}, - {217,244,-1.03e-02}, - {217,245,-1.03e-02}, - {217,246,-1.03e-02}, - {217,473,-4.84e-05}, - {217,476,-4.84e-05}, - {217,477,-1.93e-04}, - {217,502,-1.93e-04}, - {217,503,-1.93e-04}, - {217,506,-7.74e-04}, - {217,533,-4.84e-05}, - {217,534,-1.93e-04}, - {217,535,-4.84e-05}, - {218,218,8.29e-02}, - {218,189,-1.03e-02}, - {218,191,-1.03e-02}, - {218,192,-1.03e-02}, - {218,219,-1.03e-02}, - {218,221,-1.03e-02}, - {218,249,-1.03e-02}, - {218,250,-1.03e-02}, - {218,251,-1.03e-02}, - {218,478,-4.84e-05}, - {218,480,-1.93e-04}, - {218,481,-4.84e-05}, - {218,507,-7.74e-04}, - {218,508,-1.93e-04}, - {218,510,-1.93e-04}, - {218,538,-4.84e-05}, - {218,539,-1.93e-04}, - {218,540,-4.84e-05}, - {219,219,8.29e-02}, - {219,189,-1.03e-02}, - {219,190,-1.03e-02}, - {219,191,-1.03e-02}, - {219,218,-1.03e-02}, - {219,220,-1.03e-02}, - {219,250,-1.03e-02}, - {219,251,-1.03e-02}, - {219,252,-1.03e-02}, - {219,478,-1.93e-04}, - {219,479,-4.84e-05}, - {219,480,-4.84e-05}, - {219,507,-1.93e-04}, - {219,508,-7.74e-04}, - {219,509,-1.93e-04}, - {219,539,-4.84e-05}, - {219,540,-1.93e-04}, - {219,541,-4.84e-05}, - {220,220,8.29e-02}, - {220,189,-1.03e-02}, - {220,190,-1.03e-02}, - {220,195,-1.03e-02}, - {220,219,-1.03e-02}, - {220,224,-1.03e-02}, - {220,251,-1.03e-02}, - {220,252,-1.03e-02}, - {220,253,-1.03e-02}, - {220,478,-4.84e-05}, - {220,479,-1.93e-04}, - {220,484,-4.84e-05}, - {220,508,-1.93e-04}, - {220,509,-7.74e-04}, - {220,513,-1.93e-04}, - {220,540,-4.84e-05}, - {220,541,-1.93e-04}, - {220,542,-4.84e-05}, - {221,221,8.29e-02}, - {221,186,-1.03e-02}, - {221,191,-1.03e-02}, - {221,192,-1.03e-02}, - {221,216,-1.03e-02}, - {221,218,-1.03e-02}, - {221,248,-1.03e-02}, - {221,249,-1.03e-02}, - {221,250,-1.03e-02}, - {221,475,-4.84e-05}, - {221,480,-4.84e-05}, - {221,481,-1.93e-04}, - {221,505,-1.93e-04}, - {221,507,-1.93e-04}, - {221,510,-7.74e-04}, - {221,537,-4.84e-05}, - {221,538,-1.93e-04}, - {221,539,-4.84e-05}, - {222,222,8.29e-02}, - {222,193,-1.03e-02}, - {222,194,-1.03e-02}, - {222,195,-1.03e-02}, - {222,223,-1.03e-02}, - {222,224,-1.03e-02}, - {222,253,-1.03e-02}, - {222,254,-1.03e-02}, - {222,255,-1.03e-02}, - {222,482,-4.84e-05}, - {222,483,-1.93e-04}, - {222,484,-4.84e-05}, - {222,511,-7.74e-04}, - {222,512,-1.93e-04}, - {222,513,-1.93e-04}, - {222,542,-4.84e-05}, - {222,543,-1.93e-04}, - {222,544,-4.84e-05}, - {223,223,8.29e-02}, - {223,170,-1.03e-02}, - {223,193,-1.03e-02}, - {223,194,-1.03e-02}, - {223,197,-1.03e-02}, - {223,222,-1.03e-02}, - {223,226,-1.03e-02}, - {223,254,-1.03e-02}, - {223,255,-1.03e-02}, - {223,459,-4.84e-05}, - {223,482,-1.93e-04}, - {223,483,-4.84e-05}, - {223,486,-1.93e-04}, - {223,511,-1.93e-04}, - {223,512,-7.74e-04}, - {223,515,-4.84e-05}, - {223,543,-4.84e-05}, - {223,544,-1.93e-04}, - {224,224,8.29e-02}, - {224,190,-1.03e-02}, - {224,194,-1.03e-02}, - {224,195,-1.03e-02}, - {224,220,-1.03e-02}, - {224,222,-1.03e-02}, - {224,252,-1.03e-02}, - {224,253,-1.03e-02}, - {224,254,-1.03e-02}, - {224,479,-4.84e-05}, - {224,483,-4.84e-05}, - {224,484,-1.93e-04}, - {224,509,-1.93e-04}, - {224,511,-1.93e-04}, - {224,513,-7.74e-04}, - {224,541,-4.84e-05}, - {224,542,-1.93e-04}, - {224,543,-4.84e-05}, - {225,225,2.08e-01}, - {225,196,3.65e-02}, - {225,198,-1.03e-02}, - {225,227,-1.03e-02}, - {225,256,3.65e-02}, - {225,259,-1.03e-02}, - {225,485,-9.67e-05}, - {225,487,-4.84e-05}, - {225,514,-3.87e-04}, - {225,516,-1.93e-04}, - {225,545,-9.67e-05}, - {225,548,-4.84e-05}, - {226,226,2.08e-01}, - {226,197,3.65e-02}, - {226,223,-1.03e-02}, - {226,255,-1.03e-02}, - {226,258,3.65e-02}, - {226,288,-1.03e-02}, - {226,486,-9.67e-05}, - {226,512,-4.84e-05}, - {226,515,-3.87e-04}, - {226,544,-1.93e-04}, - {226,547,-9.67e-05}, - {226,577,-4.84e-05}, - {227,227,8.29e-02}, - {227,196,-1.03e-02}, - {227,198,-1.03e-02}, - {227,199,-1.03e-02}, - {227,225,-1.03e-02}, - {227,228,-1.03e-02}, - {227,256,-1.03e-02}, - {227,259,-1.03e-02}, - {227,260,-1.03e-02}, - {227,485,-4.84e-05}, - {227,487,-1.93e-04}, - {227,488,-4.84e-05}, - {227,514,-1.93e-04}, - {227,516,-7.74e-04}, - {227,517,-1.93e-04}, - {227,545,-4.84e-05}, - {227,548,-1.93e-04}, - {227,549,-4.84e-05}, - {228,228,8.29e-02}, - {228,198,-1.03e-02}, - {228,199,-1.03e-02}, - {228,200,-1.03e-02}, - {228,227,-1.03e-02}, - {228,229,-1.03e-02}, - {228,259,-1.03e-02}, - {228,260,-1.03e-02}, - {228,261,-1.03e-02}, - {228,487,-4.84e-05}, - {228,488,-1.93e-04}, - {228,489,-4.84e-05}, - {228,516,-1.93e-04}, - {228,517,-7.74e-04}, - {228,518,-1.93e-04}, - {228,548,-4.84e-05}, - {228,549,-1.93e-04}, - {228,550,-4.84e-05}, - {229,229,8.29e-02}, - {229,199,-1.03e-02}, - {229,200,-1.03e-02}, - {229,201,-1.03e-02}, - {229,228,-1.03e-02}, - {229,230,-1.03e-02}, - {229,260,-1.03e-02}, - {229,261,-1.03e-02}, - {229,262,-1.03e-02}, - {229,488,-4.84e-05}, - {229,489,-1.93e-04}, - {229,490,-4.84e-05}, - {229,517,-1.93e-04}, - {229,518,-7.74e-04}, - {229,519,-1.93e-04}, - {229,549,-4.84e-05}, - {229,550,-1.93e-04}, - {229,551,-4.84e-05}, - {230,230,8.29e-02}, - {230,200,-1.03e-02}, - {230,201,-1.03e-02}, - {230,202,-1.03e-02}, - {230,229,-1.03e-02}, - {230,231,-1.03e-02}, - {230,261,-1.03e-02}, - {230,262,-1.03e-02}, - {230,263,-1.03e-02}, - {230,489,-4.84e-05}, - {230,490,-1.93e-04}, - {230,491,-4.84e-05}, - {230,518,-1.93e-04}, - {230,519,-7.74e-04}, - {230,520,-1.93e-04}, - {230,550,-4.84e-05}, - {230,551,-1.93e-04}, - {230,552,-4.84e-05}, - {231,231,8.29e-02}, - {231,201,-1.03e-02}, - {231,202,-1.03e-02}, - {231,203,-1.03e-02}, - {231,230,-1.03e-02}, - {231,232,-1.03e-02}, - {231,262,-1.03e-02}, - {231,263,-1.03e-02}, - {231,264,-1.03e-02}, - {231,490,-4.84e-05}, - {231,491,-1.93e-04}, - {231,492,-4.84e-05}, - {231,519,-1.93e-04}, - {231,520,-7.74e-04}, - {231,521,-1.93e-04}, - {231,551,-4.84e-05}, - {231,552,-1.93e-04}, - {231,553,-4.84e-05}, - {232,232,8.29e-02}, - {232,202,-1.03e-02}, - {232,203,-1.03e-02}, - {232,204,-1.03e-02}, - {232,231,-1.03e-02}, - {232,233,-1.03e-02}, - {232,263,-1.03e-02}, - {232,264,-1.03e-02}, - {232,265,-1.03e-02}, - {232,491,-4.84e-05}, - {232,492,-1.93e-04}, - {232,493,-4.84e-05}, - {232,520,-1.93e-04}, - {232,521,-7.74e-04}, - {232,522,-1.93e-04}, - {232,552,-4.84e-05}, - {232,553,-1.93e-04}, - {232,554,-4.84e-05}, - {233,233,8.29e-02}, - {233,203,-1.03e-02}, - {233,204,-1.03e-02}, - {233,205,-1.03e-02}, - {233,232,-1.03e-02}, - {233,234,-1.03e-02}, - {233,264,-1.03e-02}, - {233,265,-1.03e-02}, - {233,266,-1.03e-02}, - {233,492,-4.84e-05}, - {233,493,-1.93e-04}, - {233,494,-4.84e-05}, - {233,521,-1.93e-04}, - {233,522,-7.74e-04}, - {233,523,-1.93e-04}, - {233,553,-4.84e-05}, - {233,554,-1.93e-04}, - {233,555,-4.84e-05}, - {234,234,8.29e-02}, - {234,204,-1.03e-02}, - {234,205,-1.03e-02}, - {234,206,-1.03e-02}, - {234,233,-1.03e-02}, - {234,235,-1.03e-02}, - {234,265,-1.03e-02}, - {234,266,-1.03e-02}, - {234,267,-1.03e-02}, - {234,493,-4.84e-05}, - {234,494,-1.93e-04}, - {234,495,-4.84e-05}, - {234,522,-1.93e-04}, - {234,523,-7.74e-04}, - {234,524,-1.93e-04}, - {234,554,-4.84e-05}, - {234,555,-1.93e-04}, - {234,556,-4.84e-05}, - {235,235,8.29e-02}, - {235,205,-1.03e-02}, - {235,206,-1.03e-02}, - {235,207,-1.03e-02}, - {235,234,-1.03e-02}, - {235,236,-1.03e-02}, - {235,266,-1.03e-02}, - {235,267,-1.03e-02}, - {235,268,-1.03e-02}, - {235,494,-4.84e-05}, - {235,495,-1.93e-04}, - {235,496,-4.84e-05}, - {235,523,-1.93e-04}, - {235,524,-7.74e-04}, - {235,525,-1.93e-04}, - {235,555,-4.84e-05}, - {235,556,-1.93e-04}, - {235,557,-4.84e-05}, - {236,236,8.29e-02}, - {236,206,-1.03e-02}, - {236,207,-1.03e-02}, - {236,208,-1.03e-02}, - {236,235,-1.03e-02}, - {236,237,-1.03e-02}, - {236,267,-1.03e-02}, - {236,268,-1.03e-02}, - {236,269,-1.03e-02}, - {236,495,-4.84e-05}, - {236,496,-1.93e-04}, - {236,497,-4.84e-05}, - {236,524,-1.93e-04}, - {236,525,-7.74e-04}, - {236,526,-1.93e-04}, - {236,556,-4.84e-05}, - {236,557,-1.93e-04}, - {236,558,-4.84e-05}, - {237,237,8.29e-02}, - {237,207,-1.03e-02}, - {237,208,-1.03e-02}, - {237,209,-1.03e-02}, - {237,236,-1.03e-02}, - {237,238,-1.03e-02}, - {237,268,-1.03e-02}, - {237,269,-1.03e-02}, - {237,270,-1.03e-02}, - {237,496,-4.84e-05}, - {237,497,-1.93e-04}, - {237,498,-4.84e-05}, - {237,525,-1.93e-04}, - {237,526,-7.74e-04}, - {237,527,-1.93e-04}, - {237,557,-4.84e-05}, - {237,558,-1.93e-04}, - {237,559,-4.84e-05}, - {238,238,8.29e-02}, - {238,208,-1.03e-02}, - {238,209,-1.03e-02}, - {238,210,-1.03e-02}, - {238,237,-1.03e-02}, - {238,239,-1.03e-02}, - {238,269,-1.03e-02}, - {238,270,-1.03e-02}, - {238,271,-1.03e-02}, - {238,497,-4.84e-05}, - {238,498,-1.93e-04}, - {238,499,-4.84e-05}, - {238,526,-1.93e-04}, - {238,527,-7.74e-04}, - {238,528,-1.93e-04}, - {238,558,-4.84e-05}, - {238,559,-1.93e-04}, - {238,560,-4.84e-05}, - {239,239,8.29e-02}, - {239,209,-1.03e-02}, - {239,210,-1.03e-02}, - {239,211,-1.03e-02}, - {239,238,-1.03e-02}, - {239,240,-1.03e-02}, - {239,270,-1.03e-02}, - {239,271,-1.03e-02}, - {239,272,-1.03e-02}, - {239,498,-4.84e-05}, - {239,499,-1.93e-04}, - {239,500,-4.84e-05}, - {239,527,-1.93e-04}, - {239,528,-7.74e-04}, - {239,529,-1.93e-04}, - {239,559,-4.84e-05}, - {239,560,-1.93e-04}, - {239,561,-4.84e-05}, - {240,240,8.29e-02}, - {240,210,-1.03e-02}, - {240,211,-1.03e-02}, - {240,239,-1.03e-02}, - {240,241,-1.03e-02}, - {240,242,-1.03e-02}, - {240,271,-1.03e-02}, - {240,272,-1.03e-02}, - {240,273,-1.03e-02}, - {240,499,-4.84e-05}, - {240,500,-1.93e-04}, - {240,528,-1.93e-04}, - {240,529,-7.74e-04}, - {240,530,-1.93e-04}, - {240,531,-4.84e-05}, - {240,560,-4.84e-05}, - {240,561,-1.93e-04}, - {240,562,-4.84e-05}, - {241,241,8.29e-02}, - {241,211,-1.03e-02}, - {241,240,-1.03e-02}, - {241,242,-1.03e-02}, - {241,257,-1.03e-02}, - {241,272,-1.03e-02}, - {241,273,-1.03e-02}, - {241,274,-1.03e-02}, - {241,275,-1.03e-02}, - {241,500,-4.84e-05}, - {241,529,-1.93e-04}, - {241,530,-7.74e-04}, - {241,531,-1.93e-04}, - {241,546,-4.84e-05}, - {241,561,-4.84e-05}, - {241,562,-1.93e-04}, - {241,563,-1.93e-04}, - {241,564,-4.84e-05}, - {242,242,8.29e-02}, - {242,211,-1.03e-02}, - {242,212,-1.03e-02}, - {242,240,-1.03e-02}, - {242,241,-1.03e-02}, - {242,243,-1.03e-02}, - {242,274,-1.03e-02}, - {242,275,-1.03e-02}, - {242,276,-1.03e-02}, - {242,500,-1.93e-04}, - {242,501,-4.84e-05}, - {242,529,-4.84e-05}, - {242,530,-1.93e-04}, - {242,531,-7.74e-04}, - {242,532,-1.93e-04}, - {242,563,-4.84e-05}, - {242,564,-1.93e-04}, - {242,565,-4.84e-05}, - {243,243,8.29e-02}, - {243,211,-1.03e-02}, - {243,212,-1.03e-02}, - {243,213,-1.03e-02}, - {243,242,-1.03e-02}, - {243,244,-1.03e-02}, - {243,275,-1.03e-02}, - {243,276,-1.03e-02}, - {243,277,-1.03e-02}, - {243,500,-4.84e-05}, - {243,501,-1.93e-04}, - {243,502,-4.84e-05}, - {243,531,-1.93e-04}, - {243,532,-7.74e-04}, - {243,533,-1.93e-04}, - {243,564,-4.84e-05}, - {243,565,-1.93e-04}, - {243,566,-4.84e-05}, - {244,244,8.29e-02}, - {244,212,-1.03e-02}, - {244,213,-1.03e-02}, - {244,217,-1.03e-02}, - {244,243,-1.03e-02}, - {244,245,-1.03e-02}, - {244,276,-1.03e-02}, - {244,277,-1.03e-02}, - {244,278,-1.03e-02}, - {244,501,-4.84e-05}, - {244,502,-1.93e-04}, - {244,506,-4.84e-05}, - {244,532,-1.93e-04}, - {244,533,-7.74e-04}, - {244,534,-1.93e-04}, - {244,565,-4.84e-05}, - {244,566,-1.93e-04}, - {244,567,-4.84e-05}, - {245,245,8.29e-02}, - {245,213,-1.03e-02}, - {245,214,-1.03e-02}, - {245,217,-1.03e-02}, - {245,244,-1.03e-02}, - {245,246,-1.03e-02}, - {245,277,-1.03e-02}, - {245,278,-1.03e-02}, - {245,279,-1.03e-02}, - {245,502,-4.84e-05}, - {245,503,-4.84e-05}, - {245,506,-1.93e-04}, - {245,533,-1.93e-04}, - {245,534,-7.74e-04}, - {245,535,-1.93e-04}, - {245,566,-4.84e-05}, - {245,567,-1.93e-04}, - {245,568,-4.84e-05}, - {246,246,8.29e-02}, - {246,214,-1.03e-02}, - {246,215,-1.03e-02}, - {246,217,-1.03e-02}, - {246,245,-1.03e-02}, - {246,247,-1.03e-02}, - {246,278,-1.03e-02}, - {246,279,-1.03e-02}, - {246,280,-1.03e-02}, - {246,503,-1.93e-04}, - {246,504,-4.84e-05}, - {246,506,-4.84e-05}, - {246,534,-1.93e-04}, - {246,535,-7.74e-04}, - {246,536,-1.93e-04}, - {246,567,-4.84e-05}, - {246,568,-1.93e-04}, - {246,569,-4.84e-05}, - {247,247,8.29e-02}, - {247,214,-1.03e-02}, - {247,215,-1.03e-02}, - {247,216,-1.03e-02}, - {247,246,-1.03e-02}, - {247,248,-1.03e-02}, - {247,279,-1.03e-02}, - {247,280,-1.03e-02}, - {247,281,-1.03e-02}, - {247,503,-4.84e-05}, - {247,504,-1.93e-04}, - {247,505,-4.84e-05}, - {247,535,-1.93e-04}, - {247,536,-7.74e-04}, - {247,537,-1.93e-04}, - {247,568,-4.84e-05}, - {247,569,-1.93e-04}, - {247,570,-4.84e-05}, - {248,248,8.29e-02}, - {248,215,-1.03e-02}, - {248,216,-1.03e-02}, - {248,221,-1.03e-02}, - {248,247,-1.03e-02}, - {248,249,-1.03e-02}, - {248,280,-1.03e-02}, - {248,281,-1.03e-02}, - {248,282,-1.03e-02}, - {248,504,-4.84e-05}, - {248,505,-1.93e-04}, - {248,510,-4.84e-05}, - {248,536,-1.93e-04}, - {248,537,-7.74e-04}, - {248,538,-1.93e-04}, - {248,569,-4.84e-05}, - {248,570,-1.93e-04}, - {248,571,-4.84e-05}, - {249,249,8.29e-02}, - {249,216,-1.03e-02}, - {249,218,-1.03e-02}, - {249,221,-1.03e-02}, - {249,248,-1.03e-02}, - {249,250,-1.03e-02}, - {249,281,-1.03e-02}, - {249,282,-1.03e-02}, - {249,283,-1.03e-02}, - {249,505,-4.84e-05}, - {249,507,-4.84e-05}, - {249,510,-1.93e-04}, - {249,537,-1.93e-04}, - {249,538,-7.74e-04}, - {249,539,-1.93e-04}, - {249,570,-4.84e-05}, - {249,571,-1.93e-04}, - {249,572,-4.84e-05}, - {250,250,8.29e-02}, - {250,218,-1.03e-02}, - {250,219,-1.03e-02}, - {250,221,-1.03e-02}, - {250,249,-1.03e-02}, - {250,251,-1.03e-02}, - {250,282,-1.03e-02}, - {250,283,-1.03e-02}, - {250,284,-1.03e-02}, - {250,507,-1.93e-04}, - {250,508,-4.84e-05}, - {250,510,-4.84e-05}, - {250,538,-1.93e-04}, - {250,539,-7.74e-04}, - {250,540,-1.93e-04}, - {250,571,-4.84e-05}, - {250,572,-1.93e-04}, - {250,573,-4.84e-05}, - {251,251,8.29e-02}, - {251,218,-1.03e-02}, - {251,219,-1.03e-02}, - {251,220,-1.03e-02}, - {251,250,-1.03e-02}, - {251,252,-1.03e-02}, - {251,283,-1.03e-02}, - {251,284,-1.03e-02}, - {251,285,-1.03e-02}, - {251,507,-4.84e-05}, - {251,508,-1.93e-04}, - {251,509,-4.84e-05}, - {251,539,-1.93e-04}, - {251,540,-7.74e-04}, - {251,541,-1.93e-04}, - {251,572,-4.84e-05}, - {251,573,-1.93e-04}, - {251,574,-4.84e-05}, - {252,252,8.29e-02}, - {252,219,-1.03e-02}, - {252,220,-1.03e-02}, - {252,224,-1.03e-02}, - {252,251,-1.03e-02}, - {252,253,-1.03e-02}, - {252,284,-1.03e-02}, - {252,285,-1.03e-02}, - {252,286,-1.03e-02}, - {252,508,-4.84e-05}, - {252,509,-1.93e-04}, - {252,513,-4.84e-05}, - {252,540,-1.93e-04}, - {252,541,-7.74e-04}, - {252,542,-1.93e-04}, - {252,573,-4.84e-05}, - {252,574,-1.93e-04}, - {252,575,-4.84e-05}, - {253,253,8.29e-02}, - {253,220,-1.03e-02}, - {253,222,-1.03e-02}, - {253,224,-1.03e-02}, - {253,252,-1.03e-02}, - {253,254,-1.03e-02}, - {253,285,-1.03e-02}, - {253,286,-1.03e-02}, - {253,287,-1.03e-02}, - {253,509,-4.84e-05}, - {253,511,-4.84e-05}, - {253,513,-1.93e-04}, - {253,541,-1.93e-04}, - {253,542,-7.74e-04}, - {253,543,-1.93e-04}, - {253,574,-4.84e-05}, - {253,575,-1.93e-04}, - {253,576,-4.84e-05}, - {254,254,8.29e-02}, - {254,222,-1.03e-02}, - {254,223,-1.03e-02}, - {254,224,-1.03e-02}, - {254,253,-1.03e-02}, - {254,255,-1.03e-02}, - {254,286,-1.03e-02}, - {254,287,-1.03e-02}, - {254,288,-1.03e-02}, - {254,511,-1.93e-04}, - {254,512,-4.84e-05}, - {254,513,-4.84e-05}, - {254,542,-1.93e-04}, - {254,543,-7.74e-04}, - {254,544,-1.93e-04}, - {254,575,-4.84e-05}, - {254,576,-1.93e-04}, - {254,577,-4.84e-05}, - {255,255,8.29e-02}, - {255,197,-1.03e-02}, - {255,222,-1.03e-02}, - {255,223,-1.03e-02}, - {255,226,-1.03e-02}, - {255,254,-1.03e-02}, - {255,258,-1.03e-02}, - {255,287,-1.03e-02}, - {255,288,-1.03e-02}, - {255,486,-4.84e-05}, - {255,511,-4.84e-05}, - {255,512,-1.93e-04}, - {255,515,-1.93e-04}, - {255,543,-1.93e-04}, - {255,544,-7.74e-04}, - {255,547,-4.84e-05}, - {255,576,-4.84e-05}, - {255,577,-1.93e-04}, - {256,256,1.87e-01}, - {256,225,3.65e-02}, - {256,227,-1.03e-02}, - {256,259,3.65e-02}, - {256,514,-9.67e-05}, - {256,516,-4.84e-05}, - {256,545,-1.93e-04}, - {256,548,-9.67e-05}, - {257,257,1.87e-01}, - {257,241,-1.03e-02}, - {257,273,3.65e-02}, - {257,274,3.65e-02}, - {257,530,-4.84e-05}, - {257,546,-1.93e-04}, - {257,562,-9.67e-05}, - {257,563,-9.67e-05}, - {258,258,1.87e-01}, - {258,226,3.65e-02}, - {258,255,-1.03e-02}, - {258,288,3.65e-02}, - {258,515,-9.67e-05}, - {258,544,-4.84e-05}, - {258,547,-1.93e-04}, - {258,577,-9.67e-05}, - {259,259,2.08e-01}, - {259,225,-1.03e-02}, - {259,227,-1.03e-02}, - {259,228,-1.03e-02}, - {259,256,3.65e-02}, - {259,260,3.65e-02}, - {259,514,-4.84e-05}, - {259,516,-1.93e-04}, - {259,517,-4.84e-05}, - {259,545,-9.67e-05}, - {259,548,-3.87e-04}, - {259,549,-9.67e-05}, - {260,260,2.08e-01}, - {260,227,-1.03e-02}, - {260,228,-1.03e-02}, - {260,229,-1.03e-02}, - {260,259,3.65e-02}, - {260,261,3.65e-02}, - {260,516,-4.84e-05}, - {260,517,-1.93e-04}, - {260,518,-4.84e-05}, - {260,548,-9.67e-05}, - {260,549,-3.87e-04}, - {260,550,-9.67e-05}, - {261,261,2.08e-01}, - {261,228,-1.03e-02}, - {261,229,-1.03e-02}, - {261,230,-1.03e-02}, - {261,260,3.65e-02}, - {261,262,3.65e-02}, - {261,517,-4.84e-05}, - {261,518,-1.93e-04}, - {261,519,-4.84e-05}, - {261,549,-9.67e-05}, - {261,550,-3.87e-04}, - {261,551,-9.67e-05}, - {262,262,2.08e-01}, - {262,229,-1.03e-02}, - {262,230,-1.03e-02}, - {262,231,-1.03e-02}, - {262,261,3.65e-02}, - {262,263,3.65e-02}, - {262,518,-4.84e-05}, - {262,519,-1.93e-04}, - {262,520,-4.84e-05}, - {262,550,-9.67e-05}, - {262,551,-3.87e-04}, - {262,552,-9.67e-05}, - {263,263,2.08e-01}, - {263,230,-1.03e-02}, - {263,231,-1.03e-02}, - {263,232,-1.03e-02}, - {263,262,3.65e-02}, - {263,264,3.65e-02}, - {263,519,-4.84e-05}, - {263,520,-1.93e-04}, - {263,521,-4.84e-05}, - {263,551,-9.67e-05}, - {263,552,-3.87e-04}, - {263,553,-9.67e-05}, - {264,264,2.08e-01}, - {264,231,-1.03e-02}, - {264,232,-1.03e-02}, - {264,233,-1.03e-02}, - {264,263,3.65e-02}, - {264,265,3.65e-02}, - {264,520,-4.84e-05}, - {264,521,-1.93e-04}, - {264,522,-4.84e-05}, - {264,552,-9.67e-05}, - {264,553,-3.87e-04}, - {264,554,-9.67e-05}, - {265,265,2.08e-01}, - {265,232,-1.03e-02}, - {265,233,-1.03e-02}, - {265,234,-1.03e-02}, - {265,264,3.65e-02}, - {265,266,3.65e-02}, - {265,521,-4.84e-05}, - {265,522,-1.93e-04}, - {265,523,-4.84e-05}, - {265,553,-9.67e-05}, - {265,554,-3.87e-04}, - {265,555,-9.67e-05}, - {266,266,2.08e-01}, - {266,233,-1.03e-02}, - {266,234,-1.03e-02}, - {266,235,-1.03e-02}, - {266,265,3.65e-02}, - {266,267,3.65e-02}, - {266,522,-4.84e-05}, - {266,523,-1.93e-04}, - {266,524,-4.84e-05}, - {266,554,-9.67e-05}, - {266,555,-3.87e-04}, - {266,556,-9.67e-05}, - {267,267,2.08e-01}, - {267,234,-1.03e-02}, - {267,235,-1.03e-02}, - {267,236,-1.03e-02}, - {267,266,3.65e-02}, - {267,268,3.65e-02}, - {267,523,-4.84e-05}, - {267,524,-1.93e-04}, - {267,525,-4.84e-05}, - {267,555,-9.67e-05}, - {267,556,-3.87e-04}, - {267,557,-9.67e-05}, - {268,268,2.08e-01}, - {268,235,-1.03e-02}, - {268,236,-1.03e-02}, - {268,237,-1.03e-02}, - {268,267,3.65e-02}, - {268,269,3.65e-02}, - {268,524,-4.84e-05}, - {268,525,-1.93e-04}, - {268,526,-4.84e-05}, - {268,556,-9.67e-05}, - {268,557,-3.87e-04}, - {268,558,-9.67e-05}, - {269,269,2.08e-01}, - {269,236,-1.03e-02}, - {269,237,-1.03e-02}, - {269,238,-1.03e-02}, - {269,268,3.65e-02}, - {269,270,3.65e-02}, - {269,525,-4.84e-05}, - {269,526,-1.93e-04}, - {269,527,-4.84e-05}, - {269,557,-9.67e-05}, - {269,558,-3.87e-04}, - {269,559,-9.67e-05}, - {270,270,2.08e-01}, - {270,237,-1.03e-02}, - {270,238,-1.03e-02}, - {270,239,-1.03e-02}, - {270,269,3.65e-02}, - {270,271,3.65e-02}, - {270,526,-4.84e-05}, - {270,527,-1.93e-04}, - {270,528,-4.84e-05}, - {270,558,-9.67e-05}, - {270,559,-3.87e-04}, - {270,560,-9.67e-05}, - {271,271,2.08e-01}, - {271,238,-1.03e-02}, - {271,239,-1.03e-02}, - {271,240,-1.03e-02}, - {271,270,3.65e-02}, - {271,272,3.65e-02}, - {271,527,-4.84e-05}, - {271,528,-1.93e-04}, - {271,529,-4.84e-05}, - {271,559,-9.67e-05}, - {271,560,-3.87e-04}, - {271,561,-9.67e-05}, - {272,272,2.08e-01}, - {272,239,-1.03e-02}, - {272,240,-1.03e-02}, - {272,241,-1.03e-02}, - {272,271,3.65e-02}, - {272,273,3.65e-02}, - {272,528,-4.84e-05}, - {272,529,-1.93e-04}, - {272,530,-4.84e-05}, - {272,560,-9.67e-05}, - {272,561,-3.87e-04}, - {272,562,-9.67e-05}, - {273,273,2.08e-01}, - {273,240,-1.03e-02}, - {273,241,-1.03e-02}, - {273,257,3.65e-02}, - {273,272,3.65e-02}, - {273,274,-1.03e-02}, - {273,529,-4.84e-05}, - {273,530,-1.93e-04}, - {273,546,-9.67e-05}, - {273,561,-9.67e-05}, - {273,562,-3.87e-04}, - {273,563,-4.84e-05}, - {274,274,2.08e-01}, - {274,241,-1.03e-02}, - {274,242,-1.03e-02}, - {274,257,3.65e-02}, - {274,273,-1.03e-02}, - {274,275,3.65e-02}, - {274,530,-1.93e-04}, - {274,531,-4.84e-05}, - {274,546,-9.67e-05}, - {274,562,-4.84e-05}, - {274,563,-3.87e-04}, - {274,564,-9.67e-05}, - {275,275,2.08e-01}, - {275,241,-1.03e-02}, - {275,242,-1.03e-02}, - {275,243,-1.03e-02}, - {275,274,3.65e-02}, - {275,276,3.65e-02}, - {275,530,-4.84e-05}, - {275,531,-1.93e-04}, - {275,532,-4.84e-05}, - {275,563,-9.67e-05}, - {275,564,-3.87e-04}, - {275,565,-9.67e-05}, - {276,276,2.08e-01}, - {276,242,-1.03e-02}, - {276,243,-1.03e-02}, - {276,244,-1.03e-02}, - {276,275,3.65e-02}, - {276,277,3.65e-02}, - {276,531,-4.84e-05}, - {276,532,-1.93e-04}, - {276,533,-4.84e-05}, - {276,564,-9.67e-05}, - {276,565,-3.87e-04}, - {276,566,-9.67e-05}, - {277,277,2.08e-01}, - {277,243,-1.03e-02}, - {277,244,-1.03e-02}, - {277,245,-1.03e-02}, - {277,276,3.65e-02}, - {277,278,3.65e-02}, - {277,532,-4.84e-05}, - {277,533,-1.93e-04}, - {277,534,-4.84e-05}, - {277,565,-9.67e-05}, - {277,566,-3.87e-04}, - {277,567,-9.67e-05}, - {278,278,2.08e-01}, - {278,244,-1.03e-02}, - {278,245,-1.03e-02}, - {278,246,-1.03e-02}, - {278,277,3.65e-02}, - {278,279,3.65e-02}, - {278,533,-4.84e-05}, - {278,534,-1.93e-04}, - {278,535,-4.84e-05}, - {278,566,-9.67e-05}, - {278,567,-3.87e-04}, - {278,568,-9.67e-05}, - {279,279,2.08e-01}, - {279,245,-1.03e-02}, - {279,246,-1.03e-02}, - {279,247,-1.03e-02}, - {279,278,3.65e-02}, - {279,280,3.65e-02}, - {279,534,-4.84e-05}, - {279,535,-1.93e-04}, - {279,536,-4.84e-05}, - {279,567,-9.67e-05}, - {279,568,-3.87e-04}, - {279,569,-9.67e-05}, - {280,280,2.08e-01}, - {280,246,-1.03e-02}, - {280,247,-1.03e-02}, - {280,248,-1.03e-02}, - {280,279,3.65e-02}, - {280,281,3.65e-02}, - {280,535,-4.84e-05}, - {280,536,-1.93e-04}, - {280,537,-4.84e-05}, - {280,568,-9.67e-05}, - {280,569,-3.87e-04}, - {280,570,-9.67e-05}, - {281,281,2.08e-01}, - {281,247,-1.03e-02}, - {281,248,-1.03e-02}, - {281,249,-1.03e-02}, - {281,280,3.65e-02}, - {281,282,3.65e-02}, - {281,536,-4.84e-05}, - {281,537,-1.93e-04}, - {281,538,-4.84e-05}, - {281,569,-9.67e-05}, - {281,570,-3.87e-04}, - {281,571,-9.67e-05}, - {282,282,2.08e-01}, - {282,248,-1.03e-02}, - {282,249,-1.03e-02}, - {282,250,-1.03e-02}, - {282,281,3.65e-02}, - {282,283,3.65e-02}, - {282,537,-4.84e-05}, - {282,538,-1.93e-04}, - {282,539,-4.84e-05}, - {282,570,-9.67e-05}, - {282,571,-3.87e-04}, - {282,572,-9.67e-05}, - {283,283,2.08e-01}, - {283,249,-1.03e-02}, - {283,250,-1.03e-02}, - {283,251,-1.03e-02}, - {283,282,3.65e-02}, - {283,284,3.65e-02}, - {283,538,-4.84e-05}, - {283,539,-1.93e-04}, - {283,540,-4.84e-05}, - {283,571,-9.67e-05}, - {283,572,-3.87e-04}, - {283,573,-9.67e-05}, - {284,284,2.08e-01}, - {284,250,-1.03e-02}, - {284,251,-1.03e-02}, - {284,252,-1.03e-02}, - {284,283,3.65e-02}, - {284,285,3.65e-02}, - {284,539,-4.84e-05}, - {284,540,-1.93e-04}, - {284,541,-4.84e-05}, - {284,572,-9.67e-05}, - {284,573,-3.87e-04}, - {284,574,-9.67e-05}, - {285,285,2.08e-01}, - {285,251,-1.03e-02}, - {285,252,-1.03e-02}, - {285,253,-1.03e-02}, - {285,284,3.65e-02}, - {285,286,3.65e-02}, - {285,540,-4.84e-05}, - {285,541,-1.93e-04}, - {285,542,-4.84e-05}, - {285,573,-9.67e-05}, - {285,574,-3.87e-04}, - {285,575,-9.67e-05}, - {286,286,2.08e-01}, - {286,252,-1.03e-02}, - {286,253,-1.03e-02}, - {286,254,-1.03e-02}, - {286,285,3.65e-02}, - {286,287,3.65e-02}, - {286,541,-4.84e-05}, - {286,542,-1.93e-04}, - {286,543,-4.84e-05}, - {286,574,-9.67e-05}, - {286,575,-3.87e-04}, - {286,576,-9.67e-05}, - {287,287,2.08e-01}, - {287,253,-1.03e-02}, - {287,254,-1.03e-02}, - {287,255,-1.03e-02}, - {287,286,3.65e-02}, - {287,288,3.65e-02}, - {287,542,-4.84e-05}, - {287,543,-1.93e-04}, - {287,544,-4.84e-05}, - {287,575,-9.67e-05}, - {287,576,-3.87e-04}, - {287,577,-9.67e-05}, - {288,288,2.08e-01}, - {288,226,-1.03e-02}, - {288,254,-1.03e-02}, - {288,255,-1.03e-02}, - {288,258,3.65e-02}, - {288,287,3.65e-02}, - {288,515,-4.84e-05}, - {288,543,-4.84e-05}, - {288,544,-1.93e-04}, - {288,547,-9.67e-05}, - {288,576,-9.67e-05}, - {288,577,-3.87e-04}, - {289,289,1.87e-01}, - {289,0,1.93e-04}, - {289,1,9.67e-05}, - {289,2,9.67e-05}, - {289,3,4.84e-05}, - {289,290,3.65e-02}, - {289,291,3.65e-02}, - {289,292,-1.03e-02}, - {290,290,2.08e-01}, - {290,0,9.67e-05}, - {290,1,3.87e-04}, - {290,2,4.84e-05}, - {290,3,1.93e-04}, - {290,4,9.67e-05}, - {290,6,4.84e-05}, - {290,289,3.65e-02}, - {290,291,-1.03e-02}, - {290,292,-1.03e-02}, - {290,293,3.65e-02}, - {290,295,-1.03e-02}, - {291,291,2.08e-01}, - {291,0,9.67e-05}, - {291,1,4.84e-05}, - {291,2,3.87e-04}, - {291,3,1.93e-04}, - {291,5,9.67e-05}, - {291,8,4.84e-05}, - {291,289,3.65e-02}, - {291,290,-1.03e-02}, - {291,292,-1.03e-02}, - {291,294,3.65e-02}, - {291,297,-1.03e-02}, - {292,292,8.29e-02}, - {292,0,4.84e-05}, - {292,1,1.93e-04}, - {292,2,1.93e-04}, - {292,3,7.74e-04}, - {292,4,4.84e-05}, - {292,5,4.84e-05}, - {292,6,1.93e-04}, - {292,7,4.84e-05}, - {292,8,1.93e-04}, - {292,289,-1.03e-02}, - {292,290,-1.03e-02}, - {292,291,-1.03e-02}, - {292,293,-1.03e-02}, - {292,294,-1.03e-02}, - {292,295,-1.03e-02}, - {292,296,-1.03e-02}, - {292,297,-1.03e-02}, - {293,293,2.08e-01}, - {293,1,9.67e-05}, - {293,3,4.84e-05}, - {293,4,3.87e-04}, - {293,6,1.93e-04}, - {293,9,9.67e-05}, - {293,11,4.84e-05}, - {293,290,3.65e-02}, - {293,292,-1.03e-02}, - {293,295,-1.03e-02}, - {293,298,3.65e-02}, - {293,300,-1.03e-02}, - {294,294,2.08e-01}, - {294,2,9.67e-05}, - {294,3,4.84e-05}, - {294,5,3.87e-04}, - {294,8,1.93e-04}, - {294,10,9.67e-05}, - {294,15,4.84e-05}, - {294,291,3.65e-02}, - {294,292,-1.03e-02}, - {294,297,-1.03e-02}, - {294,299,3.65e-02}, - {294,304,-1.03e-02}, - {295,295,8.29e-02}, - {295,1,4.84e-05}, - {295,3,1.93e-04}, - {295,4,1.93e-04}, - {295,6,7.74e-04}, - {295,7,1.93e-04}, - {295,8,4.84e-05}, - {295,9,4.84e-05}, - {295,11,1.93e-04}, - {295,12,4.84e-05}, - {295,290,-1.03e-02}, - {295,292,-1.03e-02}, - {295,293,-1.03e-02}, - {295,296,-1.03e-02}, - {295,297,-1.03e-02}, - {295,298,-1.03e-02}, - {295,300,-1.03e-02}, - {295,301,-1.03e-02}, - {296,296,8.29e-02}, - {296,3,4.84e-05}, - {296,6,1.93e-04}, - {296,7,7.74e-04}, - {296,8,1.93e-04}, - {296,11,4.84e-05}, - {296,12,1.93e-04}, - {296,13,4.84e-05}, - {296,14,1.93e-04}, - {296,15,4.84e-05}, - {296,292,-1.03e-02}, - {296,295,-1.03e-02}, - {296,297,-1.03e-02}, - {296,300,-1.03e-02}, - {296,301,-1.03e-02}, - {296,302,-1.03e-02}, - {296,303,-1.03e-02}, - {296,304,-1.03e-02}, - {297,297,8.29e-02}, - {297,2,4.84e-05}, - {297,3,1.93e-04}, - {297,5,1.93e-04}, - {297,6,4.84e-05}, - {297,7,1.93e-04}, - {297,8,7.74e-04}, - {297,10,4.84e-05}, - {297,14,4.84e-05}, - {297,15,1.93e-04}, - {297,291,-1.03e-02}, - {297,292,-1.03e-02}, - {297,294,-1.03e-02}, - {297,295,-1.03e-02}, - {297,296,-1.03e-02}, - {297,299,-1.03e-02}, - {297,303,-1.03e-02}, - {297,304,-1.03e-02}, - {298,298,2.08e-01}, - {298,4,9.67e-05}, - {298,6,4.84e-05}, - {298,9,3.87e-04}, - {298,11,1.93e-04}, - {298,16,9.67e-05}, - {298,18,4.84e-05}, - {298,293,3.65e-02}, - {298,295,-1.03e-02}, - {298,300,-1.03e-02}, - {298,305,3.65e-02}, - {298,307,-1.03e-02}, - {299,299,2.08e-01}, - {299,5,9.67e-05}, - {299,8,4.84e-05}, - {299,10,3.87e-04}, - {299,15,1.93e-04}, - {299,17,9.67e-05}, - {299,24,4.84e-05}, - {299,294,3.65e-02}, - {299,297,-1.03e-02}, - {299,304,-1.03e-02}, - {299,306,3.65e-02}, - {299,313,-1.03e-02}, - {300,300,8.29e-02}, - {300,4,4.84e-05}, - {300,6,1.93e-04}, - {300,7,4.84e-05}, - {300,9,1.93e-04}, - {300,11,7.74e-04}, - {300,12,1.93e-04}, - {300,16,4.84e-05}, - {300,18,1.93e-04}, - {300,19,4.84e-05}, - {300,293,-1.03e-02}, - {300,295,-1.03e-02}, - {300,296,-1.03e-02}, - {300,298,-1.03e-02}, - {300,301,-1.03e-02}, - {300,305,-1.03e-02}, - {300,307,-1.03e-02}, - {300,308,-1.03e-02}, - {301,301,8.29e-02}, - {301,6,4.84e-05}, - {301,7,1.93e-04}, - {301,11,1.93e-04}, - {301,12,7.74e-04}, - {301,13,1.93e-04}, - {301,14,4.84e-05}, - {301,18,4.84e-05}, - {301,19,1.93e-04}, - {301,20,4.84e-05}, - {301,295,-1.03e-02}, - {301,296,-1.03e-02}, - {301,300,-1.03e-02}, - {301,302,-1.03e-02}, - {301,303,-1.03e-02}, - {301,307,-1.03e-02}, - {301,308,-1.03e-02}, - {301,309,-1.03e-02}, - {302,302,8.29e-02}, - {302,7,4.84e-05}, - {302,12,1.93e-04}, - {302,13,7.74e-04}, - {302,14,1.93e-04}, - {302,19,4.84e-05}, - {302,20,1.93e-04}, - {302,21,4.84e-05}, - {302,22,1.93e-04}, - {302,23,4.84e-05}, - {302,296,-1.03e-02}, - {302,301,-1.03e-02}, - {302,303,-1.03e-02}, - {302,308,-1.03e-02}, - {302,309,-1.03e-02}, - {302,310,-1.03e-02}, - {302,311,-1.03e-02}, - {302,312,-1.03e-02}, - {303,303,8.29e-02}, - {303,7,1.93e-04}, - {303,8,4.84e-05}, - {303,12,4.84e-05}, - {303,13,1.93e-04}, - {303,14,7.74e-04}, - {303,15,1.93e-04}, - {303,22,4.84e-05}, - {303,23,1.93e-04}, - {303,24,4.84e-05}, - {303,296,-1.03e-02}, - {303,297,-1.03e-02}, - {303,301,-1.03e-02}, - {303,302,-1.03e-02}, - {303,304,-1.03e-02}, - {303,311,-1.03e-02}, - {303,312,-1.03e-02}, - {303,313,-1.03e-02}, - {304,304,8.29e-02}, - {304,5,4.84e-05}, - {304,7,4.84e-05}, - {304,8,1.93e-04}, - {304,10,1.93e-04}, - {304,14,1.93e-04}, - {304,15,7.74e-04}, - {304,17,4.84e-05}, - {304,23,4.84e-05}, - {304,24,1.93e-04}, - {304,294,-1.03e-02}, - {304,296,-1.03e-02}, - {304,297,-1.03e-02}, - {304,299,-1.03e-02}, - {304,303,-1.03e-02}, - {304,306,-1.03e-02}, - {304,312,-1.03e-02}, - {304,313,-1.03e-02}, - {305,305,2.08e-01}, - {305,9,9.67e-05}, - {305,11,4.84e-05}, - {305,16,3.87e-04}, - {305,18,1.93e-04}, - {305,25,9.67e-05}, - {305,27,4.84e-05}, - {305,298,3.65e-02}, - {305,300,-1.03e-02}, - {305,307,-1.03e-02}, - {305,314,3.65e-02}, - {305,316,-1.03e-02}, - {306,306,2.08e-01}, - {306,10,9.67e-05}, - {306,15,4.84e-05}, - {306,17,3.87e-04}, - {306,24,1.93e-04}, - {306,26,9.67e-05}, - {306,33,4.84e-05}, - {306,299,3.65e-02}, - {306,304,-1.03e-02}, - {306,313,-1.03e-02}, - {306,315,3.65e-02}, - {306,322,-1.03e-02}, - {307,307,8.29e-02}, - {307,9,4.84e-05}, - {307,11,1.93e-04}, - {307,12,4.84e-05}, - {307,16,1.93e-04}, - {307,18,7.74e-04}, - {307,19,1.93e-04}, - {307,25,4.84e-05}, - {307,27,1.93e-04}, - {307,28,4.84e-05}, - {307,298,-1.03e-02}, - {307,300,-1.03e-02}, - {307,301,-1.03e-02}, - {307,305,-1.03e-02}, - {307,308,-1.03e-02}, - {307,314,-1.03e-02}, - {307,316,-1.03e-02}, - {307,317,-1.03e-02}, - {308,308,8.29e-02}, - {308,11,4.84e-05}, - {308,12,1.93e-04}, - {308,13,4.84e-05}, - {308,18,1.93e-04}, - {308,19,7.74e-04}, - {308,20,1.93e-04}, - {308,27,4.84e-05}, - {308,28,1.93e-04}, - {308,29,4.84e-05}, - {308,300,-1.03e-02}, - {308,301,-1.03e-02}, - {308,302,-1.03e-02}, - {308,307,-1.03e-02}, - {308,309,-1.03e-02}, - {308,316,-1.03e-02}, - {308,317,-1.03e-02}, - {308,318,-1.03e-02}, - {309,309,8.29e-02}, - {309,12,4.84e-05}, - {309,13,1.93e-04}, - {309,19,1.93e-04}, - {309,20,7.74e-04}, - {309,21,1.93e-04}, - {309,22,4.84e-05}, - {309,28,4.84e-05}, - {309,29,1.93e-04}, - {309,30,4.84e-05}, - {309,301,-1.03e-02}, - {309,302,-1.03e-02}, - {309,308,-1.03e-02}, - {309,310,-1.03e-02}, - {309,311,-1.03e-02}, - {309,317,-1.03e-02}, - {309,318,-1.03e-02}, - {309,319,-1.03e-02}, - {310,310,8.29e-02}, - {310,13,4.84e-05}, - {310,20,1.93e-04}, - {310,21,7.74e-04}, - {310,22,1.93e-04}, - {310,29,4.84e-05}, - {310,30,1.93e-04}, - {310,31,4.84e-05}, - {310,32,1.93e-04}, - {310,35,4.84e-05}, - {310,302,-1.03e-02}, - {310,309,-1.03e-02}, - {310,311,-1.03e-02}, - {310,318,-1.03e-02}, - {310,319,-1.03e-02}, - {310,320,-1.03e-02}, - {310,321,-1.03e-02}, - {310,324,-1.03e-02}, - {311,311,8.29e-02}, - {311,13,1.93e-04}, - {311,14,4.84e-05}, - {311,20,4.84e-05}, - {311,21,1.93e-04}, - {311,22,7.74e-04}, - {311,23,1.93e-04}, - {311,32,4.84e-05}, - {311,34,4.84e-05}, - {311,35,1.93e-04}, - {311,302,-1.03e-02}, - {311,303,-1.03e-02}, - {311,309,-1.03e-02}, - {311,310,-1.03e-02}, - {311,312,-1.03e-02}, - {311,321,-1.03e-02}, - {311,323,-1.03e-02}, - {311,324,-1.03e-02}, - {312,312,8.29e-02}, - {312,13,4.84e-05}, - {312,14,1.93e-04}, - {312,15,4.84e-05}, - {312,22,1.93e-04}, - {312,23,7.74e-04}, - {312,24,1.93e-04}, - {312,33,4.84e-05}, - {312,34,1.93e-04}, - {312,35,4.84e-05}, - {312,302,-1.03e-02}, - {312,303,-1.03e-02}, - {312,304,-1.03e-02}, - {312,311,-1.03e-02}, - {312,313,-1.03e-02}, - {312,322,-1.03e-02}, - {312,323,-1.03e-02}, - {312,324,-1.03e-02}, - {313,313,8.29e-02}, - {313,10,4.84e-05}, - {313,14,4.84e-05}, - {313,15,1.93e-04}, - {313,17,1.93e-04}, - {313,23,1.93e-04}, - {313,24,7.74e-04}, - {313,26,4.84e-05}, - {313,33,1.93e-04}, - {313,34,4.84e-05}, - {313,299,-1.03e-02}, - {313,303,-1.03e-02}, - {313,304,-1.03e-02}, - {313,306,-1.03e-02}, - {313,312,-1.03e-02}, - {313,315,-1.03e-02}, - {313,322,-1.03e-02}, - {313,323,-1.03e-02}, - {314,314,2.08e-01}, - {314,16,9.67e-05}, - {314,18,4.84e-05}, - {314,25,3.87e-04}, - {314,27,1.93e-04}, - {314,36,9.67e-05}, - {314,38,4.84e-05}, - {314,305,3.65e-02}, - {314,307,-1.03e-02}, - {314,316,-1.03e-02}, - {314,325,3.65e-02}, - {314,327,-1.03e-02}, - {315,315,2.08e-01}, - {315,17,9.67e-05}, - {315,24,4.84e-05}, - {315,26,3.87e-04}, - {315,33,1.93e-04}, - {315,37,9.67e-05}, - {315,47,4.84e-05}, - {315,306,3.65e-02}, - {315,313,-1.03e-02}, - {315,322,-1.03e-02}, - {315,326,3.65e-02}, - {315,336,-1.03e-02}, - {316,316,8.29e-02}, - {316,16,4.84e-05}, - {316,18,1.93e-04}, - {316,19,4.84e-05}, - {316,25,1.93e-04}, - {316,27,7.74e-04}, - {316,28,1.93e-04}, - {316,36,4.84e-05}, - {316,38,1.93e-04}, - {316,39,4.84e-05}, - {316,305,-1.03e-02}, - {316,307,-1.03e-02}, - {316,308,-1.03e-02}, - {316,314,-1.03e-02}, - {316,317,-1.03e-02}, - {316,325,-1.03e-02}, - {316,327,-1.03e-02}, - {316,328,-1.03e-02}, - {317,317,8.29e-02}, - {317,18,4.84e-05}, - {317,19,1.93e-04}, - {317,20,4.84e-05}, - {317,27,1.93e-04}, - {317,28,7.74e-04}, - {317,29,1.93e-04}, - {317,38,4.84e-05}, - {317,39,1.93e-04}, - {317,40,4.84e-05}, - {317,307,-1.03e-02}, - {317,308,-1.03e-02}, - {317,309,-1.03e-02}, - {317,316,-1.03e-02}, - {317,318,-1.03e-02}, - {317,327,-1.03e-02}, - {317,328,-1.03e-02}, - {317,329,-1.03e-02}, - {318,318,8.29e-02}, - {318,19,4.84e-05}, - {318,20,1.93e-04}, - {318,21,4.84e-05}, - {318,28,1.93e-04}, - {318,29,7.74e-04}, - {318,30,1.93e-04}, - {318,39,4.84e-05}, - {318,40,1.93e-04}, - {318,41,4.84e-05}, - {318,308,-1.03e-02}, - {318,309,-1.03e-02}, - {318,310,-1.03e-02}, - {318,317,-1.03e-02}, - {318,319,-1.03e-02}, - {318,328,-1.03e-02}, - {318,329,-1.03e-02}, - {318,330,-1.03e-02}, - {319,319,8.29e-02}, - {319,20,4.84e-05}, - {319,21,1.93e-04}, - {319,29,1.93e-04}, - {319,30,7.74e-04}, - {319,31,1.93e-04}, - {319,32,4.84e-05}, - {319,40,4.84e-05}, - {319,41,1.93e-04}, - {319,42,4.84e-05}, - {319,309,-1.03e-02}, - {319,310,-1.03e-02}, - {319,318,-1.03e-02}, - {319,320,-1.03e-02}, - {319,321,-1.03e-02}, - {319,329,-1.03e-02}, - {319,330,-1.03e-02}, - {319,331,-1.03e-02}, - {320,320,8.29e-02}, - {320,21,4.84e-05}, - {320,30,1.93e-04}, - {320,31,7.74e-04}, - {320,32,1.93e-04}, - {320,41,4.84e-05}, - {320,42,1.93e-04}, - {320,43,4.84e-05}, - {320,44,1.93e-04}, - {320,45,4.84e-05}, - {320,310,-1.03e-02}, - {320,319,-1.03e-02}, - {320,321,-1.03e-02}, - {320,330,-1.03e-02}, - {320,331,-1.03e-02}, - {320,332,-1.03e-02}, - {320,333,-1.03e-02}, - {320,334,-1.03e-02}, - {321,321,8.29e-02}, - {321,21,1.93e-04}, - {321,22,4.84e-05}, - {321,30,4.84e-05}, - {321,31,1.93e-04}, - {321,32,7.74e-04}, - {321,35,1.93e-04}, - {321,44,4.84e-05}, - {321,45,1.93e-04}, - {321,48,4.84e-05}, - {321,310,-1.03e-02}, - {321,311,-1.03e-02}, - {321,319,-1.03e-02}, - {321,320,-1.03e-02}, - {321,324,-1.03e-02}, - {321,333,-1.03e-02}, - {321,334,-1.03e-02}, - {321,337,-1.03e-02}, - {322,322,8.29e-02}, - {322,17,4.84e-05}, - {322,23,4.84e-05}, - {322,24,1.93e-04}, - {322,26,1.93e-04}, - {322,33,7.74e-04}, - {322,34,1.93e-04}, - {322,37,4.84e-05}, - {322,46,4.84e-05}, - {322,47,1.93e-04}, - {322,306,-1.03e-02}, - {322,312,-1.03e-02}, - {322,313,-1.03e-02}, - {322,315,-1.03e-02}, - {322,323,-1.03e-02}, - {322,326,-1.03e-02}, - {322,335,-1.03e-02}, - {322,336,-1.03e-02}, - {323,323,8.29e-02}, - {323,22,4.84e-05}, - {323,23,1.93e-04}, - {323,24,4.84e-05}, - {323,33,1.93e-04}, - {323,34,7.74e-04}, - {323,35,1.93e-04}, - {323,46,1.93e-04}, - {323,47,4.84e-05}, - {323,48,4.84e-05}, - {323,311,-1.03e-02}, - {323,312,-1.03e-02}, - {323,313,-1.03e-02}, - {323,322,-1.03e-02}, - {323,324,-1.03e-02}, - {323,335,-1.03e-02}, - {323,336,-1.03e-02}, - {323,337,-1.03e-02}, - {324,324,8.29e-02}, - {324,21,4.84e-05}, - {324,22,1.93e-04}, - {324,23,4.84e-05}, - {324,32,1.93e-04}, - {324,34,1.93e-04}, - {324,35,7.74e-04}, - {324,45,4.84e-05}, - {324,46,4.84e-05}, - {324,48,1.93e-04}, - {324,310,-1.03e-02}, - {324,311,-1.03e-02}, - {324,312,-1.03e-02}, - {324,321,-1.03e-02}, - {324,323,-1.03e-02}, - {324,334,-1.03e-02}, - {324,335,-1.03e-02}, - {324,337,-1.03e-02}, - {325,325,2.08e-01}, - {325,25,9.67e-05}, - {325,27,4.84e-05}, - {325,36,3.87e-04}, - {325,38,1.93e-04}, - {325,49,9.67e-05}, - {325,51,4.84e-05}, - {325,314,3.65e-02}, - {325,316,-1.03e-02}, - {325,327,-1.03e-02}, - {325,338,3.65e-02}, - {325,340,-1.03e-02}, - {326,326,2.08e-01}, - {326,26,9.67e-05}, - {326,33,4.84e-05}, - {326,37,3.87e-04}, - {326,47,1.93e-04}, - {326,50,9.67e-05}, - {326,63,4.84e-05}, - {326,315,3.65e-02}, - {326,322,-1.03e-02}, - {326,336,-1.03e-02}, - {326,339,3.65e-02}, - {326,352,-1.03e-02}, - {327,327,8.29e-02}, - {327,25,4.84e-05}, - {327,27,1.93e-04}, - {327,28,4.84e-05}, - {327,36,1.93e-04}, - {327,38,7.74e-04}, - {327,39,1.93e-04}, - {327,49,4.84e-05}, - {327,51,1.93e-04}, - {327,52,4.84e-05}, - {327,314,-1.03e-02}, - {327,316,-1.03e-02}, - {327,317,-1.03e-02}, - {327,325,-1.03e-02}, - {327,328,-1.03e-02}, - {327,338,-1.03e-02}, - {327,340,-1.03e-02}, - {327,341,-1.03e-02}, - {328,328,8.29e-02}, - {328,27,4.84e-05}, - {328,28,1.93e-04}, - {328,29,4.84e-05}, - {328,38,1.93e-04}, - {328,39,7.74e-04}, - {328,40,1.93e-04}, - {328,51,4.84e-05}, - {328,52,1.93e-04}, - {328,53,4.84e-05}, - {328,316,-1.03e-02}, - {328,317,-1.03e-02}, - {328,318,-1.03e-02}, - {328,327,-1.03e-02}, - {328,329,-1.03e-02}, - {328,340,-1.03e-02}, - {328,341,-1.03e-02}, - {328,342,-1.03e-02}, - {329,329,8.29e-02}, - {329,28,4.84e-05}, - {329,29,1.93e-04}, - {329,30,4.84e-05}, - {329,39,1.93e-04}, - {329,40,7.74e-04}, - {329,41,1.93e-04}, - {329,52,4.84e-05}, - {329,53,1.93e-04}, - {329,54,4.84e-05}, - {329,317,-1.03e-02}, - {329,318,-1.03e-02}, - {329,319,-1.03e-02}, - {329,328,-1.03e-02}, - {329,330,-1.03e-02}, - {329,341,-1.03e-02}, - {329,342,-1.03e-02}, - {329,343,-1.03e-02}, - {330,330,8.29e-02}, - {330,29,4.84e-05}, - {330,30,1.93e-04}, - {330,31,4.84e-05}, - {330,40,1.93e-04}, - {330,41,7.74e-04}, - {330,42,1.93e-04}, - {330,53,4.84e-05}, - {330,54,1.93e-04}, - {330,55,4.84e-05}, - {330,318,-1.03e-02}, - {330,319,-1.03e-02}, - {330,320,-1.03e-02}, - {330,329,-1.03e-02}, - {330,331,-1.03e-02}, - {330,342,-1.03e-02}, - {330,343,-1.03e-02}, - {330,344,-1.03e-02}, - {331,331,8.29e-02}, - {331,30,4.84e-05}, - {331,31,1.93e-04}, - {331,41,1.93e-04}, - {331,42,7.74e-04}, - {331,43,1.93e-04}, - {331,44,4.84e-05}, - {331,54,4.84e-05}, - {331,55,1.93e-04}, - {331,56,4.84e-05}, - {331,319,-1.03e-02}, - {331,320,-1.03e-02}, - {331,330,-1.03e-02}, - {331,332,-1.03e-02}, - {331,333,-1.03e-02}, - {331,343,-1.03e-02}, - {331,344,-1.03e-02}, - {331,345,-1.03e-02}, - {332,332,8.29e-02}, - {332,31,4.84e-05}, - {332,42,1.93e-04}, - {332,43,7.74e-04}, - {332,44,1.93e-04}, - {332,55,4.84e-05}, - {332,56,1.93e-04}, - {332,57,4.84e-05}, - {332,58,1.93e-04}, - {332,59,4.84e-05}, - {332,320,-1.03e-02}, - {332,331,-1.03e-02}, - {332,333,-1.03e-02}, - {332,344,-1.03e-02}, - {332,345,-1.03e-02}, - {332,346,-1.03e-02}, - {332,347,-1.03e-02}, - {332,348,-1.03e-02}, - {333,333,8.29e-02}, - {333,31,1.93e-04}, - {333,32,4.84e-05}, - {333,42,4.84e-05}, - {333,43,1.93e-04}, - {333,44,7.74e-04}, - {333,45,1.93e-04}, - {333,58,4.84e-05}, - {333,59,1.93e-04}, - {333,60,4.84e-05}, - {333,320,-1.03e-02}, - {333,321,-1.03e-02}, - {333,331,-1.03e-02}, - {333,332,-1.03e-02}, - {333,334,-1.03e-02}, - {333,347,-1.03e-02}, - {333,348,-1.03e-02}, - {333,349,-1.03e-02}, - {334,334,8.29e-02}, - {334,31,4.84e-05}, - {334,32,1.93e-04}, - {334,35,4.84e-05}, - {334,44,1.93e-04}, - {334,45,7.74e-04}, - {334,48,1.93e-04}, - {334,59,4.84e-05}, - {334,60,1.93e-04}, - {334,61,4.84e-05}, - {334,320,-1.03e-02}, - {334,321,-1.03e-02}, - {334,324,-1.03e-02}, - {334,333,-1.03e-02}, - {334,337,-1.03e-02}, - {334,348,-1.03e-02}, - {334,349,-1.03e-02}, - {334,350,-1.03e-02}, - {335,335,8.29e-02}, - {335,33,4.84e-05}, - {335,34,1.93e-04}, - {335,35,4.84e-05}, - {335,46,7.74e-04}, - {335,47,1.93e-04}, - {335,48,1.93e-04}, - {335,61,4.84e-05}, - {335,62,1.93e-04}, - {335,63,4.84e-05}, - {335,322,-1.03e-02}, - {335,323,-1.03e-02}, - {335,324,-1.03e-02}, - {335,336,-1.03e-02}, - {335,337,-1.03e-02}, - {335,350,-1.03e-02}, - {335,351,-1.03e-02}, - {335,352,-1.03e-02}, - {336,336,8.29e-02}, - {336,26,4.84e-05}, - {336,33,1.93e-04}, - {336,34,4.84e-05}, - {336,37,1.93e-04}, - {336,46,1.93e-04}, - {336,47,7.74e-04}, - {336,50,4.84e-05}, - {336,62,4.84e-05}, - {336,63,1.93e-04}, - {336,315,-1.03e-02}, - {336,322,-1.03e-02}, - {336,323,-1.03e-02}, - {336,326,-1.03e-02}, - {336,335,-1.03e-02}, - {336,339,-1.03e-02}, - {336,351,-1.03e-02}, - {336,352,-1.03e-02}, - {337,337,8.29e-02}, - {337,32,4.84e-05}, - {337,34,4.84e-05}, - {337,35,1.93e-04}, - {337,45,1.93e-04}, - {337,46,1.93e-04}, - {337,48,7.74e-04}, - {337,60,4.84e-05}, - {337,61,1.93e-04}, - {337,62,4.84e-05}, - {337,321,-1.03e-02}, - {337,323,-1.03e-02}, - {337,324,-1.03e-02}, - {337,334,-1.03e-02}, - {337,335,-1.03e-02}, - {337,349,-1.03e-02}, - {337,350,-1.03e-02}, - {337,351,-1.03e-02}, - {338,338,2.08e-01}, - {338,36,9.67e-05}, - {338,38,4.84e-05}, - {338,49,3.87e-04}, - {338,51,1.93e-04}, - {338,64,9.67e-05}, - {338,66,4.84e-05}, - {338,325,3.65e-02}, - {338,327,-1.03e-02}, - {338,340,-1.03e-02}, - {338,353,3.65e-02}, - {338,355,-1.03e-02}, - {339,339,2.08e-01}, - {339,37,9.67e-05}, - {339,47,4.84e-05}, - {339,50,3.87e-04}, - {339,63,1.93e-04}, - {339,65,9.67e-05}, - {339,80,4.84e-05}, - {339,326,3.65e-02}, - {339,336,-1.03e-02}, - {339,352,-1.03e-02}, - {339,354,3.65e-02}, - {339,369,-1.03e-02}, - {340,340,8.29e-02}, - {340,36,4.84e-05}, - {340,38,1.93e-04}, - {340,39,4.84e-05}, - {340,49,1.93e-04}, - {340,51,7.74e-04}, - {340,52,1.93e-04}, - {340,64,4.84e-05}, - {340,66,1.93e-04}, - {340,67,4.84e-05}, - {340,325,-1.03e-02}, - {340,327,-1.03e-02}, - {340,328,-1.03e-02}, - {340,338,-1.03e-02}, - {340,341,-1.03e-02}, - {340,353,-1.03e-02}, - {340,355,-1.03e-02}, - {340,356,-1.03e-02}, - {341,341,8.29e-02}, - {341,38,4.84e-05}, - {341,39,1.93e-04}, - {341,40,4.84e-05}, - {341,51,1.93e-04}, - {341,52,7.74e-04}, - {341,53,1.93e-04}, - {341,66,4.84e-05}, - {341,67,1.93e-04}, - {341,68,4.84e-05}, - {341,327,-1.03e-02}, - {341,328,-1.03e-02}, - {341,329,-1.03e-02}, - {341,340,-1.03e-02}, - {341,342,-1.03e-02}, - {341,355,-1.03e-02}, - {341,356,-1.03e-02}, - {341,357,-1.03e-02}, - {342,342,8.29e-02}, - {342,39,4.84e-05}, - {342,40,1.93e-04}, - {342,41,4.84e-05}, - {342,52,1.93e-04}, - {342,53,7.74e-04}, - {342,54,1.93e-04}, - {342,67,4.84e-05}, - {342,68,1.93e-04}, - {342,69,4.84e-05}, - {342,328,-1.03e-02}, - {342,329,-1.03e-02}, - {342,330,-1.03e-02}, - {342,341,-1.03e-02}, - {342,343,-1.03e-02}, - {342,356,-1.03e-02}, - {342,357,-1.03e-02}, - {342,358,-1.03e-02}, - {343,343,8.29e-02}, - {343,40,4.84e-05}, - {343,41,1.93e-04}, - {343,42,4.84e-05}, - {343,53,1.93e-04}, - {343,54,7.74e-04}, - {343,55,1.93e-04}, - {343,68,4.84e-05}, - {343,69,1.93e-04}, - {343,70,4.84e-05}, - {343,329,-1.03e-02}, - {343,330,-1.03e-02}, - {343,331,-1.03e-02}, - {343,342,-1.03e-02}, - {343,344,-1.03e-02}, - {343,357,-1.03e-02}, - {343,358,-1.03e-02}, - {343,359,-1.03e-02}, - {344,344,8.29e-02}, - {344,41,4.84e-05}, - {344,42,1.93e-04}, - {344,43,4.84e-05}, - {344,54,1.93e-04}, - {344,55,7.74e-04}, - {344,56,1.93e-04}, - {344,69,4.84e-05}, - {344,70,1.93e-04}, - {344,71,4.84e-05}, - {344,330,-1.03e-02}, - {344,331,-1.03e-02}, - {344,332,-1.03e-02}, - {344,343,-1.03e-02}, - {344,345,-1.03e-02}, - {344,358,-1.03e-02}, - {344,359,-1.03e-02}, - {344,360,-1.03e-02}, - {345,345,8.29e-02}, - {345,42,4.84e-05}, - {345,43,1.93e-04}, - {345,55,1.93e-04}, - {345,56,7.74e-04}, - {345,57,1.93e-04}, - {345,58,4.84e-05}, - {345,70,4.84e-05}, - {345,71,1.93e-04}, - {345,72,4.84e-05}, - {345,331,-1.03e-02}, - {345,332,-1.03e-02}, - {345,344,-1.03e-02}, - {345,346,-1.03e-02}, - {345,347,-1.03e-02}, - {345,359,-1.03e-02}, - {345,360,-1.03e-02}, - {345,361,-1.03e-02}, - {346,346,8.29e-02}, - {346,43,4.84e-05}, - {346,56,1.93e-04}, - {346,57,7.74e-04}, - {346,58,1.93e-04}, - {346,71,4.84e-05}, - {346,72,1.93e-04}, - {346,73,4.84e-05}, - {346,74,1.93e-04}, - {346,75,4.84e-05}, - {346,332,-1.03e-02}, - {346,345,-1.03e-02}, - {346,347,-1.03e-02}, - {346,360,-1.03e-02}, - {346,361,-1.03e-02}, - {346,362,-1.03e-02}, - {346,363,-1.03e-02}, - {346,364,-1.03e-02}, - {347,347,8.29e-02}, - {347,43,1.93e-04}, - {347,44,4.84e-05}, - {347,56,4.84e-05}, - {347,57,1.93e-04}, - {347,58,7.74e-04}, - {347,59,1.93e-04}, - {347,74,4.84e-05}, - {347,75,1.93e-04}, - {347,76,4.84e-05}, - {347,332,-1.03e-02}, - {347,333,-1.03e-02}, - {347,345,-1.03e-02}, - {347,346,-1.03e-02}, - {347,348,-1.03e-02}, - {347,363,-1.03e-02}, - {347,364,-1.03e-02}, - {347,365,-1.03e-02}, - {348,348,8.29e-02}, - {348,43,4.84e-05}, - {348,44,1.93e-04}, - {348,45,4.84e-05}, - {348,58,1.93e-04}, - {348,59,7.74e-04}, - {348,60,1.93e-04}, - {348,75,4.84e-05}, - {348,76,1.93e-04}, - {348,77,4.84e-05}, - {348,332,-1.03e-02}, - {348,333,-1.03e-02}, - {348,334,-1.03e-02}, - {348,347,-1.03e-02}, - {348,349,-1.03e-02}, - {348,364,-1.03e-02}, - {348,365,-1.03e-02}, - {348,366,-1.03e-02}, - {349,349,8.29e-02}, - {349,44,4.84e-05}, - {349,45,1.93e-04}, - {349,48,4.84e-05}, - {349,59,1.93e-04}, - {349,60,7.74e-04}, - {349,61,1.93e-04}, - {349,76,4.84e-05}, - {349,77,1.93e-04}, - {349,78,4.84e-05}, - {349,333,-1.03e-02}, - {349,334,-1.03e-02}, - {349,337,-1.03e-02}, - {349,348,-1.03e-02}, - {349,350,-1.03e-02}, - {349,365,-1.03e-02}, - {349,366,-1.03e-02}, - {349,367,-1.03e-02}, - {350,350,8.29e-02}, - {350,45,4.84e-05}, - {350,46,4.84e-05}, - {350,48,1.93e-04}, - {350,60,1.93e-04}, - {350,61,7.74e-04}, - {350,62,1.93e-04}, - {350,77,4.84e-05}, - {350,78,1.93e-04}, - {350,79,4.84e-05}, - {350,334,-1.03e-02}, - {350,335,-1.03e-02}, - {350,337,-1.03e-02}, - {350,349,-1.03e-02}, - {350,351,-1.03e-02}, - {350,366,-1.03e-02}, - {350,367,-1.03e-02}, - {350,368,-1.03e-02}, - {351,351,8.29e-02}, - {351,46,1.93e-04}, - {351,47,4.84e-05}, - {351,48,4.84e-05}, - {351,61,1.93e-04}, - {351,62,7.74e-04}, - {351,63,1.93e-04}, - {351,78,4.84e-05}, - {351,79,1.93e-04}, - {351,80,4.84e-05}, - {351,335,-1.03e-02}, - {351,336,-1.03e-02}, - {351,337,-1.03e-02}, - {351,350,-1.03e-02}, - {351,352,-1.03e-02}, - {351,367,-1.03e-02}, - {351,368,-1.03e-02}, - {351,369,-1.03e-02}, - {352,352,8.29e-02}, - {352,37,4.84e-05}, - {352,46,4.84e-05}, - {352,47,1.93e-04}, - {352,50,1.93e-04}, - {352,62,1.93e-04}, - {352,63,7.74e-04}, - {352,65,4.84e-05}, - {352,79,4.84e-05}, - {352,80,1.93e-04}, - {352,326,-1.03e-02}, - {352,335,-1.03e-02}, - {352,336,-1.03e-02}, - {352,339,-1.03e-02}, - {352,351,-1.03e-02}, - {352,354,-1.03e-02}, - {352,368,-1.03e-02}, - {352,369,-1.03e-02}, - {353,353,2.08e-01}, - {353,49,9.67e-05}, - {353,51,4.84e-05}, - {353,64,3.87e-04}, - {353,66,1.93e-04}, - {353,81,9.67e-05}, - {353,83,4.84e-05}, - {353,338,3.65e-02}, - {353,340,-1.03e-02}, - {353,355,-1.03e-02}, - {353,370,3.65e-02}, - {353,372,-1.03e-02}, - {354,354,2.08e-01}, - {354,50,9.67e-05}, - {354,63,4.84e-05}, - {354,65,3.87e-04}, - {354,80,1.93e-04}, - {354,82,9.67e-05}, - {354,93,4.84e-05}, - {354,339,3.65e-02}, - {354,352,-1.03e-02}, - {354,369,-1.03e-02}, - {354,371,3.65e-02}, - {354,382,-1.03e-02}, - {355,355,8.29e-02}, - {355,49,4.84e-05}, - {355,51,1.93e-04}, - {355,52,4.84e-05}, - {355,64,1.93e-04}, - {355,66,7.74e-04}, - {355,67,1.93e-04}, - {355,81,4.84e-05}, - {355,83,1.93e-04}, - {355,84,4.84e-05}, - {355,338,-1.03e-02}, - {355,340,-1.03e-02}, - {355,341,-1.03e-02}, - {355,353,-1.03e-02}, - {355,356,-1.03e-02}, - {355,370,-1.03e-02}, - {355,372,-1.03e-02}, - {355,373,-1.03e-02}, - {356,356,8.29e-02}, - {356,51,4.84e-05}, - {356,52,1.93e-04}, - {356,53,4.84e-05}, - {356,66,1.93e-04}, - {356,67,7.74e-04}, - {356,68,1.93e-04}, - {356,83,4.84e-05}, - {356,84,1.93e-04}, - {356,85,4.84e-05}, - {356,340,-1.03e-02}, - {356,341,-1.03e-02}, - {356,342,-1.03e-02}, - {356,355,-1.03e-02}, - {356,357,-1.03e-02}, - {356,372,-1.03e-02}, - {356,373,-1.03e-02}, - {356,374,-1.03e-02}, - {357,357,8.29e-02}, - {357,52,4.84e-05}, - {357,53,1.93e-04}, - {357,54,4.84e-05}, - {357,67,1.93e-04}, - {357,68,7.74e-04}, - {357,69,1.93e-04}, - {357,84,4.84e-05}, - {357,85,1.93e-04}, - {357,86,4.84e-05}, - {357,341,-1.03e-02}, - {357,342,-1.03e-02}, - {357,343,-1.03e-02}, - {357,356,-1.03e-02}, - {357,358,-1.03e-02}, - {357,373,-1.03e-02}, - {357,374,-1.03e-02}, - {357,375,-1.03e-02}, - {358,358,8.29e-02}, - {358,53,4.84e-05}, - {358,54,1.93e-04}, - {358,55,4.84e-05}, - {358,68,1.93e-04}, - {358,69,7.74e-04}, - {358,70,1.93e-04}, - {358,85,4.84e-05}, - {358,86,1.93e-04}, - {358,87,4.84e-05}, - {358,342,-1.03e-02}, - {358,343,-1.03e-02}, - {358,344,-1.03e-02}, - {358,357,-1.03e-02}, - {358,359,-1.03e-02}, - {358,374,-1.03e-02}, - {358,375,-1.03e-02}, - {358,376,-1.03e-02}, - {359,359,8.29e-02}, - {359,54,4.84e-05}, - {359,55,1.93e-04}, - {359,56,4.84e-05}, - {359,69,1.93e-04}, - {359,70,7.74e-04}, - {359,71,1.93e-04}, - {359,86,4.84e-05}, - {359,87,1.93e-04}, - {359,88,4.84e-05}, - {359,343,-1.03e-02}, - {359,344,-1.03e-02}, - {359,345,-1.03e-02}, - {359,358,-1.03e-02}, - {359,360,-1.03e-02}, - {359,375,-1.03e-02}, - {359,376,-1.03e-02}, - {359,377,-1.03e-02}, - {360,360,8.29e-02}, - {360,55,4.84e-05}, - {360,56,1.93e-04}, - {360,57,4.84e-05}, - {360,70,1.93e-04}, - {360,71,7.74e-04}, - {360,72,1.93e-04}, - {360,87,4.84e-05}, - {360,88,1.93e-04}, - {360,89,4.84e-05}, - {360,344,-1.03e-02}, - {360,345,-1.03e-02}, - {360,346,-1.03e-02}, - {360,359,-1.03e-02}, - {360,361,-1.03e-02}, - {360,376,-1.03e-02}, - {360,377,-1.03e-02}, - {360,378,-1.03e-02}, - {361,361,8.29e-02}, - {361,56,4.84e-05}, - {361,57,1.93e-04}, - {361,71,1.93e-04}, - {361,72,7.74e-04}, - {361,73,1.93e-04}, - {361,74,4.84e-05}, - {361,88,4.84e-05}, - {361,89,1.93e-04}, - {361,90,4.84e-05}, - {361,345,-1.03e-02}, - {361,346,-1.03e-02}, - {361,360,-1.03e-02}, - {361,362,-1.03e-02}, - {361,363,-1.03e-02}, - {361,377,-1.03e-02}, - {361,378,-1.03e-02}, - {361,379,-1.03e-02}, - {362,362,8.29e-02}, - {362,57,4.84e-05}, - {362,72,1.93e-04}, - {362,73,7.74e-04}, - {362,74,1.93e-04}, - {362,89,4.84e-05}, - {362,90,1.93e-04}, - {362,91,4.84e-05}, - {362,92,1.93e-04}, - {362,99,4.84e-05}, - {362,346,-1.03e-02}, - {362,361,-1.03e-02}, - {362,363,-1.03e-02}, - {362,378,-1.03e-02}, - {362,379,-1.03e-02}, - {362,380,-1.03e-02}, - {362,381,-1.03e-02}, - {362,388,-1.03e-02}, - {363,363,8.29e-02}, - {363,57,1.93e-04}, - {363,58,4.84e-05}, - {363,72,4.84e-05}, - {363,73,1.93e-04}, - {363,74,7.74e-04}, - {363,75,1.93e-04}, - {363,92,4.84e-05}, - {363,98,4.84e-05}, - {363,99,1.93e-04}, - {363,346,-1.03e-02}, - {363,347,-1.03e-02}, - {363,361,-1.03e-02}, - {363,362,-1.03e-02}, - {363,364,-1.03e-02}, - {363,381,-1.03e-02}, - {363,387,-1.03e-02}, - {363,388,-1.03e-02}, - {364,364,8.29e-02}, - {364,57,4.84e-05}, - {364,58,1.93e-04}, - {364,59,4.84e-05}, - {364,74,1.93e-04}, - {364,75,7.74e-04}, - {364,76,1.93e-04}, - {364,97,4.84e-05}, - {364,98,1.93e-04}, - {364,99,4.84e-05}, - {364,346,-1.03e-02}, - {364,347,-1.03e-02}, - {364,348,-1.03e-02}, - {364,363,-1.03e-02}, - {364,365,-1.03e-02}, - {364,386,-1.03e-02}, - {364,387,-1.03e-02}, - {364,388,-1.03e-02}, - {365,365,8.29e-02}, - {365,58,4.84e-05}, - {365,59,1.93e-04}, - {365,60,4.84e-05}, - {365,75,1.93e-04}, - {365,76,7.74e-04}, - {365,77,1.93e-04}, - {365,96,4.84e-05}, - {365,97,1.93e-04}, - {365,98,4.84e-05}, - {365,347,-1.03e-02}, - {365,348,-1.03e-02}, - {365,349,-1.03e-02}, - {365,364,-1.03e-02}, - {365,366,-1.03e-02}, - {365,385,-1.03e-02}, - {365,386,-1.03e-02}, - {365,387,-1.03e-02}, - {366,366,8.29e-02}, - {366,59,4.84e-05}, - {366,60,1.93e-04}, - {366,61,4.84e-05}, - {366,76,1.93e-04}, - {366,77,7.74e-04}, - {366,78,1.93e-04}, - {366,95,4.84e-05}, - {366,96,1.93e-04}, - {366,97,4.84e-05}, - {366,348,-1.03e-02}, - {366,349,-1.03e-02}, - {366,350,-1.03e-02}, - {366,365,-1.03e-02}, - {366,367,-1.03e-02}, - {366,384,-1.03e-02}, - {366,385,-1.03e-02}, - {366,386,-1.03e-02}, - {367,367,8.29e-02}, - {367,60,4.84e-05}, - {367,61,1.93e-04}, - {367,62,4.84e-05}, - {367,77,1.93e-04}, - {367,78,7.74e-04}, - {367,79,1.93e-04}, - {367,94,4.84e-05}, - {367,95,1.93e-04}, - {367,96,4.84e-05}, - {367,349,-1.03e-02}, - {367,350,-1.03e-02}, - {367,351,-1.03e-02}, - {367,366,-1.03e-02}, - {367,368,-1.03e-02}, - {367,383,-1.03e-02}, - {367,384,-1.03e-02}, - {367,385,-1.03e-02}, - {368,368,8.29e-02}, - {368,61,4.84e-05}, - {368,62,1.93e-04}, - {368,63,4.84e-05}, - {368,78,1.93e-04}, - {368,79,7.74e-04}, - {368,80,1.93e-04}, - {368,93,4.84e-05}, - {368,94,1.93e-04}, - {368,95,4.84e-05}, - {368,350,-1.03e-02}, - {368,351,-1.03e-02}, - {368,352,-1.03e-02}, - {368,367,-1.03e-02}, - {368,369,-1.03e-02}, - {368,382,-1.03e-02}, - {368,383,-1.03e-02}, - {368,384,-1.03e-02}, - {369,369,8.29e-02}, - {369,50,4.84e-05}, - {369,62,4.84e-05}, - {369,63,1.93e-04}, - {369,65,1.93e-04}, - {369,79,1.93e-04}, - {369,80,7.74e-04}, - {369,82,4.84e-05}, - {369,93,1.93e-04}, - {369,94,4.84e-05}, - {369,339,-1.03e-02}, - {369,351,-1.03e-02}, - {369,352,-1.03e-02}, - {369,354,-1.03e-02}, - {369,368,-1.03e-02}, - {369,371,-1.03e-02}, - {369,382,-1.03e-02}, - {369,383,-1.03e-02}, - {370,370,2.08e-01}, - {370,64,9.67e-05}, - {370,66,4.84e-05}, - {370,81,3.87e-04}, - {370,83,1.93e-04}, - {370,100,9.67e-05}, - {370,102,4.84e-05}, - {370,353,3.65e-02}, - {370,355,-1.03e-02}, - {370,372,-1.03e-02}, - {370,389,3.65e-02}, - {370,391,-1.03e-02}, - {371,371,2.08e-01}, - {371,65,9.67e-05}, - {371,80,4.84e-05}, - {371,82,3.87e-04}, - {371,93,1.93e-04}, - {371,101,9.67e-05}, - {371,115,4.84e-05}, - {371,354,3.65e-02}, - {371,369,-1.03e-02}, - {371,382,-1.03e-02}, - {371,390,3.65e-02}, - {371,404,-1.03e-02}, - {372,372,8.29e-02}, - {372,64,4.84e-05}, - {372,66,1.93e-04}, - {372,67,4.84e-05}, - {372,81,1.93e-04}, - {372,83,7.74e-04}, - {372,84,1.93e-04}, - {372,100,4.84e-05}, - {372,102,1.93e-04}, - {372,103,4.84e-05}, - {372,353,-1.03e-02}, - {372,355,-1.03e-02}, - {372,356,-1.03e-02}, - {372,370,-1.03e-02}, - {372,373,-1.03e-02}, - {372,389,-1.03e-02}, - {372,391,-1.03e-02}, - {372,392,-1.03e-02}, - {373,373,8.29e-02}, - {373,66,4.84e-05}, - {373,67,1.93e-04}, - {373,68,4.84e-05}, - {373,83,1.93e-04}, - {373,84,7.74e-04}, - {373,85,1.93e-04}, - {373,102,4.84e-05}, - {373,103,1.93e-04}, - {373,104,4.84e-05}, - {373,355,-1.03e-02}, - {373,356,-1.03e-02}, - {373,357,-1.03e-02}, - {373,372,-1.03e-02}, - {373,374,-1.03e-02}, - {373,391,-1.03e-02}, - {373,392,-1.03e-02}, - {373,393,-1.03e-02}, - {374,374,8.29e-02}, - {374,67,4.84e-05}, - {374,68,1.93e-04}, - {374,69,4.84e-05}, - {374,84,1.93e-04}, - {374,85,7.74e-04}, - {374,86,1.93e-04}, - {374,103,4.84e-05}, - {374,104,1.93e-04}, - {374,105,4.84e-05}, - {374,356,-1.03e-02}, - {374,357,-1.03e-02}, - {374,358,-1.03e-02}, - {374,373,-1.03e-02}, - {374,375,-1.03e-02}, - {374,392,-1.03e-02}, - {374,393,-1.03e-02}, - {374,394,-1.03e-02}, - {375,375,8.29e-02}, - {375,68,4.84e-05}, - {375,69,1.93e-04}, - {375,70,4.84e-05}, - {375,85,1.93e-04}, - {375,86,7.74e-04}, - {375,87,1.93e-04}, - {375,104,4.84e-05}, - {375,105,1.93e-04}, - {375,106,4.84e-05}, - {375,357,-1.03e-02}, - {375,358,-1.03e-02}, - {375,359,-1.03e-02}, - {375,374,-1.03e-02}, - {375,376,-1.03e-02}, - {375,393,-1.03e-02}, - {375,394,-1.03e-02}, - {375,395,-1.03e-02}, - {376,376,8.29e-02}, - {376,69,4.84e-05}, - {376,70,1.93e-04}, - {376,71,4.84e-05}, - {376,86,1.93e-04}, - {376,87,7.74e-04}, - {376,88,1.93e-04}, - {376,105,4.84e-05}, - {376,106,1.93e-04}, - {376,107,4.84e-05}, - {376,358,-1.03e-02}, - {376,359,-1.03e-02}, - {376,360,-1.03e-02}, - {376,375,-1.03e-02}, - {376,377,-1.03e-02}, - {376,394,-1.03e-02}, - {376,395,-1.03e-02}, - {376,396,-1.03e-02}, - {377,377,8.29e-02}, - {377,70,4.84e-05}, - {377,71,1.93e-04}, - {377,72,4.84e-05}, - {377,87,1.93e-04}, - {377,88,7.74e-04}, - {377,89,1.93e-04}, - {377,106,4.84e-05}, - {377,107,1.93e-04}, - {377,108,4.84e-05}, - {377,359,-1.03e-02}, - {377,360,-1.03e-02}, - {377,361,-1.03e-02}, - {377,376,-1.03e-02}, - {377,378,-1.03e-02}, - {377,395,-1.03e-02}, - {377,396,-1.03e-02}, - {377,397,-1.03e-02}, - {378,378,8.29e-02}, - {378,71,4.84e-05}, - {378,72,1.93e-04}, - {378,73,4.84e-05}, - {378,88,1.93e-04}, - {378,89,7.74e-04}, - {378,90,1.93e-04}, - {378,107,4.84e-05}, - {378,108,1.93e-04}, - {378,109,4.84e-05}, - {378,360,-1.03e-02}, - {378,361,-1.03e-02}, - {378,362,-1.03e-02}, - {378,377,-1.03e-02}, - {378,379,-1.03e-02}, - {378,396,-1.03e-02}, - {378,397,-1.03e-02}, - {378,398,-1.03e-02}, - {379,379,8.29e-02}, - {379,72,4.84e-05}, - {379,73,1.93e-04}, - {379,89,1.93e-04}, - {379,90,7.74e-04}, - {379,91,1.93e-04}, - {379,92,4.84e-05}, - {379,108,4.84e-05}, - {379,109,1.93e-04}, - {379,110,4.84e-05}, - {379,361,-1.03e-02}, - {379,362,-1.03e-02}, - {379,378,-1.03e-02}, - {379,380,-1.03e-02}, - {379,381,-1.03e-02}, - {379,397,-1.03e-02}, - {379,398,-1.03e-02}, - {379,399,-1.03e-02}, - {380,380,8.29e-02}, - {380,73,4.84e-05}, - {380,90,1.93e-04}, - {380,91,7.74e-04}, - {380,92,1.93e-04}, - {380,109,4.84e-05}, - {380,110,1.93e-04}, - {380,111,4.84e-05}, - {380,112,1.93e-04}, - {380,113,4.84e-05}, - {380,362,-1.03e-02}, - {380,379,-1.03e-02}, - {380,381,-1.03e-02}, - {380,398,-1.03e-02}, - {380,399,-1.03e-02}, - {380,400,-1.03e-02}, - {380,401,-1.03e-02}, - {380,402,-1.03e-02}, - {381,381,8.29e-02}, - {381,73,1.93e-04}, - {381,74,4.84e-05}, - {381,90,4.84e-05}, - {381,91,1.93e-04}, - {381,92,7.74e-04}, - {381,99,1.93e-04}, - {381,112,4.84e-05}, - {381,113,1.93e-04}, - {381,120,4.84e-05}, - {381,362,-1.03e-02}, - {381,363,-1.03e-02}, - {381,379,-1.03e-02}, - {381,380,-1.03e-02}, - {381,388,-1.03e-02}, - {381,401,-1.03e-02}, - {381,402,-1.03e-02}, - {381,409,-1.03e-02}, - {382,382,8.29e-02}, - {382,65,4.84e-05}, - {382,79,4.84e-05}, - {382,80,1.93e-04}, - {382,82,1.93e-04}, - {382,93,7.74e-04}, - {382,94,1.93e-04}, - {382,101,4.84e-05}, - {382,114,4.84e-05}, - {382,115,1.93e-04}, - {382,354,-1.03e-02}, - {382,368,-1.03e-02}, - {382,369,-1.03e-02}, - {382,371,-1.03e-02}, - {382,383,-1.03e-02}, - {382,390,-1.03e-02}, - {382,403,-1.03e-02}, - {382,404,-1.03e-02}, - {383,383,8.29e-02}, - {383,78,4.84e-05}, - {383,79,1.93e-04}, - {383,80,4.84e-05}, - {383,93,1.93e-04}, - {383,94,7.74e-04}, - {383,95,1.93e-04}, - {383,114,1.93e-04}, - {383,115,4.84e-05}, - {383,117,4.84e-05}, - {383,367,-1.03e-02}, - {383,368,-1.03e-02}, - {383,369,-1.03e-02}, - {383,382,-1.03e-02}, - {383,384,-1.03e-02}, - {383,403,-1.03e-02}, - {383,404,-1.03e-02}, - {383,406,-1.03e-02}, - {384,384,8.29e-02}, - {384,77,4.84e-05}, - {384,78,1.93e-04}, - {384,79,4.84e-05}, - {384,94,1.93e-04}, - {384,95,7.74e-04}, - {384,96,1.93e-04}, - {384,114,4.84e-05}, - {384,116,4.84e-05}, - {384,117,1.93e-04}, - {384,366,-1.03e-02}, - {384,367,-1.03e-02}, - {384,368,-1.03e-02}, - {384,383,-1.03e-02}, - {384,385,-1.03e-02}, - {384,403,-1.03e-02}, - {384,405,-1.03e-02}, - {384,406,-1.03e-02}, - {385,385,8.29e-02}, - {385,76,4.84e-05}, - {385,77,1.93e-04}, - {385,78,4.84e-05}, - {385,95,1.93e-04}, - {385,96,7.74e-04}, - {385,97,1.93e-04}, - {385,116,1.93e-04}, - {385,117,4.84e-05}, - {385,119,4.84e-05}, - {385,365,-1.03e-02}, - {385,366,-1.03e-02}, - {385,367,-1.03e-02}, - {385,384,-1.03e-02}, - {385,386,-1.03e-02}, - {385,405,-1.03e-02}, - {385,406,-1.03e-02}, - {385,408,-1.03e-02}, - {386,386,8.29e-02}, - {386,75,4.84e-05}, - {386,76,1.93e-04}, - {386,77,4.84e-05}, - {386,96,1.93e-04}, - {386,97,7.74e-04}, - {386,98,1.93e-04}, - {386,116,4.84e-05}, - {386,118,4.84e-05}, - {386,119,1.93e-04}, - {386,364,-1.03e-02}, - {386,365,-1.03e-02}, - {386,366,-1.03e-02}, - {386,385,-1.03e-02}, - {386,387,-1.03e-02}, - {386,405,-1.03e-02}, - {386,407,-1.03e-02}, - {386,408,-1.03e-02}, - {387,387,8.29e-02}, - {387,74,4.84e-05}, - {387,75,1.93e-04}, - {387,76,4.84e-05}, - {387,97,1.93e-04}, - {387,98,7.74e-04}, - {387,99,1.93e-04}, - {387,118,1.93e-04}, - {387,119,4.84e-05}, - {387,120,4.84e-05}, - {387,363,-1.03e-02}, - {387,364,-1.03e-02}, - {387,365,-1.03e-02}, - {387,386,-1.03e-02}, - {387,388,-1.03e-02}, - {387,407,-1.03e-02}, - {387,408,-1.03e-02}, - {387,409,-1.03e-02}, - {388,388,8.29e-02}, - {388,73,4.84e-05}, - {388,74,1.93e-04}, - {388,75,4.84e-05}, - {388,92,1.93e-04}, - {388,98,1.93e-04}, - {388,99,7.74e-04}, - {388,113,4.84e-05}, - {388,118,4.84e-05}, - {388,120,1.93e-04}, - {388,362,-1.03e-02}, - {388,363,-1.03e-02}, - {388,364,-1.03e-02}, - {388,381,-1.03e-02}, - {388,387,-1.03e-02}, - {388,402,-1.03e-02}, - {388,407,-1.03e-02}, - {388,409,-1.03e-02}, - {389,389,2.08e-01}, - {389,81,9.67e-05}, - {389,83,4.84e-05}, - {389,100,3.87e-04}, - {389,102,1.93e-04}, - {389,121,9.67e-05}, - {389,123,4.84e-05}, - {389,370,3.65e-02}, - {389,372,-1.03e-02}, - {389,391,-1.03e-02}, - {389,410,3.65e-02}, - {389,412,-1.03e-02}, - {390,390,2.08e-01}, - {390,82,9.67e-05}, - {390,93,4.84e-05}, - {390,101,3.87e-04}, - {390,115,1.93e-04}, - {390,122,9.67e-05}, - {390,140,4.84e-05}, - {390,371,3.65e-02}, - {390,382,-1.03e-02}, - {390,404,-1.03e-02}, - {390,411,3.65e-02}, - {390,429,-1.03e-02}, - {391,391,8.29e-02}, - {391,81,4.84e-05}, - {391,83,1.93e-04}, - {391,84,4.84e-05}, - {391,100,1.93e-04}, - {391,102,7.74e-04}, - {391,103,1.93e-04}, - {391,121,4.84e-05}, - {391,123,1.93e-04}, - {391,124,4.84e-05}, - {391,370,-1.03e-02}, - {391,372,-1.03e-02}, - {391,373,-1.03e-02}, - {391,389,-1.03e-02}, - {391,392,-1.03e-02}, - {391,410,-1.03e-02}, - {391,412,-1.03e-02}, - {391,413,-1.03e-02}, - {392,392,8.29e-02}, - {392,83,4.84e-05}, - {392,84,1.93e-04}, - {392,85,4.84e-05}, - {392,102,1.93e-04}, - {392,103,7.74e-04}, - {392,104,1.93e-04}, - {392,123,4.84e-05}, - {392,124,1.93e-04}, - {392,125,4.84e-05}, - {392,372,-1.03e-02}, - {392,373,-1.03e-02}, - {392,374,-1.03e-02}, - {392,391,-1.03e-02}, - {392,393,-1.03e-02}, - {392,412,-1.03e-02}, - {392,413,-1.03e-02}, - {392,414,-1.03e-02}, - {393,393,8.29e-02}, - {393,84,4.84e-05}, - {393,85,1.93e-04}, - {393,86,4.84e-05}, - {393,103,1.93e-04}, - {393,104,7.74e-04}, - {393,105,1.93e-04}, - {393,124,4.84e-05}, - {393,125,1.93e-04}, - {393,126,4.84e-05}, - {393,373,-1.03e-02}, - {393,374,-1.03e-02}, - {393,375,-1.03e-02}, - {393,392,-1.03e-02}, - {393,394,-1.03e-02}, - {393,413,-1.03e-02}, - {393,414,-1.03e-02}, - {393,415,-1.03e-02}, - {394,394,8.29e-02}, - {394,85,4.84e-05}, - {394,86,1.93e-04}, - {394,87,4.84e-05}, - {394,104,1.93e-04}, - {394,105,7.74e-04}, - {394,106,1.93e-04}, - {394,125,4.84e-05}, - {394,126,1.93e-04}, - {394,127,4.84e-05}, - {394,374,-1.03e-02}, - {394,375,-1.03e-02}, - {394,376,-1.03e-02}, - {394,393,-1.03e-02}, - {394,395,-1.03e-02}, - {394,414,-1.03e-02}, - {394,415,-1.03e-02}, - {394,416,-1.03e-02}, - {395,395,8.29e-02}, - {395,86,4.84e-05}, - {395,87,1.93e-04}, - {395,88,4.84e-05}, - {395,105,1.93e-04}, - {395,106,7.74e-04}, - {395,107,1.93e-04}, - {395,126,4.84e-05}, - {395,127,1.93e-04}, - {395,128,4.84e-05}, - {395,375,-1.03e-02}, - {395,376,-1.03e-02}, - {395,377,-1.03e-02}, - {395,394,-1.03e-02}, - {395,396,-1.03e-02}, - {395,415,-1.03e-02}, - {395,416,-1.03e-02}, - {395,417,-1.03e-02}, - {396,396,8.29e-02}, - {396,87,4.84e-05}, - {396,88,1.93e-04}, - {396,89,4.84e-05}, - {396,106,1.93e-04}, - {396,107,7.74e-04}, - {396,108,1.93e-04}, - {396,127,4.84e-05}, - {396,128,1.93e-04}, - {396,129,4.84e-05}, - {396,376,-1.03e-02}, - {396,377,-1.03e-02}, - {396,378,-1.03e-02}, - {396,395,-1.03e-02}, - {396,397,-1.03e-02}, - {396,416,-1.03e-02}, - {396,417,-1.03e-02}, - {396,418,-1.03e-02}, - {397,397,8.29e-02}, - {397,88,4.84e-05}, - {397,89,1.93e-04}, - {397,90,4.84e-05}, - {397,107,1.93e-04}, - {397,108,7.74e-04}, - {397,109,1.93e-04}, - {397,128,4.84e-05}, - {397,129,1.93e-04}, - {397,130,4.84e-05}, - {397,377,-1.03e-02}, - {397,378,-1.03e-02}, - {397,379,-1.03e-02}, - {397,396,-1.03e-02}, - {397,398,-1.03e-02}, - {397,417,-1.03e-02}, - {397,418,-1.03e-02}, - {397,419,-1.03e-02}, - {398,398,8.29e-02}, - {398,89,4.84e-05}, - {398,90,1.93e-04}, - {398,91,4.84e-05}, - {398,108,1.93e-04}, - {398,109,7.74e-04}, - {398,110,1.93e-04}, - {398,129,4.84e-05}, - {398,130,1.93e-04}, - {398,131,4.84e-05}, - {398,378,-1.03e-02}, - {398,379,-1.03e-02}, - {398,380,-1.03e-02}, - {398,397,-1.03e-02}, - {398,399,-1.03e-02}, - {398,418,-1.03e-02}, - {398,419,-1.03e-02}, - {398,420,-1.03e-02}, - {399,399,8.29e-02}, - {399,90,4.84e-05}, - {399,91,1.93e-04}, - {399,109,1.93e-04}, - {399,110,7.74e-04}, - {399,111,1.93e-04}, - {399,112,4.84e-05}, - {399,130,4.84e-05}, - {399,131,1.93e-04}, - {399,132,4.84e-05}, - {399,379,-1.03e-02}, - {399,380,-1.03e-02}, - {399,398,-1.03e-02}, - {399,400,-1.03e-02}, - {399,401,-1.03e-02}, - {399,419,-1.03e-02}, - {399,420,-1.03e-02}, - {399,421,-1.03e-02}, - {400,400,8.29e-02}, - {400,91,4.84e-05}, - {400,110,1.93e-04}, - {400,111,7.74e-04}, - {400,112,1.93e-04}, - {400,131,4.84e-05}, - {400,132,1.93e-04}, - {400,133,4.84e-05}, - {400,134,1.93e-04}, - {400,135,4.84e-05}, - {400,380,-1.03e-02}, - {400,399,-1.03e-02}, - {400,401,-1.03e-02}, - {400,420,-1.03e-02}, - {400,421,-1.03e-02}, - {400,422,-1.03e-02}, - {400,423,-1.03e-02}, - {400,424,-1.03e-02}, - {401,401,8.29e-02}, - {401,91,1.93e-04}, - {401,92,4.84e-05}, - {401,110,4.84e-05}, - {401,111,1.93e-04}, - {401,112,7.74e-04}, - {401,113,1.93e-04}, - {401,134,4.84e-05}, - {401,135,1.93e-04}, - {401,136,4.84e-05}, - {401,380,-1.03e-02}, - {401,381,-1.03e-02}, - {401,399,-1.03e-02}, - {401,400,-1.03e-02}, - {401,402,-1.03e-02}, - {401,423,-1.03e-02}, - {401,424,-1.03e-02}, - {401,425,-1.03e-02}, - {402,402,8.29e-02}, - {402,91,4.84e-05}, - {402,92,1.93e-04}, - {402,99,4.84e-05}, - {402,112,1.93e-04}, - {402,113,7.74e-04}, - {402,120,1.93e-04}, - {402,135,4.84e-05}, - {402,136,1.93e-04}, - {402,141,4.84e-05}, - {402,380,-1.03e-02}, - {402,381,-1.03e-02}, - {402,388,-1.03e-02}, - {402,401,-1.03e-02}, - {402,409,-1.03e-02}, - {402,424,-1.03e-02}, - {402,425,-1.03e-02}, - {402,430,-1.03e-02}, - {403,403,8.29e-02}, - {403,93,4.84e-05}, - {403,94,1.93e-04}, - {403,95,4.84e-05}, - {403,114,7.74e-04}, - {403,115,1.93e-04}, - {403,117,1.93e-04}, - {403,137,4.84e-05}, - {403,138,1.93e-04}, - {403,140,4.84e-05}, - {403,382,-1.03e-02}, - {403,383,-1.03e-02}, - {403,384,-1.03e-02}, - {403,404,-1.03e-02}, - {403,406,-1.03e-02}, - {403,426,-1.03e-02}, - {403,427,-1.03e-02}, - {403,429,-1.03e-02}, - {404,404,8.29e-02}, - {404,82,4.84e-05}, - {404,93,1.93e-04}, - {404,94,4.84e-05}, - {404,101,1.93e-04}, - {404,114,1.93e-04}, - {404,115,7.74e-04}, - {404,122,4.84e-05}, - {404,138,4.84e-05}, - {404,140,1.93e-04}, - {404,371,-1.03e-02}, - {404,382,-1.03e-02}, - {404,383,-1.03e-02}, - {404,390,-1.03e-02}, - {404,403,-1.03e-02}, - {404,411,-1.03e-02}, - {404,427,-1.03e-02}, - {404,429,-1.03e-02}, - {405,405,8.29e-02}, - {405,95,4.84e-05}, - {405,96,1.93e-04}, - {405,97,4.84e-05}, - {405,116,7.74e-04}, - {405,117,1.93e-04}, - {405,119,1.93e-04}, - {405,137,4.84e-05}, - {405,139,1.93e-04}, - {405,143,4.84e-05}, - {405,384,-1.03e-02}, - {405,385,-1.03e-02}, - {405,386,-1.03e-02}, - {405,406,-1.03e-02}, - {405,408,-1.03e-02}, - {405,426,-1.03e-02}, - {405,428,-1.03e-02}, - {405,432,-1.03e-02}, - {406,406,8.29e-02}, - {406,94,4.84e-05}, - {406,95,1.93e-04}, - {406,96,4.84e-05}, - {406,114,1.93e-04}, - {406,116,1.93e-04}, - {406,117,7.74e-04}, - {406,137,1.93e-04}, - {406,138,4.84e-05}, - {406,139,4.84e-05}, - {406,383,-1.03e-02}, - {406,384,-1.03e-02}, - {406,385,-1.03e-02}, - {406,403,-1.03e-02}, - {406,405,-1.03e-02}, - {406,426,-1.03e-02}, - {406,427,-1.03e-02}, - {406,428,-1.03e-02}, - {407,407,8.29e-02}, - {407,97,4.84e-05}, - {407,98,1.93e-04}, - {407,99,4.84e-05}, - {407,118,7.74e-04}, - {407,119,1.93e-04}, - {407,120,1.93e-04}, - {407,141,4.84e-05}, - {407,142,1.93e-04}, - {407,143,4.84e-05}, - {407,386,-1.03e-02}, - {407,387,-1.03e-02}, - {407,388,-1.03e-02}, - {407,408,-1.03e-02}, - {407,409,-1.03e-02}, - {407,430,-1.03e-02}, - {407,431,-1.03e-02}, - {407,432,-1.03e-02}, - {408,408,8.29e-02}, - {408,96,4.84e-05}, - {408,97,1.93e-04}, - {408,98,4.84e-05}, - {408,116,1.93e-04}, - {408,118,1.93e-04}, - {408,119,7.74e-04}, - {408,139,4.84e-05}, - {408,142,4.84e-05}, - {408,143,1.93e-04}, - {408,385,-1.03e-02}, - {408,386,-1.03e-02}, - {408,387,-1.03e-02}, - {408,405,-1.03e-02}, - {408,407,-1.03e-02}, - {408,428,-1.03e-02}, - {408,431,-1.03e-02}, - {408,432,-1.03e-02}, - {409,409,8.29e-02}, - {409,92,4.84e-05}, - {409,98,4.84e-05}, - {409,99,1.93e-04}, - {409,113,1.93e-04}, - {409,118,1.93e-04}, - {409,120,7.74e-04}, - {409,136,4.84e-05}, - {409,141,1.93e-04}, - {409,142,4.84e-05}, - {409,381,-1.03e-02}, - {409,387,-1.03e-02}, - {409,388,-1.03e-02}, - {409,402,-1.03e-02}, - {409,407,-1.03e-02}, - {409,425,-1.03e-02}, - {409,430,-1.03e-02}, - {409,431,-1.03e-02}, - {410,410,2.08e-01}, - {410,100,9.67e-05}, - {410,102,4.84e-05}, - {410,121,3.87e-04}, - {410,123,1.93e-04}, - {410,144,9.67e-05}, - {410,146,4.84e-05}, - {410,389,3.65e-02}, - {410,391,-1.03e-02}, - {410,412,-1.03e-02}, - {410,433,3.65e-02}, - {410,435,-1.03e-02}, - {411,411,2.08e-01}, - {411,101,9.67e-05}, - {411,115,4.84e-05}, - {411,122,3.87e-04}, - {411,140,1.93e-04}, - {411,145,9.67e-05}, - {411,165,4.84e-05}, - {411,390,3.65e-02}, - {411,404,-1.03e-02}, - {411,429,-1.03e-02}, - {411,434,3.65e-02}, - {411,454,-1.03e-02}, - {412,412,8.29e-02}, - {412,100,4.84e-05}, - {412,102,1.93e-04}, - {412,103,4.84e-05}, - {412,121,1.93e-04}, - {412,123,7.74e-04}, - {412,124,1.93e-04}, - {412,144,4.84e-05}, - {412,146,1.93e-04}, - {412,147,4.84e-05}, - {412,389,-1.03e-02}, - {412,391,-1.03e-02}, - {412,392,-1.03e-02}, - {412,410,-1.03e-02}, - {412,413,-1.03e-02}, - {412,433,-1.03e-02}, - {412,435,-1.03e-02}, - {412,436,-1.03e-02}, - {413,413,8.29e-02}, - {413,102,4.84e-05}, - {413,103,1.93e-04}, - {413,104,4.84e-05}, - {413,123,1.93e-04}, - {413,124,7.74e-04}, - {413,125,1.93e-04}, - {413,146,4.84e-05}, - {413,147,1.93e-04}, - {413,148,4.84e-05}, - {413,391,-1.03e-02}, - {413,392,-1.03e-02}, - {413,393,-1.03e-02}, - {413,412,-1.03e-02}, - {413,414,-1.03e-02}, - {413,435,-1.03e-02}, - {413,436,-1.03e-02}, - {413,437,-1.03e-02}, - {414,414,8.29e-02}, - {414,103,4.84e-05}, - {414,104,1.93e-04}, - {414,105,4.84e-05}, - {414,124,1.93e-04}, - {414,125,7.74e-04}, - {414,126,1.93e-04}, - {414,147,4.84e-05}, - {414,148,1.93e-04}, - {414,149,4.84e-05}, - {414,392,-1.03e-02}, - {414,393,-1.03e-02}, - {414,394,-1.03e-02}, - {414,413,-1.03e-02}, - {414,415,-1.03e-02}, - {414,436,-1.03e-02}, - {414,437,-1.03e-02}, - {414,438,-1.03e-02}, - {415,415,8.29e-02}, - {415,104,4.84e-05}, - {415,105,1.93e-04}, - {415,106,4.84e-05}, - {415,125,1.93e-04}, - {415,126,7.74e-04}, - {415,127,1.93e-04}, - {415,148,4.84e-05}, - {415,149,1.93e-04}, - {415,150,4.84e-05}, - {415,393,-1.03e-02}, - {415,394,-1.03e-02}, - {415,395,-1.03e-02}, - {415,414,-1.03e-02}, - {415,416,-1.03e-02}, - {415,437,-1.03e-02}, - {415,438,-1.03e-02}, - {415,439,-1.03e-02}, - {416,416,8.29e-02}, - {416,105,4.84e-05}, - {416,106,1.93e-04}, - {416,107,4.84e-05}, - {416,126,1.93e-04}, - {416,127,7.74e-04}, - {416,128,1.93e-04}, - {416,149,4.84e-05}, - {416,150,1.93e-04}, - {416,151,4.84e-05}, - {416,394,-1.03e-02}, - {416,395,-1.03e-02}, - {416,396,-1.03e-02}, - {416,415,-1.03e-02}, - {416,417,-1.03e-02}, - {416,438,-1.03e-02}, - {416,439,-1.03e-02}, - {416,440,-1.03e-02}, - {417,417,8.29e-02}, - {417,106,4.84e-05}, - {417,107,1.93e-04}, - {417,108,4.84e-05}, - {417,127,1.93e-04}, - {417,128,7.74e-04}, - {417,129,1.93e-04}, - {417,150,4.84e-05}, - {417,151,1.93e-04}, - {417,152,4.84e-05}, - {417,395,-1.03e-02}, - {417,396,-1.03e-02}, - {417,397,-1.03e-02}, - {417,416,-1.03e-02}, - {417,418,-1.03e-02}, - {417,439,-1.03e-02}, - {417,440,-1.03e-02}, - {417,441,-1.03e-02}, - {418,418,8.29e-02}, - {418,107,4.84e-05}, - {418,108,1.93e-04}, - {418,109,4.84e-05}, - {418,128,1.93e-04}, - {418,129,7.74e-04}, - {418,130,1.93e-04}, - {418,151,4.84e-05}, - {418,152,1.93e-04}, - {418,153,4.84e-05}, - {418,396,-1.03e-02}, - {418,397,-1.03e-02}, - {418,398,-1.03e-02}, - {418,417,-1.03e-02}, - {418,419,-1.03e-02}, - {418,440,-1.03e-02}, - {418,441,-1.03e-02}, - {418,442,-1.03e-02}, - {419,419,8.29e-02}, - {419,108,4.84e-05}, - {419,109,1.93e-04}, - {419,110,4.84e-05}, - {419,129,1.93e-04}, - {419,130,7.74e-04}, - {419,131,1.93e-04}, - {419,152,4.84e-05}, - {419,153,1.93e-04}, - {419,154,4.84e-05}, - {419,397,-1.03e-02}, - {419,398,-1.03e-02}, - {419,399,-1.03e-02}, - {419,418,-1.03e-02}, - {419,420,-1.03e-02}, - {419,441,-1.03e-02}, - {419,442,-1.03e-02}, - {419,443,-1.03e-02}, - {420,420,8.29e-02}, - {420,109,4.84e-05}, - {420,110,1.93e-04}, - {420,111,4.84e-05}, - {420,130,1.93e-04}, - {420,131,7.74e-04}, - {420,132,1.93e-04}, - {420,153,4.84e-05}, - {420,154,1.93e-04}, - {420,155,4.84e-05}, - {420,398,-1.03e-02}, - {420,399,-1.03e-02}, - {420,400,-1.03e-02}, - {420,419,-1.03e-02}, - {420,421,-1.03e-02}, - {420,442,-1.03e-02}, - {420,443,-1.03e-02}, - {420,444,-1.03e-02}, - {421,421,8.29e-02}, - {421,110,4.84e-05}, - {421,111,1.93e-04}, - {421,131,1.93e-04}, - {421,132,7.74e-04}, - {421,133,1.93e-04}, - {421,134,4.84e-05}, - {421,154,4.84e-05}, - {421,155,1.93e-04}, - {421,156,4.84e-05}, - {421,399,-1.03e-02}, - {421,400,-1.03e-02}, - {421,420,-1.03e-02}, - {421,422,-1.03e-02}, - {421,423,-1.03e-02}, - {421,443,-1.03e-02}, - {421,444,-1.03e-02}, - {421,445,-1.03e-02}, - {422,422,8.29e-02}, - {422,111,4.84e-05}, - {422,132,1.93e-04}, - {422,133,7.74e-04}, - {422,134,1.93e-04}, - {422,155,4.84e-05}, - {422,156,1.93e-04}, - {422,157,4.84e-05}, - {422,158,1.93e-04}, - {422,159,4.84e-05}, - {422,400,-1.03e-02}, - {422,421,-1.03e-02}, - {422,423,-1.03e-02}, - {422,444,-1.03e-02}, - {422,445,-1.03e-02}, - {422,446,-1.03e-02}, - {422,447,-1.03e-02}, - {422,448,-1.03e-02}, - {423,423,8.29e-02}, - {423,111,1.93e-04}, - {423,112,4.84e-05}, - {423,132,4.84e-05}, - {423,133,1.93e-04}, - {423,134,7.74e-04}, - {423,135,1.93e-04}, - {423,158,4.84e-05}, - {423,159,1.93e-04}, - {423,160,4.84e-05}, - {423,400,-1.03e-02}, - {423,401,-1.03e-02}, - {423,421,-1.03e-02}, - {423,422,-1.03e-02}, - {423,424,-1.03e-02}, - {423,447,-1.03e-02}, - {423,448,-1.03e-02}, - {423,449,-1.03e-02}, - {424,424,8.29e-02}, - {424,111,4.84e-05}, - {424,112,1.93e-04}, - {424,113,4.84e-05}, - {424,134,1.93e-04}, - {424,135,7.74e-04}, - {424,136,1.93e-04}, - {424,159,4.84e-05}, - {424,160,1.93e-04}, - {424,161,4.84e-05}, - {424,400,-1.03e-02}, - {424,401,-1.03e-02}, - {424,402,-1.03e-02}, - {424,423,-1.03e-02}, - {424,425,-1.03e-02}, - {424,448,-1.03e-02}, - {424,449,-1.03e-02}, - {424,450,-1.03e-02}, - {425,425,8.29e-02}, - {425,112,4.84e-05}, - {425,113,1.93e-04}, - {425,120,4.84e-05}, - {425,135,1.93e-04}, - {425,136,7.74e-04}, - {425,141,1.93e-04}, - {425,160,4.84e-05}, - {425,161,1.93e-04}, - {425,166,4.84e-05}, - {425,401,-1.03e-02}, - {425,402,-1.03e-02}, - {425,409,-1.03e-02}, - {425,424,-1.03e-02}, - {425,430,-1.03e-02}, - {425,449,-1.03e-02}, - {425,450,-1.03e-02}, - {425,455,-1.03e-02}, - {426,426,8.29e-02}, - {426,114,4.84e-05}, - {426,116,4.84e-05}, - {426,117,1.93e-04}, - {426,137,7.74e-04}, - {426,138,1.93e-04}, - {426,139,1.93e-04}, - {426,162,4.84e-05}, - {426,163,1.93e-04}, - {426,164,4.84e-05}, - {426,403,-1.03e-02}, - {426,405,-1.03e-02}, - {426,406,-1.03e-02}, - {426,427,-1.03e-02}, - {426,428,-1.03e-02}, - {426,451,-1.03e-02}, - {426,452,-1.03e-02}, - {426,453,-1.03e-02}, - {427,427,8.29e-02}, - {427,114,1.93e-04}, - {427,115,4.84e-05}, - {427,117,4.84e-05}, - {427,137,1.93e-04}, - {427,138,7.74e-04}, - {427,140,1.93e-04}, - {427,163,4.84e-05}, - {427,164,1.93e-04}, - {427,165,4.84e-05}, - {427,403,-1.03e-02}, - {427,404,-1.03e-02}, - {427,406,-1.03e-02}, - {427,426,-1.03e-02}, - {427,429,-1.03e-02}, - {427,452,-1.03e-02}, - {427,453,-1.03e-02}, - {427,454,-1.03e-02}, - {428,428,8.29e-02}, - {428,116,1.93e-04}, - {428,117,4.84e-05}, - {428,119,4.84e-05}, - {428,137,1.93e-04}, - {428,139,7.74e-04}, - {428,143,1.93e-04}, - {428,162,1.93e-04}, - {428,163,4.84e-05}, - {428,168,4.84e-05}, - {428,405,-1.03e-02}, - {428,406,-1.03e-02}, - {428,408,-1.03e-02}, - {428,426,-1.03e-02}, - {428,432,-1.03e-02}, - {428,451,-1.03e-02}, - {428,452,-1.03e-02}, - {428,457,-1.03e-02}, - {429,429,8.29e-02}, - {429,101,4.84e-05}, - {429,114,4.84e-05}, - {429,115,1.93e-04}, - {429,122,1.93e-04}, - {429,138,1.93e-04}, - {429,140,7.74e-04}, - {429,145,4.84e-05}, - {429,164,4.84e-05}, - {429,165,1.93e-04}, - {429,390,-1.03e-02}, - {429,403,-1.03e-02}, - {429,404,-1.03e-02}, - {429,411,-1.03e-02}, - {429,427,-1.03e-02}, - {429,434,-1.03e-02}, - {429,453,-1.03e-02}, - {429,454,-1.03e-02}, - {430,430,8.29e-02}, - {430,113,4.84e-05}, - {430,118,4.84e-05}, - {430,120,1.93e-04}, - {430,136,1.93e-04}, - {430,141,7.74e-04}, - {430,142,1.93e-04}, - {430,161,4.84e-05}, - {430,166,1.93e-04}, - {430,167,4.84e-05}, - {430,402,-1.03e-02}, - {430,407,-1.03e-02}, - {430,409,-1.03e-02}, - {430,425,-1.03e-02}, - {430,431,-1.03e-02}, - {430,450,-1.03e-02}, - {430,455,-1.03e-02}, - {430,456,-1.03e-02}, - {431,431,8.29e-02}, - {431,118,1.93e-04}, - {431,119,4.84e-05}, - {431,120,4.84e-05}, - {431,141,1.93e-04}, - {431,142,7.74e-04}, - {431,143,1.93e-04}, - {431,166,4.84e-05}, - {431,167,1.93e-04}, - {431,168,4.84e-05}, - {431,407,-1.03e-02}, - {431,408,-1.03e-02}, - {431,409,-1.03e-02}, - {431,430,-1.03e-02}, - {431,432,-1.03e-02}, - {431,455,-1.03e-02}, - {431,456,-1.03e-02}, - {431,457,-1.03e-02}, - {432,432,8.29e-02}, - {432,116,4.84e-05}, - {432,118,4.84e-05}, - {432,119,1.93e-04}, - {432,139,1.93e-04}, - {432,142,1.93e-04}, - {432,143,7.74e-04}, - {432,162,4.84e-05}, - {432,167,4.84e-05}, - {432,168,1.93e-04}, - {432,405,-1.03e-02}, - {432,407,-1.03e-02}, - {432,408,-1.03e-02}, - {432,428,-1.03e-02}, - {432,431,-1.03e-02}, - {432,451,-1.03e-02}, - {432,456,-1.03e-02}, - {432,457,-1.03e-02}, - {433,433,2.08e-01}, - {433,121,9.67e-05}, - {433,123,4.84e-05}, - {433,144,3.87e-04}, - {433,146,1.93e-04}, - {433,169,9.67e-05}, - {433,171,4.84e-05}, - {433,410,3.65e-02}, - {433,412,-1.03e-02}, - {433,435,-1.03e-02}, - {433,458,3.65e-02}, - {433,460,-1.03e-02}, - {434,434,2.08e-01}, - {434,122,9.67e-05}, - {434,140,4.84e-05}, - {434,145,3.87e-04}, - {434,165,1.93e-04}, - {434,170,9.67e-05}, - {434,193,4.84e-05}, - {434,411,3.65e-02}, - {434,429,-1.03e-02}, - {434,454,-1.03e-02}, - {434,459,3.65e-02}, - {434,482,-1.03e-02}, - {435,435,8.29e-02}, - {435,121,4.84e-05}, - {435,123,1.93e-04}, - {435,124,4.84e-05}, - {435,144,1.93e-04}, - {435,146,7.74e-04}, - {435,147,1.93e-04}, - {435,169,4.84e-05}, - {435,171,1.93e-04}, - {435,172,4.84e-05}, - {435,410,-1.03e-02}, - {435,412,-1.03e-02}, - {435,413,-1.03e-02}, - {435,433,-1.03e-02}, - {435,436,-1.03e-02}, - {435,458,-1.03e-02}, - {435,460,-1.03e-02}, - {435,461,-1.03e-02}, - {436,436,8.29e-02}, - {436,123,4.84e-05}, - {436,124,1.93e-04}, - {436,125,4.84e-05}, - {436,146,1.93e-04}, - {436,147,7.74e-04}, - {436,148,1.93e-04}, - {436,171,4.84e-05}, - {436,172,1.93e-04}, - {436,173,4.84e-05}, - {436,412,-1.03e-02}, - {436,413,-1.03e-02}, - {436,414,-1.03e-02}, - {436,435,-1.03e-02}, - {436,437,-1.03e-02}, - {436,460,-1.03e-02}, - {436,461,-1.03e-02}, - {436,462,-1.03e-02}, - {437,437,8.29e-02}, - {437,124,4.84e-05}, - {437,125,1.93e-04}, - {437,126,4.84e-05}, - {437,147,1.93e-04}, - {437,148,7.74e-04}, - {437,149,1.93e-04}, - {437,172,4.84e-05}, - {437,173,1.93e-04}, - {437,174,4.84e-05}, - {437,413,-1.03e-02}, - {437,414,-1.03e-02}, - {437,415,-1.03e-02}, - {437,436,-1.03e-02}, - {437,438,-1.03e-02}, - {437,461,-1.03e-02}, - {437,462,-1.03e-02}, - {437,463,-1.03e-02}, - {438,438,8.29e-02}, - {438,125,4.84e-05}, - {438,126,1.93e-04}, - {438,127,4.84e-05}, - {438,148,1.93e-04}, - {438,149,7.74e-04}, - {438,150,1.93e-04}, - {438,173,4.84e-05}, - {438,174,1.93e-04}, - {438,175,4.84e-05}, - {438,414,-1.03e-02}, - {438,415,-1.03e-02}, - {438,416,-1.03e-02}, - {438,437,-1.03e-02}, - {438,439,-1.03e-02}, - {438,462,-1.03e-02}, - {438,463,-1.03e-02}, - {438,464,-1.03e-02}, - {439,439,8.29e-02}, - {439,126,4.84e-05}, - {439,127,1.93e-04}, - {439,128,4.84e-05}, - {439,149,1.93e-04}, - {439,150,7.74e-04}, - {439,151,1.93e-04}, - {439,174,4.84e-05}, - {439,175,1.93e-04}, - {439,176,4.84e-05}, - {439,415,-1.03e-02}, - {439,416,-1.03e-02}, - {439,417,-1.03e-02}, - {439,438,-1.03e-02}, - {439,440,-1.03e-02}, - {439,463,-1.03e-02}, - {439,464,-1.03e-02}, - {439,465,-1.03e-02}, - {440,440,8.29e-02}, - {440,127,4.84e-05}, - {440,128,1.93e-04}, - {440,129,4.84e-05}, - {440,150,1.93e-04}, - {440,151,7.74e-04}, - {440,152,1.93e-04}, - {440,175,4.84e-05}, - {440,176,1.93e-04}, - {440,177,4.84e-05}, - {440,416,-1.03e-02}, - {440,417,-1.03e-02}, - {440,418,-1.03e-02}, - {440,439,-1.03e-02}, - {440,441,-1.03e-02}, - {440,464,-1.03e-02}, - {440,465,-1.03e-02}, - {440,466,-1.03e-02}, - {441,441,8.29e-02}, - {441,128,4.84e-05}, - {441,129,1.93e-04}, - {441,130,4.84e-05}, - {441,151,1.93e-04}, - {441,152,7.74e-04}, - {441,153,1.93e-04}, - {441,176,4.84e-05}, - {441,177,1.93e-04}, - {441,178,4.84e-05}, - {441,417,-1.03e-02}, - {441,418,-1.03e-02}, - {441,419,-1.03e-02}, - {441,440,-1.03e-02}, - {441,442,-1.03e-02}, - {441,465,-1.03e-02}, - {441,466,-1.03e-02}, - {441,467,-1.03e-02}, - {442,442,8.29e-02}, - {442,129,4.84e-05}, - {442,130,1.93e-04}, - {442,131,4.84e-05}, - {442,152,1.93e-04}, - {442,153,7.74e-04}, - {442,154,1.93e-04}, - {442,177,4.84e-05}, - {442,178,1.93e-04}, - {442,179,4.84e-05}, - {442,418,-1.03e-02}, - {442,419,-1.03e-02}, - {442,420,-1.03e-02}, - {442,441,-1.03e-02}, - {442,443,-1.03e-02}, - {442,466,-1.03e-02}, - {442,467,-1.03e-02}, - {442,468,-1.03e-02}, - {443,443,8.29e-02}, - {443,130,4.84e-05}, - {443,131,1.93e-04}, - {443,132,4.84e-05}, - {443,153,1.93e-04}, - {443,154,7.74e-04}, - {443,155,1.93e-04}, - {443,178,4.84e-05}, - {443,179,1.93e-04}, - {443,180,4.84e-05}, - {443,419,-1.03e-02}, - {443,420,-1.03e-02}, - {443,421,-1.03e-02}, - {443,442,-1.03e-02}, - {443,444,-1.03e-02}, - {443,467,-1.03e-02}, - {443,468,-1.03e-02}, - {443,469,-1.03e-02}, - {444,444,8.29e-02}, - {444,131,4.84e-05}, - {444,132,1.93e-04}, - {444,133,4.84e-05}, - {444,154,1.93e-04}, - {444,155,7.74e-04}, - {444,156,1.93e-04}, - {444,179,4.84e-05}, - {444,180,1.93e-04}, - {444,181,4.84e-05}, - {444,420,-1.03e-02}, - {444,421,-1.03e-02}, - {444,422,-1.03e-02}, - {444,443,-1.03e-02}, - {444,445,-1.03e-02}, - {444,468,-1.03e-02}, - {444,469,-1.03e-02}, - {444,470,-1.03e-02}, - {445,445,8.29e-02}, - {445,132,4.84e-05}, - {445,133,1.93e-04}, - {445,155,1.93e-04}, - {445,156,7.74e-04}, - {445,157,1.93e-04}, - {445,158,4.84e-05}, - {445,180,4.84e-05}, - {445,181,1.93e-04}, - {445,182,4.84e-05}, - {445,421,-1.03e-02}, - {445,422,-1.03e-02}, - {445,444,-1.03e-02}, - {445,446,-1.03e-02}, - {445,447,-1.03e-02}, - {445,469,-1.03e-02}, - {445,470,-1.03e-02}, - {445,471,-1.03e-02}, - {446,446,8.29e-02}, - {446,133,4.84e-05}, - {446,156,1.93e-04}, - {446,157,7.74e-04}, - {446,158,1.93e-04}, - {446,181,4.84e-05}, - {446,182,1.93e-04}, - {446,183,4.84e-05}, - {446,184,1.93e-04}, - {446,188,4.84e-05}, - {446,422,-1.03e-02}, - {446,445,-1.03e-02}, - {446,447,-1.03e-02}, - {446,470,-1.03e-02}, - {446,471,-1.03e-02}, - {446,472,-1.03e-02}, - {446,473,-1.03e-02}, - {446,477,-1.03e-02}, - {447,447,8.29e-02}, - {447,133,1.93e-04}, - {447,134,4.84e-05}, - {447,156,4.84e-05}, - {447,157,1.93e-04}, - {447,158,7.74e-04}, - {447,159,1.93e-04}, - {447,184,4.84e-05}, - {447,187,4.84e-05}, - {447,188,1.93e-04}, - {447,422,-1.03e-02}, - {447,423,-1.03e-02}, - {447,445,-1.03e-02}, - {447,446,-1.03e-02}, - {447,448,-1.03e-02}, - {447,473,-1.03e-02}, - {447,476,-1.03e-02}, - {447,477,-1.03e-02}, - {448,448,8.29e-02}, - {448,133,4.84e-05}, - {448,134,1.93e-04}, - {448,135,4.84e-05}, - {448,158,1.93e-04}, - {448,159,7.74e-04}, - {448,160,1.93e-04}, - {448,185,4.84e-05}, - {448,187,1.93e-04}, - {448,188,4.84e-05}, - {448,422,-1.03e-02}, - {448,423,-1.03e-02}, - {448,424,-1.03e-02}, - {448,447,-1.03e-02}, - {448,449,-1.03e-02}, - {448,474,-1.03e-02}, - {448,476,-1.03e-02}, - {448,477,-1.03e-02}, - {449,449,8.29e-02}, - {449,134,4.84e-05}, - {449,135,1.93e-04}, - {449,136,4.84e-05}, - {449,159,1.93e-04}, - {449,160,7.74e-04}, - {449,161,1.93e-04}, - {449,185,1.93e-04}, - {449,186,4.84e-05}, - {449,187,4.84e-05}, - {449,423,-1.03e-02}, - {449,424,-1.03e-02}, - {449,425,-1.03e-02}, - {449,448,-1.03e-02}, - {449,450,-1.03e-02}, - {449,474,-1.03e-02}, - {449,475,-1.03e-02}, - {449,476,-1.03e-02}, - {450,450,8.29e-02}, - {450,135,4.84e-05}, - {450,136,1.93e-04}, - {450,141,4.84e-05}, - {450,160,1.93e-04}, - {450,161,7.74e-04}, - {450,166,1.93e-04}, - {450,185,4.84e-05}, - {450,186,1.93e-04}, - {450,192,4.84e-05}, - {450,424,-1.03e-02}, - {450,425,-1.03e-02}, - {450,430,-1.03e-02}, - {450,449,-1.03e-02}, - {450,455,-1.03e-02}, - {450,474,-1.03e-02}, - {450,475,-1.03e-02}, - {450,481,-1.03e-02}, - {451,451,8.29e-02}, - {451,137,4.84e-05}, - {451,139,1.93e-04}, - {451,143,4.84e-05}, - {451,162,7.74e-04}, - {451,163,1.93e-04}, - {451,168,1.93e-04}, - {451,189,4.84e-05}, - {451,190,1.93e-04}, - {451,195,4.84e-05}, - {451,426,-1.03e-02}, - {451,428,-1.03e-02}, - {451,432,-1.03e-02}, - {451,452,-1.03e-02}, - {451,457,-1.03e-02}, - {451,478,-1.03e-02}, - {451,479,-1.03e-02}, - {451,484,-1.03e-02}, - {452,452,8.29e-02}, - {452,137,1.93e-04}, - {452,138,4.84e-05}, - {452,139,4.84e-05}, - {452,162,1.93e-04}, - {452,163,7.74e-04}, - {452,164,1.93e-04}, - {452,190,4.84e-05}, - {452,194,4.84e-05}, - {452,195,1.93e-04}, - {452,426,-1.03e-02}, - {452,427,-1.03e-02}, - {452,428,-1.03e-02}, - {452,451,-1.03e-02}, - {452,453,-1.03e-02}, - {452,479,-1.03e-02}, - {452,483,-1.03e-02}, - {452,484,-1.03e-02}, - {453,453,8.29e-02}, - {453,137,4.84e-05}, - {453,138,1.93e-04}, - {453,140,4.84e-05}, - {453,163,1.93e-04}, - {453,164,7.74e-04}, - {453,165,1.93e-04}, - {453,193,4.84e-05}, - {453,194,1.93e-04}, - {453,195,4.84e-05}, - {453,426,-1.03e-02}, - {453,427,-1.03e-02}, - {453,429,-1.03e-02}, - {453,452,-1.03e-02}, - {453,454,-1.03e-02}, - {453,482,-1.03e-02}, - {453,483,-1.03e-02}, - {453,484,-1.03e-02}, - {454,454,8.29e-02}, - {454,122,4.84e-05}, - {454,138,4.84e-05}, - {454,140,1.93e-04}, - {454,145,1.93e-04}, - {454,164,1.93e-04}, - {454,165,7.74e-04}, - {454,170,4.84e-05}, - {454,193,1.93e-04}, - {454,194,4.84e-05}, - {454,411,-1.03e-02}, - {454,427,-1.03e-02}, - {454,429,-1.03e-02}, - {454,434,-1.03e-02}, - {454,453,-1.03e-02}, - {454,459,-1.03e-02}, - {454,482,-1.03e-02}, - {454,483,-1.03e-02}, - {455,455,8.29e-02}, - {455,136,4.84e-05}, - {455,141,1.93e-04}, - {455,142,4.84e-05}, - {455,161,1.93e-04}, - {455,166,7.74e-04}, - {455,167,1.93e-04}, - {455,186,4.84e-05}, - {455,191,4.84e-05}, - {455,192,1.93e-04}, - {455,425,-1.03e-02}, - {455,430,-1.03e-02}, - {455,431,-1.03e-02}, - {455,450,-1.03e-02}, - {455,456,-1.03e-02}, - {455,475,-1.03e-02}, - {455,480,-1.03e-02}, - {455,481,-1.03e-02}, - {456,456,8.29e-02}, - {456,141,4.84e-05}, - {456,142,1.93e-04}, - {456,143,4.84e-05}, - {456,166,1.93e-04}, - {456,167,7.74e-04}, - {456,168,1.93e-04}, - {456,189,4.84e-05}, - {456,191,1.93e-04}, - {456,192,4.84e-05}, - {456,430,-1.03e-02}, - {456,431,-1.03e-02}, - {456,432,-1.03e-02}, - {456,455,-1.03e-02}, - {456,457,-1.03e-02}, - {456,478,-1.03e-02}, - {456,480,-1.03e-02}, - {456,481,-1.03e-02}, - {457,457,8.29e-02}, - {457,139,4.84e-05}, - {457,142,4.84e-05}, - {457,143,1.93e-04}, - {457,162,1.93e-04}, - {457,167,1.93e-04}, - {457,168,7.74e-04}, - {457,189,1.93e-04}, - {457,190,4.84e-05}, - {457,191,4.84e-05}, - {457,428,-1.03e-02}, - {457,431,-1.03e-02}, - {457,432,-1.03e-02}, - {457,451,-1.03e-02}, - {457,456,-1.03e-02}, - {457,478,-1.03e-02}, - {457,479,-1.03e-02}, - {457,480,-1.03e-02}, - {458,458,2.08e-01}, - {458,144,9.67e-05}, - {458,146,4.84e-05}, - {458,169,3.87e-04}, - {458,171,1.93e-04}, - {458,196,9.67e-05}, - {458,198,4.84e-05}, - {458,433,3.65e-02}, - {458,435,-1.03e-02}, - {458,460,-1.03e-02}, - {458,485,3.65e-02}, - {458,487,-1.03e-02}, - {459,459,2.08e-01}, - {459,145,9.67e-05}, - {459,165,4.84e-05}, - {459,170,3.87e-04}, - {459,193,1.93e-04}, - {459,197,9.67e-05}, - {459,223,4.84e-05}, - {459,434,3.65e-02}, - {459,454,-1.03e-02}, - {459,482,-1.03e-02}, - {459,486,3.65e-02}, - {459,512,-1.03e-02}, - {460,460,8.29e-02}, - {460,144,4.84e-05}, - {460,146,1.93e-04}, - {460,147,4.84e-05}, - {460,169,1.93e-04}, - {460,171,7.74e-04}, - {460,172,1.93e-04}, - {460,196,4.84e-05}, - {460,198,1.93e-04}, - {460,199,4.84e-05}, - {460,433,-1.03e-02}, - {460,435,-1.03e-02}, - {460,436,-1.03e-02}, - {460,458,-1.03e-02}, - {460,461,-1.03e-02}, - {460,485,-1.03e-02}, - {460,487,-1.03e-02}, - {460,488,-1.03e-02}, - {461,461,8.29e-02}, - {461,146,4.84e-05}, - {461,147,1.93e-04}, - {461,148,4.84e-05}, - {461,171,1.93e-04}, - {461,172,7.74e-04}, - {461,173,1.93e-04}, - {461,198,4.84e-05}, - {461,199,1.93e-04}, - {461,200,4.84e-05}, - {461,435,-1.03e-02}, - {461,436,-1.03e-02}, - {461,437,-1.03e-02}, - {461,460,-1.03e-02}, - {461,462,-1.03e-02}, - {461,487,-1.03e-02}, - {461,488,-1.03e-02}, - {461,489,-1.03e-02}, - {462,462,8.29e-02}, - {462,147,4.84e-05}, - {462,148,1.93e-04}, - {462,149,4.84e-05}, - {462,172,1.93e-04}, - {462,173,7.74e-04}, - {462,174,1.93e-04}, - {462,199,4.84e-05}, - {462,200,1.93e-04}, - {462,201,4.84e-05}, - {462,436,-1.03e-02}, - {462,437,-1.03e-02}, - {462,438,-1.03e-02}, - {462,461,-1.03e-02}, - {462,463,-1.03e-02}, - {462,488,-1.03e-02}, - {462,489,-1.03e-02}, - {462,490,-1.03e-02}, - {463,463,8.29e-02}, - {463,148,4.84e-05}, - {463,149,1.93e-04}, - {463,150,4.84e-05}, - {463,173,1.93e-04}, - {463,174,7.74e-04}, - {463,175,1.93e-04}, - {463,200,4.84e-05}, - {463,201,1.93e-04}, - {463,202,4.84e-05}, - {463,437,-1.03e-02}, - {463,438,-1.03e-02}, - {463,439,-1.03e-02}, - {463,462,-1.03e-02}, - {463,464,-1.03e-02}, - {463,489,-1.03e-02}, - {463,490,-1.03e-02}, - {463,491,-1.03e-02}, - {464,464,8.29e-02}, - {464,149,4.84e-05}, - {464,150,1.93e-04}, - {464,151,4.84e-05}, - {464,174,1.93e-04}, - {464,175,7.74e-04}, - {464,176,1.93e-04}, - {464,201,4.84e-05}, - {464,202,1.93e-04}, - {464,203,4.84e-05}, - {464,438,-1.03e-02}, - {464,439,-1.03e-02}, - {464,440,-1.03e-02}, - {464,463,-1.03e-02}, - {464,465,-1.03e-02}, - {464,490,-1.03e-02}, - {464,491,-1.03e-02}, - {464,492,-1.03e-02}, - {465,465,8.29e-02}, - {465,150,4.84e-05}, - {465,151,1.93e-04}, - {465,152,4.84e-05}, - {465,175,1.93e-04}, - {465,176,7.74e-04}, - {465,177,1.93e-04}, - {465,202,4.84e-05}, - {465,203,1.93e-04}, - {465,204,4.84e-05}, - {465,439,-1.03e-02}, - {465,440,-1.03e-02}, - {465,441,-1.03e-02}, - {465,464,-1.03e-02}, - {465,466,-1.03e-02}, - {465,491,-1.03e-02}, - {465,492,-1.03e-02}, - {465,493,-1.03e-02}, - {466,466,8.29e-02}, - {466,151,4.84e-05}, - {466,152,1.93e-04}, - {466,153,4.84e-05}, - {466,176,1.93e-04}, - {466,177,7.74e-04}, - {466,178,1.93e-04}, - {466,203,4.84e-05}, - {466,204,1.93e-04}, - {466,205,4.84e-05}, - {466,440,-1.03e-02}, - {466,441,-1.03e-02}, - {466,442,-1.03e-02}, - {466,465,-1.03e-02}, - {466,467,-1.03e-02}, - {466,492,-1.03e-02}, - {466,493,-1.03e-02}, - {466,494,-1.03e-02}, - {467,467,8.29e-02}, - {467,152,4.84e-05}, - {467,153,1.93e-04}, - {467,154,4.84e-05}, - {467,177,1.93e-04}, - {467,178,7.74e-04}, - {467,179,1.93e-04}, - {467,204,4.84e-05}, - {467,205,1.93e-04}, - {467,206,4.84e-05}, - {467,441,-1.03e-02}, - {467,442,-1.03e-02}, - {467,443,-1.03e-02}, - {467,466,-1.03e-02}, - {467,468,-1.03e-02}, - {467,493,-1.03e-02}, - {467,494,-1.03e-02}, - {467,495,-1.03e-02}, - {468,468,8.29e-02}, - {468,153,4.84e-05}, - {468,154,1.93e-04}, - {468,155,4.84e-05}, - {468,178,1.93e-04}, - {468,179,7.74e-04}, - {468,180,1.93e-04}, - {468,205,4.84e-05}, - {468,206,1.93e-04}, - {468,207,4.84e-05}, - {468,442,-1.03e-02}, - {468,443,-1.03e-02}, - {468,444,-1.03e-02}, - {468,467,-1.03e-02}, - {468,469,-1.03e-02}, - {468,494,-1.03e-02}, - {468,495,-1.03e-02}, - {468,496,-1.03e-02}, - {469,469,8.29e-02}, - {469,154,4.84e-05}, - {469,155,1.93e-04}, - {469,156,4.84e-05}, - {469,179,1.93e-04}, - {469,180,7.74e-04}, - {469,181,1.93e-04}, - {469,206,4.84e-05}, - {469,207,1.93e-04}, - {469,208,4.84e-05}, - {469,443,-1.03e-02}, - {469,444,-1.03e-02}, - {469,445,-1.03e-02}, - {469,468,-1.03e-02}, - {469,470,-1.03e-02}, - {469,495,-1.03e-02}, - {469,496,-1.03e-02}, - {469,497,-1.03e-02}, - {470,470,8.29e-02}, - {470,155,4.84e-05}, - {470,156,1.93e-04}, - {470,157,4.84e-05}, - {470,180,1.93e-04}, - {470,181,7.74e-04}, - {470,182,1.93e-04}, - {470,207,4.84e-05}, - {470,208,1.93e-04}, - {470,209,4.84e-05}, - {470,444,-1.03e-02}, - {470,445,-1.03e-02}, - {470,446,-1.03e-02}, - {470,469,-1.03e-02}, - {470,471,-1.03e-02}, - {470,496,-1.03e-02}, - {470,497,-1.03e-02}, - {470,498,-1.03e-02}, - {471,471,8.29e-02}, - {471,156,4.84e-05}, - {471,157,1.93e-04}, - {471,181,1.93e-04}, - {471,182,7.74e-04}, - {471,183,1.93e-04}, - {471,184,4.84e-05}, - {471,208,4.84e-05}, - {471,209,1.93e-04}, - {471,210,4.84e-05}, - {471,445,-1.03e-02}, - {471,446,-1.03e-02}, - {471,470,-1.03e-02}, - {471,472,-1.03e-02}, - {471,473,-1.03e-02}, - {471,497,-1.03e-02}, - {471,498,-1.03e-02}, - {471,499,-1.03e-02}, - {472,472,8.29e-02}, - {472,157,4.84e-05}, - {472,182,1.93e-04}, - {472,183,7.74e-04}, - {472,184,1.93e-04}, - {472,209,4.84e-05}, - {472,210,1.93e-04}, - {472,211,4.84e-05}, - {472,212,1.93e-04}, - {472,213,4.84e-05}, - {472,446,-1.03e-02}, - {472,471,-1.03e-02}, - {472,473,-1.03e-02}, - {472,498,-1.03e-02}, - {472,499,-1.03e-02}, - {472,500,-1.03e-02}, - {472,501,-1.03e-02}, - {472,502,-1.03e-02}, - {473,473,8.29e-02}, - {473,157,1.93e-04}, - {473,158,4.84e-05}, - {473,182,4.84e-05}, - {473,183,1.93e-04}, - {473,184,7.74e-04}, - {473,188,1.93e-04}, - {473,212,4.84e-05}, - {473,213,1.93e-04}, - {473,217,4.84e-05}, - {473,446,-1.03e-02}, - {473,447,-1.03e-02}, - {473,471,-1.03e-02}, - {473,472,-1.03e-02}, - {473,477,-1.03e-02}, - {473,501,-1.03e-02}, - {473,502,-1.03e-02}, - {473,506,-1.03e-02}, - {474,474,8.29e-02}, - {474,159,4.84e-05}, - {474,160,1.93e-04}, - {474,161,4.84e-05}, - {474,185,7.74e-04}, - {474,186,1.93e-04}, - {474,187,1.93e-04}, - {474,214,4.84e-05}, - {474,215,1.93e-04}, - {474,216,4.84e-05}, - {474,448,-1.03e-02}, - {474,449,-1.03e-02}, - {474,450,-1.03e-02}, - {474,475,-1.03e-02}, - {474,476,-1.03e-02}, - {474,503,-1.03e-02}, - {474,504,-1.03e-02}, - {474,505,-1.03e-02}, - {475,475,8.29e-02}, - {475,160,4.84e-05}, - {475,161,1.93e-04}, - {475,166,4.84e-05}, - {475,185,1.93e-04}, - {475,186,7.74e-04}, - {475,192,1.93e-04}, - {475,215,4.84e-05}, - {475,216,1.93e-04}, - {475,221,4.84e-05}, - {475,449,-1.03e-02}, - {475,450,-1.03e-02}, - {475,455,-1.03e-02}, - {475,474,-1.03e-02}, - {475,481,-1.03e-02}, - {475,504,-1.03e-02}, - {475,505,-1.03e-02}, - {475,510,-1.03e-02}, - {476,476,8.29e-02}, - {476,158,4.84e-05}, - {476,159,1.93e-04}, - {476,160,4.84e-05}, - {476,185,1.93e-04}, - {476,187,7.74e-04}, - {476,188,1.93e-04}, - {476,214,1.93e-04}, - {476,215,4.84e-05}, - {476,217,4.84e-05}, - {476,447,-1.03e-02}, - {476,448,-1.03e-02}, - {476,449,-1.03e-02}, - {476,474,-1.03e-02}, - {476,477,-1.03e-02}, - {476,503,-1.03e-02}, - {476,504,-1.03e-02}, - {476,506,-1.03e-02}, - {477,477,8.29e-02}, - {477,157,4.84e-05}, - {477,158,1.93e-04}, - {477,159,4.84e-05}, - {477,184,1.93e-04}, - {477,187,1.93e-04}, - {477,188,7.74e-04}, - {477,213,4.84e-05}, - {477,214,4.84e-05}, - {477,217,1.93e-04}, - {477,446,-1.03e-02}, - {477,447,-1.03e-02}, - {477,448,-1.03e-02}, - {477,473,-1.03e-02}, - {477,476,-1.03e-02}, - {477,502,-1.03e-02}, - {477,503,-1.03e-02}, - {477,506,-1.03e-02}, - {478,478,8.29e-02}, - {478,162,4.84e-05}, - {478,167,4.84e-05}, - {478,168,1.93e-04}, - {478,189,7.74e-04}, - {478,190,1.93e-04}, - {478,191,1.93e-04}, - {478,218,4.84e-05}, - {478,219,1.93e-04}, - {478,220,4.84e-05}, - {478,451,-1.03e-02}, - {478,456,-1.03e-02}, - {478,457,-1.03e-02}, - {478,479,-1.03e-02}, - {478,480,-1.03e-02}, - {478,507,-1.03e-02}, - {478,508,-1.03e-02}, - {478,509,-1.03e-02}, - {479,479,8.29e-02}, - {479,162,1.93e-04}, - {479,163,4.84e-05}, - {479,168,4.84e-05}, - {479,189,1.93e-04}, - {479,190,7.74e-04}, - {479,195,1.93e-04}, - {479,219,4.84e-05}, - {479,220,1.93e-04}, - {479,224,4.84e-05}, - {479,451,-1.03e-02}, - {479,452,-1.03e-02}, - {479,457,-1.03e-02}, - {479,478,-1.03e-02}, - {479,484,-1.03e-02}, - {479,508,-1.03e-02}, - {479,509,-1.03e-02}, - {479,513,-1.03e-02}, - {480,480,8.29e-02}, - {480,166,4.84e-05}, - {480,167,1.93e-04}, - {480,168,4.84e-05}, - {480,189,1.93e-04}, - {480,191,7.74e-04}, - {480,192,1.93e-04}, - {480,218,1.93e-04}, - {480,219,4.84e-05}, - {480,221,4.84e-05}, - {480,455,-1.03e-02}, - {480,456,-1.03e-02}, - {480,457,-1.03e-02}, - {480,478,-1.03e-02}, - {480,481,-1.03e-02}, - {480,507,-1.03e-02}, - {480,508,-1.03e-02}, - {480,510,-1.03e-02}, - {481,481,8.29e-02}, - {481,161,4.84e-05}, - {481,166,1.93e-04}, - {481,167,4.84e-05}, - {481,186,1.93e-04}, - {481,191,1.93e-04}, - {481,192,7.74e-04}, - {481,216,4.84e-05}, - {481,218,4.84e-05}, - {481,221,1.93e-04}, - {481,450,-1.03e-02}, - {481,455,-1.03e-02}, - {481,456,-1.03e-02}, - {481,475,-1.03e-02}, - {481,480,-1.03e-02}, - {481,505,-1.03e-02}, - {481,507,-1.03e-02}, - {481,510,-1.03e-02}, - {482,482,8.29e-02}, - {482,145,4.84e-05}, - {482,164,4.84e-05}, - {482,165,1.93e-04}, - {482,170,1.93e-04}, - {482,193,7.74e-04}, - {482,194,1.93e-04}, - {482,197,4.84e-05}, - {482,222,4.84e-05}, - {482,223,1.93e-04}, - {482,434,-1.03e-02}, - {482,453,-1.03e-02}, - {482,454,-1.03e-02}, - {482,459,-1.03e-02}, - {482,483,-1.03e-02}, - {482,486,-1.03e-02}, - {482,511,-1.03e-02}, - {482,512,-1.03e-02}, - {483,483,8.29e-02}, - {483,163,4.84e-05}, - {483,164,1.93e-04}, - {483,165,4.84e-05}, - {483,193,1.93e-04}, - {483,194,7.74e-04}, - {483,195,1.93e-04}, - {483,222,1.93e-04}, - {483,223,4.84e-05}, - {483,224,4.84e-05}, - {483,452,-1.03e-02}, - {483,453,-1.03e-02}, - {483,454,-1.03e-02}, - {483,482,-1.03e-02}, - {483,484,-1.03e-02}, - {483,511,-1.03e-02}, - {483,512,-1.03e-02}, - {483,513,-1.03e-02}, - {484,484,8.29e-02}, - {484,162,4.84e-05}, - {484,163,1.93e-04}, - {484,164,4.84e-05}, - {484,190,1.93e-04}, - {484,194,1.93e-04}, - {484,195,7.74e-04}, - {484,220,4.84e-05}, - {484,222,4.84e-05}, - {484,224,1.93e-04}, - {484,451,-1.03e-02}, - {484,452,-1.03e-02}, - {484,453,-1.03e-02}, - {484,479,-1.03e-02}, - {484,483,-1.03e-02}, - {484,509,-1.03e-02}, - {484,511,-1.03e-02}, - {484,513,-1.03e-02}, - {485,485,2.08e-01}, - {485,169,9.67e-05}, - {485,171,4.84e-05}, - {485,196,3.87e-04}, - {485,198,1.93e-04}, - {485,225,9.67e-05}, - {485,227,4.84e-05}, - {485,458,3.65e-02}, - {485,460,-1.03e-02}, - {485,487,-1.03e-02}, - {485,514,3.65e-02}, - {485,516,-1.03e-02}, - {486,486,2.08e-01}, - {486,170,9.67e-05}, - {486,193,4.84e-05}, - {486,197,3.87e-04}, - {486,223,1.93e-04}, - {486,226,9.67e-05}, - {486,255,4.84e-05}, - {486,459,3.65e-02}, - {486,482,-1.03e-02}, - {486,512,-1.03e-02}, - {486,515,3.65e-02}, - {486,544,-1.03e-02}, - {487,487,8.29e-02}, - {487,169,4.84e-05}, - {487,171,1.93e-04}, - {487,172,4.84e-05}, - {487,196,1.93e-04}, - {487,198,7.74e-04}, - {487,199,1.93e-04}, - {487,225,4.84e-05}, - {487,227,1.93e-04}, - {487,228,4.84e-05}, - {487,458,-1.03e-02}, - {487,460,-1.03e-02}, - {487,461,-1.03e-02}, - {487,485,-1.03e-02}, - {487,488,-1.03e-02}, - {487,514,-1.03e-02}, - {487,516,-1.03e-02}, - {487,517,-1.03e-02}, - {488,488,8.29e-02}, - {488,171,4.84e-05}, - {488,172,1.93e-04}, - {488,173,4.84e-05}, - {488,198,1.93e-04}, - {488,199,7.74e-04}, - {488,200,1.93e-04}, - {488,227,4.84e-05}, - {488,228,1.93e-04}, - {488,229,4.84e-05}, - {488,460,-1.03e-02}, - {488,461,-1.03e-02}, - {488,462,-1.03e-02}, - {488,487,-1.03e-02}, - {488,489,-1.03e-02}, - {488,516,-1.03e-02}, - {488,517,-1.03e-02}, - {488,518,-1.03e-02}, - {489,489,8.29e-02}, - {489,172,4.84e-05}, - {489,173,1.93e-04}, - {489,174,4.84e-05}, - {489,199,1.93e-04}, - {489,200,7.74e-04}, - {489,201,1.93e-04}, - {489,228,4.84e-05}, - {489,229,1.93e-04}, - {489,230,4.84e-05}, - {489,461,-1.03e-02}, - {489,462,-1.03e-02}, - {489,463,-1.03e-02}, - {489,488,-1.03e-02}, - {489,490,-1.03e-02}, - {489,517,-1.03e-02}, - {489,518,-1.03e-02}, - {489,519,-1.03e-02}, - {490,490,8.29e-02}, - {490,173,4.84e-05}, - {490,174,1.93e-04}, - {490,175,4.84e-05}, - {490,200,1.93e-04}, - {490,201,7.74e-04}, - {490,202,1.93e-04}, - {490,229,4.84e-05}, - {490,230,1.93e-04}, - {490,231,4.84e-05}, - {490,462,-1.03e-02}, - {490,463,-1.03e-02}, - {490,464,-1.03e-02}, - {490,489,-1.03e-02}, - {490,491,-1.03e-02}, - {490,518,-1.03e-02}, - {490,519,-1.03e-02}, - {490,520,-1.03e-02}, - {491,491,8.29e-02}, - {491,174,4.84e-05}, - {491,175,1.93e-04}, - {491,176,4.84e-05}, - {491,201,1.93e-04}, - {491,202,7.74e-04}, - {491,203,1.93e-04}, - {491,230,4.84e-05}, - {491,231,1.93e-04}, - {491,232,4.84e-05}, - {491,463,-1.03e-02}, - {491,464,-1.03e-02}, - {491,465,-1.03e-02}, - {491,490,-1.03e-02}, - {491,492,-1.03e-02}, - {491,519,-1.03e-02}, - {491,520,-1.03e-02}, - {491,521,-1.03e-02}, - {492,492,8.29e-02}, - {492,175,4.84e-05}, - {492,176,1.93e-04}, - {492,177,4.84e-05}, - {492,202,1.93e-04}, - {492,203,7.74e-04}, - {492,204,1.93e-04}, - {492,231,4.84e-05}, - {492,232,1.93e-04}, - {492,233,4.84e-05}, - {492,464,-1.03e-02}, - {492,465,-1.03e-02}, - {492,466,-1.03e-02}, - {492,491,-1.03e-02}, - {492,493,-1.03e-02}, - {492,520,-1.03e-02}, - {492,521,-1.03e-02}, - {492,522,-1.03e-02}, - {493,493,8.29e-02}, - {493,176,4.84e-05}, - {493,177,1.93e-04}, - {493,178,4.84e-05}, - {493,203,1.93e-04}, - {493,204,7.74e-04}, - {493,205,1.93e-04}, - {493,232,4.84e-05}, - {493,233,1.93e-04}, - {493,234,4.84e-05}, - {493,465,-1.03e-02}, - {493,466,-1.03e-02}, - {493,467,-1.03e-02}, - {493,492,-1.03e-02}, - {493,494,-1.03e-02}, - {493,521,-1.03e-02}, - {493,522,-1.03e-02}, - {493,523,-1.03e-02}, - {494,494,8.29e-02}, - {494,177,4.84e-05}, - {494,178,1.93e-04}, - {494,179,4.84e-05}, - {494,204,1.93e-04}, - {494,205,7.74e-04}, - {494,206,1.93e-04}, - {494,233,4.84e-05}, - {494,234,1.93e-04}, - {494,235,4.84e-05}, - {494,466,-1.03e-02}, - {494,467,-1.03e-02}, - {494,468,-1.03e-02}, - {494,493,-1.03e-02}, - {494,495,-1.03e-02}, - {494,522,-1.03e-02}, - {494,523,-1.03e-02}, - {494,524,-1.03e-02}, - {495,495,8.29e-02}, - {495,178,4.84e-05}, - {495,179,1.93e-04}, - {495,180,4.84e-05}, - {495,205,1.93e-04}, - {495,206,7.74e-04}, - {495,207,1.93e-04}, - {495,234,4.84e-05}, - {495,235,1.93e-04}, - {495,236,4.84e-05}, - {495,467,-1.03e-02}, - {495,468,-1.03e-02}, - {495,469,-1.03e-02}, - {495,494,-1.03e-02}, - {495,496,-1.03e-02}, - {495,523,-1.03e-02}, - {495,524,-1.03e-02}, - {495,525,-1.03e-02}, - {496,496,8.29e-02}, - {496,179,4.84e-05}, - {496,180,1.93e-04}, - {496,181,4.84e-05}, - {496,206,1.93e-04}, - {496,207,7.74e-04}, - {496,208,1.93e-04}, - {496,235,4.84e-05}, - {496,236,1.93e-04}, - {496,237,4.84e-05}, - {496,468,-1.03e-02}, - {496,469,-1.03e-02}, - {496,470,-1.03e-02}, - {496,495,-1.03e-02}, - {496,497,-1.03e-02}, - {496,524,-1.03e-02}, - {496,525,-1.03e-02}, - {496,526,-1.03e-02}, - {497,497,8.29e-02}, - {497,180,4.84e-05}, - {497,181,1.93e-04}, - {497,182,4.84e-05}, - {497,207,1.93e-04}, - {497,208,7.74e-04}, - {497,209,1.93e-04}, - {497,236,4.84e-05}, - {497,237,1.93e-04}, - {497,238,4.84e-05}, - {497,469,-1.03e-02}, - {497,470,-1.03e-02}, - {497,471,-1.03e-02}, - {497,496,-1.03e-02}, - {497,498,-1.03e-02}, - {497,525,-1.03e-02}, - {497,526,-1.03e-02}, - {497,527,-1.03e-02}, - {498,498,8.29e-02}, - {498,181,4.84e-05}, - {498,182,1.93e-04}, - {498,183,4.84e-05}, - {498,208,1.93e-04}, - {498,209,7.74e-04}, - {498,210,1.93e-04}, - {498,237,4.84e-05}, - {498,238,1.93e-04}, - {498,239,4.84e-05}, - {498,470,-1.03e-02}, - {498,471,-1.03e-02}, - {498,472,-1.03e-02}, - {498,497,-1.03e-02}, - {498,499,-1.03e-02}, - {498,526,-1.03e-02}, - {498,527,-1.03e-02}, - {498,528,-1.03e-02}, - {499,499,8.29e-02}, - {499,182,4.84e-05}, - {499,183,1.93e-04}, - {499,209,1.93e-04}, - {499,210,7.74e-04}, - {499,211,1.93e-04}, - {499,212,4.84e-05}, - {499,238,4.84e-05}, - {499,239,1.93e-04}, - {499,240,4.84e-05}, - {499,471,-1.03e-02}, - {499,472,-1.03e-02}, - {499,498,-1.03e-02}, - {499,500,-1.03e-02}, - {499,501,-1.03e-02}, - {499,527,-1.03e-02}, - {499,528,-1.03e-02}, - {499,529,-1.03e-02}, - {500,500,8.29e-02}, - {500,183,4.84e-05}, - {500,210,1.93e-04}, - {500,211,7.74e-04}, - {500,212,1.93e-04}, - {500,239,4.84e-05}, - {500,240,1.93e-04}, - {500,241,4.84e-05}, - {500,242,1.93e-04}, - {500,243,4.84e-05}, - {500,472,-1.03e-02}, - {500,499,-1.03e-02}, - {500,501,-1.03e-02}, - {500,528,-1.03e-02}, - {500,529,-1.03e-02}, - {500,530,-1.03e-02}, - {500,531,-1.03e-02}, - {500,532,-1.03e-02}, - {501,501,8.29e-02}, - {501,183,1.93e-04}, - {501,184,4.84e-05}, - {501,210,4.84e-05}, - {501,211,1.93e-04}, - {501,212,7.74e-04}, - {501,213,1.93e-04}, - {501,242,4.84e-05}, - {501,243,1.93e-04}, - {501,244,4.84e-05}, - {501,472,-1.03e-02}, - {501,473,-1.03e-02}, - {501,499,-1.03e-02}, - {501,500,-1.03e-02}, - {501,502,-1.03e-02}, - {501,531,-1.03e-02}, - {501,532,-1.03e-02}, - {501,533,-1.03e-02}, - {502,502,8.29e-02}, - {502,183,4.84e-05}, - {502,184,1.93e-04}, - {502,188,4.84e-05}, - {502,212,1.93e-04}, - {502,213,7.74e-04}, - {502,217,1.93e-04}, - {502,243,4.84e-05}, - {502,244,1.93e-04}, - {502,245,4.84e-05}, - {502,472,-1.03e-02}, - {502,473,-1.03e-02}, - {502,477,-1.03e-02}, - {502,501,-1.03e-02}, - {502,506,-1.03e-02}, - {502,532,-1.03e-02}, - {502,533,-1.03e-02}, - {502,534,-1.03e-02}, - {503,503,8.29e-02}, - {503,185,4.84e-05}, - {503,187,1.93e-04}, - {503,188,4.84e-05}, - {503,214,7.74e-04}, - {503,215,1.93e-04}, - {503,217,1.93e-04}, - {503,245,4.84e-05}, - {503,246,1.93e-04}, - {503,247,4.84e-05}, - {503,474,-1.03e-02}, - {503,476,-1.03e-02}, - {503,477,-1.03e-02}, - {503,504,-1.03e-02}, - {503,506,-1.03e-02}, - {503,534,-1.03e-02}, - {503,535,-1.03e-02}, - {503,536,-1.03e-02}, - {504,504,8.29e-02}, - {504,185,1.93e-04}, - {504,186,4.84e-05}, - {504,187,4.84e-05}, - {504,214,1.93e-04}, - {504,215,7.74e-04}, - {504,216,1.93e-04}, - {504,246,4.84e-05}, - {504,247,1.93e-04}, - {504,248,4.84e-05}, - {504,474,-1.03e-02}, - {504,475,-1.03e-02}, - {504,476,-1.03e-02}, - {504,503,-1.03e-02}, - {504,505,-1.03e-02}, - {504,535,-1.03e-02}, - {504,536,-1.03e-02}, - {504,537,-1.03e-02}, - {505,505,8.29e-02}, - {505,185,4.84e-05}, - {505,186,1.93e-04}, - {505,192,4.84e-05}, - {505,215,1.93e-04}, - {505,216,7.74e-04}, - {505,221,1.93e-04}, - {505,247,4.84e-05}, - {505,248,1.93e-04}, - {505,249,4.84e-05}, - {505,474,-1.03e-02}, - {505,475,-1.03e-02}, - {505,481,-1.03e-02}, - {505,504,-1.03e-02}, - {505,510,-1.03e-02}, - {505,536,-1.03e-02}, - {505,537,-1.03e-02}, - {505,538,-1.03e-02}, - {506,506,8.29e-02}, - {506,184,4.84e-05}, - {506,187,4.84e-05}, - {506,188,1.93e-04}, - {506,213,1.93e-04}, - {506,214,1.93e-04}, - {506,217,7.74e-04}, - {506,244,4.84e-05}, - {506,245,1.93e-04}, - {506,246,4.84e-05}, - {506,473,-1.03e-02}, - {506,476,-1.03e-02}, - {506,477,-1.03e-02}, - {506,502,-1.03e-02}, - {506,503,-1.03e-02}, - {506,533,-1.03e-02}, - {506,534,-1.03e-02}, - {506,535,-1.03e-02}, - {507,507,8.29e-02}, - {507,189,4.84e-05}, - {507,191,1.93e-04}, - {507,192,4.84e-05}, - {507,218,7.74e-04}, - {507,219,1.93e-04}, - {507,221,1.93e-04}, - {507,249,4.84e-05}, - {507,250,1.93e-04}, - {507,251,4.84e-05}, - {507,478,-1.03e-02}, - {507,480,-1.03e-02}, - {507,481,-1.03e-02}, - {507,508,-1.03e-02}, - {507,510,-1.03e-02}, - {507,538,-1.03e-02}, - {507,539,-1.03e-02}, - {507,540,-1.03e-02}, - {508,508,8.29e-02}, - {508,189,1.93e-04}, - {508,190,4.84e-05}, - {508,191,4.84e-05}, - {508,218,1.93e-04}, - {508,219,7.74e-04}, - {508,220,1.93e-04}, - {508,250,4.84e-05}, - {508,251,1.93e-04}, - {508,252,4.84e-05}, - {508,478,-1.03e-02}, - {508,479,-1.03e-02}, - {508,480,-1.03e-02}, - {508,507,-1.03e-02}, - {508,509,-1.03e-02}, - {508,539,-1.03e-02}, - {508,540,-1.03e-02}, - {508,541,-1.03e-02}, - {509,509,8.29e-02}, - {509,189,4.84e-05}, - {509,190,1.93e-04}, - {509,195,4.84e-05}, - {509,219,1.93e-04}, - {509,220,7.74e-04}, - {509,224,1.93e-04}, - {509,251,4.84e-05}, - {509,252,1.93e-04}, - {509,253,4.84e-05}, - {509,478,-1.03e-02}, - {509,479,-1.03e-02}, - {509,484,-1.03e-02}, - {509,508,-1.03e-02}, - {509,513,-1.03e-02}, - {509,540,-1.03e-02}, - {509,541,-1.03e-02}, - {509,542,-1.03e-02}, - {510,510,8.29e-02}, - {510,186,4.84e-05}, - {510,191,4.84e-05}, - {510,192,1.93e-04}, - {510,216,1.93e-04}, - {510,218,1.93e-04}, - {510,221,7.74e-04}, - {510,248,4.84e-05}, - {510,249,1.93e-04}, - {510,250,4.84e-05}, - {510,475,-1.03e-02}, - {510,480,-1.03e-02}, - {510,481,-1.03e-02}, - {510,505,-1.03e-02}, - {510,507,-1.03e-02}, - {510,537,-1.03e-02}, - {510,538,-1.03e-02}, - {510,539,-1.03e-02}, - {511,511,8.29e-02}, - {511,193,4.84e-05}, - {511,194,1.93e-04}, - {511,195,4.84e-05}, - {511,222,7.74e-04}, - {511,223,1.93e-04}, - {511,224,1.93e-04}, - {511,253,4.84e-05}, - {511,254,1.93e-04}, - {511,255,4.84e-05}, - {511,482,-1.03e-02}, - {511,483,-1.03e-02}, - {511,484,-1.03e-02}, - {511,512,-1.03e-02}, - {511,513,-1.03e-02}, - {511,542,-1.03e-02}, - {511,543,-1.03e-02}, - {511,544,-1.03e-02}, - {512,512,8.29e-02}, - {512,170,4.84e-05}, - {512,193,1.93e-04}, - {512,194,4.84e-05}, - {512,197,1.93e-04}, - {512,222,1.93e-04}, - {512,223,7.74e-04}, - {512,226,4.84e-05}, - {512,254,4.84e-05}, - {512,255,1.93e-04}, - {512,459,-1.03e-02}, - {512,482,-1.03e-02}, - {512,483,-1.03e-02}, - {512,486,-1.03e-02}, - {512,511,-1.03e-02}, - {512,515,-1.03e-02}, - {512,543,-1.03e-02}, - {512,544,-1.03e-02}, - {513,513,8.29e-02}, - {513,190,4.84e-05}, - {513,194,4.84e-05}, - {513,195,1.93e-04}, - {513,220,1.93e-04}, - {513,222,1.93e-04}, - {513,224,7.74e-04}, - {513,252,4.84e-05}, - {513,253,1.93e-04}, - {513,254,4.84e-05}, - {513,479,-1.03e-02}, - {513,483,-1.03e-02}, - {513,484,-1.03e-02}, - {513,509,-1.03e-02}, - {513,511,-1.03e-02}, - {513,541,-1.03e-02}, - {513,542,-1.03e-02}, - {513,543,-1.03e-02}, - {514,514,2.08e-01}, - {514,196,9.67e-05}, - {514,198,4.84e-05}, - {514,225,3.87e-04}, - {514,227,1.93e-04}, - {514,256,9.67e-05}, - {514,259,4.84e-05}, - {514,485,3.65e-02}, - {514,487,-1.03e-02}, - {514,516,-1.03e-02}, - {514,545,3.65e-02}, - {514,548,-1.03e-02}, - {515,515,2.08e-01}, - {515,197,9.67e-05}, - {515,223,4.84e-05}, - {515,226,3.87e-04}, - {515,255,1.93e-04}, - {515,258,9.67e-05}, - {515,288,4.84e-05}, - {515,486,3.65e-02}, - {515,512,-1.03e-02}, - {515,544,-1.03e-02}, - {515,547,3.65e-02}, - {515,577,-1.03e-02}, - {516,516,8.29e-02}, - {516,196,4.84e-05}, - {516,198,1.93e-04}, - {516,199,4.84e-05}, - {516,225,1.93e-04}, - {516,227,7.74e-04}, - {516,228,1.93e-04}, - {516,256,4.84e-05}, - {516,259,1.93e-04}, - {516,260,4.84e-05}, - {516,485,-1.03e-02}, - {516,487,-1.03e-02}, - {516,488,-1.03e-02}, - {516,514,-1.03e-02}, - {516,517,-1.03e-02}, - {516,545,-1.03e-02}, - {516,548,-1.03e-02}, - {516,549,-1.03e-02}, - {517,517,8.29e-02}, - {517,198,4.84e-05}, - {517,199,1.93e-04}, - {517,200,4.84e-05}, - {517,227,1.93e-04}, - {517,228,7.74e-04}, - {517,229,1.93e-04}, - {517,259,4.84e-05}, - {517,260,1.93e-04}, - {517,261,4.84e-05}, - {517,487,-1.03e-02}, - {517,488,-1.03e-02}, - {517,489,-1.03e-02}, - {517,516,-1.03e-02}, - {517,518,-1.03e-02}, - {517,548,-1.03e-02}, - {517,549,-1.03e-02}, - {517,550,-1.03e-02}, - {518,518,8.29e-02}, - {518,199,4.84e-05}, - {518,200,1.93e-04}, - {518,201,4.84e-05}, - {518,228,1.93e-04}, - {518,229,7.74e-04}, - {518,230,1.93e-04}, - {518,260,4.84e-05}, - {518,261,1.93e-04}, - {518,262,4.84e-05}, - {518,488,-1.03e-02}, - {518,489,-1.03e-02}, - {518,490,-1.03e-02}, - {518,517,-1.03e-02}, - {518,519,-1.03e-02}, - {518,549,-1.03e-02}, - {518,550,-1.03e-02}, - {518,551,-1.03e-02}, - {519,519,8.29e-02}, - {519,200,4.84e-05}, - {519,201,1.93e-04}, - {519,202,4.84e-05}, - {519,229,1.93e-04}, - {519,230,7.74e-04}, - {519,231,1.93e-04}, - {519,261,4.84e-05}, - {519,262,1.93e-04}, - {519,263,4.84e-05}, - {519,489,-1.03e-02}, - {519,490,-1.03e-02}, - {519,491,-1.03e-02}, - {519,518,-1.03e-02}, - {519,520,-1.03e-02}, - {519,550,-1.03e-02}, - {519,551,-1.03e-02}, - {519,552,-1.03e-02}, - {520,520,8.29e-02}, - {520,201,4.84e-05}, - {520,202,1.93e-04}, - {520,203,4.84e-05}, - {520,230,1.93e-04}, - {520,231,7.74e-04}, - {520,232,1.93e-04}, - {520,262,4.84e-05}, - {520,263,1.93e-04}, - {520,264,4.84e-05}, - {520,490,-1.03e-02}, - {520,491,-1.03e-02}, - {520,492,-1.03e-02}, - {520,519,-1.03e-02}, - {520,521,-1.03e-02}, - {520,551,-1.03e-02}, - {520,552,-1.03e-02}, - {520,553,-1.03e-02}, - {521,521,8.29e-02}, - {521,202,4.84e-05}, - {521,203,1.93e-04}, - {521,204,4.84e-05}, - {521,231,1.93e-04}, - {521,232,7.74e-04}, - {521,233,1.93e-04}, - {521,263,4.84e-05}, - {521,264,1.93e-04}, - {521,265,4.84e-05}, - {521,491,-1.03e-02}, - {521,492,-1.03e-02}, - {521,493,-1.03e-02}, - {521,520,-1.03e-02}, - {521,522,-1.03e-02}, - {521,552,-1.03e-02}, - {521,553,-1.03e-02}, - {521,554,-1.03e-02}, - {522,522,8.29e-02}, - {522,203,4.84e-05}, - {522,204,1.93e-04}, - {522,205,4.84e-05}, - {522,232,1.93e-04}, - {522,233,7.74e-04}, - {522,234,1.93e-04}, - {522,264,4.84e-05}, - {522,265,1.93e-04}, - {522,266,4.84e-05}, - {522,492,-1.03e-02}, - {522,493,-1.03e-02}, - {522,494,-1.03e-02}, - {522,521,-1.03e-02}, - {522,523,-1.03e-02}, - {522,553,-1.03e-02}, - {522,554,-1.03e-02}, - {522,555,-1.03e-02}, - {523,523,8.29e-02}, - {523,204,4.84e-05}, - {523,205,1.93e-04}, - {523,206,4.84e-05}, - {523,233,1.93e-04}, - {523,234,7.74e-04}, - {523,235,1.93e-04}, - {523,265,4.84e-05}, - {523,266,1.93e-04}, - {523,267,4.84e-05}, - {523,493,-1.03e-02}, - {523,494,-1.03e-02}, - {523,495,-1.03e-02}, - {523,522,-1.03e-02}, - {523,524,-1.03e-02}, - {523,554,-1.03e-02}, - {523,555,-1.03e-02}, - {523,556,-1.03e-02}, - {524,524,8.29e-02}, - {524,205,4.84e-05}, - {524,206,1.93e-04}, - {524,207,4.84e-05}, - {524,234,1.93e-04}, - {524,235,7.74e-04}, - {524,236,1.93e-04}, - {524,266,4.84e-05}, - {524,267,1.93e-04}, - {524,268,4.84e-05}, - {524,494,-1.03e-02}, - {524,495,-1.03e-02}, - {524,496,-1.03e-02}, - {524,523,-1.03e-02}, - {524,525,-1.03e-02}, - {524,555,-1.03e-02}, - {524,556,-1.03e-02}, - {524,557,-1.03e-02}, - {525,525,8.29e-02}, - {525,206,4.84e-05}, - {525,207,1.93e-04}, - {525,208,4.84e-05}, - {525,235,1.93e-04}, - {525,236,7.74e-04}, - {525,237,1.93e-04}, - {525,267,4.84e-05}, - {525,268,1.93e-04}, - {525,269,4.84e-05}, - {525,495,-1.03e-02}, - {525,496,-1.03e-02}, - {525,497,-1.03e-02}, - {525,524,-1.03e-02}, - {525,526,-1.03e-02}, - {525,556,-1.03e-02}, - {525,557,-1.03e-02}, - {525,558,-1.03e-02}, - {526,526,8.29e-02}, - {526,207,4.84e-05}, - {526,208,1.93e-04}, - {526,209,4.84e-05}, - {526,236,1.93e-04}, - {526,237,7.74e-04}, - {526,238,1.93e-04}, - {526,268,4.84e-05}, - {526,269,1.93e-04}, - {526,270,4.84e-05}, - {526,496,-1.03e-02}, - {526,497,-1.03e-02}, - {526,498,-1.03e-02}, - {526,525,-1.03e-02}, - {526,527,-1.03e-02}, - {526,557,-1.03e-02}, - {526,558,-1.03e-02}, - {526,559,-1.03e-02}, - {527,527,8.29e-02}, - {527,208,4.84e-05}, - {527,209,1.93e-04}, - {527,210,4.84e-05}, - {527,237,1.93e-04}, - {527,238,7.74e-04}, - {527,239,1.93e-04}, - {527,269,4.84e-05}, - {527,270,1.93e-04}, - {527,271,4.84e-05}, - {527,497,-1.03e-02}, - {527,498,-1.03e-02}, - {527,499,-1.03e-02}, - {527,526,-1.03e-02}, - {527,528,-1.03e-02}, - {527,558,-1.03e-02}, - {527,559,-1.03e-02}, - {527,560,-1.03e-02}, - {528,528,8.29e-02}, - {528,209,4.84e-05}, - {528,210,1.93e-04}, - {528,211,4.84e-05}, - {528,238,1.93e-04}, - {528,239,7.74e-04}, - {528,240,1.93e-04}, - {528,270,4.84e-05}, - {528,271,1.93e-04}, - {528,272,4.84e-05}, - {528,498,-1.03e-02}, - {528,499,-1.03e-02}, - {528,500,-1.03e-02}, - {528,527,-1.03e-02}, - {528,529,-1.03e-02}, - {528,559,-1.03e-02}, - {528,560,-1.03e-02}, - {528,561,-1.03e-02}, - {529,529,8.29e-02}, - {529,210,4.84e-05}, - {529,211,1.93e-04}, - {529,239,1.93e-04}, - {529,240,7.74e-04}, - {529,241,1.93e-04}, - {529,242,4.84e-05}, - {529,271,4.84e-05}, - {529,272,1.93e-04}, - {529,273,4.84e-05}, - {529,499,-1.03e-02}, - {529,500,-1.03e-02}, - {529,528,-1.03e-02}, - {529,530,-1.03e-02}, - {529,531,-1.03e-02}, - {529,560,-1.03e-02}, - {529,561,-1.03e-02}, - {529,562,-1.03e-02}, - {530,530,8.29e-02}, - {530,211,4.84e-05}, - {530,240,1.93e-04}, - {530,241,7.74e-04}, - {530,242,1.93e-04}, - {530,257,4.84e-05}, - {530,272,4.84e-05}, - {530,273,1.93e-04}, - {530,274,1.93e-04}, - {530,275,4.84e-05}, - {530,500,-1.03e-02}, - {530,529,-1.03e-02}, - {530,531,-1.03e-02}, - {530,546,-1.03e-02}, - {530,561,-1.03e-02}, - {530,562,-1.03e-02}, - {530,563,-1.03e-02}, - {530,564,-1.03e-02}, - {531,531,8.29e-02}, - {531,211,1.93e-04}, - {531,212,4.84e-05}, - {531,240,4.84e-05}, - {531,241,1.93e-04}, - {531,242,7.74e-04}, - {531,243,1.93e-04}, - {531,274,4.84e-05}, - {531,275,1.93e-04}, - {531,276,4.84e-05}, - {531,500,-1.03e-02}, - {531,501,-1.03e-02}, - {531,529,-1.03e-02}, - {531,530,-1.03e-02}, - {531,532,-1.03e-02}, - {531,563,-1.03e-02}, - {531,564,-1.03e-02}, - {531,565,-1.03e-02}, - {532,532,8.29e-02}, - {532,211,4.84e-05}, - {532,212,1.93e-04}, - {532,213,4.84e-05}, - {532,242,1.93e-04}, - {532,243,7.74e-04}, - {532,244,1.93e-04}, - {532,275,4.84e-05}, - {532,276,1.93e-04}, - {532,277,4.84e-05}, - {532,500,-1.03e-02}, - {532,501,-1.03e-02}, - {532,502,-1.03e-02}, - {532,531,-1.03e-02}, - {532,533,-1.03e-02}, - {532,564,-1.03e-02}, - {532,565,-1.03e-02}, - {532,566,-1.03e-02}, - {533,533,8.29e-02}, - {533,212,4.84e-05}, - {533,213,1.93e-04}, - {533,217,4.84e-05}, - {533,243,1.93e-04}, - {533,244,7.74e-04}, - {533,245,1.93e-04}, - {533,276,4.84e-05}, - {533,277,1.93e-04}, - {533,278,4.84e-05}, - {533,501,-1.03e-02}, - {533,502,-1.03e-02}, - {533,506,-1.03e-02}, - {533,532,-1.03e-02}, - {533,534,-1.03e-02}, - {533,565,-1.03e-02}, - {533,566,-1.03e-02}, - {533,567,-1.03e-02}, - {534,534,8.29e-02}, - {534,213,4.84e-05}, - {534,214,4.84e-05}, - {534,217,1.93e-04}, - {534,244,1.93e-04}, - {534,245,7.74e-04}, - {534,246,1.93e-04}, - {534,277,4.84e-05}, - {534,278,1.93e-04}, - {534,279,4.84e-05}, - {534,502,-1.03e-02}, - {534,503,-1.03e-02}, - {534,506,-1.03e-02}, - {534,533,-1.03e-02}, - {534,535,-1.03e-02}, - {534,566,-1.03e-02}, - {534,567,-1.03e-02}, - {534,568,-1.03e-02}, - {535,535,8.29e-02}, - {535,214,1.93e-04}, - {535,215,4.84e-05}, - {535,217,4.84e-05}, - {535,245,1.93e-04}, - {535,246,7.74e-04}, - {535,247,1.93e-04}, - {535,278,4.84e-05}, - {535,279,1.93e-04}, - {535,280,4.84e-05}, - {535,503,-1.03e-02}, - {535,504,-1.03e-02}, - {535,506,-1.03e-02}, - {535,534,-1.03e-02}, - {535,536,-1.03e-02}, - {535,567,-1.03e-02}, - {535,568,-1.03e-02}, - {535,569,-1.03e-02}, - {536,536,8.29e-02}, - {536,214,4.84e-05}, - {536,215,1.93e-04}, - {536,216,4.84e-05}, - {536,246,1.93e-04}, - {536,247,7.74e-04}, - {536,248,1.93e-04}, - {536,279,4.84e-05}, - {536,280,1.93e-04}, - {536,281,4.84e-05}, - {536,503,-1.03e-02}, - {536,504,-1.03e-02}, - {536,505,-1.03e-02}, - {536,535,-1.03e-02}, - {536,537,-1.03e-02}, - {536,568,-1.03e-02}, - {536,569,-1.03e-02}, - {536,570,-1.03e-02}, - {537,537,8.29e-02}, - {537,215,4.84e-05}, - {537,216,1.93e-04}, - {537,221,4.84e-05}, - {537,247,1.93e-04}, - {537,248,7.74e-04}, - {537,249,1.93e-04}, - {537,280,4.84e-05}, - {537,281,1.93e-04}, - {537,282,4.84e-05}, - {537,504,-1.03e-02}, - {537,505,-1.03e-02}, - {537,510,-1.03e-02}, - {537,536,-1.03e-02}, - {537,538,-1.03e-02}, - {537,569,-1.03e-02}, - {537,570,-1.03e-02}, - {537,571,-1.03e-02}, - {538,538,8.29e-02}, - {538,216,4.84e-05}, - {538,218,4.84e-05}, - {538,221,1.93e-04}, - {538,248,1.93e-04}, - {538,249,7.74e-04}, - {538,250,1.93e-04}, - {538,281,4.84e-05}, - {538,282,1.93e-04}, - {538,283,4.84e-05}, - {538,505,-1.03e-02}, - {538,507,-1.03e-02}, - {538,510,-1.03e-02}, - {538,537,-1.03e-02}, - {538,539,-1.03e-02}, - {538,570,-1.03e-02}, - {538,571,-1.03e-02}, - {538,572,-1.03e-02}, - {539,539,8.29e-02}, - {539,218,1.93e-04}, - {539,219,4.84e-05}, - {539,221,4.84e-05}, - {539,249,1.93e-04}, - {539,250,7.74e-04}, - {539,251,1.93e-04}, - {539,282,4.84e-05}, - {539,283,1.93e-04}, - {539,284,4.84e-05}, - {539,507,-1.03e-02}, - {539,508,-1.03e-02}, - {539,510,-1.03e-02}, - {539,538,-1.03e-02}, - {539,540,-1.03e-02}, - {539,571,-1.03e-02}, - {539,572,-1.03e-02}, - {539,573,-1.03e-02}, - {540,540,8.29e-02}, - {540,218,4.84e-05}, - {540,219,1.93e-04}, - {540,220,4.84e-05}, - {540,250,1.93e-04}, - {540,251,7.74e-04}, - {540,252,1.93e-04}, - {540,283,4.84e-05}, - {540,284,1.93e-04}, - {540,285,4.84e-05}, - {540,507,-1.03e-02}, - {540,508,-1.03e-02}, - {540,509,-1.03e-02}, - {540,539,-1.03e-02}, - {540,541,-1.03e-02}, - {540,572,-1.03e-02}, - {540,573,-1.03e-02}, - {540,574,-1.03e-02}, - {541,541,8.29e-02}, - {541,219,4.84e-05}, - {541,220,1.93e-04}, - {541,224,4.84e-05}, - {541,251,1.93e-04}, - {541,252,7.74e-04}, - {541,253,1.93e-04}, - {541,284,4.84e-05}, - {541,285,1.93e-04}, - {541,286,4.84e-05}, - {541,508,-1.03e-02}, - {541,509,-1.03e-02}, - {541,513,-1.03e-02}, - {541,540,-1.03e-02}, - {541,542,-1.03e-02}, - {541,573,-1.03e-02}, - {541,574,-1.03e-02}, - {541,575,-1.03e-02}, - {542,542,8.29e-02}, - {542,220,4.84e-05}, - {542,222,4.84e-05}, - {542,224,1.93e-04}, - {542,252,1.93e-04}, - {542,253,7.74e-04}, - {542,254,1.93e-04}, - {542,285,4.84e-05}, - {542,286,1.93e-04}, - {542,287,4.84e-05}, - {542,509,-1.03e-02}, - {542,511,-1.03e-02}, - {542,513,-1.03e-02}, - {542,541,-1.03e-02}, - {542,543,-1.03e-02}, - {542,574,-1.03e-02}, - {542,575,-1.03e-02}, - {542,576,-1.03e-02}, - {543,543,8.29e-02}, - {543,222,1.93e-04}, - {543,223,4.84e-05}, - {543,224,4.84e-05}, - {543,253,1.93e-04}, - {543,254,7.74e-04}, - {543,255,1.93e-04}, - {543,286,4.84e-05}, - {543,287,1.93e-04}, - {543,288,4.84e-05}, - {543,511,-1.03e-02}, - {543,512,-1.03e-02}, - {543,513,-1.03e-02}, - {543,542,-1.03e-02}, - {543,544,-1.03e-02}, - {543,575,-1.03e-02}, - {543,576,-1.03e-02}, - {543,577,-1.03e-02}, - {544,544,8.29e-02}, - {544,197,4.84e-05}, - {544,222,4.84e-05}, - {544,223,1.93e-04}, - {544,226,1.93e-04}, - {544,254,1.93e-04}, - {544,255,7.74e-04}, - {544,258,4.84e-05}, - {544,287,4.84e-05}, - {544,288,1.93e-04}, - {544,486,-1.03e-02}, - {544,511,-1.03e-02}, - {544,512,-1.03e-02}, - {544,515,-1.03e-02}, - {544,543,-1.03e-02}, - {544,547,-1.03e-02}, - {544,576,-1.03e-02}, - {544,577,-1.03e-02}, - {545,545,1.87e-01}, - {545,225,9.67e-05}, - {545,227,4.84e-05}, - {545,256,1.93e-04}, - {545,259,9.67e-05}, - {545,514,3.65e-02}, - {545,516,-1.03e-02}, - {545,548,3.65e-02}, - {546,546,1.87e-01}, - {546,241,4.84e-05}, - {546,257,1.93e-04}, - {546,273,9.67e-05}, - {546,274,9.67e-05}, - {546,530,-1.03e-02}, - {546,562,3.65e-02}, - {546,563,3.65e-02}, - {547,547,1.87e-01}, - {547,226,9.67e-05}, - {547,255,4.84e-05}, - {547,258,1.93e-04}, - {547,288,9.67e-05}, - {547,515,3.65e-02}, - {547,544,-1.03e-02}, - {547,577,3.65e-02}, - {548,548,2.08e-01}, - {548,225,4.84e-05}, - {548,227,1.93e-04}, - {548,228,4.84e-05}, - {548,256,9.67e-05}, - {548,259,3.87e-04}, - {548,260,9.67e-05}, - {548,514,-1.03e-02}, - {548,516,-1.03e-02}, - {548,517,-1.03e-02}, - {548,545,3.65e-02}, - {548,549,3.65e-02}, - {549,549,2.08e-01}, - {549,227,4.84e-05}, - {549,228,1.93e-04}, - {549,229,4.84e-05}, - {549,259,9.67e-05}, - {549,260,3.87e-04}, - {549,261,9.67e-05}, - {549,516,-1.03e-02}, - {549,517,-1.03e-02}, - {549,518,-1.03e-02}, - {549,548,3.65e-02}, - {549,550,3.65e-02}, - {550,550,2.08e-01}, - {550,228,4.84e-05}, - {550,229,1.93e-04}, - {550,230,4.84e-05}, - {550,260,9.67e-05}, - {550,261,3.87e-04}, - {550,262,9.67e-05}, - {550,517,-1.03e-02}, - {550,518,-1.03e-02}, - {550,519,-1.03e-02}, - {550,549,3.65e-02}, - {550,551,3.65e-02}, - {551,551,2.08e-01}, - {551,229,4.84e-05}, - {551,230,1.93e-04}, - {551,231,4.84e-05}, - {551,261,9.67e-05}, - {551,262,3.87e-04}, - {551,263,9.67e-05}, - {551,518,-1.03e-02}, - {551,519,-1.03e-02}, - {551,520,-1.03e-02}, - {551,550,3.65e-02}, - {551,552,3.65e-02}, - {552,552,2.08e-01}, - {552,230,4.84e-05}, - {552,231,1.93e-04}, - {552,232,4.84e-05}, - {552,262,9.67e-05}, - {552,263,3.87e-04}, - {552,264,9.67e-05}, - {552,519,-1.03e-02}, - {552,520,-1.03e-02}, - {552,521,-1.03e-02}, - {552,551,3.65e-02}, - {552,553,3.65e-02}, - {553,553,2.08e-01}, - {553,231,4.84e-05}, - {553,232,1.93e-04}, - {553,233,4.84e-05}, - {553,263,9.67e-05}, - {553,264,3.87e-04}, - {553,265,9.67e-05}, - {553,520,-1.03e-02}, - {553,521,-1.03e-02}, - {553,522,-1.03e-02}, - {553,552,3.65e-02}, - {553,554,3.65e-02}, - {554,554,2.08e-01}, - {554,232,4.84e-05}, - {554,233,1.93e-04}, - {554,234,4.84e-05}, - {554,264,9.67e-05}, - {554,265,3.87e-04}, - {554,266,9.67e-05}, - {554,521,-1.03e-02}, - {554,522,-1.03e-02}, - {554,523,-1.03e-02}, - {554,553,3.65e-02}, - {554,555,3.65e-02}, - {555,555,2.08e-01}, - {555,233,4.84e-05}, - {555,234,1.93e-04}, - {555,235,4.84e-05}, - {555,265,9.67e-05}, - {555,266,3.87e-04}, - {555,267,9.67e-05}, - {555,522,-1.03e-02}, - {555,523,-1.03e-02}, - {555,524,-1.03e-02}, - {555,554,3.65e-02}, - {555,556,3.65e-02}, - {556,556,2.08e-01}, - {556,234,4.84e-05}, - {556,235,1.93e-04}, - {556,236,4.84e-05}, - {556,266,9.67e-05}, - {556,267,3.87e-04}, - {556,268,9.67e-05}, - {556,523,-1.03e-02}, - {556,524,-1.03e-02}, - {556,525,-1.03e-02}, - {556,555,3.65e-02}, - {556,557,3.65e-02}, - {557,557,2.08e-01}, - {557,235,4.84e-05}, - {557,236,1.93e-04}, - {557,237,4.84e-05}, - {557,267,9.67e-05}, - {557,268,3.87e-04}, - {557,269,9.67e-05}, - {557,524,-1.03e-02}, - {557,525,-1.03e-02}, - {557,526,-1.03e-02}, - {557,556,3.65e-02}, - {557,558,3.65e-02}, - {558,558,2.08e-01}, - {558,236,4.84e-05}, - {558,237,1.93e-04}, - {558,238,4.84e-05}, - {558,268,9.67e-05}, - {558,269,3.87e-04}, - {558,270,9.67e-05}, - {558,525,-1.03e-02}, - {558,526,-1.03e-02}, - {558,527,-1.03e-02}, - {558,557,3.65e-02}, - {558,559,3.65e-02}, - {559,559,2.08e-01}, - {559,237,4.84e-05}, - {559,238,1.93e-04}, - {559,239,4.84e-05}, - {559,269,9.67e-05}, - {559,270,3.87e-04}, - {559,271,9.67e-05}, - {559,526,-1.03e-02}, - {559,527,-1.03e-02}, - {559,528,-1.03e-02}, - {559,558,3.65e-02}, - {559,560,3.65e-02}, - {560,560,2.08e-01}, - {560,238,4.84e-05}, - {560,239,1.93e-04}, - {560,240,4.84e-05}, - {560,270,9.67e-05}, - {560,271,3.87e-04}, - {560,272,9.67e-05}, - {560,527,-1.03e-02}, - {560,528,-1.03e-02}, - {560,529,-1.03e-02}, - {560,559,3.65e-02}, - {560,561,3.65e-02}, - {561,561,2.08e-01}, - {561,239,4.84e-05}, - {561,240,1.93e-04}, - {561,241,4.84e-05}, - {561,271,9.67e-05}, - {561,272,3.87e-04}, - {561,273,9.67e-05}, - {561,528,-1.03e-02}, - {561,529,-1.03e-02}, - {561,530,-1.03e-02}, - {561,560,3.65e-02}, - {561,562,3.65e-02}, - {562,562,2.08e-01}, - {562,240,4.84e-05}, - {562,241,1.93e-04}, - {562,257,9.67e-05}, - {562,272,9.67e-05}, - {562,273,3.87e-04}, - {562,274,4.84e-05}, - {562,529,-1.03e-02}, - {562,530,-1.03e-02}, - {562,546,3.65e-02}, - {562,561,3.65e-02}, - {562,563,-1.03e-02}, - {563,563,2.08e-01}, - {563,241,1.93e-04}, - {563,242,4.84e-05}, - {563,257,9.67e-05}, - {563,273,4.84e-05}, - {563,274,3.87e-04}, - {563,275,9.67e-05}, - {563,530,-1.03e-02}, - {563,531,-1.03e-02}, - {563,546,3.65e-02}, - {563,562,-1.03e-02}, - {563,564,3.65e-02}, - {564,564,2.08e-01}, - {564,241,4.84e-05}, - {564,242,1.93e-04}, - {564,243,4.84e-05}, - {564,274,9.67e-05}, - {564,275,3.87e-04}, - {564,276,9.67e-05}, - {564,530,-1.03e-02}, - {564,531,-1.03e-02}, - {564,532,-1.03e-02}, - {564,563,3.65e-02}, - {564,565,3.65e-02}, - {565,565,2.08e-01}, - {565,242,4.84e-05}, - {565,243,1.93e-04}, - {565,244,4.84e-05}, - {565,275,9.67e-05}, - {565,276,3.87e-04}, - {565,277,9.67e-05}, - {565,531,-1.03e-02}, - {565,532,-1.03e-02}, - {565,533,-1.03e-02}, - {565,564,3.65e-02}, - {565,566,3.65e-02}, - {566,566,2.08e-01}, - {566,243,4.84e-05}, - {566,244,1.93e-04}, - {566,245,4.84e-05}, - {566,276,9.67e-05}, - {566,277,3.87e-04}, - {566,278,9.67e-05}, - {566,532,-1.03e-02}, - {566,533,-1.03e-02}, - {566,534,-1.03e-02}, - {566,565,3.65e-02}, - {566,567,3.65e-02}, - {567,567,2.08e-01}, - {567,244,4.84e-05}, - {567,245,1.93e-04}, - {567,246,4.84e-05}, - {567,277,9.67e-05}, - {567,278,3.87e-04}, - {567,279,9.67e-05}, - {567,533,-1.03e-02}, - {567,534,-1.03e-02}, - {567,535,-1.03e-02}, - {567,566,3.65e-02}, - {567,568,3.65e-02}, - {568,568,2.08e-01}, - {568,245,4.84e-05}, - {568,246,1.93e-04}, - {568,247,4.84e-05}, - {568,278,9.67e-05}, - {568,279,3.87e-04}, - {568,280,9.67e-05}, - {568,534,-1.03e-02}, - {568,535,-1.03e-02}, - {568,536,-1.03e-02}, - {568,567,3.65e-02}, - {568,569,3.65e-02}, - {569,569,2.08e-01}, - {569,246,4.84e-05}, - {569,247,1.93e-04}, - {569,248,4.84e-05}, - {569,279,9.67e-05}, - {569,280,3.87e-04}, - {569,281,9.67e-05}, - {569,535,-1.03e-02}, - {569,536,-1.03e-02}, - {569,537,-1.03e-02}, - {569,568,3.65e-02}, - {569,570,3.65e-02}, - {570,570,2.08e-01}, - {570,247,4.84e-05}, - {570,248,1.93e-04}, - {570,249,4.84e-05}, - {570,280,9.67e-05}, - {570,281,3.87e-04}, - {570,282,9.67e-05}, - {570,536,-1.03e-02}, - {570,537,-1.03e-02}, - {570,538,-1.03e-02}, - {570,569,3.65e-02}, - {570,571,3.65e-02}, - {571,571,2.08e-01}, - {571,248,4.84e-05}, - {571,249,1.93e-04}, - {571,250,4.84e-05}, - {571,281,9.67e-05}, - {571,282,3.87e-04}, - {571,283,9.67e-05}, - {571,537,-1.03e-02}, - {571,538,-1.03e-02}, - {571,539,-1.03e-02}, - {571,570,3.65e-02}, - {571,572,3.65e-02}, - {572,572,2.08e-01}, - {572,249,4.84e-05}, - {572,250,1.93e-04}, - {572,251,4.84e-05}, - {572,282,9.67e-05}, - {572,283,3.87e-04}, - {572,284,9.67e-05}, - {572,538,-1.03e-02}, - {572,539,-1.03e-02}, - {572,540,-1.03e-02}, - {572,571,3.65e-02}, - {572,573,3.65e-02}, - {573,573,2.08e-01}, - {573,250,4.84e-05}, - {573,251,1.93e-04}, - {573,252,4.84e-05}, - {573,283,9.67e-05}, - {573,284,3.87e-04}, - {573,285,9.67e-05}, - {573,539,-1.03e-02}, - {573,540,-1.03e-02}, - {573,541,-1.03e-02}, - {573,572,3.65e-02}, - {573,574,3.65e-02}, - {574,574,2.08e-01}, - {574,251,4.84e-05}, - {574,252,1.93e-04}, - {574,253,4.84e-05}, - {574,284,9.67e-05}, - {574,285,3.87e-04}, - {574,286,9.67e-05}, - {574,540,-1.03e-02}, - {574,541,-1.03e-02}, - {574,542,-1.03e-02}, - {574,573,3.65e-02}, - {574,575,3.65e-02}, - {575,575,2.08e-01}, - {575,252,4.84e-05}, - {575,253,1.93e-04}, - {575,254,4.84e-05}, - {575,285,9.67e-05}, - {575,286,3.87e-04}, - {575,287,9.67e-05}, - {575,541,-1.03e-02}, - {575,542,-1.03e-02}, - {575,543,-1.03e-02}, - {575,574,3.65e-02}, - {575,576,3.65e-02}, - {576,576,2.08e-01}, - {576,253,4.84e-05}, - {576,254,1.93e-04}, - {576,255,4.84e-05}, - {576,286,9.67e-05}, - {576,287,3.87e-04}, - {576,288,9.67e-05}, - {576,542,-1.03e-02}, - {576,543,-1.03e-02}, - {576,544,-1.03e-02}, - {576,575,3.65e-02}, - {576,577,3.65e-02}, - {577,577,2.08e-01}, - {577,226,4.84e-05}, - {577,254,4.84e-05}, - {577,255,1.93e-04}, - {577,258,9.67e-05}, - {577,287,9.67e-05}, - {577,288,3.87e-04}, - {577,515,-1.03e-02}, - {577,543,-1.03e-02}, - {577,544,-1.03e-02}, - {577,547,3.65e-02}, - {577,576,3.65e-02}}; + {0,0,1.87e-01}, + {0,1,3.65e-02}, + {0,2,3.65e-02}, + {0,3,-1.03e-02}, + {0,289,-1.93e-04}, + {0,290,-9.67e-05}, + {0,291,-9.67e-05}, + {0,292,-4.84e-05}, + {1,1,2.08e-01}, + {1,0,3.65e-02}, + {1,2,-1.03e-02}, + {1,3,-1.03e-02}, + {1,4,3.65e-02}, + {1,6,-1.03e-02}, + {1,289,-9.67e-05}, + {1,290,-3.87e-04}, + {1,291,-4.84e-05}, + {1,292,-1.93e-04}, + {1,293,-9.67e-05}, + {1,295,-4.84e-05}, + {2,2,2.08e-01}, + {2,0,3.65e-02}, + {2,1,-1.03e-02}, + {2,3,-1.03e-02}, + {2,5,3.65e-02}, + {2,8,-1.03e-02}, + {2,289,-9.67e-05}, + {2,290,-4.84e-05}, + {2,291,-3.87e-04}, + {2,292,-1.93e-04}, + {2,294,-9.67e-05}, + {2,297,-4.84e-05}, + {3,3,8.29e-02}, + {3,0,-1.03e-02}, + {3,1,-1.03e-02}, + {3,2,-1.03e-02}, + {3,4,-1.03e-02}, + {3,5,-1.03e-02}, + {3,6,-1.03e-02}, + {3,7,-1.03e-02}, + {3,8,-1.03e-02}, + {3,289,-4.84e-05}, + {3,290,-1.93e-04}, + {3,291,-1.93e-04}, + {3,292,-7.74e-04}, + {3,293,-4.84e-05}, + {3,294,-4.84e-05}, + {3,295,-1.93e-04}, + {3,296,-4.84e-05}, + {3,297,-1.93e-04}, + {4,4,2.08e-01}, + {4,1,3.65e-02}, + {4,3,-1.03e-02}, + {4,6,-1.03e-02}, + {4,9,3.65e-02}, + {4,11,-1.03e-02}, + {4,290,-9.67e-05}, + {4,292,-4.84e-05}, + {4,293,-3.87e-04}, + {4,295,-1.93e-04}, + {4,298,-9.67e-05}, + {4,300,-4.84e-05}, + {5,5,2.08e-01}, + {5,2,3.65e-02}, + {5,3,-1.03e-02}, + {5,8,-1.03e-02}, + {5,10,3.65e-02}, + {5,15,-1.03e-02}, + {5,291,-9.67e-05}, + {5,292,-4.84e-05}, + {5,294,-3.87e-04}, + {5,297,-1.93e-04}, + {5,299,-9.67e-05}, + {5,304,-4.84e-05}, + {6,6,8.29e-02}, + {6,1,-1.03e-02}, + {6,3,-1.03e-02}, + {6,4,-1.03e-02}, + {6,7,-1.03e-02}, + {6,8,-1.03e-02}, + {6,9,-1.03e-02}, + {6,11,-1.03e-02}, + {6,12,-1.03e-02}, + {6,290,-4.84e-05}, + {6,292,-1.93e-04}, + {6,293,-1.93e-04}, + {6,295,-7.74e-04}, + {6,296,-1.93e-04}, + {6,297,-4.84e-05}, + {6,298,-4.84e-05}, + {6,300,-1.93e-04}, + {6,301,-4.84e-05}, + {7,7,8.29e-02}, + {7,3,-1.03e-02}, + {7,6,-1.03e-02}, + {7,8,-1.03e-02}, + {7,11,-1.03e-02}, + {7,12,-1.03e-02}, + {7,13,-1.03e-02}, + {7,14,-1.03e-02}, + {7,15,-1.03e-02}, + {7,292,-4.84e-05}, + {7,295,-1.93e-04}, + {7,296,-7.74e-04}, + {7,297,-1.93e-04}, + {7,300,-4.84e-05}, + {7,301,-1.93e-04}, + {7,302,-4.84e-05}, + {7,303,-1.93e-04}, + {7,304,-4.84e-05}, + {8,8,8.29e-02}, + {8,2,-1.03e-02}, + {8,3,-1.03e-02}, + {8,5,-1.03e-02}, + {8,6,-1.03e-02}, + {8,7,-1.03e-02}, + {8,10,-1.03e-02}, + {8,14,-1.03e-02}, + {8,15,-1.03e-02}, + {8,291,-4.84e-05}, + {8,292,-1.93e-04}, + {8,294,-1.93e-04}, + {8,295,-4.84e-05}, + {8,296,-1.93e-04}, + {8,297,-7.74e-04}, + {8,299,-4.84e-05}, + {8,303,-4.84e-05}, + {8,304,-1.93e-04}, + {9,9,2.08e-01}, + {9,4,3.65e-02}, + {9,6,-1.03e-02}, + {9,11,-1.03e-02}, + {9,16,3.65e-02}, + {9,18,-1.03e-02}, + {9,293,-9.67e-05}, + {9,295,-4.84e-05}, + {9,298,-3.87e-04}, + {9,300,-1.93e-04}, + {9,305,-9.67e-05}, + {9,307,-4.84e-05}, + {10,10,2.08e-01}, + {10,5,3.65e-02}, + {10,8,-1.03e-02}, + {10,15,-1.03e-02}, + {10,17,3.65e-02}, + {10,24,-1.03e-02}, + {10,294,-9.67e-05}, + {10,297,-4.84e-05}, + {10,299,-3.87e-04}, + {10,304,-1.93e-04}, + {10,306,-9.67e-05}, + {10,313,-4.84e-05}, + {11,11,8.29e-02}, + {11,4,-1.03e-02}, + {11,6,-1.03e-02}, + {11,7,-1.03e-02}, + {11,9,-1.03e-02}, + {11,12,-1.03e-02}, + {11,16,-1.03e-02}, + {11,18,-1.03e-02}, + {11,19,-1.03e-02}, + {11,293,-4.84e-05}, + {11,295,-1.93e-04}, + {11,296,-4.84e-05}, + {11,298,-1.93e-04}, + {11,300,-7.74e-04}, + {11,301,-1.93e-04}, + {11,305,-4.84e-05}, + {11,307,-1.93e-04}, + {11,308,-4.84e-05}, + {12,12,8.29e-02}, + {12,6,-1.03e-02}, + {12,7,-1.03e-02}, + {12,11,-1.03e-02}, + {12,13,-1.03e-02}, + {12,14,-1.03e-02}, + {12,18,-1.03e-02}, + {12,19,-1.03e-02}, + {12,20,-1.03e-02}, + {12,295,-4.84e-05}, + {12,296,-1.93e-04}, + {12,300,-1.93e-04}, + {12,301,-7.74e-04}, + {12,302,-1.93e-04}, + {12,303,-4.84e-05}, + {12,307,-4.84e-05}, + {12,308,-1.93e-04}, + {12,309,-4.84e-05}, + {13,13,8.29e-02}, + {13,7,-1.03e-02}, + {13,12,-1.03e-02}, + {13,14,-1.03e-02}, + {13,19,-1.03e-02}, + {13,20,-1.03e-02}, + {13,21,-1.03e-02}, + {13,22,-1.03e-02}, + {13,23,-1.03e-02}, + {13,296,-4.84e-05}, + {13,301,-1.93e-04}, + {13,302,-7.74e-04}, + {13,303,-1.93e-04}, + {13,308,-4.84e-05}, + {13,309,-1.93e-04}, + {13,310,-4.84e-05}, + {13,311,-1.93e-04}, + {13,312,-4.84e-05}, + {14,14,8.29e-02}, + {14,7,-1.03e-02}, + {14,8,-1.03e-02}, + {14,12,-1.03e-02}, + {14,13,-1.03e-02}, + {14,15,-1.03e-02}, + {14,22,-1.03e-02}, + {14,23,-1.03e-02}, + {14,24,-1.03e-02}, + {14,296,-1.93e-04}, + {14,297,-4.84e-05}, + {14,301,-4.84e-05}, + {14,302,-1.93e-04}, + {14,303,-7.74e-04}, + {14,304,-1.93e-04}, + {14,311,-4.84e-05}, + {14,312,-1.93e-04}, + {14,313,-4.84e-05}, + {15,15,8.29e-02}, + {15,5,-1.03e-02}, + {15,7,-1.03e-02}, + {15,8,-1.03e-02}, + {15,10,-1.03e-02}, + {15,14,-1.03e-02}, + {15,17,-1.03e-02}, + {15,23,-1.03e-02}, + {15,24,-1.03e-02}, + {15,294,-4.84e-05}, + {15,296,-4.84e-05}, + {15,297,-1.93e-04}, + {15,299,-1.93e-04}, + {15,303,-1.93e-04}, + {15,304,-7.74e-04}, + {15,306,-4.84e-05}, + {15,312,-4.84e-05}, + {15,313,-1.93e-04}, + {16,16,2.08e-01}, + {16,9,3.65e-02}, + {16,11,-1.03e-02}, + {16,18,-1.03e-02}, + {16,25,3.65e-02}, + {16,27,-1.03e-02}, + {16,298,-9.67e-05}, + {16,300,-4.84e-05}, + {16,305,-3.87e-04}, + {16,307,-1.93e-04}, + {16,314,-9.67e-05}, + {16,316,-4.84e-05}, + {17,17,2.08e-01}, + {17,10,3.65e-02}, + {17,15,-1.03e-02}, + {17,24,-1.03e-02}, + {17,26,3.65e-02}, + {17,33,-1.03e-02}, + {17,299,-9.67e-05}, + {17,304,-4.84e-05}, + {17,306,-3.87e-04}, + {17,313,-1.93e-04}, + {17,315,-9.67e-05}, + {17,322,-4.84e-05}, + {18,18,8.29e-02}, + {18,9,-1.03e-02}, + {18,11,-1.03e-02}, + {18,12,-1.03e-02}, + {18,16,-1.03e-02}, + {18,19,-1.03e-02}, + {18,25,-1.03e-02}, + {18,27,-1.03e-02}, + {18,28,-1.03e-02}, + {18,298,-4.84e-05}, + {18,300,-1.93e-04}, + {18,301,-4.84e-05}, + {18,305,-1.93e-04}, + {18,307,-7.74e-04}, + {18,308,-1.93e-04}, + {18,314,-4.84e-05}, + {18,316,-1.93e-04}, + {18,317,-4.84e-05}, + {19,19,8.29e-02}, + {19,11,-1.03e-02}, + {19,12,-1.03e-02}, + {19,13,-1.03e-02}, + {19,18,-1.03e-02}, + {19,20,-1.03e-02}, + {19,27,-1.03e-02}, + {19,28,-1.03e-02}, + {19,29,-1.03e-02}, + {19,300,-4.84e-05}, + {19,301,-1.93e-04}, + {19,302,-4.84e-05}, + {19,307,-1.93e-04}, + {19,308,-7.74e-04}, + {19,309,-1.93e-04}, + {19,316,-4.84e-05}, + {19,317,-1.93e-04}, + {19,318,-4.84e-05}, + {20,20,8.29e-02}, + {20,12,-1.03e-02}, + {20,13,-1.03e-02}, + {20,19,-1.03e-02}, + {20,21,-1.03e-02}, + {20,22,-1.03e-02}, + {20,28,-1.03e-02}, + {20,29,-1.03e-02}, + {20,30,-1.03e-02}, + {20,301,-4.84e-05}, + {20,302,-1.93e-04}, + {20,308,-1.93e-04}, + {20,309,-7.74e-04}, + {20,310,-1.93e-04}, + {20,311,-4.84e-05}, + {20,317,-4.84e-05}, + {20,318,-1.93e-04}, + {20,319,-4.84e-05}, + {21,21,8.29e-02}, + {21,13,-1.03e-02}, + {21,20,-1.03e-02}, + {21,22,-1.03e-02}, + {21,29,-1.03e-02}, + {21,30,-1.03e-02}, + {21,31,-1.03e-02}, + {21,32,-1.03e-02}, + {21,35,-1.03e-02}, + {21,302,-4.84e-05}, + {21,309,-1.93e-04}, + {21,310,-7.74e-04}, + {21,311,-1.93e-04}, + {21,318,-4.84e-05}, + {21,319,-1.93e-04}, + {21,320,-4.84e-05}, + {21,321,-1.93e-04}, + {21,324,-4.84e-05}, + {22,22,8.29e-02}, + {22,13,-1.03e-02}, + {22,14,-1.03e-02}, + {22,20,-1.03e-02}, + {22,21,-1.03e-02}, + {22,23,-1.03e-02}, + {22,32,-1.03e-02}, + {22,34,-1.03e-02}, + {22,35,-1.03e-02}, + {22,302,-1.93e-04}, + {22,303,-4.84e-05}, + {22,309,-4.84e-05}, + {22,310,-1.93e-04}, + {22,311,-7.74e-04}, + {22,312,-1.93e-04}, + {22,321,-4.84e-05}, + {22,323,-4.84e-05}, + {22,324,-1.93e-04}, + {23,23,8.29e-02}, + {23,13,-1.03e-02}, + {23,14,-1.03e-02}, + {23,15,-1.03e-02}, + {23,22,-1.03e-02}, + {23,24,-1.03e-02}, + {23,33,-1.03e-02}, + {23,34,-1.03e-02}, + {23,35,-1.03e-02}, + {23,302,-4.84e-05}, + {23,303,-1.93e-04}, + {23,304,-4.84e-05}, + {23,311,-1.93e-04}, + {23,312,-7.74e-04}, + {23,313,-1.93e-04}, + {23,322,-4.84e-05}, + {23,323,-1.93e-04}, + {23,324,-4.84e-05}, + {24,24,8.29e-02}, + {24,10,-1.03e-02}, + {24,14,-1.03e-02}, + {24,15,-1.03e-02}, + {24,17,-1.03e-02}, + {24,23,-1.03e-02}, + {24,26,-1.03e-02}, + {24,33,-1.03e-02}, + {24,34,-1.03e-02}, + {24,299,-4.84e-05}, + {24,303,-4.84e-05}, + {24,304,-1.93e-04}, + {24,306,-1.93e-04}, + {24,312,-1.93e-04}, + {24,313,-7.74e-04}, + {24,315,-4.84e-05}, + {24,322,-1.93e-04}, + {24,323,-4.84e-05}, + {25,25,2.08e-01}, + {25,16,3.65e-02}, + {25,18,-1.03e-02}, + {25,27,-1.03e-02}, + {25,36,3.65e-02}, + {25,38,-1.03e-02}, + {25,305,-9.67e-05}, + {25,307,-4.84e-05}, + {25,314,-3.87e-04}, + {25,316,-1.93e-04}, + {25,325,-9.67e-05}, + {25,327,-4.84e-05}, + {26,26,2.08e-01}, + {26,17,3.65e-02}, + {26,24,-1.03e-02}, + {26,33,-1.03e-02}, + {26,37,3.65e-02}, + {26,47,-1.03e-02}, + {26,306,-9.67e-05}, + {26,313,-4.84e-05}, + {26,315,-3.87e-04}, + {26,322,-1.93e-04}, + {26,326,-9.67e-05}, + {26,336,-4.84e-05}, + {27,27,8.29e-02}, + {27,16,-1.03e-02}, + {27,18,-1.03e-02}, + {27,19,-1.03e-02}, + {27,25,-1.03e-02}, + {27,28,-1.03e-02}, + {27,36,-1.03e-02}, + {27,38,-1.03e-02}, + {27,39,-1.03e-02}, + {27,305,-4.84e-05}, + {27,307,-1.93e-04}, + {27,308,-4.84e-05}, + {27,314,-1.93e-04}, + {27,316,-7.74e-04}, + {27,317,-1.93e-04}, + {27,325,-4.84e-05}, + {27,327,-1.93e-04}, + {27,328,-4.84e-05}, + {28,28,8.29e-02}, + {28,18,-1.03e-02}, + {28,19,-1.03e-02}, + {28,20,-1.03e-02}, + {28,27,-1.03e-02}, + {28,29,-1.03e-02}, + {28,38,-1.03e-02}, + {28,39,-1.03e-02}, + {28,40,-1.03e-02}, + {28,307,-4.84e-05}, + {28,308,-1.93e-04}, + {28,309,-4.84e-05}, + {28,316,-1.93e-04}, + {28,317,-7.74e-04}, + {28,318,-1.93e-04}, + {28,327,-4.84e-05}, + {28,328,-1.93e-04}, + {28,329,-4.84e-05}, + {29,29,8.29e-02}, + {29,19,-1.03e-02}, + {29,20,-1.03e-02}, + {29,21,-1.03e-02}, + {29,28,-1.03e-02}, + {29,30,-1.03e-02}, + {29,39,-1.03e-02}, + {29,40,-1.03e-02}, + {29,41,-1.03e-02}, + {29,308,-4.84e-05}, + {29,309,-1.93e-04}, + {29,310,-4.84e-05}, + {29,317,-1.93e-04}, + {29,318,-7.74e-04}, + {29,319,-1.93e-04}, + {29,328,-4.84e-05}, + {29,329,-1.93e-04}, + {29,330,-4.84e-05}, + {30,30,8.29e-02}, + {30,20,-1.03e-02}, + {30,21,-1.03e-02}, + {30,29,-1.03e-02}, + {30,31,-1.03e-02}, + {30,32,-1.03e-02}, + {30,40,-1.03e-02}, + {30,41,-1.03e-02}, + {30,42,-1.03e-02}, + {30,309,-4.84e-05}, + {30,310,-1.93e-04}, + {30,318,-1.93e-04}, + {30,319,-7.74e-04}, + {30,320,-1.93e-04}, + {30,321,-4.84e-05}, + {30,329,-4.84e-05}, + {30,330,-1.93e-04}, + {30,331,-4.84e-05}, + {31,31,8.29e-02}, + {31,21,-1.03e-02}, + {31,30,-1.03e-02}, + {31,32,-1.03e-02}, + {31,41,-1.03e-02}, + {31,42,-1.03e-02}, + {31,43,-1.03e-02}, + {31,44,-1.03e-02}, + {31,45,-1.03e-02}, + {31,310,-4.84e-05}, + {31,319,-1.93e-04}, + {31,320,-7.74e-04}, + {31,321,-1.93e-04}, + {31,330,-4.84e-05}, + {31,331,-1.93e-04}, + {31,332,-4.84e-05}, + {31,333,-1.93e-04}, + {31,334,-4.84e-05}, + {32,32,8.29e-02}, + {32,21,-1.03e-02}, + {32,22,-1.03e-02}, + {32,30,-1.03e-02}, + {32,31,-1.03e-02}, + {32,35,-1.03e-02}, + {32,44,-1.03e-02}, + {32,45,-1.03e-02}, + {32,48,-1.03e-02}, + {32,310,-1.93e-04}, + {32,311,-4.84e-05}, + {32,319,-4.84e-05}, + {32,320,-1.93e-04}, + {32,321,-7.74e-04}, + {32,324,-1.93e-04}, + {32,333,-4.84e-05}, + {32,334,-1.93e-04}, + {32,337,-4.84e-05}, + {33,33,8.29e-02}, + {33,17,-1.03e-02}, + {33,23,-1.03e-02}, + {33,24,-1.03e-02}, + {33,26,-1.03e-02}, + {33,34,-1.03e-02}, + {33,37,-1.03e-02}, + {33,46,-1.03e-02}, + {33,47,-1.03e-02}, + {33,306,-4.84e-05}, + {33,312,-4.84e-05}, + {33,313,-1.93e-04}, + {33,315,-1.93e-04}, + {33,322,-7.74e-04}, + {33,323,-1.93e-04}, + {33,326,-4.84e-05}, + {33,335,-4.84e-05}, + {33,336,-1.93e-04}, + {34,34,8.29e-02}, + {34,22,-1.03e-02}, + {34,23,-1.03e-02}, + {34,24,-1.03e-02}, + {34,33,-1.03e-02}, + {34,35,-1.03e-02}, + {34,46,-1.03e-02}, + {34,47,-1.03e-02}, + {34,48,-1.03e-02}, + {34,311,-4.84e-05}, + {34,312,-1.93e-04}, + {34,313,-4.84e-05}, + {34,322,-1.93e-04}, + {34,323,-7.74e-04}, + {34,324,-1.93e-04}, + {34,335,-1.93e-04}, + {34,336,-4.84e-05}, + {34,337,-4.84e-05}, + {35,35,8.29e-02}, + {35,21,-1.03e-02}, + {35,22,-1.03e-02}, + {35,23,-1.03e-02}, + {35,32,-1.03e-02}, + {35,34,-1.03e-02}, + {35,45,-1.03e-02}, + {35,46,-1.03e-02}, + {35,48,-1.03e-02}, + {35,310,-4.84e-05}, + {35,311,-1.93e-04}, + {35,312,-4.84e-05}, + {35,321,-1.93e-04}, + {35,323,-1.93e-04}, + {35,324,-7.74e-04}, + {35,334,-4.84e-05}, + {35,335,-4.84e-05}, + {35,337,-1.93e-04}, + {36,36,2.08e-01}, + {36,25,3.65e-02}, + {36,27,-1.03e-02}, + {36,38,-1.03e-02}, + {36,49,3.65e-02}, + {36,51,-1.03e-02}, + {36,314,-9.67e-05}, + {36,316,-4.84e-05}, + {36,325,-3.87e-04}, + {36,327,-1.93e-04}, + {36,338,-9.67e-05}, + {36,340,-4.84e-05}, + {37,37,2.08e-01}, + {37,26,3.65e-02}, + {37,33,-1.03e-02}, + {37,47,-1.03e-02}, + {37,50,3.65e-02}, + {37,63,-1.03e-02}, + {37,315,-9.67e-05}, + {37,322,-4.84e-05}, + {37,326,-3.87e-04}, + {37,336,-1.93e-04}, + {37,339,-9.67e-05}, + {37,352,-4.84e-05}, + {38,38,8.29e-02}, + {38,25,-1.03e-02}, + {38,27,-1.03e-02}, + {38,28,-1.03e-02}, + {38,36,-1.03e-02}, + {38,39,-1.03e-02}, + {38,49,-1.03e-02}, + {38,51,-1.03e-02}, + {38,52,-1.03e-02}, + {38,314,-4.84e-05}, + {38,316,-1.93e-04}, + {38,317,-4.84e-05}, + {38,325,-1.93e-04}, + {38,327,-7.74e-04}, + {38,328,-1.93e-04}, + {38,338,-4.84e-05}, + {38,340,-1.93e-04}, + {38,341,-4.84e-05}, + {39,39,8.29e-02}, + {39,27,-1.03e-02}, + {39,28,-1.03e-02}, + {39,29,-1.03e-02}, + {39,38,-1.03e-02}, + {39,40,-1.03e-02}, + {39,51,-1.03e-02}, + {39,52,-1.03e-02}, + {39,53,-1.03e-02}, + {39,316,-4.84e-05}, + {39,317,-1.93e-04}, + {39,318,-4.84e-05}, + {39,327,-1.93e-04}, + {39,328,-7.74e-04}, + {39,329,-1.93e-04}, + {39,340,-4.84e-05}, + {39,341,-1.93e-04}, + {39,342,-4.84e-05}, + {40,40,8.29e-02}, + {40,28,-1.03e-02}, + {40,29,-1.03e-02}, + {40,30,-1.03e-02}, + {40,39,-1.03e-02}, + {40,41,-1.03e-02}, + {40,52,-1.03e-02}, + {40,53,-1.03e-02}, + {40,54,-1.03e-02}, + {40,317,-4.84e-05}, + {40,318,-1.93e-04}, + {40,319,-4.84e-05}, + {40,328,-1.93e-04}, + {40,329,-7.74e-04}, + {40,330,-1.93e-04}, + {40,341,-4.84e-05}, + {40,342,-1.93e-04}, + {40,343,-4.84e-05}, + {41,41,8.29e-02}, + {41,29,-1.03e-02}, + {41,30,-1.03e-02}, + {41,31,-1.03e-02}, + {41,40,-1.03e-02}, + {41,42,-1.03e-02}, + {41,53,-1.03e-02}, + {41,54,-1.03e-02}, + {41,55,-1.03e-02}, + {41,318,-4.84e-05}, + {41,319,-1.93e-04}, + {41,320,-4.84e-05}, + {41,329,-1.93e-04}, + {41,330,-7.74e-04}, + {41,331,-1.93e-04}, + {41,342,-4.84e-05}, + {41,343,-1.93e-04}, + {41,344,-4.84e-05}, + {42,42,8.29e-02}, + {42,30,-1.03e-02}, + {42,31,-1.03e-02}, + {42,41,-1.03e-02}, + {42,43,-1.03e-02}, + {42,44,-1.03e-02}, + {42,54,-1.03e-02}, + {42,55,-1.03e-02}, + {42,56,-1.03e-02}, + {42,319,-4.84e-05}, + {42,320,-1.93e-04}, + {42,330,-1.93e-04}, + {42,331,-7.74e-04}, + {42,332,-1.93e-04}, + {42,333,-4.84e-05}, + {42,343,-4.84e-05}, + {42,344,-1.93e-04}, + {42,345,-4.84e-05}, + {43,43,8.29e-02}, + {43,31,-1.03e-02}, + {43,42,-1.03e-02}, + {43,44,-1.03e-02}, + {43,55,-1.03e-02}, + {43,56,-1.03e-02}, + {43,57,-1.03e-02}, + {43,58,-1.03e-02}, + {43,59,-1.03e-02}, + {43,320,-4.84e-05}, + {43,331,-1.93e-04}, + {43,332,-7.74e-04}, + {43,333,-1.93e-04}, + {43,344,-4.84e-05}, + {43,345,-1.93e-04}, + {43,346,-4.84e-05}, + {43,347,-1.93e-04}, + {43,348,-4.84e-05}, + {44,44,8.29e-02}, + {44,31,-1.03e-02}, + {44,32,-1.03e-02}, + {44,42,-1.03e-02}, + {44,43,-1.03e-02}, + {44,45,-1.03e-02}, + {44,58,-1.03e-02}, + {44,59,-1.03e-02}, + {44,60,-1.03e-02}, + {44,320,-1.93e-04}, + {44,321,-4.84e-05}, + {44,331,-4.84e-05}, + {44,332,-1.93e-04}, + {44,333,-7.74e-04}, + {44,334,-1.93e-04}, + {44,347,-4.84e-05}, + {44,348,-1.93e-04}, + {44,349,-4.84e-05}, + {45,45,8.29e-02}, + {45,31,-1.03e-02}, + {45,32,-1.03e-02}, + {45,35,-1.03e-02}, + {45,44,-1.03e-02}, + {45,48,-1.03e-02}, + {45,59,-1.03e-02}, + {45,60,-1.03e-02}, + {45,61,-1.03e-02}, + {45,320,-4.84e-05}, + {45,321,-1.93e-04}, + {45,324,-4.84e-05}, + {45,333,-1.93e-04}, + {45,334,-7.74e-04}, + {45,337,-1.93e-04}, + {45,348,-4.84e-05}, + {45,349,-1.93e-04}, + {45,350,-4.84e-05}, + {46,46,8.29e-02}, + {46,33,-1.03e-02}, + {46,34,-1.03e-02}, + {46,35,-1.03e-02}, + {46,47,-1.03e-02}, + {46,48,-1.03e-02}, + {46,61,-1.03e-02}, + {46,62,-1.03e-02}, + {46,63,-1.03e-02}, + {46,322,-4.84e-05}, + {46,323,-1.93e-04}, + {46,324,-4.84e-05}, + {46,335,-7.74e-04}, + {46,336,-1.93e-04}, + {46,337,-1.93e-04}, + {46,350,-4.84e-05}, + {46,351,-1.93e-04}, + {46,352,-4.84e-05}, + {47,47,8.29e-02}, + {47,26,-1.03e-02}, + {47,33,-1.03e-02}, + {47,34,-1.03e-02}, + {47,37,-1.03e-02}, + {47,46,-1.03e-02}, + {47,50,-1.03e-02}, + {47,62,-1.03e-02}, + {47,63,-1.03e-02}, + {47,315,-4.84e-05}, + {47,322,-1.93e-04}, + {47,323,-4.84e-05}, + {47,326,-1.93e-04}, + {47,335,-1.93e-04}, + {47,336,-7.74e-04}, + {47,339,-4.84e-05}, + {47,351,-4.84e-05}, + {47,352,-1.93e-04}, + {48,48,8.29e-02}, + {48,32,-1.03e-02}, + {48,34,-1.03e-02}, + {48,35,-1.03e-02}, + {48,45,-1.03e-02}, + {48,46,-1.03e-02}, + {48,60,-1.03e-02}, + {48,61,-1.03e-02}, + {48,62,-1.03e-02}, + {48,321,-4.84e-05}, + {48,323,-4.84e-05}, + {48,324,-1.93e-04}, + {48,334,-1.93e-04}, + {48,335,-1.93e-04}, + {48,337,-7.74e-04}, + {48,349,-4.84e-05}, + {48,350,-1.93e-04}, + {48,351,-4.84e-05}, + {49,49,2.08e-01}, + {49,36,3.65e-02}, + {49,38,-1.03e-02}, + {49,51,-1.03e-02}, + {49,64,3.65e-02}, + {49,66,-1.03e-02}, + {49,325,-9.67e-05}, + {49,327,-4.84e-05}, + {49,338,-3.87e-04}, + {49,340,-1.93e-04}, + {49,353,-9.67e-05}, + {49,355,-4.84e-05}, + {50,50,2.08e-01}, + {50,37,3.65e-02}, + {50,47,-1.03e-02}, + {50,63,-1.03e-02}, + {50,65,3.65e-02}, + {50,80,-1.03e-02}, + {50,326,-9.67e-05}, + {50,336,-4.84e-05}, + {50,339,-3.87e-04}, + {50,352,-1.93e-04}, + {50,354,-9.67e-05}, + {50,369,-4.84e-05}, + {51,51,8.29e-02}, + {51,36,-1.03e-02}, + {51,38,-1.03e-02}, + {51,39,-1.03e-02}, + {51,49,-1.03e-02}, + {51,52,-1.03e-02}, + {51,64,-1.03e-02}, + {51,66,-1.03e-02}, + {51,67,-1.03e-02}, + {51,325,-4.84e-05}, + {51,327,-1.93e-04}, + {51,328,-4.84e-05}, + {51,338,-1.93e-04}, + {51,340,-7.74e-04}, + {51,341,-1.93e-04}, + {51,353,-4.84e-05}, + {51,355,-1.93e-04}, + {51,356,-4.84e-05}, + {52,52,8.29e-02}, + {52,38,-1.03e-02}, + {52,39,-1.03e-02}, + {52,40,-1.03e-02}, + {52,51,-1.03e-02}, + {52,53,-1.03e-02}, + {52,66,-1.03e-02}, + {52,67,-1.03e-02}, + {52,68,-1.03e-02}, + {52,327,-4.84e-05}, + {52,328,-1.93e-04}, + {52,329,-4.84e-05}, + {52,340,-1.93e-04}, + {52,341,-7.74e-04}, + {52,342,-1.93e-04}, + {52,355,-4.84e-05}, + {52,356,-1.93e-04}, + {52,357,-4.84e-05}, + {53,53,8.29e-02}, + {53,39,-1.03e-02}, + {53,40,-1.03e-02}, + {53,41,-1.03e-02}, + {53,52,-1.03e-02}, + {53,54,-1.03e-02}, + {53,67,-1.03e-02}, + {53,68,-1.03e-02}, + {53,69,-1.03e-02}, + {53,328,-4.84e-05}, + {53,329,-1.93e-04}, + {53,330,-4.84e-05}, + {53,341,-1.93e-04}, + {53,342,-7.74e-04}, + {53,343,-1.93e-04}, + {53,356,-4.84e-05}, + {53,357,-1.93e-04}, + {53,358,-4.84e-05}, + {54,54,8.29e-02}, + {54,40,-1.03e-02}, + {54,41,-1.03e-02}, + {54,42,-1.03e-02}, + {54,53,-1.03e-02}, + {54,55,-1.03e-02}, + {54,68,-1.03e-02}, + {54,69,-1.03e-02}, + {54,70,-1.03e-02}, + {54,329,-4.84e-05}, + {54,330,-1.93e-04}, + {54,331,-4.84e-05}, + {54,342,-1.93e-04}, + {54,343,-7.74e-04}, + {54,344,-1.93e-04}, + {54,357,-4.84e-05}, + {54,358,-1.93e-04}, + {54,359,-4.84e-05}, + {55,55,8.29e-02}, + {55,41,-1.03e-02}, + {55,42,-1.03e-02}, + {55,43,-1.03e-02}, + {55,54,-1.03e-02}, + {55,56,-1.03e-02}, + {55,69,-1.03e-02}, + {55,70,-1.03e-02}, + {55,71,-1.03e-02}, + {55,330,-4.84e-05}, + {55,331,-1.93e-04}, + {55,332,-4.84e-05}, + {55,343,-1.93e-04}, + {55,344,-7.74e-04}, + {55,345,-1.93e-04}, + {55,358,-4.84e-05}, + {55,359,-1.93e-04}, + {55,360,-4.84e-05}, + {56,56,8.29e-02}, + {56,42,-1.03e-02}, + {56,43,-1.03e-02}, + {56,55,-1.03e-02}, + {56,57,-1.03e-02}, + {56,58,-1.03e-02}, + {56,70,-1.03e-02}, + {56,71,-1.03e-02}, + {56,72,-1.03e-02}, + {56,331,-4.84e-05}, + {56,332,-1.93e-04}, + {56,344,-1.93e-04}, + {56,345,-7.74e-04}, + {56,346,-1.93e-04}, + {56,347,-4.84e-05}, + {56,359,-4.84e-05}, + {56,360,-1.93e-04}, + {56,361,-4.84e-05}, + {57,57,8.29e-02}, + {57,43,-1.03e-02}, + {57,56,-1.03e-02}, + {57,58,-1.03e-02}, + {57,71,-1.03e-02}, + {57,72,-1.03e-02}, + {57,73,-1.03e-02}, + {57,74,-1.03e-02}, + {57,75,-1.03e-02}, + {57,332,-4.84e-05}, + {57,345,-1.93e-04}, + {57,346,-7.74e-04}, + {57,347,-1.93e-04}, + {57,360,-4.84e-05}, + {57,361,-1.93e-04}, + {57,362,-4.84e-05}, + {57,363,-1.93e-04}, + {57,364,-4.84e-05}, + {58,58,8.29e-02}, + {58,43,-1.03e-02}, + {58,44,-1.03e-02}, + {58,56,-1.03e-02}, + {58,57,-1.03e-02}, + {58,59,-1.03e-02}, + {58,74,-1.03e-02}, + {58,75,-1.03e-02}, + {58,76,-1.03e-02}, + {58,332,-1.93e-04}, + {58,333,-4.84e-05}, + {58,345,-4.84e-05}, + {58,346,-1.93e-04}, + {58,347,-7.74e-04}, + {58,348,-1.93e-04}, + {58,363,-4.84e-05}, + {58,364,-1.93e-04}, + {58,365,-4.84e-05}, + {59,59,8.29e-02}, + {59,43,-1.03e-02}, + {59,44,-1.03e-02}, + {59,45,-1.03e-02}, + {59,58,-1.03e-02}, + {59,60,-1.03e-02}, + {59,75,-1.03e-02}, + {59,76,-1.03e-02}, + {59,77,-1.03e-02}, + {59,332,-4.84e-05}, + {59,333,-1.93e-04}, + {59,334,-4.84e-05}, + {59,347,-1.93e-04}, + {59,348,-7.74e-04}, + {59,349,-1.93e-04}, + {59,364,-4.84e-05}, + {59,365,-1.93e-04}, + {59,366,-4.84e-05}, + {60,60,8.29e-02}, + {60,44,-1.03e-02}, + {60,45,-1.03e-02}, + {60,48,-1.03e-02}, + {60,59,-1.03e-02}, + {60,61,-1.03e-02}, + {60,76,-1.03e-02}, + {60,77,-1.03e-02}, + {60,78,-1.03e-02}, + {60,333,-4.84e-05}, + {60,334,-1.93e-04}, + {60,337,-4.84e-05}, + {60,348,-1.93e-04}, + {60,349,-7.74e-04}, + {60,350,-1.93e-04}, + {60,365,-4.84e-05}, + {60,366,-1.93e-04}, + {60,367,-4.84e-05}, + {61,61,8.29e-02}, + {61,45,-1.03e-02}, + {61,46,-1.03e-02}, + {61,48,-1.03e-02}, + {61,60,-1.03e-02}, + {61,62,-1.03e-02}, + {61,77,-1.03e-02}, + {61,78,-1.03e-02}, + {61,79,-1.03e-02}, + {61,334,-4.84e-05}, + {61,335,-4.84e-05}, + {61,337,-1.93e-04}, + {61,349,-1.93e-04}, + {61,350,-7.74e-04}, + {61,351,-1.93e-04}, + {61,366,-4.84e-05}, + {61,367,-1.93e-04}, + {61,368,-4.84e-05}, + {62,62,8.29e-02}, + {62,46,-1.03e-02}, + {62,47,-1.03e-02}, + {62,48,-1.03e-02}, + {62,61,-1.03e-02}, + {62,63,-1.03e-02}, + {62,78,-1.03e-02}, + {62,79,-1.03e-02}, + {62,80,-1.03e-02}, + {62,335,-1.93e-04}, + {62,336,-4.84e-05}, + {62,337,-4.84e-05}, + {62,350,-1.93e-04}, + {62,351,-7.74e-04}, + {62,352,-1.93e-04}, + {62,367,-4.84e-05}, + {62,368,-1.93e-04}, + {62,369,-4.84e-05}, + {63,63,8.29e-02}, + {63,37,-1.03e-02}, + {63,46,-1.03e-02}, + {63,47,-1.03e-02}, + {63,50,-1.03e-02}, + {63,62,-1.03e-02}, + {63,65,-1.03e-02}, + {63,79,-1.03e-02}, + {63,80,-1.03e-02}, + {63,326,-4.84e-05}, + {63,335,-4.84e-05}, + {63,336,-1.93e-04}, + {63,339,-1.93e-04}, + {63,351,-1.93e-04}, + {63,352,-7.74e-04}, + {63,354,-4.84e-05}, + {63,368,-4.84e-05}, + {63,369,-1.93e-04}, + {64,64,2.08e-01}, + {64,49,3.65e-02}, + {64,51,-1.03e-02}, + {64,66,-1.03e-02}, + {64,81,3.65e-02}, + {64,83,-1.03e-02}, + {64,338,-9.67e-05}, + {64,340,-4.84e-05}, + {64,353,-3.87e-04}, + {64,355,-1.93e-04}, + {64,370,-9.67e-05}, + {64,372,-4.84e-05}, + {65,65,2.08e-01}, + {65,50,3.65e-02}, + {65,63,-1.03e-02}, + {65,80,-1.03e-02}, + {65,82,3.65e-02}, + {65,93,-1.03e-02}, + {65,339,-9.67e-05}, + {65,352,-4.84e-05}, + {65,354,-3.87e-04}, + {65,369,-1.93e-04}, + {65,371,-9.67e-05}, + {65,382,-4.84e-05}, + {66,66,8.29e-02}, + {66,49,-1.03e-02}, + {66,51,-1.03e-02}, + {66,52,-1.03e-02}, + {66,64,-1.03e-02}, + {66,67,-1.03e-02}, + {66,81,-1.03e-02}, + {66,83,-1.03e-02}, + {66,84,-1.03e-02}, + {66,338,-4.84e-05}, + {66,340,-1.93e-04}, + {66,341,-4.84e-05}, + {66,353,-1.93e-04}, + {66,355,-7.74e-04}, + {66,356,-1.93e-04}, + {66,370,-4.84e-05}, + {66,372,-1.93e-04}, + {66,373,-4.84e-05}, + {67,67,8.29e-02}, + {67,51,-1.03e-02}, + {67,52,-1.03e-02}, + {67,53,-1.03e-02}, + {67,66,-1.03e-02}, + {67,68,-1.03e-02}, + {67,83,-1.03e-02}, + {67,84,-1.03e-02}, + {67,85,-1.03e-02}, + {67,340,-4.84e-05}, + {67,341,-1.93e-04}, + {67,342,-4.84e-05}, + {67,355,-1.93e-04}, + {67,356,-7.74e-04}, + {67,357,-1.93e-04}, + {67,372,-4.84e-05}, + {67,373,-1.93e-04}, + {67,374,-4.84e-05}, + {68,68,8.29e-02}, + {68,52,-1.03e-02}, + {68,53,-1.03e-02}, + {68,54,-1.03e-02}, + {68,67,-1.03e-02}, + {68,69,-1.03e-02}, + {68,84,-1.03e-02}, + {68,85,-1.03e-02}, + {68,86,-1.03e-02}, + {68,341,-4.84e-05}, + {68,342,-1.93e-04}, + {68,343,-4.84e-05}, + {68,356,-1.93e-04}, + {68,357,-7.74e-04}, + {68,358,-1.93e-04}, + {68,373,-4.84e-05}, + {68,374,-1.93e-04}, + {68,375,-4.84e-05}, + {69,69,8.29e-02}, + {69,53,-1.03e-02}, + {69,54,-1.03e-02}, + {69,55,-1.03e-02}, + {69,68,-1.03e-02}, + {69,70,-1.03e-02}, + {69,85,-1.03e-02}, + {69,86,-1.03e-02}, + {69,87,-1.03e-02}, + {69,342,-4.84e-05}, + {69,343,-1.93e-04}, + {69,344,-4.84e-05}, + {69,357,-1.93e-04}, + {69,358,-7.74e-04}, + {69,359,-1.93e-04}, + {69,374,-4.84e-05}, + {69,375,-1.93e-04}, + {69,376,-4.84e-05}, + {70,70,8.29e-02}, + {70,54,-1.03e-02}, + {70,55,-1.03e-02}, + {70,56,-1.03e-02}, + {70,69,-1.03e-02}, + {70,71,-1.03e-02}, + {70,86,-1.03e-02}, + {70,87,-1.03e-02}, + {70,88,-1.03e-02}, + {70,343,-4.84e-05}, + {70,344,-1.93e-04}, + {70,345,-4.84e-05}, + {70,358,-1.93e-04}, + {70,359,-7.74e-04}, + {70,360,-1.93e-04}, + {70,375,-4.84e-05}, + {70,376,-1.93e-04}, + {70,377,-4.84e-05}, + {71,71,8.29e-02}, + {71,55,-1.03e-02}, + {71,56,-1.03e-02}, + {71,57,-1.03e-02}, + {71,70,-1.03e-02}, + {71,72,-1.03e-02}, + {71,87,-1.03e-02}, + {71,88,-1.03e-02}, + {71,89,-1.03e-02}, + {71,344,-4.84e-05}, + {71,345,-1.93e-04}, + {71,346,-4.84e-05}, + {71,359,-1.93e-04}, + {71,360,-7.74e-04}, + {71,361,-1.93e-04}, + {71,376,-4.84e-05}, + {71,377,-1.93e-04}, + {71,378,-4.84e-05}, + {72,72,8.29e-02}, + {72,56,-1.03e-02}, + {72,57,-1.03e-02}, + {72,71,-1.03e-02}, + {72,73,-1.03e-02}, + {72,74,-1.03e-02}, + {72,88,-1.03e-02}, + {72,89,-1.03e-02}, + {72,90,-1.03e-02}, + {72,345,-4.84e-05}, + {72,346,-1.93e-04}, + {72,360,-1.93e-04}, + {72,361,-7.74e-04}, + {72,362,-1.93e-04}, + {72,363,-4.84e-05}, + {72,377,-4.84e-05}, + {72,378,-1.93e-04}, + {72,379,-4.84e-05}, + {73,73,8.29e-02}, + {73,57,-1.03e-02}, + {73,72,-1.03e-02}, + {73,74,-1.03e-02}, + {73,89,-1.03e-02}, + {73,90,-1.03e-02}, + {73,91,-1.03e-02}, + {73,92,-1.03e-02}, + {73,99,-1.03e-02}, + {73,346,-4.84e-05}, + {73,361,-1.93e-04}, + {73,362,-7.74e-04}, + {73,363,-1.93e-04}, + {73,378,-4.84e-05}, + {73,379,-1.93e-04}, + {73,380,-4.84e-05}, + {73,381,-1.93e-04}, + {73,388,-4.84e-05}, + {74,74,8.29e-02}, + {74,57,-1.03e-02}, + {74,58,-1.03e-02}, + {74,72,-1.03e-02}, + {74,73,-1.03e-02}, + {74,75,-1.03e-02}, + {74,92,-1.03e-02}, + {74,98,-1.03e-02}, + {74,99,-1.03e-02}, + {74,346,-1.93e-04}, + {74,347,-4.84e-05}, + {74,361,-4.84e-05}, + {74,362,-1.93e-04}, + {74,363,-7.74e-04}, + {74,364,-1.93e-04}, + {74,381,-4.84e-05}, + {74,387,-4.84e-05}, + {74,388,-1.93e-04}, + {75,75,8.29e-02}, + {75,57,-1.03e-02}, + {75,58,-1.03e-02}, + {75,59,-1.03e-02}, + {75,74,-1.03e-02}, + {75,76,-1.03e-02}, + {75,97,-1.03e-02}, + {75,98,-1.03e-02}, + {75,99,-1.03e-02}, + {75,346,-4.84e-05}, + {75,347,-1.93e-04}, + {75,348,-4.84e-05}, + {75,363,-1.93e-04}, + {75,364,-7.74e-04}, + {75,365,-1.93e-04}, + {75,386,-4.84e-05}, + {75,387,-1.93e-04}, + {75,388,-4.84e-05}, + {76,76,8.29e-02}, + {76,58,-1.03e-02}, + {76,59,-1.03e-02}, + {76,60,-1.03e-02}, + {76,75,-1.03e-02}, + {76,77,-1.03e-02}, + {76,96,-1.03e-02}, + {76,97,-1.03e-02}, + {76,98,-1.03e-02}, + {76,347,-4.84e-05}, + {76,348,-1.93e-04}, + {76,349,-4.84e-05}, + {76,364,-1.93e-04}, + {76,365,-7.74e-04}, + {76,366,-1.93e-04}, + {76,385,-4.84e-05}, + {76,386,-1.93e-04}, + {76,387,-4.84e-05}, + {77,77,8.29e-02}, + {77,59,-1.03e-02}, + {77,60,-1.03e-02}, + {77,61,-1.03e-02}, + {77,76,-1.03e-02}, + {77,78,-1.03e-02}, + {77,95,-1.03e-02}, + {77,96,-1.03e-02}, + {77,97,-1.03e-02}, + {77,348,-4.84e-05}, + {77,349,-1.93e-04}, + {77,350,-4.84e-05}, + {77,365,-1.93e-04}, + {77,366,-7.74e-04}, + {77,367,-1.93e-04}, + {77,384,-4.84e-05}, + {77,385,-1.93e-04}, + {77,386,-4.84e-05}, + {78,78,8.29e-02}, + {78,60,-1.03e-02}, + {78,61,-1.03e-02}, + {78,62,-1.03e-02}, + {78,77,-1.03e-02}, + {78,79,-1.03e-02}, + {78,94,-1.03e-02}, + {78,95,-1.03e-02}, + {78,96,-1.03e-02}, + {78,349,-4.84e-05}, + {78,350,-1.93e-04}, + {78,351,-4.84e-05}, + {78,366,-1.93e-04}, + {78,367,-7.74e-04}, + {78,368,-1.93e-04}, + {78,383,-4.84e-05}, + {78,384,-1.93e-04}, + {78,385,-4.84e-05}, + {79,79,8.29e-02}, + {79,61,-1.03e-02}, + {79,62,-1.03e-02}, + {79,63,-1.03e-02}, + {79,78,-1.03e-02}, + {79,80,-1.03e-02}, + {79,93,-1.03e-02}, + {79,94,-1.03e-02}, + {79,95,-1.03e-02}, + {79,350,-4.84e-05}, + {79,351,-1.93e-04}, + {79,352,-4.84e-05}, + {79,367,-1.93e-04}, + {79,368,-7.74e-04}, + {79,369,-1.93e-04}, + {79,382,-4.84e-05}, + {79,383,-1.93e-04}, + {79,384,-4.84e-05}, + {80,80,8.29e-02}, + {80,50,-1.03e-02}, + {80,62,-1.03e-02}, + {80,63,-1.03e-02}, + {80,65,-1.03e-02}, + {80,79,-1.03e-02}, + {80,82,-1.03e-02}, + {80,93,-1.03e-02}, + {80,94,-1.03e-02}, + {80,339,-4.84e-05}, + {80,351,-4.84e-05}, + {80,352,-1.93e-04}, + {80,354,-1.93e-04}, + {80,368,-1.93e-04}, + {80,369,-7.74e-04}, + {80,371,-4.84e-05}, + {80,382,-1.93e-04}, + {80,383,-4.84e-05}, + {81,81,2.08e-01}, + {81,64,3.65e-02}, + {81,66,-1.03e-02}, + {81,83,-1.03e-02}, + {81,100,3.65e-02}, + {81,102,-1.03e-02}, + {81,353,-9.67e-05}, + {81,355,-4.84e-05}, + {81,370,-3.87e-04}, + {81,372,-1.93e-04}, + {81,389,-9.67e-05}, + {81,391,-4.84e-05}, + {82,82,2.08e-01}, + {82,65,3.65e-02}, + {82,80,-1.03e-02}, + {82,93,-1.03e-02}, + {82,101,3.65e-02}, + {82,115,-1.03e-02}, + {82,354,-9.67e-05}, + {82,369,-4.84e-05}, + {82,371,-3.87e-04}, + {82,382,-1.93e-04}, + {82,390,-9.67e-05}, + {82,404,-4.84e-05}, + {83,83,8.29e-02}, + {83,64,-1.03e-02}, + {83,66,-1.03e-02}, + {83,67,-1.03e-02}, + {83,81,-1.03e-02}, + {83,84,-1.03e-02}, + {83,100,-1.03e-02}, + {83,102,-1.03e-02}, + {83,103,-1.03e-02}, + {83,353,-4.84e-05}, + {83,355,-1.93e-04}, + {83,356,-4.84e-05}, + {83,370,-1.93e-04}, + {83,372,-7.74e-04}, + {83,373,-1.93e-04}, + {83,389,-4.84e-05}, + {83,391,-1.93e-04}, + {83,392,-4.84e-05}, + {84,84,8.29e-02}, + {84,66,-1.03e-02}, + {84,67,-1.03e-02}, + {84,68,-1.03e-02}, + {84,83,-1.03e-02}, + {84,85,-1.03e-02}, + {84,102,-1.03e-02}, + {84,103,-1.03e-02}, + {84,104,-1.03e-02}, + {84,355,-4.84e-05}, + {84,356,-1.93e-04}, + {84,357,-4.84e-05}, + {84,372,-1.93e-04}, + {84,373,-7.74e-04}, + {84,374,-1.93e-04}, + {84,391,-4.84e-05}, + {84,392,-1.93e-04}, + {84,393,-4.84e-05}, + {85,85,8.29e-02}, + {85,67,-1.03e-02}, + {85,68,-1.03e-02}, + {85,69,-1.03e-02}, + {85,84,-1.03e-02}, + {85,86,-1.03e-02}, + {85,103,-1.03e-02}, + {85,104,-1.03e-02}, + {85,105,-1.03e-02}, + {85,356,-4.84e-05}, + {85,357,-1.93e-04}, + {85,358,-4.84e-05}, + {85,373,-1.93e-04}, + {85,374,-7.74e-04}, + {85,375,-1.93e-04}, + {85,392,-4.84e-05}, + {85,393,-1.93e-04}, + {85,394,-4.84e-05}, + {86,86,8.29e-02}, + {86,68,-1.03e-02}, + {86,69,-1.03e-02}, + {86,70,-1.03e-02}, + {86,85,-1.03e-02}, + {86,87,-1.03e-02}, + {86,104,-1.03e-02}, + {86,105,-1.03e-02}, + {86,106,-1.03e-02}, + {86,357,-4.84e-05}, + {86,358,-1.93e-04}, + {86,359,-4.84e-05}, + {86,374,-1.93e-04}, + {86,375,-7.74e-04}, + {86,376,-1.93e-04}, + {86,393,-4.84e-05}, + {86,394,-1.93e-04}, + {86,395,-4.84e-05}, + {87,87,8.29e-02}, + {87,69,-1.03e-02}, + {87,70,-1.03e-02}, + {87,71,-1.03e-02}, + {87,86,-1.03e-02}, + {87,88,-1.03e-02}, + {87,105,-1.03e-02}, + {87,106,-1.03e-02}, + {87,107,-1.03e-02}, + {87,358,-4.84e-05}, + {87,359,-1.93e-04}, + {87,360,-4.84e-05}, + {87,375,-1.93e-04}, + {87,376,-7.74e-04}, + {87,377,-1.93e-04}, + {87,394,-4.84e-05}, + {87,395,-1.93e-04}, + {87,396,-4.84e-05}, + {88,88,8.29e-02}, + {88,70,-1.03e-02}, + {88,71,-1.03e-02}, + {88,72,-1.03e-02}, + {88,87,-1.03e-02}, + {88,89,-1.03e-02}, + {88,106,-1.03e-02}, + {88,107,-1.03e-02}, + {88,108,-1.03e-02}, + {88,359,-4.84e-05}, + {88,360,-1.93e-04}, + {88,361,-4.84e-05}, + {88,376,-1.93e-04}, + {88,377,-7.74e-04}, + {88,378,-1.93e-04}, + {88,395,-4.84e-05}, + {88,396,-1.93e-04}, + {88,397,-4.84e-05}, + {89,89,8.29e-02}, + {89,71,-1.03e-02}, + {89,72,-1.03e-02}, + {89,73,-1.03e-02}, + {89,88,-1.03e-02}, + {89,90,-1.03e-02}, + {89,107,-1.03e-02}, + {89,108,-1.03e-02}, + {89,109,-1.03e-02}, + {89,360,-4.84e-05}, + {89,361,-1.93e-04}, + {89,362,-4.84e-05}, + {89,377,-1.93e-04}, + {89,378,-7.74e-04}, + {89,379,-1.93e-04}, + {89,396,-4.84e-05}, + {89,397,-1.93e-04}, + {89,398,-4.84e-05}, + {90,90,8.29e-02}, + {90,72,-1.03e-02}, + {90,73,-1.03e-02}, + {90,89,-1.03e-02}, + {90,91,-1.03e-02}, + {90,92,-1.03e-02}, + {90,108,-1.03e-02}, + {90,109,-1.03e-02}, + {90,110,-1.03e-02}, + {90,361,-4.84e-05}, + {90,362,-1.93e-04}, + {90,378,-1.93e-04}, + {90,379,-7.74e-04}, + {90,380,-1.93e-04}, + {90,381,-4.84e-05}, + {90,397,-4.84e-05}, + {90,398,-1.93e-04}, + {90,399,-4.84e-05}, + {91,91,8.29e-02}, + {91,73,-1.03e-02}, + {91,90,-1.03e-02}, + {91,92,-1.03e-02}, + {91,109,-1.03e-02}, + {91,110,-1.03e-02}, + {91,111,-1.03e-02}, + {91,112,-1.03e-02}, + {91,113,-1.03e-02}, + {91,362,-4.84e-05}, + {91,379,-1.93e-04}, + {91,380,-7.74e-04}, + {91,381,-1.93e-04}, + {91,398,-4.84e-05}, + {91,399,-1.93e-04}, + {91,400,-4.84e-05}, + {91,401,-1.93e-04}, + {91,402,-4.84e-05}, + {92,92,8.29e-02}, + {92,73,-1.03e-02}, + {92,74,-1.03e-02}, + {92,90,-1.03e-02}, + {92,91,-1.03e-02}, + {92,99,-1.03e-02}, + {92,112,-1.03e-02}, + {92,113,-1.03e-02}, + {92,120,-1.03e-02}, + {92,362,-1.93e-04}, + {92,363,-4.84e-05}, + {92,379,-4.84e-05}, + {92,380,-1.93e-04}, + {92,381,-7.74e-04}, + {92,388,-1.93e-04}, + {92,401,-4.84e-05}, + {92,402,-1.93e-04}, + {92,409,-4.84e-05}, + {93,93,8.29e-02}, + {93,65,-1.03e-02}, + {93,79,-1.03e-02}, + {93,80,-1.03e-02}, + {93,82,-1.03e-02}, + {93,94,-1.03e-02}, + {93,101,-1.03e-02}, + {93,114,-1.03e-02}, + {93,115,-1.03e-02}, + {93,354,-4.84e-05}, + {93,368,-4.84e-05}, + {93,369,-1.93e-04}, + {93,371,-1.93e-04}, + {93,382,-7.74e-04}, + {93,383,-1.93e-04}, + {93,390,-4.84e-05}, + {93,403,-4.84e-05}, + {93,404,-1.93e-04}, + {94,94,8.29e-02}, + {94,78,-1.03e-02}, + {94,79,-1.03e-02}, + {94,80,-1.03e-02}, + {94,93,-1.03e-02}, + {94,95,-1.03e-02}, + {94,114,-1.03e-02}, + {94,115,-1.03e-02}, + {94,117,-1.03e-02}, + {94,367,-4.84e-05}, + {94,368,-1.93e-04}, + {94,369,-4.84e-05}, + {94,382,-1.93e-04}, + {94,383,-7.74e-04}, + {94,384,-1.93e-04}, + {94,403,-1.93e-04}, + {94,404,-4.84e-05}, + {94,406,-4.84e-05}, + {95,95,8.29e-02}, + {95,77,-1.03e-02}, + {95,78,-1.03e-02}, + {95,79,-1.03e-02}, + {95,94,-1.03e-02}, + {95,96,-1.03e-02}, + {95,114,-1.03e-02}, + {95,116,-1.03e-02}, + {95,117,-1.03e-02}, + {95,366,-4.84e-05}, + {95,367,-1.93e-04}, + {95,368,-4.84e-05}, + {95,383,-1.93e-04}, + {95,384,-7.74e-04}, + {95,385,-1.93e-04}, + {95,403,-4.84e-05}, + {95,405,-4.84e-05}, + {95,406,-1.93e-04}, + {96,96,8.29e-02}, + {96,76,-1.03e-02}, + {96,77,-1.03e-02}, + {96,78,-1.03e-02}, + {96,95,-1.03e-02}, + {96,97,-1.03e-02}, + {96,116,-1.03e-02}, + {96,117,-1.03e-02}, + {96,119,-1.03e-02}, + {96,365,-4.84e-05}, + {96,366,-1.93e-04}, + {96,367,-4.84e-05}, + {96,384,-1.93e-04}, + {96,385,-7.74e-04}, + {96,386,-1.93e-04}, + {96,405,-1.93e-04}, + {96,406,-4.84e-05}, + {96,408,-4.84e-05}, + {97,97,8.29e-02}, + {97,75,-1.03e-02}, + {97,76,-1.03e-02}, + {97,77,-1.03e-02}, + {97,96,-1.03e-02}, + {97,98,-1.03e-02}, + {97,116,-1.03e-02}, + {97,118,-1.03e-02}, + {97,119,-1.03e-02}, + {97,364,-4.84e-05}, + {97,365,-1.93e-04}, + {97,366,-4.84e-05}, + {97,385,-1.93e-04}, + {97,386,-7.74e-04}, + {97,387,-1.93e-04}, + {97,405,-4.84e-05}, + {97,407,-4.84e-05}, + {97,408,-1.93e-04}, + {98,98,8.29e-02}, + {98,74,-1.03e-02}, + {98,75,-1.03e-02}, + {98,76,-1.03e-02}, + {98,97,-1.03e-02}, + {98,99,-1.03e-02}, + {98,118,-1.03e-02}, + {98,119,-1.03e-02}, + {98,120,-1.03e-02}, + {98,363,-4.84e-05}, + {98,364,-1.93e-04}, + {98,365,-4.84e-05}, + {98,386,-1.93e-04}, + {98,387,-7.74e-04}, + {98,388,-1.93e-04}, + {98,407,-1.93e-04}, + {98,408,-4.84e-05}, + {98,409,-4.84e-05}, + {99,99,8.29e-02}, + {99,73,-1.03e-02}, + {99,74,-1.03e-02}, + {99,75,-1.03e-02}, + {99,92,-1.03e-02}, + {99,98,-1.03e-02}, + {99,113,-1.03e-02}, + {99,118,-1.03e-02}, + {99,120,-1.03e-02}, + {99,362,-4.84e-05}, + {99,363,-1.93e-04}, + {99,364,-4.84e-05}, + {99,381,-1.93e-04}, + {99,387,-1.93e-04}, + {99,388,-7.74e-04}, + {99,402,-4.84e-05}, + {99,407,-4.84e-05}, + {99,409,-1.93e-04}, + {100,100,2.08e-01}, + {100,81,3.65e-02}, + {100,83,-1.03e-02}, + {100,102,-1.03e-02}, + {100,121,3.65e-02}, + {100,123,-1.03e-02}, + {100,370,-9.67e-05}, + {100,372,-4.84e-05}, + {100,389,-3.87e-04}, + {100,391,-1.93e-04}, + {100,410,-9.67e-05}, + {100,412,-4.84e-05}, + {101,101,2.08e-01}, + {101,82,3.65e-02}, + {101,93,-1.03e-02}, + {101,115,-1.03e-02}, + {101,122,3.65e-02}, + {101,140,-1.03e-02}, + {101,371,-9.67e-05}, + {101,382,-4.84e-05}, + {101,390,-3.87e-04}, + {101,404,-1.93e-04}, + {101,411,-9.67e-05}, + {101,429,-4.84e-05}, + {102,102,8.29e-02}, + {102,81,-1.03e-02}, + {102,83,-1.03e-02}, + {102,84,-1.03e-02}, + {102,100,-1.03e-02}, + {102,103,-1.03e-02}, + {102,121,-1.03e-02}, + {102,123,-1.03e-02}, + {102,124,-1.03e-02}, + {102,370,-4.84e-05}, + {102,372,-1.93e-04}, + {102,373,-4.84e-05}, + {102,389,-1.93e-04}, + {102,391,-7.74e-04}, + {102,392,-1.93e-04}, + {102,410,-4.84e-05}, + {102,412,-1.93e-04}, + {102,413,-4.84e-05}, + {103,103,8.29e-02}, + {103,83,-1.03e-02}, + {103,84,-1.03e-02}, + {103,85,-1.03e-02}, + {103,102,-1.03e-02}, + {103,104,-1.03e-02}, + {103,123,-1.03e-02}, + {103,124,-1.03e-02}, + {103,125,-1.03e-02}, + {103,372,-4.84e-05}, + {103,373,-1.93e-04}, + {103,374,-4.84e-05}, + {103,391,-1.93e-04}, + {103,392,-7.74e-04}, + {103,393,-1.93e-04}, + {103,412,-4.84e-05}, + {103,413,-1.93e-04}, + {103,414,-4.84e-05}, + {104,104,8.29e-02}, + {104,84,-1.03e-02}, + {104,85,-1.03e-02}, + {104,86,-1.03e-02}, + {104,103,-1.03e-02}, + {104,105,-1.03e-02}, + {104,124,-1.03e-02}, + {104,125,-1.03e-02}, + {104,126,-1.03e-02}, + {104,373,-4.84e-05}, + {104,374,-1.93e-04}, + {104,375,-4.84e-05}, + {104,392,-1.93e-04}, + {104,393,-7.74e-04}, + {104,394,-1.93e-04}, + {104,413,-4.84e-05}, + {104,414,-1.93e-04}, + {104,415,-4.84e-05}, + {105,105,8.29e-02}, + {105,85,-1.03e-02}, + {105,86,-1.03e-02}, + {105,87,-1.03e-02}, + {105,104,-1.03e-02}, + {105,106,-1.03e-02}, + {105,125,-1.03e-02}, + {105,126,-1.03e-02}, + {105,127,-1.03e-02}, + {105,374,-4.84e-05}, + {105,375,-1.93e-04}, + {105,376,-4.84e-05}, + {105,393,-1.93e-04}, + {105,394,-7.74e-04}, + {105,395,-1.93e-04}, + {105,414,-4.84e-05}, + {105,415,-1.93e-04}, + {105,416,-4.84e-05}, + {106,106,8.29e-02}, + {106,86,-1.03e-02}, + {106,87,-1.03e-02}, + {106,88,-1.03e-02}, + {106,105,-1.03e-02}, + {106,107,-1.03e-02}, + {106,126,-1.03e-02}, + {106,127,-1.03e-02}, + {106,128,-1.03e-02}, + {106,375,-4.84e-05}, + {106,376,-1.93e-04}, + {106,377,-4.84e-05}, + {106,394,-1.93e-04}, + {106,395,-7.74e-04}, + {106,396,-1.93e-04}, + {106,415,-4.84e-05}, + {106,416,-1.93e-04}, + {106,417,-4.84e-05}, + {107,107,8.29e-02}, + {107,87,-1.03e-02}, + {107,88,-1.03e-02}, + {107,89,-1.03e-02}, + {107,106,-1.03e-02}, + {107,108,-1.03e-02}, + {107,127,-1.03e-02}, + {107,128,-1.03e-02}, + {107,129,-1.03e-02}, + {107,376,-4.84e-05}, + {107,377,-1.93e-04}, + {107,378,-4.84e-05}, + {107,395,-1.93e-04}, + {107,396,-7.74e-04}, + {107,397,-1.93e-04}, + {107,416,-4.84e-05}, + {107,417,-1.93e-04}, + {107,418,-4.84e-05}, + {108,108,8.29e-02}, + {108,88,-1.03e-02}, + {108,89,-1.03e-02}, + {108,90,-1.03e-02}, + {108,107,-1.03e-02}, + {108,109,-1.03e-02}, + {108,128,-1.03e-02}, + {108,129,-1.03e-02}, + {108,130,-1.03e-02}, + {108,377,-4.84e-05}, + {108,378,-1.93e-04}, + {108,379,-4.84e-05}, + {108,396,-1.93e-04}, + {108,397,-7.74e-04}, + {108,398,-1.93e-04}, + {108,417,-4.84e-05}, + {108,418,-1.93e-04}, + {108,419,-4.84e-05}, + {109,109,8.29e-02}, + {109,89,-1.03e-02}, + {109,90,-1.03e-02}, + {109,91,-1.03e-02}, + {109,108,-1.03e-02}, + {109,110,-1.03e-02}, + {109,129,-1.03e-02}, + {109,130,-1.03e-02}, + {109,131,-1.03e-02}, + {109,378,-4.84e-05}, + {109,379,-1.93e-04}, + {109,380,-4.84e-05}, + {109,397,-1.93e-04}, + {109,398,-7.74e-04}, + {109,399,-1.93e-04}, + {109,418,-4.84e-05}, + {109,419,-1.93e-04}, + {109,420,-4.84e-05}, + {110,110,8.29e-02}, + {110,90,-1.03e-02}, + {110,91,-1.03e-02}, + {110,109,-1.03e-02}, + {110,111,-1.03e-02}, + {110,112,-1.03e-02}, + {110,130,-1.03e-02}, + {110,131,-1.03e-02}, + {110,132,-1.03e-02}, + {110,379,-4.84e-05}, + {110,380,-1.93e-04}, + {110,398,-1.93e-04}, + {110,399,-7.74e-04}, + {110,400,-1.93e-04}, + {110,401,-4.84e-05}, + {110,419,-4.84e-05}, + {110,420,-1.93e-04}, + {110,421,-4.84e-05}, + {111,111,8.29e-02}, + {111,91,-1.03e-02}, + {111,110,-1.03e-02}, + {111,112,-1.03e-02}, + {111,131,-1.03e-02}, + {111,132,-1.03e-02}, + {111,133,-1.03e-02}, + {111,134,-1.03e-02}, + {111,135,-1.03e-02}, + {111,380,-4.84e-05}, + {111,399,-1.93e-04}, + {111,400,-7.74e-04}, + {111,401,-1.93e-04}, + {111,420,-4.84e-05}, + {111,421,-1.93e-04}, + {111,422,-4.84e-05}, + {111,423,-1.93e-04}, + {111,424,-4.84e-05}, + {112,112,8.29e-02}, + {112,91,-1.03e-02}, + {112,92,-1.03e-02}, + {112,110,-1.03e-02}, + {112,111,-1.03e-02}, + {112,113,-1.03e-02}, + {112,134,-1.03e-02}, + {112,135,-1.03e-02}, + {112,136,-1.03e-02}, + {112,380,-1.93e-04}, + {112,381,-4.84e-05}, + {112,399,-4.84e-05}, + {112,400,-1.93e-04}, + {112,401,-7.74e-04}, + {112,402,-1.93e-04}, + {112,423,-4.84e-05}, + {112,424,-1.93e-04}, + {112,425,-4.84e-05}, + {113,113,8.29e-02}, + {113,91,-1.03e-02}, + {113,92,-1.03e-02}, + {113,99,-1.03e-02}, + {113,112,-1.03e-02}, + {113,120,-1.03e-02}, + {113,135,-1.03e-02}, + {113,136,-1.03e-02}, + {113,141,-1.03e-02}, + {113,380,-4.84e-05}, + {113,381,-1.93e-04}, + {113,388,-4.84e-05}, + {113,401,-1.93e-04}, + {113,402,-7.74e-04}, + {113,409,-1.93e-04}, + {113,424,-4.84e-05}, + {113,425,-1.93e-04}, + {113,430,-4.84e-05}, + {114,114,8.29e-02}, + {114,93,-1.03e-02}, + {114,94,-1.03e-02}, + {114,95,-1.03e-02}, + {114,115,-1.03e-02}, + {114,117,-1.03e-02}, + {114,137,-1.03e-02}, + {114,138,-1.03e-02}, + {114,140,-1.03e-02}, + {114,382,-4.84e-05}, + {114,383,-1.93e-04}, + {114,384,-4.84e-05}, + {114,403,-7.74e-04}, + {114,404,-1.93e-04}, + {114,406,-1.93e-04}, + {114,426,-4.84e-05}, + {114,427,-1.93e-04}, + {114,429,-4.84e-05}, + {115,115,8.29e-02}, + {115,82,-1.03e-02}, + {115,93,-1.03e-02}, + {115,94,-1.03e-02}, + {115,101,-1.03e-02}, + {115,114,-1.03e-02}, + {115,122,-1.03e-02}, + {115,138,-1.03e-02}, + {115,140,-1.03e-02}, + {115,371,-4.84e-05}, + {115,382,-1.93e-04}, + {115,383,-4.84e-05}, + {115,390,-1.93e-04}, + {115,403,-1.93e-04}, + {115,404,-7.74e-04}, + {115,411,-4.84e-05}, + {115,427,-4.84e-05}, + {115,429,-1.93e-04}, + {116,116,8.29e-02}, + {116,95,-1.03e-02}, + {116,96,-1.03e-02}, + {116,97,-1.03e-02}, + {116,117,-1.03e-02}, + {116,119,-1.03e-02}, + {116,137,-1.03e-02}, + {116,139,-1.03e-02}, + {116,143,-1.03e-02}, + {116,384,-4.84e-05}, + {116,385,-1.93e-04}, + {116,386,-4.84e-05}, + {116,405,-7.74e-04}, + {116,406,-1.93e-04}, + {116,408,-1.93e-04}, + {116,426,-4.84e-05}, + {116,428,-1.93e-04}, + {116,432,-4.84e-05}, + {117,117,8.29e-02}, + {117,94,-1.03e-02}, + {117,95,-1.03e-02}, + {117,96,-1.03e-02}, + {117,114,-1.03e-02}, + {117,116,-1.03e-02}, + {117,137,-1.03e-02}, + {117,138,-1.03e-02}, + {117,139,-1.03e-02}, + {117,383,-4.84e-05}, + {117,384,-1.93e-04}, + {117,385,-4.84e-05}, + {117,403,-1.93e-04}, + {117,405,-1.93e-04}, + {117,406,-7.74e-04}, + {117,426,-1.93e-04}, + {117,427,-4.84e-05}, + {117,428,-4.84e-05}, + {118,118,8.29e-02}, + {118,97,-1.03e-02}, + {118,98,-1.03e-02}, + {118,99,-1.03e-02}, + {118,119,-1.03e-02}, + {118,120,-1.03e-02}, + {118,141,-1.03e-02}, + {118,142,-1.03e-02}, + {118,143,-1.03e-02}, + {118,386,-4.84e-05}, + {118,387,-1.93e-04}, + {118,388,-4.84e-05}, + {118,407,-7.74e-04}, + {118,408,-1.93e-04}, + {118,409,-1.93e-04}, + {118,430,-4.84e-05}, + {118,431,-1.93e-04}, + {118,432,-4.84e-05}, + {119,119,8.29e-02}, + {119,96,-1.03e-02}, + {119,97,-1.03e-02}, + {119,98,-1.03e-02}, + {119,116,-1.03e-02}, + {119,118,-1.03e-02}, + {119,139,-1.03e-02}, + {119,142,-1.03e-02}, + {119,143,-1.03e-02}, + {119,385,-4.84e-05}, + {119,386,-1.93e-04}, + {119,387,-4.84e-05}, + {119,405,-1.93e-04}, + {119,407,-1.93e-04}, + {119,408,-7.74e-04}, + {119,428,-4.84e-05}, + {119,431,-4.84e-05}, + {119,432,-1.93e-04}, + {120,120,8.29e-02}, + {120,92,-1.03e-02}, + {120,98,-1.03e-02}, + {120,99,-1.03e-02}, + {120,113,-1.03e-02}, + {120,118,-1.03e-02}, + {120,136,-1.03e-02}, + {120,141,-1.03e-02}, + {120,142,-1.03e-02}, + {120,381,-4.84e-05}, + {120,387,-4.84e-05}, + {120,388,-1.93e-04}, + {120,402,-1.93e-04}, + {120,407,-1.93e-04}, + {120,409,-7.74e-04}, + {120,425,-4.84e-05}, + {120,430,-1.93e-04}, + {120,431,-4.84e-05}, + {121,121,2.08e-01}, + {121,100,3.65e-02}, + {121,102,-1.03e-02}, + {121,123,-1.03e-02}, + {121,144,3.65e-02}, + {121,146,-1.03e-02}, + {121,389,-9.67e-05}, + {121,391,-4.84e-05}, + {121,410,-3.87e-04}, + {121,412,-1.93e-04}, + {121,433,-9.67e-05}, + {121,435,-4.84e-05}, + {122,122,2.08e-01}, + {122,101,3.65e-02}, + {122,115,-1.03e-02}, + {122,140,-1.03e-02}, + {122,145,3.65e-02}, + {122,165,-1.03e-02}, + {122,390,-9.67e-05}, + {122,404,-4.84e-05}, + {122,411,-3.87e-04}, + {122,429,-1.93e-04}, + {122,434,-9.67e-05}, + {122,454,-4.84e-05}, + {123,123,8.29e-02}, + {123,100,-1.03e-02}, + {123,102,-1.03e-02}, + {123,103,-1.03e-02}, + {123,121,-1.03e-02}, + {123,124,-1.03e-02}, + {123,144,-1.03e-02}, + {123,146,-1.03e-02}, + {123,147,-1.03e-02}, + {123,389,-4.84e-05}, + {123,391,-1.93e-04}, + {123,392,-4.84e-05}, + {123,410,-1.93e-04}, + {123,412,-7.74e-04}, + {123,413,-1.93e-04}, + {123,433,-4.84e-05}, + {123,435,-1.93e-04}, + {123,436,-4.84e-05}, + {124,124,8.29e-02}, + {124,102,-1.03e-02}, + {124,103,-1.03e-02}, + {124,104,-1.03e-02}, + {124,123,-1.03e-02}, + {124,125,-1.03e-02}, + {124,146,-1.03e-02}, + {124,147,-1.03e-02}, + {124,148,-1.03e-02}, + {124,391,-4.84e-05}, + {124,392,-1.93e-04}, + {124,393,-4.84e-05}, + {124,412,-1.93e-04}, + {124,413,-7.74e-04}, + {124,414,-1.93e-04}, + {124,435,-4.84e-05}, + {124,436,-1.93e-04}, + {124,437,-4.84e-05}, + {125,125,8.29e-02}, + {125,103,-1.03e-02}, + {125,104,-1.03e-02}, + {125,105,-1.03e-02}, + {125,124,-1.03e-02}, + {125,126,-1.03e-02}, + {125,147,-1.03e-02}, + {125,148,-1.03e-02}, + {125,149,-1.03e-02}, + {125,392,-4.84e-05}, + {125,393,-1.93e-04}, + {125,394,-4.84e-05}, + {125,413,-1.93e-04}, + {125,414,-7.74e-04}, + {125,415,-1.93e-04}, + {125,436,-4.84e-05}, + {125,437,-1.93e-04}, + {125,438,-4.84e-05}, + {126,126,8.29e-02}, + {126,104,-1.03e-02}, + {126,105,-1.03e-02}, + {126,106,-1.03e-02}, + {126,125,-1.03e-02}, + {126,127,-1.03e-02}, + {126,148,-1.03e-02}, + {126,149,-1.03e-02}, + {126,150,-1.03e-02}, + {126,393,-4.84e-05}, + {126,394,-1.93e-04}, + {126,395,-4.84e-05}, + {126,414,-1.93e-04}, + {126,415,-7.74e-04}, + {126,416,-1.93e-04}, + {126,437,-4.84e-05}, + {126,438,-1.93e-04}, + {126,439,-4.84e-05}, + {127,127,8.29e-02}, + {127,105,-1.03e-02}, + {127,106,-1.03e-02}, + {127,107,-1.03e-02}, + {127,126,-1.03e-02}, + {127,128,-1.03e-02}, + {127,149,-1.03e-02}, + {127,150,-1.03e-02}, + {127,151,-1.03e-02}, + {127,394,-4.84e-05}, + {127,395,-1.93e-04}, + {127,396,-4.84e-05}, + {127,415,-1.93e-04}, + {127,416,-7.74e-04}, + {127,417,-1.93e-04}, + {127,438,-4.84e-05}, + {127,439,-1.93e-04}, + {127,440,-4.84e-05}, + {128,128,8.29e-02}, + {128,106,-1.03e-02}, + {128,107,-1.03e-02}, + {128,108,-1.03e-02}, + {128,127,-1.03e-02}, + {128,129,-1.03e-02}, + {128,150,-1.03e-02}, + {128,151,-1.03e-02}, + {128,152,-1.03e-02}, + {128,395,-4.84e-05}, + {128,396,-1.93e-04}, + {128,397,-4.84e-05}, + {128,416,-1.93e-04}, + {128,417,-7.74e-04}, + {128,418,-1.93e-04}, + {128,439,-4.84e-05}, + {128,440,-1.93e-04}, + {128,441,-4.84e-05}, + {129,129,8.29e-02}, + {129,107,-1.03e-02}, + {129,108,-1.03e-02}, + {129,109,-1.03e-02}, + {129,128,-1.03e-02}, + {129,130,-1.03e-02}, + {129,151,-1.03e-02}, + {129,152,-1.03e-02}, + {129,153,-1.03e-02}, + {129,396,-4.84e-05}, + {129,397,-1.93e-04}, + {129,398,-4.84e-05}, + {129,417,-1.93e-04}, + {129,418,-7.74e-04}, + {129,419,-1.93e-04}, + {129,440,-4.84e-05}, + {129,441,-1.93e-04}, + {129,442,-4.84e-05}, + {130,130,8.29e-02}, + {130,108,-1.03e-02}, + {130,109,-1.03e-02}, + {130,110,-1.03e-02}, + {130,129,-1.03e-02}, + {130,131,-1.03e-02}, + {130,152,-1.03e-02}, + {130,153,-1.03e-02}, + {130,154,-1.03e-02}, + {130,397,-4.84e-05}, + {130,398,-1.93e-04}, + {130,399,-4.84e-05}, + {130,418,-1.93e-04}, + {130,419,-7.74e-04}, + {130,420,-1.93e-04}, + {130,441,-4.84e-05}, + {130,442,-1.93e-04}, + {130,443,-4.84e-05}, + {131,131,8.29e-02}, + {131,109,-1.03e-02}, + {131,110,-1.03e-02}, + {131,111,-1.03e-02}, + {131,130,-1.03e-02}, + {131,132,-1.03e-02}, + {131,153,-1.03e-02}, + {131,154,-1.03e-02}, + {131,155,-1.03e-02}, + {131,398,-4.84e-05}, + {131,399,-1.93e-04}, + {131,400,-4.84e-05}, + {131,419,-1.93e-04}, + {131,420,-7.74e-04}, + {131,421,-1.93e-04}, + {131,442,-4.84e-05}, + {131,443,-1.93e-04}, + {131,444,-4.84e-05}, + {132,132,8.29e-02}, + {132,110,-1.03e-02}, + {132,111,-1.03e-02}, + {132,131,-1.03e-02}, + {132,133,-1.03e-02}, + {132,134,-1.03e-02}, + {132,154,-1.03e-02}, + {132,155,-1.03e-02}, + {132,156,-1.03e-02}, + {132,399,-4.84e-05}, + {132,400,-1.93e-04}, + {132,420,-1.93e-04}, + {132,421,-7.74e-04}, + {132,422,-1.93e-04}, + {132,423,-4.84e-05}, + {132,443,-4.84e-05}, + {132,444,-1.93e-04}, + {132,445,-4.84e-05}, + {133,133,8.29e-02}, + {133,111,-1.03e-02}, + {133,132,-1.03e-02}, + {133,134,-1.03e-02}, + {133,155,-1.03e-02}, + {133,156,-1.03e-02}, + {133,157,-1.03e-02}, + {133,158,-1.03e-02}, + {133,159,-1.03e-02}, + {133,400,-4.84e-05}, + {133,421,-1.93e-04}, + {133,422,-7.74e-04}, + {133,423,-1.93e-04}, + {133,444,-4.84e-05}, + {133,445,-1.93e-04}, + {133,446,-4.84e-05}, + {133,447,-1.93e-04}, + {133,448,-4.84e-05}, + {134,134,8.29e-02}, + {134,111,-1.03e-02}, + {134,112,-1.03e-02}, + {134,132,-1.03e-02}, + {134,133,-1.03e-02}, + {134,135,-1.03e-02}, + {134,158,-1.03e-02}, + {134,159,-1.03e-02}, + {134,160,-1.03e-02}, + {134,400,-1.93e-04}, + {134,401,-4.84e-05}, + {134,421,-4.84e-05}, + {134,422,-1.93e-04}, + {134,423,-7.74e-04}, + {134,424,-1.93e-04}, + {134,447,-4.84e-05}, + {134,448,-1.93e-04}, + {134,449,-4.84e-05}, + {135,135,8.29e-02}, + {135,111,-1.03e-02}, + {135,112,-1.03e-02}, + {135,113,-1.03e-02}, + {135,134,-1.03e-02}, + {135,136,-1.03e-02}, + {135,159,-1.03e-02}, + {135,160,-1.03e-02}, + {135,161,-1.03e-02}, + {135,400,-4.84e-05}, + {135,401,-1.93e-04}, + {135,402,-4.84e-05}, + {135,423,-1.93e-04}, + {135,424,-7.74e-04}, + {135,425,-1.93e-04}, + {135,448,-4.84e-05}, + {135,449,-1.93e-04}, + {135,450,-4.84e-05}, + {136,136,8.29e-02}, + {136,112,-1.03e-02}, + {136,113,-1.03e-02}, + {136,120,-1.03e-02}, + {136,135,-1.03e-02}, + {136,141,-1.03e-02}, + {136,160,-1.03e-02}, + {136,161,-1.03e-02}, + {136,166,-1.03e-02}, + {136,401,-4.84e-05}, + {136,402,-1.93e-04}, + {136,409,-4.84e-05}, + {136,424,-1.93e-04}, + {136,425,-7.74e-04}, + {136,430,-1.93e-04}, + {136,449,-4.84e-05}, + {136,450,-1.93e-04}, + {136,455,-4.84e-05}, + {137,137,8.29e-02}, + {137,114,-1.03e-02}, + {137,116,-1.03e-02}, + {137,117,-1.03e-02}, + {137,138,-1.03e-02}, + {137,139,-1.03e-02}, + {137,162,-1.03e-02}, + {137,163,-1.03e-02}, + {137,164,-1.03e-02}, + {137,403,-4.84e-05}, + {137,405,-4.84e-05}, + {137,406,-1.93e-04}, + {137,426,-7.74e-04}, + {137,427,-1.93e-04}, + {137,428,-1.93e-04}, + {137,451,-4.84e-05}, + {137,452,-1.93e-04}, + {137,453,-4.84e-05}, + {138,138,8.29e-02}, + {138,114,-1.03e-02}, + {138,115,-1.03e-02}, + {138,117,-1.03e-02}, + {138,137,-1.03e-02}, + {138,140,-1.03e-02}, + {138,163,-1.03e-02}, + {138,164,-1.03e-02}, + {138,165,-1.03e-02}, + {138,403,-1.93e-04}, + {138,404,-4.84e-05}, + {138,406,-4.84e-05}, + {138,426,-1.93e-04}, + {138,427,-7.74e-04}, + {138,429,-1.93e-04}, + {138,452,-4.84e-05}, + {138,453,-1.93e-04}, + {138,454,-4.84e-05}, + {139,139,8.29e-02}, + {139,116,-1.03e-02}, + {139,117,-1.03e-02}, + {139,119,-1.03e-02}, + {139,137,-1.03e-02}, + {139,143,-1.03e-02}, + {139,162,-1.03e-02}, + {139,163,-1.03e-02}, + {139,168,-1.03e-02}, + {139,405,-1.93e-04}, + {139,406,-4.84e-05}, + {139,408,-4.84e-05}, + {139,426,-1.93e-04}, + {139,428,-7.74e-04}, + {139,432,-1.93e-04}, + {139,451,-1.93e-04}, + {139,452,-4.84e-05}, + {139,457,-4.84e-05}, + {140,140,8.29e-02}, + {140,101,-1.03e-02}, + {140,114,-1.03e-02}, + {140,115,-1.03e-02}, + {140,122,-1.03e-02}, + {140,138,-1.03e-02}, + {140,145,-1.03e-02}, + {140,164,-1.03e-02}, + {140,165,-1.03e-02}, + {140,390,-4.84e-05}, + {140,403,-4.84e-05}, + {140,404,-1.93e-04}, + {140,411,-1.93e-04}, + {140,427,-1.93e-04}, + {140,429,-7.74e-04}, + {140,434,-4.84e-05}, + {140,453,-4.84e-05}, + {140,454,-1.93e-04}, + {141,141,8.29e-02}, + {141,113,-1.03e-02}, + {141,118,-1.03e-02}, + {141,120,-1.03e-02}, + {141,136,-1.03e-02}, + {141,142,-1.03e-02}, + {141,161,-1.03e-02}, + {141,166,-1.03e-02}, + {141,167,-1.03e-02}, + {141,402,-4.84e-05}, + {141,407,-4.84e-05}, + {141,409,-1.93e-04}, + {141,425,-1.93e-04}, + {141,430,-7.74e-04}, + {141,431,-1.93e-04}, + {141,450,-4.84e-05}, + {141,455,-1.93e-04}, + {141,456,-4.84e-05}, + {142,142,8.29e-02}, + {142,118,-1.03e-02}, + {142,119,-1.03e-02}, + {142,120,-1.03e-02}, + {142,141,-1.03e-02}, + {142,143,-1.03e-02}, + {142,166,-1.03e-02}, + {142,167,-1.03e-02}, + {142,168,-1.03e-02}, + {142,407,-1.93e-04}, + {142,408,-4.84e-05}, + {142,409,-4.84e-05}, + {142,430,-1.93e-04}, + {142,431,-7.74e-04}, + {142,432,-1.93e-04}, + {142,455,-4.84e-05}, + {142,456,-1.93e-04}, + {142,457,-4.84e-05}, + {143,143,8.29e-02}, + {143,116,-1.03e-02}, + {143,118,-1.03e-02}, + {143,119,-1.03e-02}, + {143,139,-1.03e-02}, + {143,142,-1.03e-02}, + {143,162,-1.03e-02}, + {143,167,-1.03e-02}, + {143,168,-1.03e-02}, + {143,405,-4.84e-05}, + {143,407,-4.84e-05}, + {143,408,-1.93e-04}, + {143,428,-1.93e-04}, + {143,431,-1.93e-04}, + {143,432,-7.74e-04}, + {143,451,-4.84e-05}, + {143,456,-4.84e-05}, + {143,457,-1.93e-04}, + {144,144,2.08e-01}, + {144,121,3.65e-02}, + {144,123,-1.03e-02}, + {144,146,-1.03e-02}, + {144,169,3.65e-02}, + {144,171,-1.03e-02}, + {144,410,-9.67e-05}, + {144,412,-4.84e-05}, + {144,433,-3.87e-04}, + {144,435,-1.93e-04}, + {144,458,-9.67e-05}, + {144,460,-4.84e-05}, + {145,145,2.08e-01}, + {145,122,3.65e-02}, + {145,140,-1.03e-02}, + {145,165,-1.03e-02}, + {145,170,3.65e-02}, + {145,193,-1.03e-02}, + {145,411,-9.67e-05}, + {145,429,-4.84e-05}, + {145,434,-3.87e-04}, + {145,454,-1.93e-04}, + {145,459,-9.67e-05}, + {145,482,-4.84e-05}, + {146,146,8.29e-02}, + {146,121,-1.03e-02}, + {146,123,-1.03e-02}, + {146,124,-1.03e-02}, + {146,144,-1.03e-02}, + {146,147,-1.03e-02}, + {146,169,-1.03e-02}, + {146,171,-1.03e-02}, + {146,172,-1.03e-02}, + {146,410,-4.84e-05}, + {146,412,-1.93e-04}, + {146,413,-4.84e-05}, + {146,433,-1.93e-04}, + {146,435,-7.74e-04}, + {146,436,-1.93e-04}, + {146,458,-4.84e-05}, + {146,460,-1.93e-04}, + {146,461,-4.84e-05}, + {147,147,8.29e-02}, + {147,123,-1.03e-02}, + {147,124,-1.03e-02}, + {147,125,-1.03e-02}, + {147,146,-1.03e-02}, + {147,148,-1.03e-02}, + {147,171,-1.03e-02}, + {147,172,-1.03e-02}, + {147,173,-1.03e-02}, + {147,412,-4.84e-05}, + {147,413,-1.93e-04}, + {147,414,-4.84e-05}, + {147,435,-1.93e-04}, + {147,436,-7.74e-04}, + {147,437,-1.93e-04}, + {147,460,-4.84e-05}, + {147,461,-1.93e-04}, + {147,462,-4.84e-05}, + {148,148,8.29e-02}, + {148,124,-1.03e-02}, + {148,125,-1.03e-02}, + {148,126,-1.03e-02}, + {148,147,-1.03e-02}, + {148,149,-1.03e-02}, + {148,172,-1.03e-02}, + {148,173,-1.03e-02}, + {148,174,-1.03e-02}, + {148,413,-4.84e-05}, + {148,414,-1.93e-04}, + {148,415,-4.84e-05}, + {148,436,-1.93e-04}, + {148,437,-7.74e-04}, + {148,438,-1.93e-04}, + {148,461,-4.84e-05}, + {148,462,-1.93e-04}, + {148,463,-4.84e-05}, + {149,149,8.29e-02}, + {149,125,-1.03e-02}, + {149,126,-1.03e-02}, + {149,127,-1.03e-02}, + {149,148,-1.03e-02}, + {149,150,-1.03e-02}, + {149,173,-1.03e-02}, + {149,174,-1.03e-02}, + {149,175,-1.03e-02}, + {149,414,-4.84e-05}, + {149,415,-1.93e-04}, + {149,416,-4.84e-05}, + {149,437,-1.93e-04}, + {149,438,-7.74e-04}, + {149,439,-1.93e-04}, + {149,462,-4.84e-05}, + {149,463,-1.93e-04}, + {149,464,-4.84e-05}, + {150,150,8.29e-02}, + {150,126,-1.03e-02}, + {150,127,-1.03e-02}, + {150,128,-1.03e-02}, + {150,149,-1.03e-02}, + {150,151,-1.03e-02}, + {150,174,-1.03e-02}, + {150,175,-1.03e-02}, + {150,176,-1.03e-02}, + {150,415,-4.84e-05}, + {150,416,-1.93e-04}, + {150,417,-4.84e-05}, + {150,438,-1.93e-04}, + {150,439,-7.74e-04}, + {150,440,-1.93e-04}, + {150,463,-4.84e-05}, + {150,464,-1.93e-04}, + {150,465,-4.84e-05}, + {151,151,8.29e-02}, + {151,127,-1.03e-02}, + {151,128,-1.03e-02}, + {151,129,-1.03e-02}, + {151,150,-1.03e-02}, + {151,152,-1.03e-02}, + {151,175,-1.03e-02}, + {151,176,-1.03e-02}, + {151,177,-1.03e-02}, + {151,416,-4.84e-05}, + {151,417,-1.93e-04}, + {151,418,-4.84e-05}, + {151,439,-1.93e-04}, + {151,440,-7.74e-04}, + {151,441,-1.93e-04}, + {151,464,-4.84e-05}, + {151,465,-1.93e-04}, + {151,466,-4.84e-05}, + {152,152,8.29e-02}, + {152,128,-1.03e-02}, + {152,129,-1.03e-02}, + {152,130,-1.03e-02}, + {152,151,-1.03e-02}, + {152,153,-1.03e-02}, + {152,176,-1.03e-02}, + {152,177,-1.03e-02}, + {152,178,-1.03e-02}, + {152,417,-4.84e-05}, + {152,418,-1.93e-04}, + {152,419,-4.84e-05}, + {152,440,-1.93e-04}, + {152,441,-7.74e-04}, + {152,442,-1.93e-04}, + {152,465,-4.84e-05}, + {152,466,-1.93e-04}, + {152,467,-4.84e-05}, + {153,153,8.29e-02}, + {153,129,-1.03e-02}, + {153,130,-1.03e-02}, + {153,131,-1.03e-02}, + {153,152,-1.03e-02}, + {153,154,-1.03e-02}, + {153,177,-1.03e-02}, + {153,178,-1.03e-02}, + {153,179,-1.03e-02}, + {153,418,-4.84e-05}, + {153,419,-1.93e-04}, + {153,420,-4.84e-05}, + {153,441,-1.93e-04}, + {153,442,-7.74e-04}, + {153,443,-1.93e-04}, + {153,466,-4.84e-05}, + {153,467,-1.93e-04}, + {153,468,-4.84e-05}, + {154,154,8.29e-02}, + {154,130,-1.03e-02}, + {154,131,-1.03e-02}, + {154,132,-1.03e-02}, + {154,153,-1.03e-02}, + {154,155,-1.03e-02}, + {154,178,-1.03e-02}, + {154,179,-1.03e-02}, + {154,180,-1.03e-02}, + {154,419,-4.84e-05}, + {154,420,-1.93e-04}, + {154,421,-4.84e-05}, + {154,442,-1.93e-04}, + {154,443,-7.74e-04}, + {154,444,-1.93e-04}, + {154,467,-4.84e-05}, + {154,468,-1.93e-04}, + {154,469,-4.84e-05}, + {155,155,8.29e-02}, + {155,131,-1.03e-02}, + {155,132,-1.03e-02}, + {155,133,-1.03e-02}, + {155,154,-1.03e-02}, + {155,156,-1.03e-02}, + {155,179,-1.03e-02}, + {155,180,-1.03e-02}, + {155,181,-1.03e-02}, + {155,420,-4.84e-05}, + {155,421,-1.93e-04}, + {155,422,-4.84e-05}, + {155,443,-1.93e-04}, + {155,444,-7.74e-04}, + {155,445,-1.93e-04}, + {155,468,-4.84e-05}, + {155,469,-1.93e-04}, + {155,470,-4.84e-05}, + {156,156,8.29e-02}, + {156,132,-1.03e-02}, + {156,133,-1.03e-02}, + {156,155,-1.03e-02}, + {156,157,-1.03e-02}, + {156,158,-1.03e-02}, + {156,180,-1.03e-02}, + {156,181,-1.03e-02}, + {156,182,-1.03e-02}, + {156,421,-4.84e-05}, + {156,422,-1.93e-04}, + {156,444,-1.93e-04}, + {156,445,-7.74e-04}, + {156,446,-1.93e-04}, + {156,447,-4.84e-05}, + {156,469,-4.84e-05}, + {156,470,-1.93e-04}, + {156,471,-4.84e-05}, + {157,157,8.29e-02}, + {157,133,-1.03e-02}, + {157,156,-1.03e-02}, + {157,158,-1.03e-02}, + {157,181,-1.03e-02}, + {157,182,-1.03e-02}, + {157,183,-1.03e-02}, + {157,184,-1.03e-02}, + {157,188,-1.03e-02}, + {157,422,-4.84e-05}, + {157,445,-1.93e-04}, + {157,446,-7.74e-04}, + {157,447,-1.93e-04}, + {157,470,-4.84e-05}, + {157,471,-1.93e-04}, + {157,472,-4.84e-05}, + {157,473,-1.93e-04}, + {157,477,-4.84e-05}, + {158,158,8.29e-02}, + {158,133,-1.03e-02}, + {158,134,-1.03e-02}, + {158,156,-1.03e-02}, + {158,157,-1.03e-02}, + {158,159,-1.03e-02}, + {158,184,-1.03e-02}, + {158,187,-1.03e-02}, + {158,188,-1.03e-02}, + {158,422,-1.93e-04}, + {158,423,-4.84e-05}, + {158,445,-4.84e-05}, + {158,446,-1.93e-04}, + {158,447,-7.74e-04}, + {158,448,-1.93e-04}, + {158,473,-4.84e-05}, + {158,476,-4.84e-05}, + {158,477,-1.93e-04}, + {159,159,8.29e-02}, + {159,133,-1.03e-02}, + {159,134,-1.03e-02}, + {159,135,-1.03e-02}, + {159,158,-1.03e-02}, + {159,160,-1.03e-02}, + {159,185,-1.03e-02}, + {159,187,-1.03e-02}, + {159,188,-1.03e-02}, + {159,422,-4.84e-05}, + {159,423,-1.93e-04}, + {159,424,-4.84e-05}, + {159,447,-1.93e-04}, + {159,448,-7.74e-04}, + {159,449,-1.93e-04}, + {159,474,-4.84e-05}, + {159,476,-1.93e-04}, + {159,477,-4.84e-05}, + {160,160,8.29e-02}, + {160,134,-1.03e-02}, + {160,135,-1.03e-02}, + {160,136,-1.03e-02}, + {160,159,-1.03e-02}, + {160,161,-1.03e-02}, + {160,185,-1.03e-02}, + {160,186,-1.03e-02}, + {160,187,-1.03e-02}, + {160,423,-4.84e-05}, + {160,424,-1.93e-04}, + {160,425,-4.84e-05}, + {160,448,-1.93e-04}, + {160,449,-7.74e-04}, + {160,450,-1.93e-04}, + {160,474,-1.93e-04}, + {160,475,-4.84e-05}, + {160,476,-4.84e-05}, + {161,161,8.29e-02}, + {161,135,-1.03e-02}, + {161,136,-1.03e-02}, + {161,141,-1.03e-02}, + {161,160,-1.03e-02}, + {161,166,-1.03e-02}, + {161,185,-1.03e-02}, + {161,186,-1.03e-02}, + {161,192,-1.03e-02}, + {161,424,-4.84e-05}, + {161,425,-1.93e-04}, + {161,430,-4.84e-05}, + {161,449,-1.93e-04}, + {161,450,-7.74e-04}, + {161,455,-1.93e-04}, + {161,474,-4.84e-05}, + {161,475,-1.93e-04}, + {161,481,-4.84e-05}, + {162,162,8.29e-02}, + {162,137,-1.03e-02}, + {162,139,-1.03e-02}, + {162,143,-1.03e-02}, + {162,163,-1.03e-02}, + {162,168,-1.03e-02}, + {162,189,-1.03e-02}, + {162,190,-1.03e-02}, + {162,195,-1.03e-02}, + {162,426,-4.84e-05}, + {162,428,-1.93e-04}, + {162,432,-4.84e-05}, + {162,451,-7.74e-04}, + {162,452,-1.93e-04}, + {162,457,-1.93e-04}, + {162,478,-4.84e-05}, + {162,479,-1.93e-04}, + {162,484,-4.84e-05}, + {163,163,8.29e-02}, + {163,137,-1.03e-02}, + {163,138,-1.03e-02}, + {163,139,-1.03e-02}, + {163,162,-1.03e-02}, + {163,164,-1.03e-02}, + {163,190,-1.03e-02}, + {163,194,-1.03e-02}, + {163,195,-1.03e-02}, + {163,426,-1.93e-04}, + {163,427,-4.84e-05}, + {163,428,-4.84e-05}, + {163,451,-1.93e-04}, + {163,452,-7.74e-04}, + {163,453,-1.93e-04}, + {163,479,-4.84e-05}, + {163,483,-4.84e-05}, + {163,484,-1.93e-04}, + {164,164,8.29e-02}, + {164,137,-1.03e-02}, + {164,138,-1.03e-02}, + {164,140,-1.03e-02}, + {164,163,-1.03e-02}, + {164,165,-1.03e-02}, + {164,193,-1.03e-02}, + {164,194,-1.03e-02}, + {164,195,-1.03e-02}, + {164,426,-4.84e-05}, + {164,427,-1.93e-04}, + {164,429,-4.84e-05}, + {164,452,-1.93e-04}, + {164,453,-7.74e-04}, + {164,454,-1.93e-04}, + {164,482,-4.84e-05}, + {164,483,-1.93e-04}, + {164,484,-4.84e-05}, + {165,165,8.29e-02}, + {165,122,-1.03e-02}, + {165,138,-1.03e-02}, + {165,140,-1.03e-02}, + {165,145,-1.03e-02}, + {165,164,-1.03e-02}, + {165,170,-1.03e-02}, + {165,193,-1.03e-02}, + {165,194,-1.03e-02}, + {165,411,-4.84e-05}, + {165,427,-4.84e-05}, + {165,429,-1.93e-04}, + {165,434,-1.93e-04}, + {165,453,-1.93e-04}, + {165,454,-7.74e-04}, + {165,459,-4.84e-05}, + {165,482,-1.93e-04}, + {165,483,-4.84e-05}, + {166,166,8.29e-02}, + {166,136,-1.03e-02}, + {166,141,-1.03e-02}, + {166,142,-1.03e-02}, + {166,161,-1.03e-02}, + {166,167,-1.03e-02}, + {166,186,-1.03e-02}, + {166,191,-1.03e-02}, + {166,192,-1.03e-02}, + {166,425,-4.84e-05}, + {166,430,-1.93e-04}, + {166,431,-4.84e-05}, + {166,450,-1.93e-04}, + {166,455,-7.74e-04}, + {166,456,-1.93e-04}, + {166,475,-4.84e-05}, + {166,480,-4.84e-05}, + {166,481,-1.93e-04}, + {167,167,8.29e-02}, + {167,141,-1.03e-02}, + {167,142,-1.03e-02}, + {167,143,-1.03e-02}, + {167,166,-1.03e-02}, + {167,168,-1.03e-02}, + {167,189,-1.03e-02}, + {167,191,-1.03e-02}, + {167,192,-1.03e-02}, + {167,430,-4.84e-05}, + {167,431,-1.93e-04}, + {167,432,-4.84e-05}, + {167,455,-1.93e-04}, + {167,456,-7.74e-04}, + {167,457,-1.93e-04}, + {167,478,-4.84e-05}, + {167,480,-1.93e-04}, + {167,481,-4.84e-05}, + {168,168,8.29e-02}, + {168,139,-1.03e-02}, + {168,142,-1.03e-02}, + {168,143,-1.03e-02}, + {168,162,-1.03e-02}, + {168,167,-1.03e-02}, + {168,189,-1.03e-02}, + {168,190,-1.03e-02}, + {168,191,-1.03e-02}, + {168,428,-4.84e-05}, + {168,431,-4.84e-05}, + {168,432,-1.93e-04}, + {168,451,-1.93e-04}, + {168,456,-1.93e-04}, + {168,457,-7.74e-04}, + {168,478,-1.93e-04}, + {168,479,-4.84e-05}, + {168,480,-4.84e-05}, + {169,169,2.08e-01}, + {169,144,3.65e-02}, + {169,146,-1.03e-02}, + {169,171,-1.03e-02}, + {169,196,3.65e-02}, + {169,198,-1.03e-02}, + {169,433,-9.67e-05}, + {169,435,-4.84e-05}, + {169,458,-3.87e-04}, + {169,460,-1.93e-04}, + {169,485,-9.67e-05}, + {169,487,-4.84e-05}, + {170,170,2.08e-01}, + {170,145,3.65e-02}, + {170,165,-1.03e-02}, + {170,193,-1.03e-02}, + {170,197,3.65e-02}, + {170,223,-1.03e-02}, + {170,434,-9.67e-05}, + {170,454,-4.84e-05}, + {170,459,-3.87e-04}, + {170,482,-1.93e-04}, + {170,486,-9.67e-05}, + {170,512,-4.84e-05}, + {171,171,8.29e-02}, + {171,144,-1.03e-02}, + {171,146,-1.03e-02}, + {171,147,-1.03e-02}, + {171,169,-1.03e-02}, + {171,172,-1.03e-02}, + {171,196,-1.03e-02}, + {171,198,-1.03e-02}, + {171,199,-1.03e-02}, + {171,433,-4.84e-05}, + {171,435,-1.93e-04}, + {171,436,-4.84e-05}, + {171,458,-1.93e-04}, + {171,460,-7.74e-04}, + {171,461,-1.93e-04}, + {171,485,-4.84e-05}, + {171,487,-1.93e-04}, + {171,488,-4.84e-05}, + {172,172,8.29e-02}, + {172,146,-1.03e-02}, + {172,147,-1.03e-02}, + {172,148,-1.03e-02}, + {172,171,-1.03e-02}, + {172,173,-1.03e-02}, + {172,198,-1.03e-02}, + {172,199,-1.03e-02}, + {172,200,-1.03e-02}, + {172,435,-4.84e-05}, + {172,436,-1.93e-04}, + {172,437,-4.84e-05}, + {172,460,-1.93e-04}, + {172,461,-7.74e-04}, + {172,462,-1.93e-04}, + {172,487,-4.84e-05}, + {172,488,-1.93e-04}, + {172,489,-4.84e-05}, + {173,173,8.29e-02}, + {173,147,-1.03e-02}, + {173,148,-1.03e-02}, + {173,149,-1.03e-02}, + {173,172,-1.03e-02}, + {173,174,-1.03e-02}, + {173,199,-1.03e-02}, + {173,200,-1.03e-02}, + {173,201,-1.03e-02}, + {173,436,-4.84e-05}, + {173,437,-1.93e-04}, + {173,438,-4.84e-05}, + {173,461,-1.93e-04}, + {173,462,-7.74e-04}, + {173,463,-1.93e-04}, + {173,488,-4.84e-05}, + {173,489,-1.93e-04}, + {173,490,-4.84e-05}, + {174,174,8.29e-02}, + {174,148,-1.03e-02}, + {174,149,-1.03e-02}, + {174,150,-1.03e-02}, + {174,173,-1.03e-02}, + {174,175,-1.03e-02}, + {174,200,-1.03e-02}, + {174,201,-1.03e-02}, + {174,202,-1.03e-02}, + {174,437,-4.84e-05}, + {174,438,-1.93e-04}, + {174,439,-4.84e-05}, + {174,462,-1.93e-04}, + {174,463,-7.74e-04}, + {174,464,-1.93e-04}, + {174,489,-4.84e-05}, + {174,490,-1.93e-04}, + {174,491,-4.84e-05}, + {175,175,8.29e-02}, + {175,149,-1.03e-02}, + {175,150,-1.03e-02}, + {175,151,-1.03e-02}, + {175,174,-1.03e-02}, + {175,176,-1.03e-02}, + {175,201,-1.03e-02}, + {175,202,-1.03e-02}, + {175,203,-1.03e-02}, + {175,438,-4.84e-05}, + {175,439,-1.93e-04}, + {175,440,-4.84e-05}, + {175,463,-1.93e-04}, + {175,464,-7.74e-04}, + {175,465,-1.93e-04}, + {175,490,-4.84e-05}, + {175,491,-1.93e-04}, + {175,492,-4.84e-05}, + {176,176,8.29e-02}, + {176,150,-1.03e-02}, + {176,151,-1.03e-02}, + {176,152,-1.03e-02}, + {176,175,-1.03e-02}, + {176,177,-1.03e-02}, + {176,202,-1.03e-02}, + {176,203,-1.03e-02}, + {176,204,-1.03e-02}, + {176,439,-4.84e-05}, + {176,440,-1.93e-04}, + {176,441,-4.84e-05}, + {176,464,-1.93e-04}, + {176,465,-7.74e-04}, + {176,466,-1.93e-04}, + {176,491,-4.84e-05}, + {176,492,-1.93e-04}, + {176,493,-4.84e-05}, + {177,177,8.29e-02}, + {177,151,-1.03e-02}, + {177,152,-1.03e-02}, + {177,153,-1.03e-02}, + {177,176,-1.03e-02}, + {177,178,-1.03e-02}, + {177,203,-1.03e-02}, + {177,204,-1.03e-02}, + {177,205,-1.03e-02}, + {177,440,-4.84e-05}, + {177,441,-1.93e-04}, + {177,442,-4.84e-05}, + {177,465,-1.93e-04}, + {177,466,-7.74e-04}, + {177,467,-1.93e-04}, + {177,492,-4.84e-05}, + {177,493,-1.93e-04}, + {177,494,-4.84e-05}, + {178,178,8.29e-02}, + {178,152,-1.03e-02}, + {178,153,-1.03e-02}, + {178,154,-1.03e-02}, + {178,177,-1.03e-02}, + {178,179,-1.03e-02}, + {178,204,-1.03e-02}, + {178,205,-1.03e-02}, + {178,206,-1.03e-02}, + {178,441,-4.84e-05}, + {178,442,-1.93e-04}, + {178,443,-4.84e-05}, + {178,466,-1.93e-04}, + {178,467,-7.74e-04}, + {178,468,-1.93e-04}, + {178,493,-4.84e-05}, + {178,494,-1.93e-04}, + {178,495,-4.84e-05}, + {179,179,8.29e-02}, + {179,153,-1.03e-02}, + {179,154,-1.03e-02}, + {179,155,-1.03e-02}, + {179,178,-1.03e-02}, + {179,180,-1.03e-02}, + {179,205,-1.03e-02}, + {179,206,-1.03e-02}, + {179,207,-1.03e-02}, + {179,442,-4.84e-05}, + {179,443,-1.93e-04}, + {179,444,-4.84e-05}, + {179,467,-1.93e-04}, + {179,468,-7.74e-04}, + {179,469,-1.93e-04}, + {179,494,-4.84e-05}, + {179,495,-1.93e-04}, + {179,496,-4.84e-05}, + {180,180,8.29e-02}, + {180,154,-1.03e-02}, + {180,155,-1.03e-02}, + {180,156,-1.03e-02}, + {180,179,-1.03e-02}, + {180,181,-1.03e-02}, + {180,206,-1.03e-02}, + {180,207,-1.03e-02}, + {180,208,-1.03e-02}, + {180,443,-4.84e-05}, + {180,444,-1.93e-04}, + {180,445,-4.84e-05}, + {180,468,-1.93e-04}, + {180,469,-7.74e-04}, + {180,470,-1.93e-04}, + {180,495,-4.84e-05}, + {180,496,-1.93e-04}, + {180,497,-4.84e-05}, + {181,181,8.29e-02}, + {181,155,-1.03e-02}, + {181,156,-1.03e-02}, + {181,157,-1.03e-02}, + {181,180,-1.03e-02}, + {181,182,-1.03e-02}, + {181,207,-1.03e-02}, + {181,208,-1.03e-02}, + {181,209,-1.03e-02}, + {181,444,-4.84e-05}, + {181,445,-1.93e-04}, + {181,446,-4.84e-05}, + {181,469,-1.93e-04}, + {181,470,-7.74e-04}, + {181,471,-1.93e-04}, + {181,496,-4.84e-05}, + {181,497,-1.93e-04}, + {181,498,-4.84e-05}, + {182,182,8.29e-02}, + {182,156,-1.03e-02}, + {182,157,-1.03e-02}, + {182,181,-1.03e-02}, + {182,183,-1.03e-02}, + {182,184,-1.03e-02}, + {182,208,-1.03e-02}, + {182,209,-1.03e-02}, + {182,210,-1.03e-02}, + {182,445,-4.84e-05}, + {182,446,-1.93e-04}, + {182,470,-1.93e-04}, + {182,471,-7.74e-04}, + {182,472,-1.93e-04}, + {182,473,-4.84e-05}, + {182,497,-4.84e-05}, + {182,498,-1.93e-04}, + {182,499,-4.84e-05}, + {183,183,8.29e-02}, + {183,157,-1.03e-02}, + {183,182,-1.03e-02}, + {183,184,-1.03e-02}, + {183,209,-1.03e-02}, + {183,210,-1.03e-02}, + {183,211,-1.03e-02}, + {183,212,-1.03e-02}, + {183,213,-1.03e-02}, + {183,446,-4.84e-05}, + {183,471,-1.93e-04}, + {183,472,-7.74e-04}, + {183,473,-1.93e-04}, + {183,498,-4.84e-05}, + {183,499,-1.93e-04}, + {183,500,-4.84e-05}, + {183,501,-1.93e-04}, + {183,502,-4.84e-05}, + {184,184,8.29e-02}, + {184,157,-1.03e-02}, + {184,158,-1.03e-02}, + {184,182,-1.03e-02}, + {184,183,-1.03e-02}, + {184,188,-1.03e-02}, + {184,212,-1.03e-02}, + {184,213,-1.03e-02}, + {184,217,-1.03e-02}, + {184,446,-1.93e-04}, + {184,447,-4.84e-05}, + {184,471,-4.84e-05}, + {184,472,-1.93e-04}, + {184,473,-7.74e-04}, + {184,477,-1.93e-04}, + {184,501,-4.84e-05}, + {184,502,-1.93e-04}, + {184,506,-4.84e-05}, + {185,185,8.29e-02}, + {185,159,-1.03e-02}, + {185,160,-1.03e-02}, + {185,161,-1.03e-02}, + {185,186,-1.03e-02}, + {185,187,-1.03e-02}, + {185,214,-1.03e-02}, + {185,215,-1.03e-02}, + {185,216,-1.03e-02}, + {185,448,-4.84e-05}, + {185,449,-1.93e-04}, + {185,450,-4.84e-05}, + {185,474,-7.74e-04}, + {185,475,-1.93e-04}, + {185,476,-1.93e-04}, + {185,503,-4.84e-05}, + {185,504,-1.93e-04}, + {185,505,-4.84e-05}, + {186,186,8.29e-02}, + {186,160,-1.03e-02}, + {186,161,-1.03e-02}, + {186,166,-1.03e-02}, + {186,185,-1.03e-02}, + {186,192,-1.03e-02}, + {186,215,-1.03e-02}, + {186,216,-1.03e-02}, + {186,221,-1.03e-02}, + {186,449,-4.84e-05}, + {186,450,-1.93e-04}, + {186,455,-4.84e-05}, + {186,474,-1.93e-04}, + {186,475,-7.74e-04}, + {186,481,-1.93e-04}, + {186,504,-4.84e-05}, + {186,505,-1.93e-04}, + {186,510,-4.84e-05}, + {187,187,8.29e-02}, + {187,158,-1.03e-02}, + {187,159,-1.03e-02}, + {187,160,-1.03e-02}, + {187,185,-1.03e-02}, + {187,188,-1.03e-02}, + {187,214,-1.03e-02}, + {187,215,-1.03e-02}, + {187,217,-1.03e-02}, + {187,447,-4.84e-05}, + {187,448,-1.93e-04}, + {187,449,-4.84e-05}, + {187,474,-1.93e-04}, + {187,476,-7.74e-04}, + {187,477,-1.93e-04}, + {187,503,-1.93e-04}, + {187,504,-4.84e-05}, + {187,506,-4.84e-05}, + {188,188,8.29e-02}, + {188,157,-1.03e-02}, + {188,158,-1.03e-02}, + {188,159,-1.03e-02}, + {188,184,-1.03e-02}, + {188,187,-1.03e-02}, + {188,213,-1.03e-02}, + {188,214,-1.03e-02}, + {188,217,-1.03e-02}, + {188,446,-4.84e-05}, + {188,447,-1.93e-04}, + {188,448,-4.84e-05}, + {188,473,-1.93e-04}, + {188,476,-1.93e-04}, + {188,477,-7.74e-04}, + {188,502,-4.84e-05}, + {188,503,-4.84e-05}, + {188,506,-1.93e-04}, + {189,189,8.29e-02}, + {189,162,-1.03e-02}, + {189,167,-1.03e-02}, + {189,168,-1.03e-02}, + {189,190,-1.03e-02}, + {189,191,-1.03e-02}, + {189,218,-1.03e-02}, + {189,219,-1.03e-02}, + {189,220,-1.03e-02}, + {189,451,-4.84e-05}, + {189,456,-4.84e-05}, + {189,457,-1.93e-04}, + {189,478,-7.74e-04}, + {189,479,-1.93e-04}, + {189,480,-1.93e-04}, + {189,507,-4.84e-05}, + {189,508,-1.93e-04}, + {189,509,-4.84e-05}, + {190,190,8.29e-02}, + {190,162,-1.03e-02}, + {190,163,-1.03e-02}, + {190,168,-1.03e-02}, + {190,189,-1.03e-02}, + {190,195,-1.03e-02}, + {190,219,-1.03e-02}, + {190,220,-1.03e-02}, + {190,224,-1.03e-02}, + {190,451,-1.93e-04}, + {190,452,-4.84e-05}, + {190,457,-4.84e-05}, + {190,478,-1.93e-04}, + {190,479,-7.74e-04}, + {190,484,-1.93e-04}, + {190,508,-4.84e-05}, + {190,509,-1.93e-04}, + {190,513,-4.84e-05}, + {191,191,8.29e-02}, + {191,166,-1.03e-02}, + {191,167,-1.03e-02}, + {191,168,-1.03e-02}, + {191,189,-1.03e-02}, + {191,192,-1.03e-02}, + {191,218,-1.03e-02}, + {191,219,-1.03e-02}, + {191,221,-1.03e-02}, + {191,455,-4.84e-05}, + {191,456,-1.93e-04}, + {191,457,-4.84e-05}, + {191,478,-1.93e-04}, + {191,480,-7.74e-04}, + {191,481,-1.93e-04}, + {191,507,-1.93e-04}, + {191,508,-4.84e-05}, + {191,510,-4.84e-05}, + {192,192,8.29e-02}, + {192,161,-1.03e-02}, + {192,166,-1.03e-02}, + {192,167,-1.03e-02}, + {192,186,-1.03e-02}, + {192,191,-1.03e-02}, + {192,216,-1.03e-02}, + {192,218,-1.03e-02}, + {192,221,-1.03e-02}, + {192,450,-4.84e-05}, + {192,455,-1.93e-04}, + {192,456,-4.84e-05}, + {192,475,-1.93e-04}, + {192,480,-1.93e-04}, + {192,481,-7.74e-04}, + {192,505,-4.84e-05}, + {192,507,-4.84e-05}, + {192,510,-1.93e-04}, + {193,193,8.29e-02}, + {193,145,-1.03e-02}, + {193,164,-1.03e-02}, + {193,165,-1.03e-02}, + {193,170,-1.03e-02}, + {193,194,-1.03e-02}, + {193,197,-1.03e-02}, + {193,222,-1.03e-02}, + {193,223,-1.03e-02}, + {193,434,-4.84e-05}, + {193,453,-4.84e-05}, + {193,454,-1.93e-04}, + {193,459,-1.93e-04}, + {193,482,-7.74e-04}, + {193,483,-1.93e-04}, + {193,486,-4.84e-05}, + {193,511,-4.84e-05}, + {193,512,-1.93e-04}, + {194,194,8.29e-02}, + {194,163,-1.03e-02}, + {194,164,-1.03e-02}, + {194,165,-1.03e-02}, + {194,193,-1.03e-02}, + {194,195,-1.03e-02}, + {194,222,-1.03e-02}, + {194,223,-1.03e-02}, + {194,224,-1.03e-02}, + {194,452,-4.84e-05}, + {194,453,-1.93e-04}, + {194,454,-4.84e-05}, + {194,482,-1.93e-04}, + {194,483,-7.74e-04}, + {194,484,-1.93e-04}, + {194,511,-1.93e-04}, + {194,512,-4.84e-05}, + {194,513,-4.84e-05}, + {195,195,8.29e-02}, + {195,162,-1.03e-02}, + {195,163,-1.03e-02}, + {195,164,-1.03e-02}, + {195,190,-1.03e-02}, + {195,194,-1.03e-02}, + {195,220,-1.03e-02}, + {195,222,-1.03e-02}, + {195,224,-1.03e-02}, + {195,451,-4.84e-05}, + {195,452,-1.93e-04}, + {195,453,-4.84e-05}, + {195,479,-1.93e-04}, + {195,483,-1.93e-04}, + {195,484,-7.74e-04}, + {195,509,-4.84e-05}, + {195,511,-4.84e-05}, + {195,513,-1.93e-04}, + {196,196,2.08e-01}, + {196,169,3.65e-02}, + {196,171,-1.03e-02}, + {196,198,-1.03e-02}, + {196,225,3.65e-02}, + {196,227,-1.03e-02}, + {196,458,-9.67e-05}, + {196,460,-4.84e-05}, + {196,485,-3.87e-04}, + {196,487,-1.93e-04}, + {196,514,-9.67e-05}, + {196,516,-4.84e-05}, + {197,197,2.08e-01}, + {197,170,3.65e-02}, + {197,193,-1.03e-02}, + {197,223,-1.03e-02}, + {197,226,3.65e-02}, + {197,255,-1.03e-02}, + {197,459,-9.67e-05}, + {197,482,-4.84e-05}, + {197,486,-3.87e-04}, + {197,512,-1.93e-04}, + {197,515,-9.67e-05}, + {197,544,-4.84e-05}, + {198,198,8.29e-02}, + {198,169,-1.03e-02}, + {198,171,-1.03e-02}, + {198,172,-1.03e-02}, + {198,196,-1.03e-02}, + {198,199,-1.03e-02}, + {198,225,-1.03e-02}, + {198,227,-1.03e-02}, + {198,228,-1.03e-02}, + {198,458,-4.84e-05}, + {198,460,-1.93e-04}, + {198,461,-4.84e-05}, + {198,485,-1.93e-04}, + {198,487,-7.74e-04}, + {198,488,-1.93e-04}, + {198,514,-4.84e-05}, + {198,516,-1.93e-04}, + {198,517,-4.84e-05}, + {199,199,8.29e-02}, + {199,171,-1.03e-02}, + {199,172,-1.03e-02}, + {199,173,-1.03e-02}, + {199,198,-1.03e-02}, + {199,200,-1.03e-02}, + {199,227,-1.03e-02}, + {199,228,-1.03e-02}, + {199,229,-1.03e-02}, + {199,460,-4.84e-05}, + {199,461,-1.93e-04}, + {199,462,-4.84e-05}, + {199,487,-1.93e-04}, + {199,488,-7.74e-04}, + {199,489,-1.93e-04}, + {199,516,-4.84e-05}, + {199,517,-1.93e-04}, + {199,518,-4.84e-05}, + {200,200,8.29e-02}, + {200,172,-1.03e-02}, + {200,173,-1.03e-02}, + {200,174,-1.03e-02}, + {200,199,-1.03e-02}, + {200,201,-1.03e-02}, + {200,228,-1.03e-02}, + {200,229,-1.03e-02}, + {200,230,-1.03e-02}, + {200,461,-4.84e-05}, + {200,462,-1.93e-04}, + {200,463,-4.84e-05}, + {200,488,-1.93e-04}, + {200,489,-7.74e-04}, + {200,490,-1.93e-04}, + {200,517,-4.84e-05}, + {200,518,-1.93e-04}, + {200,519,-4.84e-05}, + {201,201,8.29e-02}, + {201,173,-1.03e-02}, + {201,174,-1.03e-02}, + {201,175,-1.03e-02}, + {201,200,-1.03e-02}, + {201,202,-1.03e-02}, + {201,229,-1.03e-02}, + {201,230,-1.03e-02}, + {201,231,-1.03e-02}, + {201,462,-4.84e-05}, + {201,463,-1.93e-04}, + {201,464,-4.84e-05}, + {201,489,-1.93e-04}, + {201,490,-7.74e-04}, + {201,491,-1.93e-04}, + {201,518,-4.84e-05}, + {201,519,-1.93e-04}, + {201,520,-4.84e-05}, + {202,202,8.29e-02}, + {202,174,-1.03e-02}, + {202,175,-1.03e-02}, + {202,176,-1.03e-02}, + {202,201,-1.03e-02}, + {202,203,-1.03e-02}, + {202,230,-1.03e-02}, + {202,231,-1.03e-02}, + {202,232,-1.03e-02}, + {202,463,-4.84e-05}, + {202,464,-1.93e-04}, + {202,465,-4.84e-05}, + {202,490,-1.93e-04}, + {202,491,-7.74e-04}, + {202,492,-1.93e-04}, + {202,519,-4.84e-05}, + {202,520,-1.93e-04}, + {202,521,-4.84e-05}, + {203,203,8.29e-02}, + {203,175,-1.03e-02}, + {203,176,-1.03e-02}, + {203,177,-1.03e-02}, + {203,202,-1.03e-02}, + {203,204,-1.03e-02}, + {203,231,-1.03e-02}, + {203,232,-1.03e-02}, + {203,233,-1.03e-02}, + {203,464,-4.84e-05}, + {203,465,-1.93e-04}, + {203,466,-4.84e-05}, + {203,491,-1.93e-04}, + {203,492,-7.74e-04}, + {203,493,-1.93e-04}, + {203,520,-4.84e-05}, + {203,521,-1.93e-04}, + {203,522,-4.84e-05}, + {204,204,8.29e-02}, + {204,176,-1.03e-02}, + {204,177,-1.03e-02}, + {204,178,-1.03e-02}, + {204,203,-1.03e-02}, + {204,205,-1.03e-02}, + {204,232,-1.03e-02}, + {204,233,-1.03e-02}, + {204,234,-1.03e-02}, + {204,465,-4.84e-05}, + {204,466,-1.93e-04}, + {204,467,-4.84e-05}, + {204,492,-1.93e-04}, + {204,493,-7.74e-04}, + {204,494,-1.93e-04}, + {204,521,-4.84e-05}, + {204,522,-1.93e-04}, + {204,523,-4.84e-05}, + {205,205,8.29e-02}, + {205,177,-1.03e-02}, + {205,178,-1.03e-02}, + {205,179,-1.03e-02}, + {205,204,-1.03e-02}, + {205,206,-1.03e-02}, + {205,233,-1.03e-02}, + {205,234,-1.03e-02}, + {205,235,-1.03e-02}, + {205,466,-4.84e-05}, + {205,467,-1.93e-04}, + {205,468,-4.84e-05}, + {205,493,-1.93e-04}, + {205,494,-7.74e-04}, + {205,495,-1.93e-04}, + {205,522,-4.84e-05}, + {205,523,-1.93e-04}, + {205,524,-4.84e-05}, + {206,206,8.29e-02}, + {206,178,-1.03e-02}, + {206,179,-1.03e-02}, + {206,180,-1.03e-02}, + {206,205,-1.03e-02}, + {206,207,-1.03e-02}, + {206,234,-1.03e-02}, + {206,235,-1.03e-02}, + {206,236,-1.03e-02}, + {206,467,-4.84e-05}, + {206,468,-1.93e-04}, + {206,469,-4.84e-05}, + {206,494,-1.93e-04}, + {206,495,-7.74e-04}, + {206,496,-1.93e-04}, + {206,523,-4.84e-05}, + {206,524,-1.93e-04}, + {206,525,-4.84e-05}, + {207,207,8.29e-02}, + {207,179,-1.03e-02}, + {207,180,-1.03e-02}, + {207,181,-1.03e-02}, + {207,206,-1.03e-02}, + {207,208,-1.03e-02}, + {207,235,-1.03e-02}, + {207,236,-1.03e-02}, + {207,237,-1.03e-02}, + {207,468,-4.84e-05}, + {207,469,-1.93e-04}, + {207,470,-4.84e-05}, + {207,495,-1.93e-04}, + {207,496,-7.74e-04}, + {207,497,-1.93e-04}, + {207,524,-4.84e-05}, + {207,525,-1.93e-04}, + {207,526,-4.84e-05}, + {208,208,8.29e-02}, + {208,180,-1.03e-02}, + {208,181,-1.03e-02}, + {208,182,-1.03e-02}, + {208,207,-1.03e-02}, + {208,209,-1.03e-02}, + {208,236,-1.03e-02}, + {208,237,-1.03e-02}, + {208,238,-1.03e-02}, + {208,469,-4.84e-05}, + {208,470,-1.93e-04}, + {208,471,-4.84e-05}, + {208,496,-1.93e-04}, + {208,497,-7.74e-04}, + {208,498,-1.93e-04}, + {208,525,-4.84e-05}, + {208,526,-1.93e-04}, + {208,527,-4.84e-05}, + {209,209,8.29e-02}, + {209,181,-1.03e-02}, + {209,182,-1.03e-02}, + {209,183,-1.03e-02}, + {209,208,-1.03e-02}, + {209,210,-1.03e-02}, + {209,237,-1.03e-02}, + {209,238,-1.03e-02}, + {209,239,-1.03e-02}, + {209,470,-4.84e-05}, + {209,471,-1.93e-04}, + {209,472,-4.84e-05}, + {209,497,-1.93e-04}, + {209,498,-7.74e-04}, + {209,499,-1.93e-04}, + {209,526,-4.84e-05}, + {209,527,-1.93e-04}, + {209,528,-4.84e-05}, + {210,210,8.29e-02}, + {210,182,-1.03e-02}, + {210,183,-1.03e-02}, + {210,209,-1.03e-02}, + {210,211,-1.03e-02}, + {210,212,-1.03e-02}, + {210,238,-1.03e-02}, + {210,239,-1.03e-02}, + {210,240,-1.03e-02}, + {210,471,-4.84e-05}, + {210,472,-1.93e-04}, + {210,498,-1.93e-04}, + {210,499,-7.74e-04}, + {210,500,-1.93e-04}, + {210,501,-4.84e-05}, + {210,527,-4.84e-05}, + {210,528,-1.93e-04}, + {210,529,-4.84e-05}, + {211,211,8.29e-02}, + {211,183,-1.03e-02}, + {211,210,-1.03e-02}, + {211,212,-1.03e-02}, + {211,239,-1.03e-02}, + {211,240,-1.03e-02}, + {211,241,-1.03e-02}, + {211,242,-1.03e-02}, + {211,243,-1.03e-02}, + {211,472,-4.84e-05}, + {211,499,-1.93e-04}, + {211,500,-7.74e-04}, + {211,501,-1.93e-04}, + {211,528,-4.84e-05}, + {211,529,-1.93e-04}, + {211,530,-4.84e-05}, + {211,531,-1.93e-04}, + {211,532,-4.84e-05}, + {212,212,8.29e-02}, + {212,183,-1.03e-02}, + {212,184,-1.03e-02}, + {212,210,-1.03e-02}, + {212,211,-1.03e-02}, + {212,213,-1.03e-02}, + {212,242,-1.03e-02}, + {212,243,-1.03e-02}, + {212,244,-1.03e-02}, + {212,472,-1.93e-04}, + {212,473,-4.84e-05}, + {212,499,-4.84e-05}, + {212,500,-1.93e-04}, + {212,501,-7.74e-04}, + {212,502,-1.93e-04}, + {212,531,-4.84e-05}, + {212,532,-1.93e-04}, + {212,533,-4.84e-05}, + {213,213,8.29e-02}, + {213,183,-1.03e-02}, + {213,184,-1.03e-02}, + {213,188,-1.03e-02}, + {213,212,-1.03e-02}, + {213,217,-1.03e-02}, + {213,243,-1.03e-02}, + {213,244,-1.03e-02}, + {213,245,-1.03e-02}, + {213,472,-4.84e-05}, + {213,473,-1.93e-04}, + {213,477,-4.84e-05}, + {213,501,-1.93e-04}, + {213,502,-7.74e-04}, + {213,506,-1.93e-04}, + {213,532,-4.84e-05}, + {213,533,-1.93e-04}, + {213,534,-4.84e-05}, + {214,214,8.29e-02}, + {214,185,-1.03e-02}, + {214,187,-1.03e-02}, + {214,188,-1.03e-02}, + {214,215,-1.03e-02}, + {214,217,-1.03e-02}, + {214,245,-1.03e-02}, + {214,246,-1.03e-02}, + {214,247,-1.03e-02}, + {214,474,-4.84e-05}, + {214,476,-1.93e-04}, + {214,477,-4.84e-05}, + {214,503,-7.74e-04}, + {214,504,-1.93e-04}, + {214,506,-1.93e-04}, + {214,534,-4.84e-05}, + {214,535,-1.93e-04}, + {214,536,-4.84e-05}, + {215,215,8.29e-02}, + {215,185,-1.03e-02}, + {215,186,-1.03e-02}, + {215,187,-1.03e-02}, + {215,214,-1.03e-02}, + {215,216,-1.03e-02}, + {215,246,-1.03e-02}, + {215,247,-1.03e-02}, + {215,248,-1.03e-02}, + {215,474,-1.93e-04}, + {215,475,-4.84e-05}, + {215,476,-4.84e-05}, + {215,503,-1.93e-04}, + {215,504,-7.74e-04}, + {215,505,-1.93e-04}, + {215,535,-4.84e-05}, + {215,536,-1.93e-04}, + {215,537,-4.84e-05}, + {216,216,8.29e-02}, + {216,185,-1.03e-02}, + {216,186,-1.03e-02}, + {216,192,-1.03e-02}, + {216,215,-1.03e-02}, + {216,221,-1.03e-02}, + {216,247,-1.03e-02}, + {216,248,-1.03e-02}, + {216,249,-1.03e-02}, + {216,474,-4.84e-05}, + {216,475,-1.93e-04}, + {216,481,-4.84e-05}, + {216,504,-1.93e-04}, + {216,505,-7.74e-04}, + {216,510,-1.93e-04}, + {216,536,-4.84e-05}, + {216,537,-1.93e-04}, + {216,538,-4.84e-05}, + {217,217,8.29e-02}, + {217,184,-1.03e-02}, + {217,187,-1.03e-02}, + {217,188,-1.03e-02}, + {217,213,-1.03e-02}, + {217,214,-1.03e-02}, + {217,244,-1.03e-02}, + {217,245,-1.03e-02}, + {217,246,-1.03e-02}, + {217,473,-4.84e-05}, + {217,476,-4.84e-05}, + {217,477,-1.93e-04}, + {217,502,-1.93e-04}, + {217,503,-1.93e-04}, + {217,506,-7.74e-04}, + {217,533,-4.84e-05}, + {217,534,-1.93e-04}, + {217,535,-4.84e-05}, + {218,218,8.29e-02}, + {218,189,-1.03e-02}, + {218,191,-1.03e-02}, + {218,192,-1.03e-02}, + {218,219,-1.03e-02}, + {218,221,-1.03e-02}, + {218,249,-1.03e-02}, + {218,250,-1.03e-02}, + {218,251,-1.03e-02}, + {218,478,-4.84e-05}, + {218,480,-1.93e-04}, + {218,481,-4.84e-05}, + {218,507,-7.74e-04}, + {218,508,-1.93e-04}, + {218,510,-1.93e-04}, + {218,538,-4.84e-05}, + {218,539,-1.93e-04}, + {218,540,-4.84e-05}, + {219,219,8.29e-02}, + {219,189,-1.03e-02}, + {219,190,-1.03e-02}, + {219,191,-1.03e-02}, + {219,218,-1.03e-02}, + {219,220,-1.03e-02}, + {219,250,-1.03e-02}, + {219,251,-1.03e-02}, + {219,252,-1.03e-02}, + {219,478,-1.93e-04}, + {219,479,-4.84e-05}, + {219,480,-4.84e-05}, + {219,507,-1.93e-04}, + {219,508,-7.74e-04}, + {219,509,-1.93e-04}, + {219,539,-4.84e-05}, + {219,540,-1.93e-04}, + {219,541,-4.84e-05}, + {220,220,8.29e-02}, + {220,189,-1.03e-02}, + {220,190,-1.03e-02}, + {220,195,-1.03e-02}, + {220,219,-1.03e-02}, + {220,224,-1.03e-02}, + {220,251,-1.03e-02}, + {220,252,-1.03e-02}, + {220,253,-1.03e-02}, + {220,478,-4.84e-05}, + {220,479,-1.93e-04}, + {220,484,-4.84e-05}, + {220,508,-1.93e-04}, + {220,509,-7.74e-04}, + {220,513,-1.93e-04}, + {220,540,-4.84e-05}, + {220,541,-1.93e-04}, + {220,542,-4.84e-05}, + {221,221,8.29e-02}, + {221,186,-1.03e-02}, + {221,191,-1.03e-02}, + {221,192,-1.03e-02}, + {221,216,-1.03e-02}, + {221,218,-1.03e-02}, + {221,248,-1.03e-02}, + {221,249,-1.03e-02}, + {221,250,-1.03e-02}, + {221,475,-4.84e-05}, + {221,480,-4.84e-05}, + {221,481,-1.93e-04}, + {221,505,-1.93e-04}, + {221,507,-1.93e-04}, + {221,510,-7.74e-04}, + {221,537,-4.84e-05}, + {221,538,-1.93e-04}, + {221,539,-4.84e-05}, + {222,222,8.29e-02}, + {222,193,-1.03e-02}, + {222,194,-1.03e-02}, + {222,195,-1.03e-02}, + {222,223,-1.03e-02}, + {222,224,-1.03e-02}, + {222,253,-1.03e-02}, + {222,254,-1.03e-02}, + {222,255,-1.03e-02}, + {222,482,-4.84e-05}, + {222,483,-1.93e-04}, + {222,484,-4.84e-05}, + {222,511,-7.74e-04}, + {222,512,-1.93e-04}, + {222,513,-1.93e-04}, + {222,542,-4.84e-05}, + {222,543,-1.93e-04}, + {222,544,-4.84e-05}, + {223,223,8.29e-02}, + {223,170,-1.03e-02}, + {223,193,-1.03e-02}, + {223,194,-1.03e-02}, + {223,197,-1.03e-02}, + {223,222,-1.03e-02}, + {223,226,-1.03e-02}, + {223,254,-1.03e-02}, + {223,255,-1.03e-02}, + {223,459,-4.84e-05}, + {223,482,-1.93e-04}, + {223,483,-4.84e-05}, + {223,486,-1.93e-04}, + {223,511,-1.93e-04}, + {223,512,-7.74e-04}, + {223,515,-4.84e-05}, + {223,543,-4.84e-05}, + {223,544,-1.93e-04}, + {224,224,8.29e-02}, + {224,190,-1.03e-02}, + {224,194,-1.03e-02}, + {224,195,-1.03e-02}, + {224,220,-1.03e-02}, + {224,222,-1.03e-02}, + {224,252,-1.03e-02}, + {224,253,-1.03e-02}, + {224,254,-1.03e-02}, + {224,479,-4.84e-05}, + {224,483,-4.84e-05}, + {224,484,-1.93e-04}, + {224,509,-1.93e-04}, + {224,511,-1.93e-04}, + {224,513,-7.74e-04}, + {224,541,-4.84e-05}, + {224,542,-1.93e-04}, + {224,543,-4.84e-05}, + {225,225,2.08e-01}, + {225,196,3.65e-02}, + {225,198,-1.03e-02}, + {225,227,-1.03e-02}, + {225,256,3.65e-02}, + {225,259,-1.03e-02}, + {225,485,-9.67e-05}, + {225,487,-4.84e-05}, + {225,514,-3.87e-04}, + {225,516,-1.93e-04}, + {225,545,-9.67e-05}, + {225,548,-4.84e-05}, + {226,226,2.08e-01}, + {226,197,3.65e-02}, + {226,223,-1.03e-02}, + {226,255,-1.03e-02}, + {226,258,3.65e-02}, + {226,288,-1.03e-02}, + {226,486,-9.67e-05}, + {226,512,-4.84e-05}, + {226,515,-3.87e-04}, + {226,544,-1.93e-04}, + {226,547,-9.67e-05}, + {226,577,-4.84e-05}, + {227,227,8.29e-02}, + {227,196,-1.03e-02}, + {227,198,-1.03e-02}, + {227,199,-1.03e-02}, + {227,225,-1.03e-02}, + {227,228,-1.03e-02}, + {227,256,-1.03e-02}, + {227,259,-1.03e-02}, + {227,260,-1.03e-02}, + {227,485,-4.84e-05}, + {227,487,-1.93e-04}, + {227,488,-4.84e-05}, + {227,514,-1.93e-04}, + {227,516,-7.74e-04}, + {227,517,-1.93e-04}, + {227,545,-4.84e-05}, + {227,548,-1.93e-04}, + {227,549,-4.84e-05}, + {228,228,8.29e-02}, + {228,198,-1.03e-02}, + {228,199,-1.03e-02}, + {228,200,-1.03e-02}, + {228,227,-1.03e-02}, + {228,229,-1.03e-02}, + {228,259,-1.03e-02}, + {228,260,-1.03e-02}, + {228,261,-1.03e-02}, + {228,487,-4.84e-05}, + {228,488,-1.93e-04}, + {228,489,-4.84e-05}, + {228,516,-1.93e-04}, + {228,517,-7.74e-04}, + {228,518,-1.93e-04}, + {228,548,-4.84e-05}, + {228,549,-1.93e-04}, + {228,550,-4.84e-05}, + {229,229,8.29e-02}, + {229,199,-1.03e-02}, + {229,200,-1.03e-02}, + {229,201,-1.03e-02}, + {229,228,-1.03e-02}, + {229,230,-1.03e-02}, + {229,260,-1.03e-02}, + {229,261,-1.03e-02}, + {229,262,-1.03e-02}, + {229,488,-4.84e-05}, + {229,489,-1.93e-04}, + {229,490,-4.84e-05}, + {229,517,-1.93e-04}, + {229,518,-7.74e-04}, + {229,519,-1.93e-04}, + {229,549,-4.84e-05}, + {229,550,-1.93e-04}, + {229,551,-4.84e-05}, + {230,230,8.29e-02}, + {230,200,-1.03e-02}, + {230,201,-1.03e-02}, + {230,202,-1.03e-02}, + {230,229,-1.03e-02}, + {230,231,-1.03e-02}, + {230,261,-1.03e-02}, + {230,262,-1.03e-02}, + {230,263,-1.03e-02}, + {230,489,-4.84e-05}, + {230,490,-1.93e-04}, + {230,491,-4.84e-05}, + {230,518,-1.93e-04}, + {230,519,-7.74e-04}, + {230,520,-1.93e-04}, + {230,550,-4.84e-05}, + {230,551,-1.93e-04}, + {230,552,-4.84e-05}, + {231,231,8.29e-02}, + {231,201,-1.03e-02}, + {231,202,-1.03e-02}, + {231,203,-1.03e-02}, + {231,230,-1.03e-02}, + {231,232,-1.03e-02}, + {231,262,-1.03e-02}, + {231,263,-1.03e-02}, + {231,264,-1.03e-02}, + {231,490,-4.84e-05}, + {231,491,-1.93e-04}, + {231,492,-4.84e-05}, + {231,519,-1.93e-04}, + {231,520,-7.74e-04}, + {231,521,-1.93e-04}, + {231,551,-4.84e-05}, + {231,552,-1.93e-04}, + {231,553,-4.84e-05}, + {232,232,8.29e-02}, + {232,202,-1.03e-02}, + {232,203,-1.03e-02}, + {232,204,-1.03e-02}, + {232,231,-1.03e-02}, + {232,233,-1.03e-02}, + {232,263,-1.03e-02}, + {232,264,-1.03e-02}, + {232,265,-1.03e-02}, + {232,491,-4.84e-05}, + {232,492,-1.93e-04}, + {232,493,-4.84e-05}, + {232,520,-1.93e-04}, + {232,521,-7.74e-04}, + {232,522,-1.93e-04}, + {232,552,-4.84e-05}, + {232,553,-1.93e-04}, + {232,554,-4.84e-05}, + {233,233,8.29e-02}, + {233,203,-1.03e-02}, + {233,204,-1.03e-02}, + {233,205,-1.03e-02}, + {233,232,-1.03e-02}, + {233,234,-1.03e-02}, + {233,264,-1.03e-02}, + {233,265,-1.03e-02}, + {233,266,-1.03e-02}, + {233,492,-4.84e-05}, + {233,493,-1.93e-04}, + {233,494,-4.84e-05}, + {233,521,-1.93e-04}, + {233,522,-7.74e-04}, + {233,523,-1.93e-04}, + {233,553,-4.84e-05}, + {233,554,-1.93e-04}, + {233,555,-4.84e-05}, + {234,234,8.29e-02}, + {234,204,-1.03e-02}, + {234,205,-1.03e-02}, + {234,206,-1.03e-02}, + {234,233,-1.03e-02}, + {234,235,-1.03e-02}, + {234,265,-1.03e-02}, + {234,266,-1.03e-02}, + {234,267,-1.03e-02}, + {234,493,-4.84e-05}, + {234,494,-1.93e-04}, + {234,495,-4.84e-05}, + {234,522,-1.93e-04}, + {234,523,-7.74e-04}, + {234,524,-1.93e-04}, + {234,554,-4.84e-05}, + {234,555,-1.93e-04}, + {234,556,-4.84e-05}, + {235,235,8.29e-02}, + {235,205,-1.03e-02}, + {235,206,-1.03e-02}, + {235,207,-1.03e-02}, + {235,234,-1.03e-02}, + {235,236,-1.03e-02}, + {235,266,-1.03e-02}, + {235,267,-1.03e-02}, + {235,268,-1.03e-02}, + {235,494,-4.84e-05}, + {235,495,-1.93e-04}, + {235,496,-4.84e-05}, + {235,523,-1.93e-04}, + {235,524,-7.74e-04}, + {235,525,-1.93e-04}, + {235,555,-4.84e-05}, + {235,556,-1.93e-04}, + {235,557,-4.84e-05}, + {236,236,8.29e-02}, + {236,206,-1.03e-02}, + {236,207,-1.03e-02}, + {236,208,-1.03e-02}, + {236,235,-1.03e-02}, + {236,237,-1.03e-02}, + {236,267,-1.03e-02}, + {236,268,-1.03e-02}, + {236,269,-1.03e-02}, + {236,495,-4.84e-05}, + {236,496,-1.93e-04}, + {236,497,-4.84e-05}, + {236,524,-1.93e-04}, + {236,525,-7.74e-04}, + {236,526,-1.93e-04}, + {236,556,-4.84e-05}, + {236,557,-1.93e-04}, + {236,558,-4.84e-05}, + {237,237,8.29e-02}, + {237,207,-1.03e-02}, + {237,208,-1.03e-02}, + {237,209,-1.03e-02}, + {237,236,-1.03e-02}, + {237,238,-1.03e-02}, + {237,268,-1.03e-02}, + {237,269,-1.03e-02}, + {237,270,-1.03e-02}, + {237,496,-4.84e-05}, + {237,497,-1.93e-04}, + {237,498,-4.84e-05}, + {237,525,-1.93e-04}, + {237,526,-7.74e-04}, + {237,527,-1.93e-04}, + {237,557,-4.84e-05}, + {237,558,-1.93e-04}, + {237,559,-4.84e-05}, + {238,238,8.29e-02}, + {238,208,-1.03e-02}, + {238,209,-1.03e-02}, + {238,210,-1.03e-02}, + {238,237,-1.03e-02}, + {238,239,-1.03e-02}, + {238,269,-1.03e-02}, + {238,270,-1.03e-02}, + {238,271,-1.03e-02}, + {238,497,-4.84e-05}, + {238,498,-1.93e-04}, + {238,499,-4.84e-05}, + {238,526,-1.93e-04}, + {238,527,-7.74e-04}, + {238,528,-1.93e-04}, + {238,558,-4.84e-05}, + {238,559,-1.93e-04}, + {238,560,-4.84e-05}, + {239,239,8.29e-02}, + {239,209,-1.03e-02}, + {239,210,-1.03e-02}, + {239,211,-1.03e-02}, + {239,238,-1.03e-02}, + {239,240,-1.03e-02}, + {239,270,-1.03e-02}, + {239,271,-1.03e-02}, + {239,272,-1.03e-02}, + {239,498,-4.84e-05}, + {239,499,-1.93e-04}, + {239,500,-4.84e-05}, + {239,527,-1.93e-04}, + {239,528,-7.74e-04}, + {239,529,-1.93e-04}, + {239,559,-4.84e-05}, + {239,560,-1.93e-04}, + {239,561,-4.84e-05}, + {240,240,8.29e-02}, + {240,210,-1.03e-02}, + {240,211,-1.03e-02}, + {240,239,-1.03e-02}, + {240,241,-1.03e-02}, + {240,242,-1.03e-02}, + {240,271,-1.03e-02}, + {240,272,-1.03e-02}, + {240,273,-1.03e-02}, + {240,499,-4.84e-05}, + {240,500,-1.93e-04}, + {240,528,-1.93e-04}, + {240,529,-7.74e-04}, + {240,530,-1.93e-04}, + {240,531,-4.84e-05}, + {240,560,-4.84e-05}, + {240,561,-1.93e-04}, + {240,562,-4.84e-05}, + {241,241,8.29e-02}, + {241,211,-1.03e-02}, + {241,240,-1.03e-02}, + {241,242,-1.03e-02}, + {241,257,-1.03e-02}, + {241,272,-1.03e-02}, + {241,273,-1.03e-02}, + {241,274,-1.03e-02}, + {241,275,-1.03e-02}, + {241,500,-4.84e-05}, + {241,529,-1.93e-04}, + {241,530,-7.74e-04}, + {241,531,-1.93e-04}, + {241,546,-4.84e-05}, + {241,561,-4.84e-05}, + {241,562,-1.93e-04}, + {241,563,-1.93e-04}, + {241,564,-4.84e-05}, + {242,242,8.29e-02}, + {242,211,-1.03e-02}, + {242,212,-1.03e-02}, + {242,240,-1.03e-02}, + {242,241,-1.03e-02}, + {242,243,-1.03e-02}, + {242,274,-1.03e-02}, + {242,275,-1.03e-02}, + {242,276,-1.03e-02}, + {242,500,-1.93e-04}, + {242,501,-4.84e-05}, + {242,529,-4.84e-05}, + {242,530,-1.93e-04}, + {242,531,-7.74e-04}, + {242,532,-1.93e-04}, + {242,563,-4.84e-05}, + {242,564,-1.93e-04}, + {242,565,-4.84e-05}, + {243,243,8.29e-02}, + {243,211,-1.03e-02}, + {243,212,-1.03e-02}, + {243,213,-1.03e-02}, + {243,242,-1.03e-02}, + {243,244,-1.03e-02}, + {243,275,-1.03e-02}, + {243,276,-1.03e-02}, + {243,277,-1.03e-02}, + {243,500,-4.84e-05}, + {243,501,-1.93e-04}, + {243,502,-4.84e-05}, + {243,531,-1.93e-04}, + {243,532,-7.74e-04}, + {243,533,-1.93e-04}, + {243,564,-4.84e-05}, + {243,565,-1.93e-04}, + {243,566,-4.84e-05}, + {244,244,8.29e-02}, + {244,212,-1.03e-02}, + {244,213,-1.03e-02}, + {244,217,-1.03e-02}, + {244,243,-1.03e-02}, + {244,245,-1.03e-02}, + {244,276,-1.03e-02}, + {244,277,-1.03e-02}, + {244,278,-1.03e-02}, + {244,501,-4.84e-05}, + {244,502,-1.93e-04}, + {244,506,-4.84e-05}, + {244,532,-1.93e-04}, + {244,533,-7.74e-04}, + {244,534,-1.93e-04}, + {244,565,-4.84e-05}, + {244,566,-1.93e-04}, + {244,567,-4.84e-05}, + {245,245,8.29e-02}, + {245,213,-1.03e-02}, + {245,214,-1.03e-02}, + {245,217,-1.03e-02}, + {245,244,-1.03e-02}, + {245,246,-1.03e-02}, + {245,277,-1.03e-02}, + {245,278,-1.03e-02}, + {245,279,-1.03e-02}, + {245,502,-4.84e-05}, + {245,503,-4.84e-05}, + {245,506,-1.93e-04}, + {245,533,-1.93e-04}, + {245,534,-7.74e-04}, + {245,535,-1.93e-04}, + {245,566,-4.84e-05}, + {245,567,-1.93e-04}, + {245,568,-4.84e-05}, + {246,246,8.29e-02}, + {246,214,-1.03e-02}, + {246,215,-1.03e-02}, + {246,217,-1.03e-02}, + {246,245,-1.03e-02}, + {246,247,-1.03e-02}, + {246,278,-1.03e-02}, + {246,279,-1.03e-02}, + {246,280,-1.03e-02}, + {246,503,-1.93e-04}, + {246,504,-4.84e-05}, + {246,506,-4.84e-05}, + {246,534,-1.93e-04}, + {246,535,-7.74e-04}, + {246,536,-1.93e-04}, + {246,567,-4.84e-05}, + {246,568,-1.93e-04}, + {246,569,-4.84e-05}, + {247,247,8.29e-02}, + {247,214,-1.03e-02}, + {247,215,-1.03e-02}, + {247,216,-1.03e-02}, + {247,246,-1.03e-02}, + {247,248,-1.03e-02}, + {247,279,-1.03e-02}, + {247,280,-1.03e-02}, + {247,281,-1.03e-02}, + {247,503,-4.84e-05}, + {247,504,-1.93e-04}, + {247,505,-4.84e-05}, + {247,535,-1.93e-04}, + {247,536,-7.74e-04}, + {247,537,-1.93e-04}, + {247,568,-4.84e-05}, + {247,569,-1.93e-04}, + {247,570,-4.84e-05}, + {248,248,8.29e-02}, + {248,215,-1.03e-02}, + {248,216,-1.03e-02}, + {248,221,-1.03e-02}, + {248,247,-1.03e-02}, + {248,249,-1.03e-02}, + {248,280,-1.03e-02}, + {248,281,-1.03e-02}, + {248,282,-1.03e-02}, + {248,504,-4.84e-05}, + {248,505,-1.93e-04}, + {248,510,-4.84e-05}, + {248,536,-1.93e-04}, + {248,537,-7.74e-04}, + {248,538,-1.93e-04}, + {248,569,-4.84e-05}, + {248,570,-1.93e-04}, + {248,571,-4.84e-05}, + {249,249,8.29e-02}, + {249,216,-1.03e-02}, + {249,218,-1.03e-02}, + {249,221,-1.03e-02}, + {249,248,-1.03e-02}, + {249,250,-1.03e-02}, + {249,281,-1.03e-02}, + {249,282,-1.03e-02}, + {249,283,-1.03e-02}, + {249,505,-4.84e-05}, + {249,507,-4.84e-05}, + {249,510,-1.93e-04}, + {249,537,-1.93e-04}, + {249,538,-7.74e-04}, + {249,539,-1.93e-04}, + {249,570,-4.84e-05}, + {249,571,-1.93e-04}, + {249,572,-4.84e-05}, + {250,250,8.29e-02}, + {250,218,-1.03e-02}, + {250,219,-1.03e-02}, + {250,221,-1.03e-02}, + {250,249,-1.03e-02}, + {250,251,-1.03e-02}, + {250,282,-1.03e-02}, + {250,283,-1.03e-02}, + {250,284,-1.03e-02}, + {250,507,-1.93e-04}, + {250,508,-4.84e-05}, + {250,510,-4.84e-05}, + {250,538,-1.93e-04}, + {250,539,-7.74e-04}, + {250,540,-1.93e-04}, + {250,571,-4.84e-05}, + {250,572,-1.93e-04}, + {250,573,-4.84e-05}, + {251,251,8.29e-02}, + {251,218,-1.03e-02}, + {251,219,-1.03e-02}, + {251,220,-1.03e-02}, + {251,250,-1.03e-02}, + {251,252,-1.03e-02}, + {251,283,-1.03e-02}, + {251,284,-1.03e-02}, + {251,285,-1.03e-02}, + {251,507,-4.84e-05}, + {251,508,-1.93e-04}, + {251,509,-4.84e-05}, + {251,539,-1.93e-04}, + {251,540,-7.74e-04}, + {251,541,-1.93e-04}, + {251,572,-4.84e-05}, + {251,573,-1.93e-04}, + {251,574,-4.84e-05}, + {252,252,8.29e-02}, + {252,219,-1.03e-02}, + {252,220,-1.03e-02}, + {252,224,-1.03e-02}, + {252,251,-1.03e-02}, + {252,253,-1.03e-02}, + {252,284,-1.03e-02}, + {252,285,-1.03e-02}, + {252,286,-1.03e-02}, + {252,508,-4.84e-05}, + {252,509,-1.93e-04}, + {252,513,-4.84e-05}, + {252,540,-1.93e-04}, + {252,541,-7.74e-04}, + {252,542,-1.93e-04}, + {252,573,-4.84e-05}, + {252,574,-1.93e-04}, + {252,575,-4.84e-05}, + {253,253,8.29e-02}, + {253,220,-1.03e-02}, + {253,222,-1.03e-02}, + {253,224,-1.03e-02}, + {253,252,-1.03e-02}, + {253,254,-1.03e-02}, + {253,285,-1.03e-02}, + {253,286,-1.03e-02}, + {253,287,-1.03e-02}, + {253,509,-4.84e-05}, + {253,511,-4.84e-05}, + {253,513,-1.93e-04}, + {253,541,-1.93e-04}, + {253,542,-7.74e-04}, + {253,543,-1.93e-04}, + {253,574,-4.84e-05}, + {253,575,-1.93e-04}, + {253,576,-4.84e-05}, + {254,254,8.29e-02}, + {254,222,-1.03e-02}, + {254,223,-1.03e-02}, + {254,224,-1.03e-02}, + {254,253,-1.03e-02}, + {254,255,-1.03e-02}, + {254,286,-1.03e-02}, + {254,287,-1.03e-02}, + {254,288,-1.03e-02}, + {254,511,-1.93e-04}, + {254,512,-4.84e-05}, + {254,513,-4.84e-05}, + {254,542,-1.93e-04}, + {254,543,-7.74e-04}, + {254,544,-1.93e-04}, + {254,575,-4.84e-05}, + {254,576,-1.93e-04}, + {254,577,-4.84e-05}, + {255,255,8.29e-02}, + {255,197,-1.03e-02}, + {255,222,-1.03e-02}, + {255,223,-1.03e-02}, + {255,226,-1.03e-02}, + {255,254,-1.03e-02}, + {255,258,-1.03e-02}, + {255,287,-1.03e-02}, + {255,288,-1.03e-02}, + {255,486,-4.84e-05}, + {255,511,-4.84e-05}, + {255,512,-1.93e-04}, + {255,515,-1.93e-04}, + {255,543,-1.93e-04}, + {255,544,-7.74e-04}, + {255,547,-4.84e-05}, + {255,576,-4.84e-05}, + {255,577,-1.93e-04}, + {256,256,1.87e-01}, + {256,225,3.65e-02}, + {256,227,-1.03e-02}, + {256,259,3.65e-02}, + {256,514,-9.67e-05}, + {256,516,-4.84e-05}, + {256,545,-1.93e-04}, + {256,548,-9.67e-05}, + {257,257,1.87e-01}, + {257,241,-1.03e-02}, + {257,273,3.65e-02}, + {257,274,3.65e-02}, + {257,530,-4.84e-05}, + {257,546,-1.93e-04}, + {257,562,-9.67e-05}, + {257,563,-9.67e-05}, + {258,258,1.87e-01}, + {258,226,3.65e-02}, + {258,255,-1.03e-02}, + {258,288,3.65e-02}, + {258,515,-9.67e-05}, + {258,544,-4.84e-05}, + {258,547,-1.93e-04}, + {258,577,-9.67e-05}, + {259,259,2.08e-01}, + {259,225,-1.03e-02}, + {259,227,-1.03e-02}, + {259,228,-1.03e-02}, + {259,256,3.65e-02}, + {259,260,3.65e-02}, + {259,514,-4.84e-05}, + {259,516,-1.93e-04}, + {259,517,-4.84e-05}, + {259,545,-9.67e-05}, + {259,548,-3.87e-04}, + {259,549,-9.67e-05}, + {260,260,2.08e-01}, + {260,227,-1.03e-02}, + {260,228,-1.03e-02}, + {260,229,-1.03e-02}, + {260,259,3.65e-02}, + {260,261,3.65e-02}, + {260,516,-4.84e-05}, + {260,517,-1.93e-04}, + {260,518,-4.84e-05}, + {260,548,-9.67e-05}, + {260,549,-3.87e-04}, + {260,550,-9.67e-05}, + {261,261,2.08e-01}, + {261,228,-1.03e-02}, + {261,229,-1.03e-02}, + {261,230,-1.03e-02}, + {261,260,3.65e-02}, + {261,262,3.65e-02}, + {261,517,-4.84e-05}, + {261,518,-1.93e-04}, + {261,519,-4.84e-05}, + {261,549,-9.67e-05}, + {261,550,-3.87e-04}, + {261,551,-9.67e-05}, + {262,262,2.08e-01}, + {262,229,-1.03e-02}, + {262,230,-1.03e-02}, + {262,231,-1.03e-02}, + {262,261,3.65e-02}, + {262,263,3.65e-02}, + {262,518,-4.84e-05}, + {262,519,-1.93e-04}, + {262,520,-4.84e-05}, + {262,550,-9.67e-05}, + {262,551,-3.87e-04}, + {262,552,-9.67e-05}, + {263,263,2.08e-01}, + {263,230,-1.03e-02}, + {263,231,-1.03e-02}, + {263,232,-1.03e-02}, + {263,262,3.65e-02}, + {263,264,3.65e-02}, + {263,519,-4.84e-05}, + {263,520,-1.93e-04}, + {263,521,-4.84e-05}, + {263,551,-9.67e-05}, + {263,552,-3.87e-04}, + {263,553,-9.67e-05}, + {264,264,2.08e-01}, + {264,231,-1.03e-02}, + {264,232,-1.03e-02}, + {264,233,-1.03e-02}, + {264,263,3.65e-02}, + {264,265,3.65e-02}, + {264,520,-4.84e-05}, + {264,521,-1.93e-04}, + {264,522,-4.84e-05}, + {264,552,-9.67e-05}, + {264,553,-3.87e-04}, + {264,554,-9.67e-05}, + {265,265,2.08e-01}, + {265,232,-1.03e-02}, + {265,233,-1.03e-02}, + {265,234,-1.03e-02}, + {265,264,3.65e-02}, + {265,266,3.65e-02}, + {265,521,-4.84e-05}, + {265,522,-1.93e-04}, + {265,523,-4.84e-05}, + {265,553,-9.67e-05}, + {265,554,-3.87e-04}, + {265,555,-9.67e-05}, + {266,266,2.08e-01}, + {266,233,-1.03e-02}, + {266,234,-1.03e-02}, + {266,235,-1.03e-02}, + {266,265,3.65e-02}, + {266,267,3.65e-02}, + {266,522,-4.84e-05}, + {266,523,-1.93e-04}, + {266,524,-4.84e-05}, + {266,554,-9.67e-05}, + {266,555,-3.87e-04}, + {266,556,-9.67e-05}, + {267,267,2.08e-01}, + {267,234,-1.03e-02}, + {267,235,-1.03e-02}, + {267,236,-1.03e-02}, + {267,266,3.65e-02}, + {267,268,3.65e-02}, + {267,523,-4.84e-05}, + {267,524,-1.93e-04}, + {267,525,-4.84e-05}, + {267,555,-9.67e-05}, + {267,556,-3.87e-04}, + {267,557,-9.67e-05}, + {268,268,2.08e-01}, + {268,235,-1.03e-02}, + {268,236,-1.03e-02}, + {268,237,-1.03e-02}, + {268,267,3.65e-02}, + {268,269,3.65e-02}, + {268,524,-4.84e-05}, + {268,525,-1.93e-04}, + {268,526,-4.84e-05}, + {268,556,-9.67e-05}, + {268,557,-3.87e-04}, + {268,558,-9.67e-05}, + {269,269,2.08e-01}, + {269,236,-1.03e-02}, + {269,237,-1.03e-02}, + {269,238,-1.03e-02}, + {269,268,3.65e-02}, + {269,270,3.65e-02}, + {269,525,-4.84e-05}, + {269,526,-1.93e-04}, + {269,527,-4.84e-05}, + {269,557,-9.67e-05}, + {269,558,-3.87e-04}, + {269,559,-9.67e-05}, + {270,270,2.08e-01}, + {270,237,-1.03e-02}, + {270,238,-1.03e-02}, + {270,239,-1.03e-02}, + {270,269,3.65e-02}, + {270,271,3.65e-02}, + {270,526,-4.84e-05}, + {270,527,-1.93e-04}, + {270,528,-4.84e-05}, + {270,558,-9.67e-05}, + {270,559,-3.87e-04}, + {270,560,-9.67e-05}, + {271,271,2.08e-01}, + {271,238,-1.03e-02}, + {271,239,-1.03e-02}, + {271,240,-1.03e-02}, + {271,270,3.65e-02}, + {271,272,3.65e-02}, + {271,527,-4.84e-05}, + {271,528,-1.93e-04}, + {271,529,-4.84e-05}, + {271,559,-9.67e-05}, + {271,560,-3.87e-04}, + {271,561,-9.67e-05}, + {272,272,2.08e-01}, + {272,239,-1.03e-02}, + {272,240,-1.03e-02}, + {272,241,-1.03e-02}, + {272,271,3.65e-02}, + {272,273,3.65e-02}, + {272,528,-4.84e-05}, + {272,529,-1.93e-04}, + {272,530,-4.84e-05}, + {272,560,-9.67e-05}, + {272,561,-3.87e-04}, + {272,562,-9.67e-05}, + {273,273,2.08e-01}, + {273,240,-1.03e-02}, + {273,241,-1.03e-02}, + {273,257,3.65e-02}, + {273,272,3.65e-02}, + {273,274,-1.03e-02}, + {273,529,-4.84e-05}, + {273,530,-1.93e-04}, + {273,546,-9.67e-05}, + {273,561,-9.67e-05}, + {273,562,-3.87e-04}, + {273,563,-4.84e-05}, + {274,274,2.08e-01}, + {274,241,-1.03e-02}, + {274,242,-1.03e-02}, + {274,257,3.65e-02}, + {274,273,-1.03e-02}, + {274,275,3.65e-02}, + {274,530,-1.93e-04}, + {274,531,-4.84e-05}, + {274,546,-9.67e-05}, + {274,562,-4.84e-05}, + {274,563,-3.87e-04}, + {274,564,-9.67e-05}, + {275,275,2.08e-01}, + {275,241,-1.03e-02}, + {275,242,-1.03e-02}, + {275,243,-1.03e-02}, + {275,274,3.65e-02}, + {275,276,3.65e-02}, + {275,530,-4.84e-05}, + {275,531,-1.93e-04}, + {275,532,-4.84e-05}, + {275,563,-9.67e-05}, + {275,564,-3.87e-04}, + {275,565,-9.67e-05}, + {276,276,2.08e-01}, + {276,242,-1.03e-02}, + {276,243,-1.03e-02}, + {276,244,-1.03e-02}, + {276,275,3.65e-02}, + {276,277,3.65e-02}, + {276,531,-4.84e-05}, + {276,532,-1.93e-04}, + {276,533,-4.84e-05}, + {276,564,-9.67e-05}, + {276,565,-3.87e-04}, + {276,566,-9.67e-05}, + {277,277,2.08e-01}, + {277,243,-1.03e-02}, + {277,244,-1.03e-02}, + {277,245,-1.03e-02}, + {277,276,3.65e-02}, + {277,278,3.65e-02}, + {277,532,-4.84e-05}, + {277,533,-1.93e-04}, + {277,534,-4.84e-05}, + {277,565,-9.67e-05}, + {277,566,-3.87e-04}, + {277,567,-9.67e-05}, + {278,278,2.08e-01}, + {278,244,-1.03e-02}, + {278,245,-1.03e-02}, + {278,246,-1.03e-02}, + {278,277,3.65e-02}, + {278,279,3.65e-02}, + {278,533,-4.84e-05}, + {278,534,-1.93e-04}, + {278,535,-4.84e-05}, + {278,566,-9.67e-05}, + {278,567,-3.87e-04}, + {278,568,-9.67e-05}, + {279,279,2.08e-01}, + {279,245,-1.03e-02}, + {279,246,-1.03e-02}, + {279,247,-1.03e-02}, + {279,278,3.65e-02}, + {279,280,3.65e-02}, + {279,534,-4.84e-05}, + {279,535,-1.93e-04}, + {279,536,-4.84e-05}, + {279,567,-9.67e-05}, + {279,568,-3.87e-04}, + {279,569,-9.67e-05}, + {280,280,2.08e-01}, + {280,246,-1.03e-02}, + {280,247,-1.03e-02}, + {280,248,-1.03e-02}, + {280,279,3.65e-02}, + {280,281,3.65e-02}, + {280,535,-4.84e-05}, + {280,536,-1.93e-04}, + {280,537,-4.84e-05}, + {280,568,-9.67e-05}, + {280,569,-3.87e-04}, + {280,570,-9.67e-05}, + {281,281,2.08e-01}, + {281,247,-1.03e-02}, + {281,248,-1.03e-02}, + {281,249,-1.03e-02}, + {281,280,3.65e-02}, + {281,282,3.65e-02}, + {281,536,-4.84e-05}, + {281,537,-1.93e-04}, + {281,538,-4.84e-05}, + {281,569,-9.67e-05}, + {281,570,-3.87e-04}, + {281,571,-9.67e-05}, + {282,282,2.08e-01}, + {282,248,-1.03e-02}, + {282,249,-1.03e-02}, + {282,250,-1.03e-02}, + {282,281,3.65e-02}, + {282,283,3.65e-02}, + {282,537,-4.84e-05}, + {282,538,-1.93e-04}, + {282,539,-4.84e-05}, + {282,570,-9.67e-05}, + {282,571,-3.87e-04}, + {282,572,-9.67e-05}, + {283,283,2.08e-01}, + {283,249,-1.03e-02}, + {283,250,-1.03e-02}, + {283,251,-1.03e-02}, + {283,282,3.65e-02}, + {283,284,3.65e-02}, + {283,538,-4.84e-05}, + {283,539,-1.93e-04}, + {283,540,-4.84e-05}, + {283,571,-9.67e-05}, + {283,572,-3.87e-04}, + {283,573,-9.67e-05}, + {284,284,2.08e-01}, + {284,250,-1.03e-02}, + {284,251,-1.03e-02}, + {284,252,-1.03e-02}, + {284,283,3.65e-02}, + {284,285,3.65e-02}, + {284,539,-4.84e-05}, + {284,540,-1.93e-04}, + {284,541,-4.84e-05}, + {284,572,-9.67e-05}, + {284,573,-3.87e-04}, + {284,574,-9.67e-05}, + {285,285,2.08e-01}, + {285,251,-1.03e-02}, + {285,252,-1.03e-02}, + {285,253,-1.03e-02}, + {285,284,3.65e-02}, + {285,286,3.65e-02}, + {285,540,-4.84e-05}, + {285,541,-1.93e-04}, + {285,542,-4.84e-05}, + {285,573,-9.67e-05}, + {285,574,-3.87e-04}, + {285,575,-9.67e-05}, + {286,286,2.08e-01}, + {286,252,-1.03e-02}, + {286,253,-1.03e-02}, + {286,254,-1.03e-02}, + {286,285,3.65e-02}, + {286,287,3.65e-02}, + {286,541,-4.84e-05}, + {286,542,-1.93e-04}, + {286,543,-4.84e-05}, + {286,574,-9.67e-05}, + {286,575,-3.87e-04}, + {286,576,-9.67e-05}, + {287,287,2.08e-01}, + {287,253,-1.03e-02}, + {287,254,-1.03e-02}, + {287,255,-1.03e-02}, + {287,286,3.65e-02}, + {287,288,3.65e-02}, + {287,542,-4.84e-05}, + {287,543,-1.93e-04}, + {287,544,-4.84e-05}, + {287,575,-9.67e-05}, + {287,576,-3.87e-04}, + {287,577,-9.67e-05}, + {288,288,2.08e-01}, + {288,226,-1.03e-02}, + {288,254,-1.03e-02}, + {288,255,-1.03e-02}, + {288,258,3.65e-02}, + {288,287,3.65e-02}, + {288,515,-4.84e-05}, + {288,543,-4.84e-05}, + {288,544,-1.93e-04}, + {288,547,-9.67e-05}, + {288,576,-9.67e-05}, + {288,577,-3.87e-04}, + {289,289,1.87e-01}, + {289,0,1.93e-04}, + {289,1,9.67e-05}, + {289,2,9.67e-05}, + {289,3,4.84e-05}, + {289,290,3.65e-02}, + {289,291,3.65e-02}, + {289,292,-1.03e-02}, + {290,290,2.08e-01}, + {290,0,9.67e-05}, + {290,1,3.87e-04}, + {290,2,4.84e-05}, + {290,3,1.93e-04}, + {290,4,9.67e-05}, + {290,6,4.84e-05}, + {290,289,3.65e-02}, + {290,291,-1.03e-02}, + {290,292,-1.03e-02}, + {290,293,3.65e-02}, + {290,295,-1.03e-02}, + {291,291,2.08e-01}, + {291,0,9.67e-05}, + {291,1,4.84e-05}, + {291,2,3.87e-04}, + {291,3,1.93e-04}, + {291,5,9.67e-05}, + {291,8,4.84e-05}, + {291,289,3.65e-02}, + {291,290,-1.03e-02}, + {291,292,-1.03e-02}, + {291,294,3.65e-02}, + {291,297,-1.03e-02}, + {292,292,8.29e-02}, + {292,0,4.84e-05}, + {292,1,1.93e-04}, + {292,2,1.93e-04}, + {292,3,7.74e-04}, + {292,4,4.84e-05}, + {292,5,4.84e-05}, + {292,6,1.93e-04}, + {292,7,4.84e-05}, + {292,8,1.93e-04}, + {292,289,-1.03e-02}, + {292,290,-1.03e-02}, + {292,291,-1.03e-02}, + {292,293,-1.03e-02}, + {292,294,-1.03e-02}, + {292,295,-1.03e-02}, + {292,296,-1.03e-02}, + {292,297,-1.03e-02}, + {293,293,2.08e-01}, + {293,1,9.67e-05}, + {293,3,4.84e-05}, + {293,4,3.87e-04}, + {293,6,1.93e-04}, + {293,9,9.67e-05}, + {293,11,4.84e-05}, + {293,290,3.65e-02}, + {293,292,-1.03e-02}, + {293,295,-1.03e-02}, + {293,298,3.65e-02}, + {293,300,-1.03e-02}, + {294,294,2.08e-01}, + {294,2,9.67e-05}, + {294,3,4.84e-05}, + {294,5,3.87e-04}, + {294,8,1.93e-04}, + {294,10,9.67e-05}, + {294,15,4.84e-05}, + {294,291,3.65e-02}, + {294,292,-1.03e-02}, + {294,297,-1.03e-02}, + {294,299,3.65e-02}, + {294,304,-1.03e-02}, + {295,295,8.29e-02}, + {295,1,4.84e-05}, + {295,3,1.93e-04}, + {295,4,1.93e-04}, + {295,6,7.74e-04}, + {295,7,1.93e-04}, + {295,8,4.84e-05}, + {295,9,4.84e-05}, + {295,11,1.93e-04}, + {295,12,4.84e-05}, + {295,290,-1.03e-02}, + {295,292,-1.03e-02}, + {295,293,-1.03e-02}, + {295,296,-1.03e-02}, + {295,297,-1.03e-02}, + {295,298,-1.03e-02}, + {295,300,-1.03e-02}, + {295,301,-1.03e-02}, + {296,296,8.29e-02}, + {296,3,4.84e-05}, + {296,6,1.93e-04}, + {296,7,7.74e-04}, + {296,8,1.93e-04}, + {296,11,4.84e-05}, + {296,12,1.93e-04}, + {296,13,4.84e-05}, + {296,14,1.93e-04}, + {296,15,4.84e-05}, + {296,292,-1.03e-02}, + {296,295,-1.03e-02}, + {296,297,-1.03e-02}, + {296,300,-1.03e-02}, + {296,301,-1.03e-02}, + {296,302,-1.03e-02}, + {296,303,-1.03e-02}, + {296,304,-1.03e-02}, + {297,297,8.29e-02}, + {297,2,4.84e-05}, + {297,3,1.93e-04}, + {297,5,1.93e-04}, + {297,6,4.84e-05}, + {297,7,1.93e-04}, + {297,8,7.74e-04}, + {297,10,4.84e-05}, + {297,14,4.84e-05}, + {297,15,1.93e-04}, + {297,291,-1.03e-02}, + {297,292,-1.03e-02}, + {297,294,-1.03e-02}, + {297,295,-1.03e-02}, + {297,296,-1.03e-02}, + {297,299,-1.03e-02}, + {297,303,-1.03e-02}, + {297,304,-1.03e-02}, + {298,298,2.08e-01}, + {298,4,9.67e-05}, + {298,6,4.84e-05}, + {298,9,3.87e-04}, + {298,11,1.93e-04}, + {298,16,9.67e-05}, + {298,18,4.84e-05}, + {298,293,3.65e-02}, + {298,295,-1.03e-02}, + {298,300,-1.03e-02}, + {298,305,3.65e-02}, + {298,307,-1.03e-02}, + {299,299,2.08e-01}, + {299,5,9.67e-05}, + {299,8,4.84e-05}, + {299,10,3.87e-04}, + {299,15,1.93e-04}, + {299,17,9.67e-05}, + {299,24,4.84e-05}, + {299,294,3.65e-02}, + {299,297,-1.03e-02}, + {299,304,-1.03e-02}, + {299,306,3.65e-02}, + {299,313,-1.03e-02}, + {300,300,8.29e-02}, + {300,4,4.84e-05}, + {300,6,1.93e-04}, + {300,7,4.84e-05}, + {300,9,1.93e-04}, + {300,11,7.74e-04}, + {300,12,1.93e-04}, + {300,16,4.84e-05}, + {300,18,1.93e-04}, + {300,19,4.84e-05}, + {300,293,-1.03e-02}, + {300,295,-1.03e-02}, + {300,296,-1.03e-02}, + {300,298,-1.03e-02}, + {300,301,-1.03e-02}, + {300,305,-1.03e-02}, + {300,307,-1.03e-02}, + {300,308,-1.03e-02}, + {301,301,8.29e-02}, + {301,6,4.84e-05}, + {301,7,1.93e-04}, + {301,11,1.93e-04}, + {301,12,7.74e-04}, + {301,13,1.93e-04}, + {301,14,4.84e-05}, + {301,18,4.84e-05}, + {301,19,1.93e-04}, + {301,20,4.84e-05}, + {301,295,-1.03e-02}, + {301,296,-1.03e-02}, + {301,300,-1.03e-02}, + {301,302,-1.03e-02}, + {301,303,-1.03e-02}, + {301,307,-1.03e-02}, + {301,308,-1.03e-02}, + {301,309,-1.03e-02}, + {302,302,8.29e-02}, + {302,7,4.84e-05}, + {302,12,1.93e-04}, + {302,13,7.74e-04}, + {302,14,1.93e-04}, + {302,19,4.84e-05}, + {302,20,1.93e-04}, + {302,21,4.84e-05}, + {302,22,1.93e-04}, + {302,23,4.84e-05}, + {302,296,-1.03e-02}, + {302,301,-1.03e-02}, + {302,303,-1.03e-02}, + {302,308,-1.03e-02}, + {302,309,-1.03e-02}, + {302,310,-1.03e-02}, + {302,311,-1.03e-02}, + {302,312,-1.03e-02}, + {303,303,8.29e-02}, + {303,7,1.93e-04}, + {303,8,4.84e-05}, + {303,12,4.84e-05}, + {303,13,1.93e-04}, + {303,14,7.74e-04}, + {303,15,1.93e-04}, + {303,22,4.84e-05}, + {303,23,1.93e-04}, + {303,24,4.84e-05}, + {303,296,-1.03e-02}, + {303,297,-1.03e-02}, + {303,301,-1.03e-02}, + {303,302,-1.03e-02}, + {303,304,-1.03e-02}, + {303,311,-1.03e-02}, + {303,312,-1.03e-02}, + {303,313,-1.03e-02}, + {304,304,8.29e-02}, + {304,5,4.84e-05}, + {304,7,4.84e-05}, + {304,8,1.93e-04}, + {304,10,1.93e-04}, + {304,14,1.93e-04}, + {304,15,7.74e-04}, + {304,17,4.84e-05}, + {304,23,4.84e-05}, + {304,24,1.93e-04}, + {304,294,-1.03e-02}, + {304,296,-1.03e-02}, + {304,297,-1.03e-02}, + {304,299,-1.03e-02}, + {304,303,-1.03e-02}, + {304,306,-1.03e-02}, + {304,312,-1.03e-02}, + {304,313,-1.03e-02}, + {305,305,2.08e-01}, + {305,9,9.67e-05}, + {305,11,4.84e-05}, + {305,16,3.87e-04}, + {305,18,1.93e-04}, + {305,25,9.67e-05}, + {305,27,4.84e-05}, + {305,298,3.65e-02}, + {305,300,-1.03e-02}, + {305,307,-1.03e-02}, + {305,314,3.65e-02}, + {305,316,-1.03e-02}, + {306,306,2.08e-01}, + {306,10,9.67e-05}, + {306,15,4.84e-05}, + {306,17,3.87e-04}, + {306,24,1.93e-04}, + {306,26,9.67e-05}, + {306,33,4.84e-05}, + {306,299,3.65e-02}, + {306,304,-1.03e-02}, + {306,313,-1.03e-02}, + {306,315,3.65e-02}, + {306,322,-1.03e-02}, + {307,307,8.29e-02}, + {307,9,4.84e-05}, + {307,11,1.93e-04}, + {307,12,4.84e-05}, + {307,16,1.93e-04}, + {307,18,7.74e-04}, + {307,19,1.93e-04}, + {307,25,4.84e-05}, + {307,27,1.93e-04}, + {307,28,4.84e-05}, + {307,298,-1.03e-02}, + {307,300,-1.03e-02}, + {307,301,-1.03e-02}, + {307,305,-1.03e-02}, + {307,308,-1.03e-02}, + {307,314,-1.03e-02}, + {307,316,-1.03e-02}, + {307,317,-1.03e-02}, + {308,308,8.29e-02}, + {308,11,4.84e-05}, + {308,12,1.93e-04}, + {308,13,4.84e-05}, + {308,18,1.93e-04}, + {308,19,7.74e-04}, + {308,20,1.93e-04}, + {308,27,4.84e-05}, + {308,28,1.93e-04}, + {308,29,4.84e-05}, + {308,300,-1.03e-02}, + {308,301,-1.03e-02}, + {308,302,-1.03e-02}, + {308,307,-1.03e-02}, + {308,309,-1.03e-02}, + {308,316,-1.03e-02}, + {308,317,-1.03e-02}, + {308,318,-1.03e-02}, + {309,309,8.29e-02}, + {309,12,4.84e-05}, + {309,13,1.93e-04}, + {309,19,1.93e-04}, + {309,20,7.74e-04}, + {309,21,1.93e-04}, + {309,22,4.84e-05}, + {309,28,4.84e-05}, + {309,29,1.93e-04}, + {309,30,4.84e-05}, + {309,301,-1.03e-02}, + {309,302,-1.03e-02}, + {309,308,-1.03e-02}, + {309,310,-1.03e-02}, + {309,311,-1.03e-02}, + {309,317,-1.03e-02}, + {309,318,-1.03e-02}, + {309,319,-1.03e-02}, + {310,310,8.29e-02}, + {310,13,4.84e-05}, + {310,20,1.93e-04}, + {310,21,7.74e-04}, + {310,22,1.93e-04}, + {310,29,4.84e-05}, + {310,30,1.93e-04}, + {310,31,4.84e-05}, + {310,32,1.93e-04}, + {310,35,4.84e-05}, + {310,302,-1.03e-02}, + {310,309,-1.03e-02}, + {310,311,-1.03e-02}, + {310,318,-1.03e-02}, + {310,319,-1.03e-02}, + {310,320,-1.03e-02}, + {310,321,-1.03e-02}, + {310,324,-1.03e-02}, + {311,311,8.29e-02}, + {311,13,1.93e-04}, + {311,14,4.84e-05}, + {311,20,4.84e-05}, + {311,21,1.93e-04}, + {311,22,7.74e-04}, + {311,23,1.93e-04}, + {311,32,4.84e-05}, + {311,34,4.84e-05}, + {311,35,1.93e-04}, + {311,302,-1.03e-02}, + {311,303,-1.03e-02}, + {311,309,-1.03e-02}, + {311,310,-1.03e-02}, + {311,312,-1.03e-02}, + {311,321,-1.03e-02}, + {311,323,-1.03e-02}, + {311,324,-1.03e-02}, + {312,312,8.29e-02}, + {312,13,4.84e-05}, + {312,14,1.93e-04}, + {312,15,4.84e-05}, + {312,22,1.93e-04}, + {312,23,7.74e-04}, + {312,24,1.93e-04}, + {312,33,4.84e-05}, + {312,34,1.93e-04}, + {312,35,4.84e-05}, + {312,302,-1.03e-02}, + {312,303,-1.03e-02}, + {312,304,-1.03e-02}, + {312,311,-1.03e-02}, + {312,313,-1.03e-02}, + {312,322,-1.03e-02}, + {312,323,-1.03e-02}, + {312,324,-1.03e-02}, + {313,313,8.29e-02}, + {313,10,4.84e-05}, + {313,14,4.84e-05}, + {313,15,1.93e-04}, + {313,17,1.93e-04}, + {313,23,1.93e-04}, + {313,24,7.74e-04}, + {313,26,4.84e-05}, + {313,33,1.93e-04}, + {313,34,4.84e-05}, + {313,299,-1.03e-02}, + {313,303,-1.03e-02}, + {313,304,-1.03e-02}, + {313,306,-1.03e-02}, + {313,312,-1.03e-02}, + {313,315,-1.03e-02}, + {313,322,-1.03e-02}, + {313,323,-1.03e-02}, + {314,314,2.08e-01}, + {314,16,9.67e-05}, + {314,18,4.84e-05}, + {314,25,3.87e-04}, + {314,27,1.93e-04}, + {314,36,9.67e-05}, + {314,38,4.84e-05}, + {314,305,3.65e-02}, + {314,307,-1.03e-02}, + {314,316,-1.03e-02}, + {314,325,3.65e-02}, + {314,327,-1.03e-02}, + {315,315,2.08e-01}, + {315,17,9.67e-05}, + {315,24,4.84e-05}, + {315,26,3.87e-04}, + {315,33,1.93e-04}, + {315,37,9.67e-05}, + {315,47,4.84e-05}, + {315,306,3.65e-02}, + {315,313,-1.03e-02}, + {315,322,-1.03e-02}, + {315,326,3.65e-02}, + {315,336,-1.03e-02}, + {316,316,8.29e-02}, + {316,16,4.84e-05}, + {316,18,1.93e-04}, + {316,19,4.84e-05}, + {316,25,1.93e-04}, + {316,27,7.74e-04}, + {316,28,1.93e-04}, + {316,36,4.84e-05}, + {316,38,1.93e-04}, + {316,39,4.84e-05}, + {316,305,-1.03e-02}, + {316,307,-1.03e-02}, + {316,308,-1.03e-02}, + {316,314,-1.03e-02}, + {316,317,-1.03e-02}, + {316,325,-1.03e-02}, + {316,327,-1.03e-02}, + {316,328,-1.03e-02}, + {317,317,8.29e-02}, + {317,18,4.84e-05}, + {317,19,1.93e-04}, + {317,20,4.84e-05}, + {317,27,1.93e-04}, + {317,28,7.74e-04}, + {317,29,1.93e-04}, + {317,38,4.84e-05}, + {317,39,1.93e-04}, + {317,40,4.84e-05}, + {317,307,-1.03e-02}, + {317,308,-1.03e-02}, + {317,309,-1.03e-02}, + {317,316,-1.03e-02}, + {317,318,-1.03e-02}, + {317,327,-1.03e-02}, + {317,328,-1.03e-02}, + {317,329,-1.03e-02}, + {318,318,8.29e-02}, + {318,19,4.84e-05}, + {318,20,1.93e-04}, + {318,21,4.84e-05}, + {318,28,1.93e-04}, + {318,29,7.74e-04}, + {318,30,1.93e-04}, + {318,39,4.84e-05}, + {318,40,1.93e-04}, + {318,41,4.84e-05}, + {318,308,-1.03e-02}, + {318,309,-1.03e-02}, + {318,310,-1.03e-02}, + {318,317,-1.03e-02}, + {318,319,-1.03e-02}, + {318,328,-1.03e-02}, + {318,329,-1.03e-02}, + {318,330,-1.03e-02}, + {319,319,8.29e-02}, + {319,20,4.84e-05}, + {319,21,1.93e-04}, + {319,29,1.93e-04}, + {319,30,7.74e-04}, + {319,31,1.93e-04}, + {319,32,4.84e-05}, + {319,40,4.84e-05}, + {319,41,1.93e-04}, + {319,42,4.84e-05}, + {319,309,-1.03e-02}, + {319,310,-1.03e-02}, + {319,318,-1.03e-02}, + {319,320,-1.03e-02}, + {319,321,-1.03e-02}, + {319,329,-1.03e-02}, + {319,330,-1.03e-02}, + {319,331,-1.03e-02}, + {320,320,8.29e-02}, + {320,21,4.84e-05}, + {320,30,1.93e-04}, + {320,31,7.74e-04}, + {320,32,1.93e-04}, + {320,41,4.84e-05}, + {320,42,1.93e-04}, + {320,43,4.84e-05}, + {320,44,1.93e-04}, + {320,45,4.84e-05}, + {320,310,-1.03e-02}, + {320,319,-1.03e-02}, + {320,321,-1.03e-02}, + {320,330,-1.03e-02}, + {320,331,-1.03e-02}, + {320,332,-1.03e-02}, + {320,333,-1.03e-02}, + {320,334,-1.03e-02}, + {321,321,8.29e-02}, + {321,21,1.93e-04}, + {321,22,4.84e-05}, + {321,30,4.84e-05}, + {321,31,1.93e-04}, + {321,32,7.74e-04}, + {321,35,1.93e-04}, + {321,44,4.84e-05}, + {321,45,1.93e-04}, + {321,48,4.84e-05}, + {321,310,-1.03e-02}, + {321,311,-1.03e-02}, + {321,319,-1.03e-02}, + {321,320,-1.03e-02}, + {321,324,-1.03e-02}, + {321,333,-1.03e-02}, + {321,334,-1.03e-02}, + {321,337,-1.03e-02}, + {322,322,8.29e-02}, + {322,17,4.84e-05}, + {322,23,4.84e-05}, + {322,24,1.93e-04}, + {322,26,1.93e-04}, + {322,33,7.74e-04}, + {322,34,1.93e-04}, + {322,37,4.84e-05}, + {322,46,4.84e-05}, + {322,47,1.93e-04}, + {322,306,-1.03e-02}, + {322,312,-1.03e-02}, + {322,313,-1.03e-02}, + {322,315,-1.03e-02}, + {322,323,-1.03e-02}, + {322,326,-1.03e-02}, + {322,335,-1.03e-02}, + {322,336,-1.03e-02}, + {323,323,8.29e-02}, + {323,22,4.84e-05}, + {323,23,1.93e-04}, + {323,24,4.84e-05}, + {323,33,1.93e-04}, + {323,34,7.74e-04}, + {323,35,1.93e-04}, + {323,46,1.93e-04}, + {323,47,4.84e-05}, + {323,48,4.84e-05}, + {323,311,-1.03e-02}, + {323,312,-1.03e-02}, + {323,313,-1.03e-02}, + {323,322,-1.03e-02}, + {323,324,-1.03e-02}, + {323,335,-1.03e-02}, + {323,336,-1.03e-02}, + {323,337,-1.03e-02}, + {324,324,8.29e-02}, + {324,21,4.84e-05}, + {324,22,1.93e-04}, + {324,23,4.84e-05}, + {324,32,1.93e-04}, + {324,34,1.93e-04}, + {324,35,7.74e-04}, + {324,45,4.84e-05}, + {324,46,4.84e-05}, + {324,48,1.93e-04}, + {324,310,-1.03e-02}, + {324,311,-1.03e-02}, + {324,312,-1.03e-02}, + {324,321,-1.03e-02}, + {324,323,-1.03e-02}, + {324,334,-1.03e-02}, + {324,335,-1.03e-02}, + {324,337,-1.03e-02}, + {325,325,2.08e-01}, + {325,25,9.67e-05}, + {325,27,4.84e-05}, + {325,36,3.87e-04}, + {325,38,1.93e-04}, + {325,49,9.67e-05}, + {325,51,4.84e-05}, + {325,314,3.65e-02}, + {325,316,-1.03e-02}, + {325,327,-1.03e-02}, + {325,338,3.65e-02}, + {325,340,-1.03e-02}, + {326,326,2.08e-01}, + {326,26,9.67e-05}, + {326,33,4.84e-05}, + {326,37,3.87e-04}, + {326,47,1.93e-04}, + {326,50,9.67e-05}, + {326,63,4.84e-05}, + {326,315,3.65e-02}, + {326,322,-1.03e-02}, + {326,336,-1.03e-02}, + {326,339,3.65e-02}, + {326,352,-1.03e-02}, + {327,327,8.29e-02}, + {327,25,4.84e-05}, + {327,27,1.93e-04}, + {327,28,4.84e-05}, + {327,36,1.93e-04}, + {327,38,7.74e-04}, + {327,39,1.93e-04}, + {327,49,4.84e-05}, + {327,51,1.93e-04}, + {327,52,4.84e-05}, + {327,314,-1.03e-02}, + {327,316,-1.03e-02}, + {327,317,-1.03e-02}, + {327,325,-1.03e-02}, + {327,328,-1.03e-02}, + {327,338,-1.03e-02}, + {327,340,-1.03e-02}, + {327,341,-1.03e-02}, + {328,328,8.29e-02}, + {328,27,4.84e-05}, + {328,28,1.93e-04}, + {328,29,4.84e-05}, + {328,38,1.93e-04}, + {328,39,7.74e-04}, + {328,40,1.93e-04}, + {328,51,4.84e-05}, + {328,52,1.93e-04}, + {328,53,4.84e-05}, + {328,316,-1.03e-02}, + {328,317,-1.03e-02}, + {328,318,-1.03e-02}, + {328,327,-1.03e-02}, + {328,329,-1.03e-02}, + {328,340,-1.03e-02}, + {328,341,-1.03e-02}, + {328,342,-1.03e-02}, + {329,329,8.29e-02}, + {329,28,4.84e-05}, + {329,29,1.93e-04}, + {329,30,4.84e-05}, + {329,39,1.93e-04}, + {329,40,7.74e-04}, + {329,41,1.93e-04}, + {329,52,4.84e-05}, + {329,53,1.93e-04}, + {329,54,4.84e-05}, + {329,317,-1.03e-02}, + {329,318,-1.03e-02}, + {329,319,-1.03e-02}, + {329,328,-1.03e-02}, + {329,330,-1.03e-02}, + {329,341,-1.03e-02}, + {329,342,-1.03e-02}, + {329,343,-1.03e-02}, + {330,330,8.29e-02}, + {330,29,4.84e-05}, + {330,30,1.93e-04}, + {330,31,4.84e-05}, + {330,40,1.93e-04}, + {330,41,7.74e-04}, + {330,42,1.93e-04}, + {330,53,4.84e-05}, + {330,54,1.93e-04}, + {330,55,4.84e-05}, + {330,318,-1.03e-02}, + {330,319,-1.03e-02}, + {330,320,-1.03e-02}, + {330,329,-1.03e-02}, + {330,331,-1.03e-02}, + {330,342,-1.03e-02}, + {330,343,-1.03e-02}, + {330,344,-1.03e-02}, + {331,331,8.29e-02}, + {331,30,4.84e-05}, + {331,31,1.93e-04}, + {331,41,1.93e-04}, + {331,42,7.74e-04}, + {331,43,1.93e-04}, + {331,44,4.84e-05}, + {331,54,4.84e-05}, + {331,55,1.93e-04}, + {331,56,4.84e-05}, + {331,319,-1.03e-02}, + {331,320,-1.03e-02}, + {331,330,-1.03e-02}, + {331,332,-1.03e-02}, + {331,333,-1.03e-02}, + {331,343,-1.03e-02}, + {331,344,-1.03e-02}, + {331,345,-1.03e-02}, + {332,332,8.29e-02}, + {332,31,4.84e-05}, + {332,42,1.93e-04}, + {332,43,7.74e-04}, + {332,44,1.93e-04}, + {332,55,4.84e-05}, + {332,56,1.93e-04}, + {332,57,4.84e-05}, + {332,58,1.93e-04}, + {332,59,4.84e-05}, + {332,320,-1.03e-02}, + {332,331,-1.03e-02}, + {332,333,-1.03e-02}, + {332,344,-1.03e-02}, + {332,345,-1.03e-02}, + {332,346,-1.03e-02}, + {332,347,-1.03e-02}, + {332,348,-1.03e-02}, + {333,333,8.29e-02}, + {333,31,1.93e-04}, + {333,32,4.84e-05}, + {333,42,4.84e-05}, + {333,43,1.93e-04}, + {333,44,7.74e-04}, + {333,45,1.93e-04}, + {333,58,4.84e-05}, + {333,59,1.93e-04}, + {333,60,4.84e-05}, + {333,320,-1.03e-02}, + {333,321,-1.03e-02}, + {333,331,-1.03e-02}, + {333,332,-1.03e-02}, + {333,334,-1.03e-02}, + {333,347,-1.03e-02}, + {333,348,-1.03e-02}, + {333,349,-1.03e-02}, + {334,334,8.29e-02}, + {334,31,4.84e-05}, + {334,32,1.93e-04}, + {334,35,4.84e-05}, + {334,44,1.93e-04}, + {334,45,7.74e-04}, + {334,48,1.93e-04}, + {334,59,4.84e-05}, + {334,60,1.93e-04}, + {334,61,4.84e-05}, + {334,320,-1.03e-02}, + {334,321,-1.03e-02}, + {334,324,-1.03e-02}, + {334,333,-1.03e-02}, + {334,337,-1.03e-02}, + {334,348,-1.03e-02}, + {334,349,-1.03e-02}, + {334,350,-1.03e-02}, + {335,335,8.29e-02}, + {335,33,4.84e-05}, + {335,34,1.93e-04}, + {335,35,4.84e-05}, + {335,46,7.74e-04}, + {335,47,1.93e-04}, + {335,48,1.93e-04}, + {335,61,4.84e-05}, + {335,62,1.93e-04}, + {335,63,4.84e-05}, + {335,322,-1.03e-02}, + {335,323,-1.03e-02}, + {335,324,-1.03e-02}, + {335,336,-1.03e-02}, + {335,337,-1.03e-02}, + {335,350,-1.03e-02}, + {335,351,-1.03e-02}, + {335,352,-1.03e-02}, + {336,336,8.29e-02}, + {336,26,4.84e-05}, + {336,33,1.93e-04}, + {336,34,4.84e-05}, + {336,37,1.93e-04}, + {336,46,1.93e-04}, + {336,47,7.74e-04}, + {336,50,4.84e-05}, + {336,62,4.84e-05}, + {336,63,1.93e-04}, + {336,315,-1.03e-02}, + {336,322,-1.03e-02}, + {336,323,-1.03e-02}, + {336,326,-1.03e-02}, + {336,335,-1.03e-02}, + {336,339,-1.03e-02}, + {336,351,-1.03e-02}, + {336,352,-1.03e-02}, + {337,337,8.29e-02}, + {337,32,4.84e-05}, + {337,34,4.84e-05}, + {337,35,1.93e-04}, + {337,45,1.93e-04}, + {337,46,1.93e-04}, + {337,48,7.74e-04}, + {337,60,4.84e-05}, + {337,61,1.93e-04}, + {337,62,4.84e-05}, + {337,321,-1.03e-02}, + {337,323,-1.03e-02}, + {337,324,-1.03e-02}, + {337,334,-1.03e-02}, + {337,335,-1.03e-02}, + {337,349,-1.03e-02}, + {337,350,-1.03e-02}, + {337,351,-1.03e-02}, + {338,338,2.08e-01}, + {338,36,9.67e-05}, + {338,38,4.84e-05}, + {338,49,3.87e-04}, + {338,51,1.93e-04}, + {338,64,9.67e-05}, + {338,66,4.84e-05}, + {338,325,3.65e-02}, + {338,327,-1.03e-02}, + {338,340,-1.03e-02}, + {338,353,3.65e-02}, + {338,355,-1.03e-02}, + {339,339,2.08e-01}, + {339,37,9.67e-05}, + {339,47,4.84e-05}, + {339,50,3.87e-04}, + {339,63,1.93e-04}, + {339,65,9.67e-05}, + {339,80,4.84e-05}, + {339,326,3.65e-02}, + {339,336,-1.03e-02}, + {339,352,-1.03e-02}, + {339,354,3.65e-02}, + {339,369,-1.03e-02}, + {340,340,8.29e-02}, + {340,36,4.84e-05}, + {340,38,1.93e-04}, + {340,39,4.84e-05}, + {340,49,1.93e-04}, + {340,51,7.74e-04}, + {340,52,1.93e-04}, + {340,64,4.84e-05}, + {340,66,1.93e-04}, + {340,67,4.84e-05}, + {340,325,-1.03e-02}, + {340,327,-1.03e-02}, + {340,328,-1.03e-02}, + {340,338,-1.03e-02}, + {340,341,-1.03e-02}, + {340,353,-1.03e-02}, + {340,355,-1.03e-02}, + {340,356,-1.03e-02}, + {341,341,8.29e-02}, + {341,38,4.84e-05}, + {341,39,1.93e-04}, + {341,40,4.84e-05}, + {341,51,1.93e-04}, + {341,52,7.74e-04}, + {341,53,1.93e-04}, + {341,66,4.84e-05}, + {341,67,1.93e-04}, + {341,68,4.84e-05}, + {341,327,-1.03e-02}, + {341,328,-1.03e-02}, + {341,329,-1.03e-02}, + {341,340,-1.03e-02}, + {341,342,-1.03e-02}, + {341,355,-1.03e-02}, + {341,356,-1.03e-02}, + {341,357,-1.03e-02}, + {342,342,8.29e-02}, + {342,39,4.84e-05}, + {342,40,1.93e-04}, + {342,41,4.84e-05}, + {342,52,1.93e-04}, + {342,53,7.74e-04}, + {342,54,1.93e-04}, + {342,67,4.84e-05}, + {342,68,1.93e-04}, + {342,69,4.84e-05}, + {342,328,-1.03e-02}, + {342,329,-1.03e-02}, + {342,330,-1.03e-02}, + {342,341,-1.03e-02}, + {342,343,-1.03e-02}, + {342,356,-1.03e-02}, + {342,357,-1.03e-02}, + {342,358,-1.03e-02}, + {343,343,8.29e-02}, + {343,40,4.84e-05}, + {343,41,1.93e-04}, + {343,42,4.84e-05}, + {343,53,1.93e-04}, + {343,54,7.74e-04}, + {343,55,1.93e-04}, + {343,68,4.84e-05}, + {343,69,1.93e-04}, + {343,70,4.84e-05}, + {343,329,-1.03e-02}, + {343,330,-1.03e-02}, + {343,331,-1.03e-02}, + {343,342,-1.03e-02}, + {343,344,-1.03e-02}, + {343,357,-1.03e-02}, + {343,358,-1.03e-02}, + {343,359,-1.03e-02}, + {344,344,8.29e-02}, + {344,41,4.84e-05}, + {344,42,1.93e-04}, + {344,43,4.84e-05}, + {344,54,1.93e-04}, + {344,55,7.74e-04}, + {344,56,1.93e-04}, + {344,69,4.84e-05}, + {344,70,1.93e-04}, + {344,71,4.84e-05}, + {344,330,-1.03e-02}, + {344,331,-1.03e-02}, + {344,332,-1.03e-02}, + {344,343,-1.03e-02}, + {344,345,-1.03e-02}, + {344,358,-1.03e-02}, + {344,359,-1.03e-02}, + {344,360,-1.03e-02}, + {345,345,8.29e-02}, + {345,42,4.84e-05}, + {345,43,1.93e-04}, + {345,55,1.93e-04}, + {345,56,7.74e-04}, + {345,57,1.93e-04}, + {345,58,4.84e-05}, + {345,70,4.84e-05}, + {345,71,1.93e-04}, + {345,72,4.84e-05}, + {345,331,-1.03e-02}, + {345,332,-1.03e-02}, + {345,344,-1.03e-02}, + {345,346,-1.03e-02}, + {345,347,-1.03e-02}, + {345,359,-1.03e-02}, + {345,360,-1.03e-02}, + {345,361,-1.03e-02}, + {346,346,8.29e-02}, + {346,43,4.84e-05}, + {346,56,1.93e-04}, + {346,57,7.74e-04}, + {346,58,1.93e-04}, + {346,71,4.84e-05}, + {346,72,1.93e-04}, + {346,73,4.84e-05}, + {346,74,1.93e-04}, + {346,75,4.84e-05}, + {346,332,-1.03e-02}, + {346,345,-1.03e-02}, + {346,347,-1.03e-02}, + {346,360,-1.03e-02}, + {346,361,-1.03e-02}, + {346,362,-1.03e-02}, + {346,363,-1.03e-02}, + {346,364,-1.03e-02}, + {347,347,8.29e-02}, + {347,43,1.93e-04}, + {347,44,4.84e-05}, + {347,56,4.84e-05}, + {347,57,1.93e-04}, + {347,58,7.74e-04}, + {347,59,1.93e-04}, + {347,74,4.84e-05}, + {347,75,1.93e-04}, + {347,76,4.84e-05}, + {347,332,-1.03e-02}, + {347,333,-1.03e-02}, + {347,345,-1.03e-02}, + {347,346,-1.03e-02}, + {347,348,-1.03e-02}, + {347,363,-1.03e-02}, + {347,364,-1.03e-02}, + {347,365,-1.03e-02}, + {348,348,8.29e-02}, + {348,43,4.84e-05}, + {348,44,1.93e-04}, + {348,45,4.84e-05}, + {348,58,1.93e-04}, + {348,59,7.74e-04}, + {348,60,1.93e-04}, + {348,75,4.84e-05}, + {348,76,1.93e-04}, + {348,77,4.84e-05}, + {348,332,-1.03e-02}, + {348,333,-1.03e-02}, + {348,334,-1.03e-02}, + {348,347,-1.03e-02}, + {348,349,-1.03e-02}, + {348,364,-1.03e-02}, + {348,365,-1.03e-02}, + {348,366,-1.03e-02}, + {349,349,8.29e-02}, + {349,44,4.84e-05}, + {349,45,1.93e-04}, + {349,48,4.84e-05}, + {349,59,1.93e-04}, + {349,60,7.74e-04}, + {349,61,1.93e-04}, + {349,76,4.84e-05}, + {349,77,1.93e-04}, + {349,78,4.84e-05}, + {349,333,-1.03e-02}, + {349,334,-1.03e-02}, + {349,337,-1.03e-02}, + {349,348,-1.03e-02}, + {349,350,-1.03e-02}, + {349,365,-1.03e-02}, + {349,366,-1.03e-02}, + {349,367,-1.03e-02}, + {350,350,8.29e-02}, + {350,45,4.84e-05}, + {350,46,4.84e-05}, + {350,48,1.93e-04}, + {350,60,1.93e-04}, + {350,61,7.74e-04}, + {350,62,1.93e-04}, + {350,77,4.84e-05}, + {350,78,1.93e-04}, + {350,79,4.84e-05}, + {350,334,-1.03e-02}, + {350,335,-1.03e-02}, + {350,337,-1.03e-02}, + {350,349,-1.03e-02}, + {350,351,-1.03e-02}, + {350,366,-1.03e-02}, + {350,367,-1.03e-02}, + {350,368,-1.03e-02}, + {351,351,8.29e-02}, + {351,46,1.93e-04}, + {351,47,4.84e-05}, + {351,48,4.84e-05}, + {351,61,1.93e-04}, + {351,62,7.74e-04}, + {351,63,1.93e-04}, + {351,78,4.84e-05}, + {351,79,1.93e-04}, + {351,80,4.84e-05}, + {351,335,-1.03e-02}, + {351,336,-1.03e-02}, + {351,337,-1.03e-02}, + {351,350,-1.03e-02}, + {351,352,-1.03e-02}, + {351,367,-1.03e-02}, + {351,368,-1.03e-02}, + {351,369,-1.03e-02}, + {352,352,8.29e-02}, + {352,37,4.84e-05}, + {352,46,4.84e-05}, + {352,47,1.93e-04}, + {352,50,1.93e-04}, + {352,62,1.93e-04}, + {352,63,7.74e-04}, + {352,65,4.84e-05}, + {352,79,4.84e-05}, + {352,80,1.93e-04}, + {352,326,-1.03e-02}, + {352,335,-1.03e-02}, + {352,336,-1.03e-02}, + {352,339,-1.03e-02}, + {352,351,-1.03e-02}, + {352,354,-1.03e-02}, + {352,368,-1.03e-02}, + {352,369,-1.03e-02}, + {353,353,2.08e-01}, + {353,49,9.67e-05}, + {353,51,4.84e-05}, + {353,64,3.87e-04}, + {353,66,1.93e-04}, + {353,81,9.67e-05}, + {353,83,4.84e-05}, + {353,338,3.65e-02}, + {353,340,-1.03e-02}, + {353,355,-1.03e-02}, + {353,370,3.65e-02}, + {353,372,-1.03e-02}, + {354,354,2.08e-01}, + {354,50,9.67e-05}, + {354,63,4.84e-05}, + {354,65,3.87e-04}, + {354,80,1.93e-04}, + {354,82,9.67e-05}, + {354,93,4.84e-05}, + {354,339,3.65e-02}, + {354,352,-1.03e-02}, + {354,369,-1.03e-02}, + {354,371,3.65e-02}, + {354,382,-1.03e-02}, + {355,355,8.29e-02}, + {355,49,4.84e-05}, + {355,51,1.93e-04}, + {355,52,4.84e-05}, + {355,64,1.93e-04}, + {355,66,7.74e-04}, + {355,67,1.93e-04}, + {355,81,4.84e-05}, + {355,83,1.93e-04}, + {355,84,4.84e-05}, + {355,338,-1.03e-02}, + {355,340,-1.03e-02}, + {355,341,-1.03e-02}, + {355,353,-1.03e-02}, + {355,356,-1.03e-02}, + {355,370,-1.03e-02}, + {355,372,-1.03e-02}, + {355,373,-1.03e-02}, + {356,356,8.29e-02}, + {356,51,4.84e-05}, + {356,52,1.93e-04}, + {356,53,4.84e-05}, + {356,66,1.93e-04}, + {356,67,7.74e-04}, + {356,68,1.93e-04}, + {356,83,4.84e-05}, + {356,84,1.93e-04}, + {356,85,4.84e-05}, + {356,340,-1.03e-02}, + {356,341,-1.03e-02}, + {356,342,-1.03e-02}, + {356,355,-1.03e-02}, + {356,357,-1.03e-02}, + {356,372,-1.03e-02}, + {356,373,-1.03e-02}, + {356,374,-1.03e-02}, + {357,357,8.29e-02}, + {357,52,4.84e-05}, + {357,53,1.93e-04}, + {357,54,4.84e-05}, + {357,67,1.93e-04}, + {357,68,7.74e-04}, + {357,69,1.93e-04}, + {357,84,4.84e-05}, + {357,85,1.93e-04}, + {357,86,4.84e-05}, + {357,341,-1.03e-02}, + {357,342,-1.03e-02}, + {357,343,-1.03e-02}, + {357,356,-1.03e-02}, + {357,358,-1.03e-02}, + {357,373,-1.03e-02}, + {357,374,-1.03e-02}, + {357,375,-1.03e-02}, + {358,358,8.29e-02}, + {358,53,4.84e-05}, + {358,54,1.93e-04}, + {358,55,4.84e-05}, + {358,68,1.93e-04}, + {358,69,7.74e-04}, + {358,70,1.93e-04}, + {358,85,4.84e-05}, + {358,86,1.93e-04}, + {358,87,4.84e-05}, + {358,342,-1.03e-02}, + {358,343,-1.03e-02}, + {358,344,-1.03e-02}, + {358,357,-1.03e-02}, + {358,359,-1.03e-02}, + {358,374,-1.03e-02}, + {358,375,-1.03e-02}, + {358,376,-1.03e-02}, + {359,359,8.29e-02}, + {359,54,4.84e-05}, + {359,55,1.93e-04}, + {359,56,4.84e-05}, + {359,69,1.93e-04}, + {359,70,7.74e-04}, + {359,71,1.93e-04}, + {359,86,4.84e-05}, + {359,87,1.93e-04}, + {359,88,4.84e-05}, + {359,343,-1.03e-02}, + {359,344,-1.03e-02}, + {359,345,-1.03e-02}, + {359,358,-1.03e-02}, + {359,360,-1.03e-02}, + {359,375,-1.03e-02}, + {359,376,-1.03e-02}, + {359,377,-1.03e-02}, + {360,360,8.29e-02}, + {360,55,4.84e-05}, + {360,56,1.93e-04}, + {360,57,4.84e-05}, + {360,70,1.93e-04}, + {360,71,7.74e-04}, + {360,72,1.93e-04}, + {360,87,4.84e-05}, + {360,88,1.93e-04}, + {360,89,4.84e-05}, + {360,344,-1.03e-02}, + {360,345,-1.03e-02}, + {360,346,-1.03e-02}, + {360,359,-1.03e-02}, + {360,361,-1.03e-02}, + {360,376,-1.03e-02}, + {360,377,-1.03e-02}, + {360,378,-1.03e-02}, + {361,361,8.29e-02}, + {361,56,4.84e-05}, + {361,57,1.93e-04}, + {361,71,1.93e-04}, + {361,72,7.74e-04}, + {361,73,1.93e-04}, + {361,74,4.84e-05}, + {361,88,4.84e-05}, + {361,89,1.93e-04}, + {361,90,4.84e-05}, + {361,345,-1.03e-02}, + {361,346,-1.03e-02}, + {361,360,-1.03e-02}, + {361,362,-1.03e-02}, + {361,363,-1.03e-02}, + {361,377,-1.03e-02}, + {361,378,-1.03e-02}, + {361,379,-1.03e-02}, + {362,362,8.29e-02}, + {362,57,4.84e-05}, + {362,72,1.93e-04}, + {362,73,7.74e-04}, + {362,74,1.93e-04}, + {362,89,4.84e-05}, + {362,90,1.93e-04}, + {362,91,4.84e-05}, + {362,92,1.93e-04}, + {362,99,4.84e-05}, + {362,346,-1.03e-02}, + {362,361,-1.03e-02}, + {362,363,-1.03e-02}, + {362,378,-1.03e-02}, + {362,379,-1.03e-02}, + {362,380,-1.03e-02}, + {362,381,-1.03e-02}, + {362,388,-1.03e-02}, + {363,363,8.29e-02}, + {363,57,1.93e-04}, + {363,58,4.84e-05}, + {363,72,4.84e-05}, + {363,73,1.93e-04}, + {363,74,7.74e-04}, + {363,75,1.93e-04}, + {363,92,4.84e-05}, + {363,98,4.84e-05}, + {363,99,1.93e-04}, + {363,346,-1.03e-02}, + {363,347,-1.03e-02}, + {363,361,-1.03e-02}, + {363,362,-1.03e-02}, + {363,364,-1.03e-02}, + {363,381,-1.03e-02}, + {363,387,-1.03e-02}, + {363,388,-1.03e-02}, + {364,364,8.29e-02}, + {364,57,4.84e-05}, + {364,58,1.93e-04}, + {364,59,4.84e-05}, + {364,74,1.93e-04}, + {364,75,7.74e-04}, + {364,76,1.93e-04}, + {364,97,4.84e-05}, + {364,98,1.93e-04}, + {364,99,4.84e-05}, + {364,346,-1.03e-02}, + {364,347,-1.03e-02}, + {364,348,-1.03e-02}, + {364,363,-1.03e-02}, + {364,365,-1.03e-02}, + {364,386,-1.03e-02}, + {364,387,-1.03e-02}, + {364,388,-1.03e-02}, + {365,365,8.29e-02}, + {365,58,4.84e-05}, + {365,59,1.93e-04}, + {365,60,4.84e-05}, + {365,75,1.93e-04}, + {365,76,7.74e-04}, + {365,77,1.93e-04}, + {365,96,4.84e-05}, + {365,97,1.93e-04}, + {365,98,4.84e-05}, + {365,347,-1.03e-02}, + {365,348,-1.03e-02}, + {365,349,-1.03e-02}, + {365,364,-1.03e-02}, + {365,366,-1.03e-02}, + {365,385,-1.03e-02}, + {365,386,-1.03e-02}, + {365,387,-1.03e-02}, + {366,366,8.29e-02}, + {366,59,4.84e-05}, + {366,60,1.93e-04}, + {366,61,4.84e-05}, + {366,76,1.93e-04}, + {366,77,7.74e-04}, + {366,78,1.93e-04}, + {366,95,4.84e-05}, + {366,96,1.93e-04}, + {366,97,4.84e-05}, + {366,348,-1.03e-02}, + {366,349,-1.03e-02}, + {366,350,-1.03e-02}, + {366,365,-1.03e-02}, + {366,367,-1.03e-02}, + {366,384,-1.03e-02}, + {366,385,-1.03e-02}, + {366,386,-1.03e-02}, + {367,367,8.29e-02}, + {367,60,4.84e-05}, + {367,61,1.93e-04}, + {367,62,4.84e-05}, + {367,77,1.93e-04}, + {367,78,7.74e-04}, + {367,79,1.93e-04}, + {367,94,4.84e-05}, + {367,95,1.93e-04}, + {367,96,4.84e-05}, + {367,349,-1.03e-02}, + {367,350,-1.03e-02}, + {367,351,-1.03e-02}, + {367,366,-1.03e-02}, + {367,368,-1.03e-02}, + {367,383,-1.03e-02}, + {367,384,-1.03e-02}, + {367,385,-1.03e-02}, + {368,368,8.29e-02}, + {368,61,4.84e-05}, + {368,62,1.93e-04}, + {368,63,4.84e-05}, + {368,78,1.93e-04}, + {368,79,7.74e-04}, + {368,80,1.93e-04}, + {368,93,4.84e-05}, + {368,94,1.93e-04}, + {368,95,4.84e-05}, + {368,350,-1.03e-02}, + {368,351,-1.03e-02}, + {368,352,-1.03e-02}, + {368,367,-1.03e-02}, + {368,369,-1.03e-02}, + {368,382,-1.03e-02}, + {368,383,-1.03e-02}, + {368,384,-1.03e-02}, + {369,369,8.29e-02}, + {369,50,4.84e-05}, + {369,62,4.84e-05}, + {369,63,1.93e-04}, + {369,65,1.93e-04}, + {369,79,1.93e-04}, + {369,80,7.74e-04}, + {369,82,4.84e-05}, + {369,93,1.93e-04}, + {369,94,4.84e-05}, + {369,339,-1.03e-02}, + {369,351,-1.03e-02}, + {369,352,-1.03e-02}, + {369,354,-1.03e-02}, + {369,368,-1.03e-02}, + {369,371,-1.03e-02}, + {369,382,-1.03e-02}, + {369,383,-1.03e-02}, + {370,370,2.08e-01}, + {370,64,9.67e-05}, + {370,66,4.84e-05}, + {370,81,3.87e-04}, + {370,83,1.93e-04}, + {370,100,9.67e-05}, + {370,102,4.84e-05}, + {370,353,3.65e-02}, + {370,355,-1.03e-02}, + {370,372,-1.03e-02}, + {370,389,3.65e-02}, + {370,391,-1.03e-02}, + {371,371,2.08e-01}, + {371,65,9.67e-05}, + {371,80,4.84e-05}, + {371,82,3.87e-04}, + {371,93,1.93e-04}, + {371,101,9.67e-05}, + {371,115,4.84e-05}, + {371,354,3.65e-02}, + {371,369,-1.03e-02}, + {371,382,-1.03e-02}, + {371,390,3.65e-02}, + {371,404,-1.03e-02}, + {372,372,8.29e-02}, + {372,64,4.84e-05}, + {372,66,1.93e-04}, + {372,67,4.84e-05}, + {372,81,1.93e-04}, + {372,83,7.74e-04}, + {372,84,1.93e-04}, + {372,100,4.84e-05}, + {372,102,1.93e-04}, + {372,103,4.84e-05}, + {372,353,-1.03e-02}, + {372,355,-1.03e-02}, + {372,356,-1.03e-02}, + {372,370,-1.03e-02}, + {372,373,-1.03e-02}, + {372,389,-1.03e-02}, + {372,391,-1.03e-02}, + {372,392,-1.03e-02}, + {373,373,8.29e-02}, + {373,66,4.84e-05}, + {373,67,1.93e-04}, + {373,68,4.84e-05}, + {373,83,1.93e-04}, + {373,84,7.74e-04}, + {373,85,1.93e-04}, + {373,102,4.84e-05}, + {373,103,1.93e-04}, + {373,104,4.84e-05}, + {373,355,-1.03e-02}, + {373,356,-1.03e-02}, + {373,357,-1.03e-02}, + {373,372,-1.03e-02}, + {373,374,-1.03e-02}, + {373,391,-1.03e-02}, + {373,392,-1.03e-02}, + {373,393,-1.03e-02}, + {374,374,8.29e-02}, + {374,67,4.84e-05}, + {374,68,1.93e-04}, + {374,69,4.84e-05}, + {374,84,1.93e-04}, + {374,85,7.74e-04}, + {374,86,1.93e-04}, + {374,103,4.84e-05}, + {374,104,1.93e-04}, + {374,105,4.84e-05}, + {374,356,-1.03e-02}, + {374,357,-1.03e-02}, + {374,358,-1.03e-02}, + {374,373,-1.03e-02}, + {374,375,-1.03e-02}, + {374,392,-1.03e-02}, + {374,393,-1.03e-02}, + {374,394,-1.03e-02}, + {375,375,8.29e-02}, + {375,68,4.84e-05}, + {375,69,1.93e-04}, + {375,70,4.84e-05}, + {375,85,1.93e-04}, + {375,86,7.74e-04}, + {375,87,1.93e-04}, + {375,104,4.84e-05}, + {375,105,1.93e-04}, + {375,106,4.84e-05}, + {375,357,-1.03e-02}, + {375,358,-1.03e-02}, + {375,359,-1.03e-02}, + {375,374,-1.03e-02}, + {375,376,-1.03e-02}, + {375,393,-1.03e-02}, + {375,394,-1.03e-02}, + {375,395,-1.03e-02}, + {376,376,8.29e-02}, + {376,69,4.84e-05}, + {376,70,1.93e-04}, + {376,71,4.84e-05}, + {376,86,1.93e-04}, + {376,87,7.74e-04}, + {376,88,1.93e-04}, + {376,105,4.84e-05}, + {376,106,1.93e-04}, + {376,107,4.84e-05}, + {376,358,-1.03e-02}, + {376,359,-1.03e-02}, + {376,360,-1.03e-02}, + {376,375,-1.03e-02}, + {376,377,-1.03e-02}, + {376,394,-1.03e-02}, + {376,395,-1.03e-02}, + {376,396,-1.03e-02}, + {377,377,8.29e-02}, + {377,70,4.84e-05}, + {377,71,1.93e-04}, + {377,72,4.84e-05}, + {377,87,1.93e-04}, + {377,88,7.74e-04}, + {377,89,1.93e-04}, + {377,106,4.84e-05}, + {377,107,1.93e-04}, + {377,108,4.84e-05}, + {377,359,-1.03e-02}, + {377,360,-1.03e-02}, + {377,361,-1.03e-02}, + {377,376,-1.03e-02}, + {377,378,-1.03e-02}, + {377,395,-1.03e-02}, + {377,396,-1.03e-02}, + {377,397,-1.03e-02}, + {378,378,8.29e-02}, + {378,71,4.84e-05}, + {378,72,1.93e-04}, + {378,73,4.84e-05}, + {378,88,1.93e-04}, + {378,89,7.74e-04}, + {378,90,1.93e-04}, + {378,107,4.84e-05}, + {378,108,1.93e-04}, + {378,109,4.84e-05}, + {378,360,-1.03e-02}, + {378,361,-1.03e-02}, + {378,362,-1.03e-02}, + {378,377,-1.03e-02}, + {378,379,-1.03e-02}, + {378,396,-1.03e-02}, + {378,397,-1.03e-02}, + {378,398,-1.03e-02}, + {379,379,8.29e-02}, + {379,72,4.84e-05}, + {379,73,1.93e-04}, + {379,89,1.93e-04}, + {379,90,7.74e-04}, + {379,91,1.93e-04}, + {379,92,4.84e-05}, + {379,108,4.84e-05}, + {379,109,1.93e-04}, + {379,110,4.84e-05}, + {379,361,-1.03e-02}, + {379,362,-1.03e-02}, + {379,378,-1.03e-02}, + {379,380,-1.03e-02}, + {379,381,-1.03e-02}, + {379,397,-1.03e-02}, + {379,398,-1.03e-02}, + {379,399,-1.03e-02}, + {380,380,8.29e-02}, + {380,73,4.84e-05}, + {380,90,1.93e-04}, + {380,91,7.74e-04}, + {380,92,1.93e-04}, + {380,109,4.84e-05}, + {380,110,1.93e-04}, + {380,111,4.84e-05}, + {380,112,1.93e-04}, + {380,113,4.84e-05}, + {380,362,-1.03e-02}, + {380,379,-1.03e-02}, + {380,381,-1.03e-02}, + {380,398,-1.03e-02}, + {380,399,-1.03e-02}, + {380,400,-1.03e-02}, + {380,401,-1.03e-02}, + {380,402,-1.03e-02}, + {381,381,8.29e-02}, + {381,73,1.93e-04}, + {381,74,4.84e-05}, + {381,90,4.84e-05}, + {381,91,1.93e-04}, + {381,92,7.74e-04}, + {381,99,1.93e-04}, + {381,112,4.84e-05}, + {381,113,1.93e-04}, + {381,120,4.84e-05}, + {381,362,-1.03e-02}, + {381,363,-1.03e-02}, + {381,379,-1.03e-02}, + {381,380,-1.03e-02}, + {381,388,-1.03e-02}, + {381,401,-1.03e-02}, + {381,402,-1.03e-02}, + {381,409,-1.03e-02}, + {382,382,8.29e-02}, + {382,65,4.84e-05}, + {382,79,4.84e-05}, + {382,80,1.93e-04}, + {382,82,1.93e-04}, + {382,93,7.74e-04}, + {382,94,1.93e-04}, + {382,101,4.84e-05}, + {382,114,4.84e-05}, + {382,115,1.93e-04}, + {382,354,-1.03e-02}, + {382,368,-1.03e-02}, + {382,369,-1.03e-02}, + {382,371,-1.03e-02}, + {382,383,-1.03e-02}, + {382,390,-1.03e-02}, + {382,403,-1.03e-02}, + {382,404,-1.03e-02}, + {383,383,8.29e-02}, + {383,78,4.84e-05}, + {383,79,1.93e-04}, + {383,80,4.84e-05}, + {383,93,1.93e-04}, + {383,94,7.74e-04}, + {383,95,1.93e-04}, + {383,114,1.93e-04}, + {383,115,4.84e-05}, + {383,117,4.84e-05}, + {383,367,-1.03e-02}, + {383,368,-1.03e-02}, + {383,369,-1.03e-02}, + {383,382,-1.03e-02}, + {383,384,-1.03e-02}, + {383,403,-1.03e-02}, + {383,404,-1.03e-02}, + {383,406,-1.03e-02}, + {384,384,8.29e-02}, + {384,77,4.84e-05}, + {384,78,1.93e-04}, + {384,79,4.84e-05}, + {384,94,1.93e-04}, + {384,95,7.74e-04}, + {384,96,1.93e-04}, + {384,114,4.84e-05}, + {384,116,4.84e-05}, + {384,117,1.93e-04}, + {384,366,-1.03e-02}, + {384,367,-1.03e-02}, + {384,368,-1.03e-02}, + {384,383,-1.03e-02}, + {384,385,-1.03e-02}, + {384,403,-1.03e-02}, + {384,405,-1.03e-02}, + {384,406,-1.03e-02}, + {385,385,8.29e-02}, + {385,76,4.84e-05}, + {385,77,1.93e-04}, + {385,78,4.84e-05}, + {385,95,1.93e-04}, + {385,96,7.74e-04}, + {385,97,1.93e-04}, + {385,116,1.93e-04}, + {385,117,4.84e-05}, + {385,119,4.84e-05}, + {385,365,-1.03e-02}, + {385,366,-1.03e-02}, + {385,367,-1.03e-02}, + {385,384,-1.03e-02}, + {385,386,-1.03e-02}, + {385,405,-1.03e-02}, + {385,406,-1.03e-02}, + {385,408,-1.03e-02}, + {386,386,8.29e-02}, + {386,75,4.84e-05}, + {386,76,1.93e-04}, + {386,77,4.84e-05}, + {386,96,1.93e-04}, + {386,97,7.74e-04}, + {386,98,1.93e-04}, + {386,116,4.84e-05}, + {386,118,4.84e-05}, + {386,119,1.93e-04}, + {386,364,-1.03e-02}, + {386,365,-1.03e-02}, + {386,366,-1.03e-02}, + {386,385,-1.03e-02}, + {386,387,-1.03e-02}, + {386,405,-1.03e-02}, + {386,407,-1.03e-02}, + {386,408,-1.03e-02}, + {387,387,8.29e-02}, + {387,74,4.84e-05}, + {387,75,1.93e-04}, + {387,76,4.84e-05}, + {387,97,1.93e-04}, + {387,98,7.74e-04}, + {387,99,1.93e-04}, + {387,118,1.93e-04}, + {387,119,4.84e-05}, + {387,120,4.84e-05}, + {387,363,-1.03e-02}, + {387,364,-1.03e-02}, + {387,365,-1.03e-02}, + {387,386,-1.03e-02}, + {387,388,-1.03e-02}, + {387,407,-1.03e-02}, + {387,408,-1.03e-02}, + {387,409,-1.03e-02}, + {388,388,8.29e-02}, + {388,73,4.84e-05}, + {388,74,1.93e-04}, + {388,75,4.84e-05}, + {388,92,1.93e-04}, + {388,98,1.93e-04}, + {388,99,7.74e-04}, + {388,113,4.84e-05}, + {388,118,4.84e-05}, + {388,120,1.93e-04}, + {388,362,-1.03e-02}, + {388,363,-1.03e-02}, + {388,364,-1.03e-02}, + {388,381,-1.03e-02}, + {388,387,-1.03e-02}, + {388,402,-1.03e-02}, + {388,407,-1.03e-02}, + {388,409,-1.03e-02}, + {389,389,2.08e-01}, + {389,81,9.67e-05}, + {389,83,4.84e-05}, + {389,100,3.87e-04}, + {389,102,1.93e-04}, + {389,121,9.67e-05}, + {389,123,4.84e-05}, + {389,370,3.65e-02}, + {389,372,-1.03e-02}, + {389,391,-1.03e-02}, + {389,410,3.65e-02}, + {389,412,-1.03e-02}, + {390,390,2.08e-01}, + {390,82,9.67e-05}, + {390,93,4.84e-05}, + {390,101,3.87e-04}, + {390,115,1.93e-04}, + {390,122,9.67e-05}, + {390,140,4.84e-05}, + {390,371,3.65e-02}, + {390,382,-1.03e-02}, + {390,404,-1.03e-02}, + {390,411,3.65e-02}, + {390,429,-1.03e-02}, + {391,391,8.29e-02}, + {391,81,4.84e-05}, + {391,83,1.93e-04}, + {391,84,4.84e-05}, + {391,100,1.93e-04}, + {391,102,7.74e-04}, + {391,103,1.93e-04}, + {391,121,4.84e-05}, + {391,123,1.93e-04}, + {391,124,4.84e-05}, + {391,370,-1.03e-02}, + {391,372,-1.03e-02}, + {391,373,-1.03e-02}, + {391,389,-1.03e-02}, + {391,392,-1.03e-02}, + {391,410,-1.03e-02}, + {391,412,-1.03e-02}, + {391,413,-1.03e-02}, + {392,392,8.29e-02}, + {392,83,4.84e-05}, + {392,84,1.93e-04}, + {392,85,4.84e-05}, + {392,102,1.93e-04}, + {392,103,7.74e-04}, + {392,104,1.93e-04}, + {392,123,4.84e-05}, + {392,124,1.93e-04}, + {392,125,4.84e-05}, + {392,372,-1.03e-02}, + {392,373,-1.03e-02}, + {392,374,-1.03e-02}, + {392,391,-1.03e-02}, + {392,393,-1.03e-02}, + {392,412,-1.03e-02}, + {392,413,-1.03e-02}, + {392,414,-1.03e-02}, + {393,393,8.29e-02}, + {393,84,4.84e-05}, + {393,85,1.93e-04}, + {393,86,4.84e-05}, + {393,103,1.93e-04}, + {393,104,7.74e-04}, + {393,105,1.93e-04}, + {393,124,4.84e-05}, + {393,125,1.93e-04}, + {393,126,4.84e-05}, + {393,373,-1.03e-02}, + {393,374,-1.03e-02}, + {393,375,-1.03e-02}, + {393,392,-1.03e-02}, + {393,394,-1.03e-02}, + {393,413,-1.03e-02}, + {393,414,-1.03e-02}, + {393,415,-1.03e-02}, + {394,394,8.29e-02}, + {394,85,4.84e-05}, + {394,86,1.93e-04}, + {394,87,4.84e-05}, + {394,104,1.93e-04}, + {394,105,7.74e-04}, + {394,106,1.93e-04}, + {394,125,4.84e-05}, + {394,126,1.93e-04}, + {394,127,4.84e-05}, + {394,374,-1.03e-02}, + {394,375,-1.03e-02}, + {394,376,-1.03e-02}, + {394,393,-1.03e-02}, + {394,395,-1.03e-02}, + {394,414,-1.03e-02}, + {394,415,-1.03e-02}, + {394,416,-1.03e-02}, + {395,395,8.29e-02}, + {395,86,4.84e-05}, + {395,87,1.93e-04}, + {395,88,4.84e-05}, + {395,105,1.93e-04}, + {395,106,7.74e-04}, + {395,107,1.93e-04}, + {395,126,4.84e-05}, + {395,127,1.93e-04}, + {395,128,4.84e-05}, + {395,375,-1.03e-02}, + {395,376,-1.03e-02}, + {395,377,-1.03e-02}, + {395,394,-1.03e-02}, + {395,396,-1.03e-02}, + {395,415,-1.03e-02}, + {395,416,-1.03e-02}, + {395,417,-1.03e-02}, + {396,396,8.29e-02}, + {396,87,4.84e-05}, + {396,88,1.93e-04}, + {396,89,4.84e-05}, + {396,106,1.93e-04}, + {396,107,7.74e-04}, + {396,108,1.93e-04}, + {396,127,4.84e-05}, + {396,128,1.93e-04}, + {396,129,4.84e-05}, + {396,376,-1.03e-02}, + {396,377,-1.03e-02}, + {396,378,-1.03e-02}, + {396,395,-1.03e-02}, + {396,397,-1.03e-02}, + {396,416,-1.03e-02}, + {396,417,-1.03e-02}, + {396,418,-1.03e-02}, + {397,397,8.29e-02}, + {397,88,4.84e-05}, + {397,89,1.93e-04}, + {397,90,4.84e-05}, + {397,107,1.93e-04}, + {397,108,7.74e-04}, + {397,109,1.93e-04}, + {397,128,4.84e-05}, + {397,129,1.93e-04}, + {397,130,4.84e-05}, + {397,377,-1.03e-02}, + {397,378,-1.03e-02}, + {397,379,-1.03e-02}, + {397,396,-1.03e-02}, + {397,398,-1.03e-02}, + {397,417,-1.03e-02}, + {397,418,-1.03e-02}, + {397,419,-1.03e-02}, + {398,398,8.29e-02}, + {398,89,4.84e-05}, + {398,90,1.93e-04}, + {398,91,4.84e-05}, + {398,108,1.93e-04}, + {398,109,7.74e-04}, + {398,110,1.93e-04}, + {398,129,4.84e-05}, + {398,130,1.93e-04}, + {398,131,4.84e-05}, + {398,378,-1.03e-02}, + {398,379,-1.03e-02}, + {398,380,-1.03e-02}, + {398,397,-1.03e-02}, + {398,399,-1.03e-02}, + {398,418,-1.03e-02}, + {398,419,-1.03e-02}, + {398,420,-1.03e-02}, + {399,399,8.29e-02}, + {399,90,4.84e-05}, + {399,91,1.93e-04}, + {399,109,1.93e-04}, + {399,110,7.74e-04}, + {399,111,1.93e-04}, + {399,112,4.84e-05}, + {399,130,4.84e-05}, + {399,131,1.93e-04}, + {399,132,4.84e-05}, + {399,379,-1.03e-02}, + {399,380,-1.03e-02}, + {399,398,-1.03e-02}, + {399,400,-1.03e-02}, + {399,401,-1.03e-02}, + {399,419,-1.03e-02}, + {399,420,-1.03e-02}, + {399,421,-1.03e-02}, + {400,400,8.29e-02}, + {400,91,4.84e-05}, + {400,110,1.93e-04}, + {400,111,7.74e-04}, + {400,112,1.93e-04}, + {400,131,4.84e-05}, + {400,132,1.93e-04}, + {400,133,4.84e-05}, + {400,134,1.93e-04}, + {400,135,4.84e-05}, + {400,380,-1.03e-02}, + {400,399,-1.03e-02}, + {400,401,-1.03e-02}, + {400,420,-1.03e-02}, + {400,421,-1.03e-02}, + {400,422,-1.03e-02}, + {400,423,-1.03e-02}, + {400,424,-1.03e-02}, + {401,401,8.29e-02}, + {401,91,1.93e-04}, + {401,92,4.84e-05}, + {401,110,4.84e-05}, + {401,111,1.93e-04}, + {401,112,7.74e-04}, + {401,113,1.93e-04}, + {401,134,4.84e-05}, + {401,135,1.93e-04}, + {401,136,4.84e-05}, + {401,380,-1.03e-02}, + {401,381,-1.03e-02}, + {401,399,-1.03e-02}, + {401,400,-1.03e-02}, + {401,402,-1.03e-02}, + {401,423,-1.03e-02}, + {401,424,-1.03e-02}, + {401,425,-1.03e-02}, + {402,402,8.29e-02}, + {402,91,4.84e-05}, + {402,92,1.93e-04}, + {402,99,4.84e-05}, + {402,112,1.93e-04}, + {402,113,7.74e-04}, + {402,120,1.93e-04}, + {402,135,4.84e-05}, + {402,136,1.93e-04}, + {402,141,4.84e-05}, + {402,380,-1.03e-02}, + {402,381,-1.03e-02}, + {402,388,-1.03e-02}, + {402,401,-1.03e-02}, + {402,409,-1.03e-02}, + {402,424,-1.03e-02}, + {402,425,-1.03e-02}, + {402,430,-1.03e-02}, + {403,403,8.29e-02}, + {403,93,4.84e-05}, + {403,94,1.93e-04}, + {403,95,4.84e-05}, + {403,114,7.74e-04}, + {403,115,1.93e-04}, + {403,117,1.93e-04}, + {403,137,4.84e-05}, + {403,138,1.93e-04}, + {403,140,4.84e-05}, + {403,382,-1.03e-02}, + {403,383,-1.03e-02}, + {403,384,-1.03e-02}, + {403,404,-1.03e-02}, + {403,406,-1.03e-02}, + {403,426,-1.03e-02}, + {403,427,-1.03e-02}, + {403,429,-1.03e-02}, + {404,404,8.29e-02}, + {404,82,4.84e-05}, + {404,93,1.93e-04}, + {404,94,4.84e-05}, + {404,101,1.93e-04}, + {404,114,1.93e-04}, + {404,115,7.74e-04}, + {404,122,4.84e-05}, + {404,138,4.84e-05}, + {404,140,1.93e-04}, + {404,371,-1.03e-02}, + {404,382,-1.03e-02}, + {404,383,-1.03e-02}, + {404,390,-1.03e-02}, + {404,403,-1.03e-02}, + {404,411,-1.03e-02}, + {404,427,-1.03e-02}, + {404,429,-1.03e-02}, + {405,405,8.29e-02}, + {405,95,4.84e-05}, + {405,96,1.93e-04}, + {405,97,4.84e-05}, + {405,116,7.74e-04}, + {405,117,1.93e-04}, + {405,119,1.93e-04}, + {405,137,4.84e-05}, + {405,139,1.93e-04}, + {405,143,4.84e-05}, + {405,384,-1.03e-02}, + {405,385,-1.03e-02}, + {405,386,-1.03e-02}, + {405,406,-1.03e-02}, + {405,408,-1.03e-02}, + {405,426,-1.03e-02}, + {405,428,-1.03e-02}, + {405,432,-1.03e-02}, + {406,406,8.29e-02}, + {406,94,4.84e-05}, + {406,95,1.93e-04}, + {406,96,4.84e-05}, + {406,114,1.93e-04}, + {406,116,1.93e-04}, + {406,117,7.74e-04}, + {406,137,1.93e-04}, + {406,138,4.84e-05}, + {406,139,4.84e-05}, + {406,383,-1.03e-02}, + {406,384,-1.03e-02}, + {406,385,-1.03e-02}, + {406,403,-1.03e-02}, + {406,405,-1.03e-02}, + {406,426,-1.03e-02}, + {406,427,-1.03e-02}, + {406,428,-1.03e-02}, + {407,407,8.29e-02}, + {407,97,4.84e-05}, + {407,98,1.93e-04}, + {407,99,4.84e-05}, + {407,118,7.74e-04}, + {407,119,1.93e-04}, + {407,120,1.93e-04}, + {407,141,4.84e-05}, + {407,142,1.93e-04}, + {407,143,4.84e-05}, + {407,386,-1.03e-02}, + {407,387,-1.03e-02}, + {407,388,-1.03e-02}, + {407,408,-1.03e-02}, + {407,409,-1.03e-02}, + {407,430,-1.03e-02}, + {407,431,-1.03e-02}, + {407,432,-1.03e-02}, + {408,408,8.29e-02}, + {408,96,4.84e-05}, + {408,97,1.93e-04}, + {408,98,4.84e-05}, + {408,116,1.93e-04}, + {408,118,1.93e-04}, + {408,119,7.74e-04}, + {408,139,4.84e-05}, + {408,142,4.84e-05}, + {408,143,1.93e-04}, + {408,385,-1.03e-02}, + {408,386,-1.03e-02}, + {408,387,-1.03e-02}, + {408,405,-1.03e-02}, + {408,407,-1.03e-02}, + {408,428,-1.03e-02}, + {408,431,-1.03e-02}, + {408,432,-1.03e-02}, + {409,409,8.29e-02}, + {409,92,4.84e-05}, + {409,98,4.84e-05}, + {409,99,1.93e-04}, + {409,113,1.93e-04}, + {409,118,1.93e-04}, + {409,120,7.74e-04}, + {409,136,4.84e-05}, + {409,141,1.93e-04}, + {409,142,4.84e-05}, + {409,381,-1.03e-02}, + {409,387,-1.03e-02}, + {409,388,-1.03e-02}, + {409,402,-1.03e-02}, + {409,407,-1.03e-02}, + {409,425,-1.03e-02}, + {409,430,-1.03e-02}, + {409,431,-1.03e-02}, + {410,410,2.08e-01}, + {410,100,9.67e-05}, + {410,102,4.84e-05}, + {410,121,3.87e-04}, + {410,123,1.93e-04}, + {410,144,9.67e-05}, + {410,146,4.84e-05}, + {410,389,3.65e-02}, + {410,391,-1.03e-02}, + {410,412,-1.03e-02}, + {410,433,3.65e-02}, + {410,435,-1.03e-02}, + {411,411,2.08e-01}, + {411,101,9.67e-05}, + {411,115,4.84e-05}, + {411,122,3.87e-04}, + {411,140,1.93e-04}, + {411,145,9.67e-05}, + {411,165,4.84e-05}, + {411,390,3.65e-02}, + {411,404,-1.03e-02}, + {411,429,-1.03e-02}, + {411,434,3.65e-02}, + {411,454,-1.03e-02}, + {412,412,8.29e-02}, + {412,100,4.84e-05}, + {412,102,1.93e-04}, + {412,103,4.84e-05}, + {412,121,1.93e-04}, + {412,123,7.74e-04}, + {412,124,1.93e-04}, + {412,144,4.84e-05}, + {412,146,1.93e-04}, + {412,147,4.84e-05}, + {412,389,-1.03e-02}, + {412,391,-1.03e-02}, + {412,392,-1.03e-02}, + {412,410,-1.03e-02}, + {412,413,-1.03e-02}, + {412,433,-1.03e-02}, + {412,435,-1.03e-02}, + {412,436,-1.03e-02}, + {413,413,8.29e-02}, + {413,102,4.84e-05}, + {413,103,1.93e-04}, + {413,104,4.84e-05}, + {413,123,1.93e-04}, + {413,124,7.74e-04}, + {413,125,1.93e-04}, + {413,146,4.84e-05}, + {413,147,1.93e-04}, + {413,148,4.84e-05}, + {413,391,-1.03e-02}, + {413,392,-1.03e-02}, + {413,393,-1.03e-02}, + {413,412,-1.03e-02}, + {413,414,-1.03e-02}, + {413,435,-1.03e-02}, + {413,436,-1.03e-02}, + {413,437,-1.03e-02}, + {414,414,8.29e-02}, + {414,103,4.84e-05}, + {414,104,1.93e-04}, + {414,105,4.84e-05}, + {414,124,1.93e-04}, + {414,125,7.74e-04}, + {414,126,1.93e-04}, + {414,147,4.84e-05}, + {414,148,1.93e-04}, + {414,149,4.84e-05}, + {414,392,-1.03e-02}, + {414,393,-1.03e-02}, + {414,394,-1.03e-02}, + {414,413,-1.03e-02}, + {414,415,-1.03e-02}, + {414,436,-1.03e-02}, + {414,437,-1.03e-02}, + {414,438,-1.03e-02}, + {415,415,8.29e-02}, + {415,104,4.84e-05}, + {415,105,1.93e-04}, + {415,106,4.84e-05}, + {415,125,1.93e-04}, + {415,126,7.74e-04}, + {415,127,1.93e-04}, + {415,148,4.84e-05}, + {415,149,1.93e-04}, + {415,150,4.84e-05}, + {415,393,-1.03e-02}, + {415,394,-1.03e-02}, + {415,395,-1.03e-02}, + {415,414,-1.03e-02}, + {415,416,-1.03e-02}, + {415,437,-1.03e-02}, + {415,438,-1.03e-02}, + {415,439,-1.03e-02}, + {416,416,8.29e-02}, + {416,105,4.84e-05}, + {416,106,1.93e-04}, + {416,107,4.84e-05}, + {416,126,1.93e-04}, + {416,127,7.74e-04}, + {416,128,1.93e-04}, + {416,149,4.84e-05}, + {416,150,1.93e-04}, + {416,151,4.84e-05}, + {416,394,-1.03e-02}, + {416,395,-1.03e-02}, + {416,396,-1.03e-02}, + {416,415,-1.03e-02}, + {416,417,-1.03e-02}, + {416,438,-1.03e-02}, + {416,439,-1.03e-02}, + {416,440,-1.03e-02}, + {417,417,8.29e-02}, + {417,106,4.84e-05}, + {417,107,1.93e-04}, + {417,108,4.84e-05}, + {417,127,1.93e-04}, + {417,128,7.74e-04}, + {417,129,1.93e-04}, + {417,150,4.84e-05}, + {417,151,1.93e-04}, + {417,152,4.84e-05}, + {417,395,-1.03e-02}, + {417,396,-1.03e-02}, + {417,397,-1.03e-02}, + {417,416,-1.03e-02}, + {417,418,-1.03e-02}, + {417,439,-1.03e-02}, + {417,440,-1.03e-02}, + {417,441,-1.03e-02}, + {418,418,8.29e-02}, + {418,107,4.84e-05}, + {418,108,1.93e-04}, + {418,109,4.84e-05}, + {418,128,1.93e-04}, + {418,129,7.74e-04}, + {418,130,1.93e-04}, + {418,151,4.84e-05}, + {418,152,1.93e-04}, + {418,153,4.84e-05}, + {418,396,-1.03e-02}, + {418,397,-1.03e-02}, + {418,398,-1.03e-02}, + {418,417,-1.03e-02}, + {418,419,-1.03e-02}, + {418,440,-1.03e-02}, + {418,441,-1.03e-02}, + {418,442,-1.03e-02}, + {419,419,8.29e-02}, + {419,108,4.84e-05}, + {419,109,1.93e-04}, + {419,110,4.84e-05}, + {419,129,1.93e-04}, + {419,130,7.74e-04}, + {419,131,1.93e-04}, + {419,152,4.84e-05}, + {419,153,1.93e-04}, + {419,154,4.84e-05}, + {419,397,-1.03e-02}, + {419,398,-1.03e-02}, + {419,399,-1.03e-02}, + {419,418,-1.03e-02}, + {419,420,-1.03e-02}, + {419,441,-1.03e-02}, + {419,442,-1.03e-02}, + {419,443,-1.03e-02}, + {420,420,8.29e-02}, + {420,109,4.84e-05}, + {420,110,1.93e-04}, + {420,111,4.84e-05}, + {420,130,1.93e-04}, + {420,131,7.74e-04}, + {420,132,1.93e-04}, + {420,153,4.84e-05}, + {420,154,1.93e-04}, + {420,155,4.84e-05}, + {420,398,-1.03e-02}, + {420,399,-1.03e-02}, + {420,400,-1.03e-02}, + {420,419,-1.03e-02}, + {420,421,-1.03e-02}, + {420,442,-1.03e-02}, + {420,443,-1.03e-02}, + {420,444,-1.03e-02}, + {421,421,8.29e-02}, + {421,110,4.84e-05}, + {421,111,1.93e-04}, + {421,131,1.93e-04}, + {421,132,7.74e-04}, + {421,133,1.93e-04}, + {421,134,4.84e-05}, + {421,154,4.84e-05}, + {421,155,1.93e-04}, + {421,156,4.84e-05}, + {421,399,-1.03e-02}, + {421,400,-1.03e-02}, + {421,420,-1.03e-02}, + {421,422,-1.03e-02}, + {421,423,-1.03e-02}, + {421,443,-1.03e-02}, + {421,444,-1.03e-02}, + {421,445,-1.03e-02}, + {422,422,8.29e-02}, + {422,111,4.84e-05}, + {422,132,1.93e-04}, + {422,133,7.74e-04}, + {422,134,1.93e-04}, + {422,155,4.84e-05}, + {422,156,1.93e-04}, + {422,157,4.84e-05}, + {422,158,1.93e-04}, + {422,159,4.84e-05}, + {422,400,-1.03e-02}, + {422,421,-1.03e-02}, + {422,423,-1.03e-02}, + {422,444,-1.03e-02}, + {422,445,-1.03e-02}, + {422,446,-1.03e-02}, + {422,447,-1.03e-02}, + {422,448,-1.03e-02}, + {423,423,8.29e-02}, + {423,111,1.93e-04}, + {423,112,4.84e-05}, + {423,132,4.84e-05}, + {423,133,1.93e-04}, + {423,134,7.74e-04}, + {423,135,1.93e-04}, + {423,158,4.84e-05}, + {423,159,1.93e-04}, + {423,160,4.84e-05}, + {423,400,-1.03e-02}, + {423,401,-1.03e-02}, + {423,421,-1.03e-02}, + {423,422,-1.03e-02}, + {423,424,-1.03e-02}, + {423,447,-1.03e-02}, + {423,448,-1.03e-02}, + {423,449,-1.03e-02}, + {424,424,8.29e-02}, + {424,111,4.84e-05}, + {424,112,1.93e-04}, + {424,113,4.84e-05}, + {424,134,1.93e-04}, + {424,135,7.74e-04}, + {424,136,1.93e-04}, + {424,159,4.84e-05}, + {424,160,1.93e-04}, + {424,161,4.84e-05}, + {424,400,-1.03e-02}, + {424,401,-1.03e-02}, + {424,402,-1.03e-02}, + {424,423,-1.03e-02}, + {424,425,-1.03e-02}, + {424,448,-1.03e-02}, + {424,449,-1.03e-02}, + {424,450,-1.03e-02}, + {425,425,8.29e-02}, + {425,112,4.84e-05}, + {425,113,1.93e-04}, + {425,120,4.84e-05}, + {425,135,1.93e-04}, + {425,136,7.74e-04}, + {425,141,1.93e-04}, + {425,160,4.84e-05}, + {425,161,1.93e-04}, + {425,166,4.84e-05}, + {425,401,-1.03e-02}, + {425,402,-1.03e-02}, + {425,409,-1.03e-02}, + {425,424,-1.03e-02}, + {425,430,-1.03e-02}, + {425,449,-1.03e-02}, + {425,450,-1.03e-02}, + {425,455,-1.03e-02}, + {426,426,8.29e-02}, + {426,114,4.84e-05}, + {426,116,4.84e-05}, + {426,117,1.93e-04}, + {426,137,7.74e-04}, + {426,138,1.93e-04}, + {426,139,1.93e-04}, + {426,162,4.84e-05}, + {426,163,1.93e-04}, + {426,164,4.84e-05}, + {426,403,-1.03e-02}, + {426,405,-1.03e-02}, + {426,406,-1.03e-02}, + {426,427,-1.03e-02}, + {426,428,-1.03e-02}, + {426,451,-1.03e-02}, + {426,452,-1.03e-02}, + {426,453,-1.03e-02}, + {427,427,8.29e-02}, + {427,114,1.93e-04}, + {427,115,4.84e-05}, + {427,117,4.84e-05}, + {427,137,1.93e-04}, + {427,138,7.74e-04}, + {427,140,1.93e-04}, + {427,163,4.84e-05}, + {427,164,1.93e-04}, + {427,165,4.84e-05}, + {427,403,-1.03e-02}, + {427,404,-1.03e-02}, + {427,406,-1.03e-02}, + {427,426,-1.03e-02}, + {427,429,-1.03e-02}, + {427,452,-1.03e-02}, + {427,453,-1.03e-02}, + {427,454,-1.03e-02}, + {428,428,8.29e-02}, + {428,116,1.93e-04}, + {428,117,4.84e-05}, + {428,119,4.84e-05}, + {428,137,1.93e-04}, + {428,139,7.74e-04}, + {428,143,1.93e-04}, + {428,162,1.93e-04}, + {428,163,4.84e-05}, + {428,168,4.84e-05}, + {428,405,-1.03e-02}, + {428,406,-1.03e-02}, + {428,408,-1.03e-02}, + {428,426,-1.03e-02}, + {428,432,-1.03e-02}, + {428,451,-1.03e-02}, + {428,452,-1.03e-02}, + {428,457,-1.03e-02}, + {429,429,8.29e-02}, + {429,101,4.84e-05}, + {429,114,4.84e-05}, + {429,115,1.93e-04}, + {429,122,1.93e-04}, + {429,138,1.93e-04}, + {429,140,7.74e-04}, + {429,145,4.84e-05}, + {429,164,4.84e-05}, + {429,165,1.93e-04}, + {429,390,-1.03e-02}, + {429,403,-1.03e-02}, + {429,404,-1.03e-02}, + {429,411,-1.03e-02}, + {429,427,-1.03e-02}, + {429,434,-1.03e-02}, + {429,453,-1.03e-02}, + {429,454,-1.03e-02}, + {430,430,8.29e-02}, + {430,113,4.84e-05}, + {430,118,4.84e-05}, + {430,120,1.93e-04}, + {430,136,1.93e-04}, + {430,141,7.74e-04}, + {430,142,1.93e-04}, + {430,161,4.84e-05}, + {430,166,1.93e-04}, + {430,167,4.84e-05}, + {430,402,-1.03e-02}, + {430,407,-1.03e-02}, + {430,409,-1.03e-02}, + {430,425,-1.03e-02}, + {430,431,-1.03e-02}, + {430,450,-1.03e-02}, + {430,455,-1.03e-02}, + {430,456,-1.03e-02}, + {431,431,8.29e-02}, + {431,118,1.93e-04}, + {431,119,4.84e-05}, + {431,120,4.84e-05}, + {431,141,1.93e-04}, + {431,142,7.74e-04}, + {431,143,1.93e-04}, + {431,166,4.84e-05}, + {431,167,1.93e-04}, + {431,168,4.84e-05}, + {431,407,-1.03e-02}, + {431,408,-1.03e-02}, + {431,409,-1.03e-02}, + {431,430,-1.03e-02}, + {431,432,-1.03e-02}, + {431,455,-1.03e-02}, + {431,456,-1.03e-02}, + {431,457,-1.03e-02}, + {432,432,8.29e-02}, + {432,116,4.84e-05}, + {432,118,4.84e-05}, + {432,119,1.93e-04}, + {432,139,1.93e-04}, + {432,142,1.93e-04}, + {432,143,7.74e-04}, + {432,162,4.84e-05}, + {432,167,4.84e-05}, + {432,168,1.93e-04}, + {432,405,-1.03e-02}, + {432,407,-1.03e-02}, + {432,408,-1.03e-02}, + {432,428,-1.03e-02}, + {432,431,-1.03e-02}, + {432,451,-1.03e-02}, + {432,456,-1.03e-02}, + {432,457,-1.03e-02}, + {433,433,2.08e-01}, + {433,121,9.67e-05}, + {433,123,4.84e-05}, + {433,144,3.87e-04}, + {433,146,1.93e-04}, + {433,169,9.67e-05}, + {433,171,4.84e-05}, + {433,410,3.65e-02}, + {433,412,-1.03e-02}, + {433,435,-1.03e-02}, + {433,458,3.65e-02}, + {433,460,-1.03e-02}, + {434,434,2.08e-01}, + {434,122,9.67e-05}, + {434,140,4.84e-05}, + {434,145,3.87e-04}, + {434,165,1.93e-04}, + {434,170,9.67e-05}, + {434,193,4.84e-05}, + {434,411,3.65e-02}, + {434,429,-1.03e-02}, + {434,454,-1.03e-02}, + {434,459,3.65e-02}, + {434,482,-1.03e-02}, + {435,435,8.29e-02}, + {435,121,4.84e-05}, + {435,123,1.93e-04}, + {435,124,4.84e-05}, + {435,144,1.93e-04}, + {435,146,7.74e-04}, + {435,147,1.93e-04}, + {435,169,4.84e-05}, + {435,171,1.93e-04}, + {435,172,4.84e-05}, + {435,410,-1.03e-02}, + {435,412,-1.03e-02}, + {435,413,-1.03e-02}, + {435,433,-1.03e-02}, + {435,436,-1.03e-02}, + {435,458,-1.03e-02}, + {435,460,-1.03e-02}, + {435,461,-1.03e-02}, + {436,436,8.29e-02}, + {436,123,4.84e-05}, + {436,124,1.93e-04}, + {436,125,4.84e-05}, + {436,146,1.93e-04}, + {436,147,7.74e-04}, + {436,148,1.93e-04}, + {436,171,4.84e-05}, + {436,172,1.93e-04}, + {436,173,4.84e-05}, + {436,412,-1.03e-02}, + {436,413,-1.03e-02}, + {436,414,-1.03e-02}, + {436,435,-1.03e-02}, + {436,437,-1.03e-02}, + {436,460,-1.03e-02}, + {436,461,-1.03e-02}, + {436,462,-1.03e-02}, + {437,437,8.29e-02}, + {437,124,4.84e-05}, + {437,125,1.93e-04}, + {437,126,4.84e-05}, + {437,147,1.93e-04}, + {437,148,7.74e-04}, + {437,149,1.93e-04}, + {437,172,4.84e-05}, + {437,173,1.93e-04}, + {437,174,4.84e-05}, + {437,413,-1.03e-02}, + {437,414,-1.03e-02}, + {437,415,-1.03e-02}, + {437,436,-1.03e-02}, + {437,438,-1.03e-02}, + {437,461,-1.03e-02}, + {437,462,-1.03e-02}, + {437,463,-1.03e-02}, + {438,438,8.29e-02}, + {438,125,4.84e-05}, + {438,126,1.93e-04}, + {438,127,4.84e-05}, + {438,148,1.93e-04}, + {438,149,7.74e-04}, + {438,150,1.93e-04}, + {438,173,4.84e-05}, + {438,174,1.93e-04}, + {438,175,4.84e-05}, + {438,414,-1.03e-02}, + {438,415,-1.03e-02}, + {438,416,-1.03e-02}, + {438,437,-1.03e-02}, + {438,439,-1.03e-02}, + {438,462,-1.03e-02}, + {438,463,-1.03e-02}, + {438,464,-1.03e-02}, + {439,439,8.29e-02}, + {439,126,4.84e-05}, + {439,127,1.93e-04}, + {439,128,4.84e-05}, + {439,149,1.93e-04}, + {439,150,7.74e-04}, + {439,151,1.93e-04}, + {439,174,4.84e-05}, + {439,175,1.93e-04}, + {439,176,4.84e-05}, + {439,415,-1.03e-02}, + {439,416,-1.03e-02}, + {439,417,-1.03e-02}, + {439,438,-1.03e-02}, + {439,440,-1.03e-02}, + {439,463,-1.03e-02}, + {439,464,-1.03e-02}, + {439,465,-1.03e-02}, + {440,440,8.29e-02}, + {440,127,4.84e-05}, + {440,128,1.93e-04}, + {440,129,4.84e-05}, + {440,150,1.93e-04}, + {440,151,7.74e-04}, + {440,152,1.93e-04}, + {440,175,4.84e-05}, + {440,176,1.93e-04}, + {440,177,4.84e-05}, + {440,416,-1.03e-02}, + {440,417,-1.03e-02}, + {440,418,-1.03e-02}, + {440,439,-1.03e-02}, + {440,441,-1.03e-02}, + {440,464,-1.03e-02}, + {440,465,-1.03e-02}, + {440,466,-1.03e-02}, + {441,441,8.29e-02}, + {441,128,4.84e-05}, + {441,129,1.93e-04}, + {441,130,4.84e-05}, + {441,151,1.93e-04}, + {441,152,7.74e-04}, + {441,153,1.93e-04}, + {441,176,4.84e-05}, + {441,177,1.93e-04}, + {441,178,4.84e-05}, + {441,417,-1.03e-02}, + {441,418,-1.03e-02}, + {441,419,-1.03e-02}, + {441,440,-1.03e-02}, + {441,442,-1.03e-02}, + {441,465,-1.03e-02}, + {441,466,-1.03e-02}, + {441,467,-1.03e-02}, + {442,442,8.29e-02}, + {442,129,4.84e-05}, + {442,130,1.93e-04}, + {442,131,4.84e-05}, + {442,152,1.93e-04}, + {442,153,7.74e-04}, + {442,154,1.93e-04}, + {442,177,4.84e-05}, + {442,178,1.93e-04}, + {442,179,4.84e-05}, + {442,418,-1.03e-02}, + {442,419,-1.03e-02}, + {442,420,-1.03e-02}, + {442,441,-1.03e-02}, + {442,443,-1.03e-02}, + {442,466,-1.03e-02}, + {442,467,-1.03e-02}, + {442,468,-1.03e-02}, + {443,443,8.29e-02}, + {443,130,4.84e-05}, + {443,131,1.93e-04}, + {443,132,4.84e-05}, + {443,153,1.93e-04}, + {443,154,7.74e-04}, + {443,155,1.93e-04}, + {443,178,4.84e-05}, + {443,179,1.93e-04}, + {443,180,4.84e-05}, + {443,419,-1.03e-02}, + {443,420,-1.03e-02}, + {443,421,-1.03e-02}, + {443,442,-1.03e-02}, + {443,444,-1.03e-02}, + {443,467,-1.03e-02}, + {443,468,-1.03e-02}, + {443,469,-1.03e-02}, + {444,444,8.29e-02}, + {444,131,4.84e-05}, + {444,132,1.93e-04}, + {444,133,4.84e-05}, + {444,154,1.93e-04}, + {444,155,7.74e-04}, + {444,156,1.93e-04}, + {444,179,4.84e-05}, + {444,180,1.93e-04}, + {444,181,4.84e-05}, + {444,420,-1.03e-02}, + {444,421,-1.03e-02}, + {444,422,-1.03e-02}, + {444,443,-1.03e-02}, + {444,445,-1.03e-02}, + {444,468,-1.03e-02}, + {444,469,-1.03e-02}, + {444,470,-1.03e-02}, + {445,445,8.29e-02}, + {445,132,4.84e-05}, + {445,133,1.93e-04}, + {445,155,1.93e-04}, + {445,156,7.74e-04}, + {445,157,1.93e-04}, + {445,158,4.84e-05}, + {445,180,4.84e-05}, + {445,181,1.93e-04}, + {445,182,4.84e-05}, + {445,421,-1.03e-02}, + {445,422,-1.03e-02}, + {445,444,-1.03e-02}, + {445,446,-1.03e-02}, + {445,447,-1.03e-02}, + {445,469,-1.03e-02}, + {445,470,-1.03e-02}, + {445,471,-1.03e-02}, + {446,446,8.29e-02}, + {446,133,4.84e-05}, + {446,156,1.93e-04}, + {446,157,7.74e-04}, + {446,158,1.93e-04}, + {446,181,4.84e-05}, + {446,182,1.93e-04}, + {446,183,4.84e-05}, + {446,184,1.93e-04}, + {446,188,4.84e-05}, + {446,422,-1.03e-02}, + {446,445,-1.03e-02}, + {446,447,-1.03e-02}, + {446,470,-1.03e-02}, + {446,471,-1.03e-02}, + {446,472,-1.03e-02}, + {446,473,-1.03e-02}, + {446,477,-1.03e-02}, + {447,447,8.29e-02}, + {447,133,1.93e-04}, + {447,134,4.84e-05}, + {447,156,4.84e-05}, + {447,157,1.93e-04}, + {447,158,7.74e-04}, + {447,159,1.93e-04}, + {447,184,4.84e-05}, + {447,187,4.84e-05}, + {447,188,1.93e-04}, + {447,422,-1.03e-02}, + {447,423,-1.03e-02}, + {447,445,-1.03e-02}, + {447,446,-1.03e-02}, + {447,448,-1.03e-02}, + {447,473,-1.03e-02}, + {447,476,-1.03e-02}, + {447,477,-1.03e-02}, + {448,448,8.29e-02}, + {448,133,4.84e-05}, + {448,134,1.93e-04}, + {448,135,4.84e-05}, + {448,158,1.93e-04}, + {448,159,7.74e-04}, + {448,160,1.93e-04}, + {448,185,4.84e-05}, + {448,187,1.93e-04}, + {448,188,4.84e-05}, + {448,422,-1.03e-02}, + {448,423,-1.03e-02}, + {448,424,-1.03e-02}, + {448,447,-1.03e-02}, + {448,449,-1.03e-02}, + {448,474,-1.03e-02}, + {448,476,-1.03e-02}, + {448,477,-1.03e-02}, + {449,449,8.29e-02}, + {449,134,4.84e-05}, + {449,135,1.93e-04}, + {449,136,4.84e-05}, + {449,159,1.93e-04}, + {449,160,7.74e-04}, + {449,161,1.93e-04}, + {449,185,1.93e-04}, + {449,186,4.84e-05}, + {449,187,4.84e-05}, + {449,423,-1.03e-02}, + {449,424,-1.03e-02}, + {449,425,-1.03e-02}, + {449,448,-1.03e-02}, + {449,450,-1.03e-02}, + {449,474,-1.03e-02}, + {449,475,-1.03e-02}, + {449,476,-1.03e-02}, + {450,450,8.29e-02}, + {450,135,4.84e-05}, + {450,136,1.93e-04}, + {450,141,4.84e-05}, + {450,160,1.93e-04}, + {450,161,7.74e-04}, + {450,166,1.93e-04}, + {450,185,4.84e-05}, + {450,186,1.93e-04}, + {450,192,4.84e-05}, + {450,424,-1.03e-02}, + {450,425,-1.03e-02}, + {450,430,-1.03e-02}, + {450,449,-1.03e-02}, + {450,455,-1.03e-02}, + {450,474,-1.03e-02}, + {450,475,-1.03e-02}, + {450,481,-1.03e-02}, + {451,451,8.29e-02}, + {451,137,4.84e-05}, + {451,139,1.93e-04}, + {451,143,4.84e-05}, + {451,162,7.74e-04}, + {451,163,1.93e-04}, + {451,168,1.93e-04}, + {451,189,4.84e-05}, + {451,190,1.93e-04}, + {451,195,4.84e-05}, + {451,426,-1.03e-02}, + {451,428,-1.03e-02}, + {451,432,-1.03e-02}, + {451,452,-1.03e-02}, + {451,457,-1.03e-02}, + {451,478,-1.03e-02}, + {451,479,-1.03e-02}, + {451,484,-1.03e-02}, + {452,452,8.29e-02}, + {452,137,1.93e-04}, + {452,138,4.84e-05}, + {452,139,4.84e-05}, + {452,162,1.93e-04}, + {452,163,7.74e-04}, + {452,164,1.93e-04}, + {452,190,4.84e-05}, + {452,194,4.84e-05}, + {452,195,1.93e-04}, + {452,426,-1.03e-02}, + {452,427,-1.03e-02}, + {452,428,-1.03e-02}, + {452,451,-1.03e-02}, + {452,453,-1.03e-02}, + {452,479,-1.03e-02}, + {452,483,-1.03e-02}, + {452,484,-1.03e-02}, + {453,453,8.29e-02}, + {453,137,4.84e-05}, + {453,138,1.93e-04}, + {453,140,4.84e-05}, + {453,163,1.93e-04}, + {453,164,7.74e-04}, + {453,165,1.93e-04}, + {453,193,4.84e-05}, + {453,194,1.93e-04}, + {453,195,4.84e-05}, + {453,426,-1.03e-02}, + {453,427,-1.03e-02}, + {453,429,-1.03e-02}, + {453,452,-1.03e-02}, + {453,454,-1.03e-02}, + {453,482,-1.03e-02}, + {453,483,-1.03e-02}, + {453,484,-1.03e-02}, + {454,454,8.29e-02}, + {454,122,4.84e-05}, + {454,138,4.84e-05}, + {454,140,1.93e-04}, + {454,145,1.93e-04}, + {454,164,1.93e-04}, + {454,165,7.74e-04}, + {454,170,4.84e-05}, + {454,193,1.93e-04}, + {454,194,4.84e-05}, + {454,411,-1.03e-02}, + {454,427,-1.03e-02}, + {454,429,-1.03e-02}, + {454,434,-1.03e-02}, + {454,453,-1.03e-02}, + {454,459,-1.03e-02}, + {454,482,-1.03e-02}, + {454,483,-1.03e-02}, + {455,455,8.29e-02}, + {455,136,4.84e-05}, + {455,141,1.93e-04}, + {455,142,4.84e-05}, + {455,161,1.93e-04}, + {455,166,7.74e-04}, + {455,167,1.93e-04}, + {455,186,4.84e-05}, + {455,191,4.84e-05}, + {455,192,1.93e-04}, + {455,425,-1.03e-02}, + {455,430,-1.03e-02}, + {455,431,-1.03e-02}, + {455,450,-1.03e-02}, + {455,456,-1.03e-02}, + {455,475,-1.03e-02}, + {455,480,-1.03e-02}, + {455,481,-1.03e-02}, + {456,456,8.29e-02}, + {456,141,4.84e-05}, + {456,142,1.93e-04}, + {456,143,4.84e-05}, + {456,166,1.93e-04}, + {456,167,7.74e-04}, + {456,168,1.93e-04}, + {456,189,4.84e-05}, + {456,191,1.93e-04}, + {456,192,4.84e-05}, + {456,430,-1.03e-02}, + {456,431,-1.03e-02}, + {456,432,-1.03e-02}, + {456,455,-1.03e-02}, + {456,457,-1.03e-02}, + {456,478,-1.03e-02}, + {456,480,-1.03e-02}, + {456,481,-1.03e-02}, + {457,457,8.29e-02}, + {457,139,4.84e-05}, + {457,142,4.84e-05}, + {457,143,1.93e-04}, + {457,162,1.93e-04}, + {457,167,1.93e-04}, + {457,168,7.74e-04}, + {457,189,1.93e-04}, + {457,190,4.84e-05}, + {457,191,4.84e-05}, + {457,428,-1.03e-02}, + {457,431,-1.03e-02}, + {457,432,-1.03e-02}, + {457,451,-1.03e-02}, + {457,456,-1.03e-02}, + {457,478,-1.03e-02}, + {457,479,-1.03e-02}, + {457,480,-1.03e-02}, + {458,458,2.08e-01}, + {458,144,9.67e-05}, + {458,146,4.84e-05}, + {458,169,3.87e-04}, + {458,171,1.93e-04}, + {458,196,9.67e-05}, + {458,198,4.84e-05}, + {458,433,3.65e-02}, + {458,435,-1.03e-02}, + {458,460,-1.03e-02}, + {458,485,3.65e-02}, + {458,487,-1.03e-02}, + {459,459,2.08e-01}, + {459,145,9.67e-05}, + {459,165,4.84e-05}, + {459,170,3.87e-04}, + {459,193,1.93e-04}, + {459,197,9.67e-05}, + {459,223,4.84e-05}, + {459,434,3.65e-02}, + {459,454,-1.03e-02}, + {459,482,-1.03e-02}, + {459,486,3.65e-02}, + {459,512,-1.03e-02}, + {460,460,8.29e-02}, + {460,144,4.84e-05}, + {460,146,1.93e-04}, + {460,147,4.84e-05}, + {460,169,1.93e-04}, + {460,171,7.74e-04}, + {460,172,1.93e-04}, + {460,196,4.84e-05}, + {460,198,1.93e-04}, + {460,199,4.84e-05}, + {460,433,-1.03e-02}, + {460,435,-1.03e-02}, + {460,436,-1.03e-02}, + {460,458,-1.03e-02}, + {460,461,-1.03e-02}, + {460,485,-1.03e-02}, + {460,487,-1.03e-02}, + {460,488,-1.03e-02}, + {461,461,8.29e-02}, + {461,146,4.84e-05}, + {461,147,1.93e-04}, + {461,148,4.84e-05}, + {461,171,1.93e-04}, + {461,172,7.74e-04}, + {461,173,1.93e-04}, + {461,198,4.84e-05}, + {461,199,1.93e-04}, + {461,200,4.84e-05}, + {461,435,-1.03e-02}, + {461,436,-1.03e-02}, + {461,437,-1.03e-02}, + {461,460,-1.03e-02}, + {461,462,-1.03e-02}, + {461,487,-1.03e-02}, + {461,488,-1.03e-02}, + {461,489,-1.03e-02}, + {462,462,8.29e-02}, + {462,147,4.84e-05}, + {462,148,1.93e-04}, + {462,149,4.84e-05}, + {462,172,1.93e-04}, + {462,173,7.74e-04}, + {462,174,1.93e-04}, + {462,199,4.84e-05}, + {462,200,1.93e-04}, + {462,201,4.84e-05}, + {462,436,-1.03e-02}, + {462,437,-1.03e-02}, + {462,438,-1.03e-02}, + {462,461,-1.03e-02}, + {462,463,-1.03e-02}, + {462,488,-1.03e-02}, + {462,489,-1.03e-02}, + {462,490,-1.03e-02}, + {463,463,8.29e-02}, + {463,148,4.84e-05}, + {463,149,1.93e-04}, + {463,150,4.84e-05}, + {463,173,1.93e-04}, + {463,174,7.74e-04}, + {463,175,1.93e-04}, + {463,200,4.84e-05}, + {463,201,1.93e-04}, + {463,202,4.84e-05}, + {463,437,-1.03e-02}, + {463,438,-1.03e-02}, + {463,439,-1.03e-02}, + {463,462,-1.03e-02}, + {463,464,-1.03e-02}, + {463,489,-1.03e-02}, + {463,490,-1.03e-02}, + {463,491,-1.03e-02}, + {464,464,8.29e-02}, + {464,149,4.84e-05}, + {464,150,1.93e-04}, + {464,151,4.84e-05}, + {464,174,1.93e-04}, + {464,175,7.74e-04}, + {464,176,1.93e-04}, + {464,201,4.84e-05}, + {464,202,1.93e-04}, + {464,203,4.84e-05}, + {464,438,-1.03e-02}, + {464,439,-1.03e-02}, + {464,440,-1.03e-02}, + {464,463,-1.03e-02}, + {464,465,-1.03e-02}, + {464,490,-1.03e-02}, + {464,491,-1.03e-02}, + {464,492,-1.03e-02}, + {465,465,8.29e-02}, + {465,150,4.84e-05}, + {465,151,1.93e-04}, + {465,152,4.84e-05}, + {465,175,1.93e-04}, + {465,176,7.74e-04}, + {465,177,1.93e-04}, + {465,202,4.84e-05}, + {465,203,1.93e-04}, + {465,204,4.84e-05}, + {465,439,-1.03e-02}, + {465,440,-1.03e-02}, + {465,441,-1.03e-02}, + {465,464,-1.03e-02}, + {465,466,-1.03e-02}, + {465,491,-1.03e-02}, + {465,492,-1.03e-02}, + {465,493,-1.03e-02}, + {466,466,8.29e-02}, + {466,151,4.84e-05}, + {466,152,1.93e-04}, + {466,153,4.84e-05}, + {466,176,1.93e-04}, + {466,177,7.74e-04}, + {466,178,1.93e-04}, + {466,203,4.84e-05}, + {466,204,1.93e-04}, + {466,205,4.84e-05}, + {466,440,-1.03e-02}, + {466,441,-1.03e-02}, + {466,442,-1.03e-02}, + {466,465,-1.03e-02}, + {466,467,-1.03e-02}, + {466,492,-1.03e-02}, + {466,493,-1.03e-02}, + {466,494,-1.03e-02}, + {467,467,8.29e-02}, + {467,152,4.84e-05}, + {467,153,1.93e-04}, + {467,154,4.84e-05}, + {467,177,1.93e-04}, + {467,178,7.74e-04}, + {467,179,1.93e-04}, + {467,204,4.84e-05}, + {467,205,1.93e-04}, + {467,206,4.84e-05}, + {467,441,-1.03e-02}, + {467,442,-1.03e-02}, + {467,443,-1.03e-02}, + {467,466,-1.03e-02}, + {467,468,-1.03e-02}, + {467,493,-1.03e-02}, + {467,494,-1.03e-02}, + {467,495,-1.03e-02}, + {468,468,8.29e-02}, + {468,153,4.84e-05}, + {468,154,1.93e-04}, + {468,155,4.84e-05}, + {468,178,1.93e-04}, + {468,179,7.74e-04}, + {468,180,1.93e-04}, + {468,205,4.84e-05}, + {468,206,1.93e-04}, + {468,207,4.84e-05}, + {468,442,-1.03e-02}, + {468,443,-1.03e-02}, + {468,444,-1.03e-02}, + {468,467,-1.03e-02}, + {468,469,-1.03e-02}, + {468,494,-1.03e-02}, + {468,495,-1.03e-02}, + {468,496,-1.03e-02}, + {469,469,8.29e-02}, + {469,154,4.84e-05}, + {469,155,1.93e-04}, + {469,156,4.84e-05}, + {469,179,1.93e-04}, + {469,180,7.74e-04}, + {469,181,1.93e-04}, + {469,206,4.84e-05}, + {469,207,1.93e-04}, + {469,208,4.84e-05}, + {469,443,-1.03e-02}, + {469,444,-1.03e-02}, + {469,445,-1.03e-02}, + {469,468,-1.03e-02}, + {469,470,-1.03e-02}, + {469,495,-1.03e-02}, + {469,496,-1.03e-02}, + {469,497,-1.03e-02}, + {470,470,8.29e-02}, + {470,155,4.84e-05}, + {470,156,1.93e-04}, + {470,157,4.84e-05}, + {470,180,1.93e-04}, + {470,181,7.74e-04}, + {470,182,1.93e-04}, + {470,207,4.84e-05}, + {470,208,1.93e-04}, + {470,209,4.84e-05}, + {470,444,-1.03e-02}, + {470,445,-1.03e-02}, + {470,446,-1.03e-02}, + {470,469,-1.03e-02}, + {470,471,-1.03e-02}, + {470,496,-1.03e-02}, + {470,497,-1.03e-02}, + {470,498,-1.03e-02}, + {471,471,8.29e-02}, + {471,156,4.84e-05}, + {471,157,1.93e-04}, + {471,181,1.93e-04}, + {471,182,7.74e-04}, + {471,183,1.93e-04}, + {471,184,4.84e-05}, + {471,208,4.84e-05}, + {471,209,1.93e-04}, + {471,210,4.84e-05}, + {471,445,-1.03e-02}, + {471,446,-1.03e-02}, + {471,470,-1.03e-02}, + {471,472,-1.03e-02}, + {471,473,-1.03e-02}, + {471,497,-1.03e-02}, + {471,498,-1.03e-02}, + {471,499,-1.03e-02}, + {472,472,8.29e-02}, + {472,157,4.84e-05}, + {472,182,1.93e-04}, + {472,183,7.74e-04}, + {472,184,1.93e-04}, + {472,209,4.84e-05}, + {472,210,1.93e-04}, + {472,211,4.84e-05}, + {472,212,1.93e-04}, + {472,213,4.84e-05}, + {472,446,-1.03e-02}, + {472,471,-1.03e-02}, + {472,473,-1.03e-02}, + {472,498,-1.03e-02}, + {472,499,-1.03e-02}, + {472,500,-1.03e-02}, + {472,501,-1.03e-02}, + {472,502,-1.03e-02}, + {473,473,8.29e-02}, + {473,157,1.93e-04}, + {473,158,4.84e-05}, + {473,182,4.84e-05}, + {473,183,1.93e-04}, + {473,184,7.74e-04}, + {473,188,1.93e-04}, + {473,212,4.84e-05}, + {473,213,1.93e-04}, + {473,217,4.84e-05}, + {473,446,-1.03e-02}, + {473,447,-1.03e-02}, + {473,471,-1.03e-02}, + {473,472,-1.03e-02}, + {473,477,-1.03e-02}, + {473,501,-1.03e-02}, + {473,502,-1.03e-02}, + {473,506,-1.03e-02}, + {474,474,8.29e-02}, + {474,159,4.84e-05}, + {474,160,1.93e-04}, + {474,161,4.84e-05}, + {474,185,7.74e-04}, + {474,186,1.93e-04}, + {474,187,1.93e-04}, + {474,214,4.84e-05}, + {474,215,1.93e-04}, + {474,216,4.84e-05}, + {474,448,-1.03e-02}, + {474,449,-1.03e-02}, + {474,450,-1.03e-02}, + {474,475,-1.03e-02}, + {474,476,-1.03e-02}, + {474,503,-1.03e-02}, + {474,504,-1.03e-02}, + {474,505,-1.03e-02}, + {475,475,8.29e-02}, + {475,160,4.84e-05}, + {475,161,1.93e-04}, + {475,166,4.84e-05}, + {475,185,1.93e-04}, + {475,186,7.74e-04}, + {475,192,1.93e-04}, + {475,215,4.84e-05}, + {475,216,1.93e-04}, + {475,221,4.84e-05}, + {475,449,-1.03e-02}, + {475,450,-1.03e-02}, + {475,455,-1.03e-02}, + {475,474,-1.03e-02}, + {475,481,-1.03e-02}, + {475,504,-1.03e-02}, + {475,505,-1.03e-02}, + {475,510,-1.03e-02}, + {476,476,8.29e-02}, + {476,158,4.84e-05}, + {476,159,1.93e-04}, + {476,160,4.84e-05}, + {476,185,1.93e-04}, + {476,187,7.74e-04}, + {476,188,1.93e-04}, + {476,214,1.93e-04}, + {476,215,4.84e-05}, + {476,217,4.84e-05}, + {476,447,-1.03e-02}, + {476,448,-1.03e-02}, + {476,449,-1.03e-02}, + {476,474,-1.03e-02}, + {476,477,-1.03e-02}, + {476,503,-1.03e-02}, + {476,504,-1.03e-02}, + {476,506,-1.03e-02}, + {477,477,8.29e-02}, + {477,157,4.84e-05}, + {477,158,1.93e-04}, + {477,159,4.84e-05}, + {477,184,1.93e-04}, + {477,187,1.93e-04}, + {477,188,7.74e-04}, + {477,213,4.84e-05}, + {477,214,4.84e-05}, + {477,217,1.93e-04}, + {477,446,-1.03e-02}, + {477,447,-1.03e-02}, + {477,448,-1.03e-02}, + {477,473,-1.03e-02}, + {477,476,-1.03e-02}, + {477,502,-1.03e-02}, + {477,503,-1.03e-02}, + {477,506,-1.03e-02}, + {478,478,8.29e-02}, + {478,162,4.84e-05}, + {478,167,4.84e-05}, + {478,168,1.93e-04}, + {478,189,7.74e-04}, + {478,190,1.93e-04}, + {478,191,1.93e-04}, + {478,218,4.84e-05}, + {478,219,1.93e-04}, + {478,220,4.84e-05}, + {478,451,-1.03e-02}, + {478,456,-1.03e-02}, + {478,457,-1.03e-02}, + {478,479,-1.03e-02}, + {478,480,-1.03e-02}, + {478,507,-1.03e-02}, + {478,508,-1.03e-02}, + {478,509,-1.03e-02}, + {479,479,8.29e-02}, + {479,162,1.93e-04}, + {479,163,4.84e-05}, + {479,168,4.84e-05}, + {479,189,1.93e-04}, + {479,190,7.74e-04}, + {479,195,1.93e-04}, + {479,219,4.84e-05}, + {479,220,1.93e-04}, + {479,224,4.84e-05}, + {479,451,-1.03e-02}, + {479,452,-1.03e-02}, + {479,457,-1.03e-02}, + {479,478,-1.03e-02}, + {479,484,-1.03e-02}, + {479,508,-1.03e-02}, + {479,509,-1.03e-02}, + {479,513,-1.03e-02}, + {480,480,8.29e-02}, + {480,166,4.84e-05}, + {480,167,1.93e-04}, + {480,168,4.84e-05}, + {480,189,1.93e-04}, + {480,191,7.74e-04}, + {480,192,1.93e-04}, + {480,218,1.93e-04}, + {480,219,4.84e-05}, + {480,221,4.84e-05}, + {480,455,-1.03e-02}, + {480,456,-1.03e-02}, + {480,457,-1.03e-02}, + {480,478,-1.03e-02}, + {480,481,-1.03e-02}, + {480,507,-1.03e-02}, + {480,508,-1.03e-02}, + {480,510,-1.03e-02}, + {481,481,8.29e-02}, + {481,161,4.84e-05}, + {481,166,1.93e-04}, + {481,167,4.84e-05}, + {481,186,1.93e-04}, + {481,191,1.93e-04}, + {481,192,7.74e-04}, + {481,216,4.84e-05}, + {481,218,4.84e-05}, + {481,221,1.93e-04}, + {481,450,-1.03e-02}, + {481,455,-1.03e-02}, + {481,456,-1.03e-02}, + {481,475,-1.03e-02}, + {481,480,-1.03e-02}, + {481,505,-1.03e-02}, + {481,507,-1.03e-02}, + {481,510,-1.03e-02}, + {482,482,8.29e-02}, + {482,145,4.84e-05}, + {482,164,4.84e-05}, + {482,165,1.93e-04}, + {482,170,1.93e-04}, + {482,193,7.74e-04}, + {482,194,1.93e-04}, + {482,197,4.84e-05}, + {482,222,4.84e-05}, + {482,223,1.93e-04}, + {482,434,-1.03e-02}, + {482,453,-1.03e-02}, + {482,454,-1.03e-02}, + {482,459,-1.03e-02}, + {482,483,-1.03e-02}, + {482,486,-1.03e-02}, + {482,511,-1.03e-02}, + {482,512,-1.03e-02}, + {483,483,8.29e-02}, + {483,163,4.84e-05}, + {483,164,1.93e-04}, + {483,165,4.84e-05}, + {483,193,1.93e-04}, + {483,194,7.74e-04}, + {483,195,1.93e-04}, + {483,222,1.93e-04}, + {483,223,4.84e-05}, + {483,224,4.84e-05}, + {483,452,-1.03e-02}, + {483,453,-1.03e-02}, + {483,454,-1.03e-02}, + {483,482,-1.03e-02}, + {483,484,-1.03e-02}, + {483,511,-1.03e-02}, + {483,512,-1.03e-02}, + {483,513,-1.03e-02}, + {484,484,8.29e-02}, + {484,162,4.84e-05}, + {484,163,1.93e-04}, + {484,164,4.84e-05}, + {484,190,1.93e-04}, + {484,194,1.93e-04}, + {484,195,7.74e-04}, + {484,220,4.84e-05}, + {484,222,4.84e-05}, + {484,224,1.93e-04}, + {484,451,-1.03e-02}, + {484,452,-1.03e-02}, + {484,453,-1.03e-02}, + {484,479,-1.03e-02}, + {484,483,-1.03e-02}, + {484,509,-1.03e-02}, + {484,511,-1.03e-02}, + {484,513,-1.03e-02}, + {485,485,2.08e-01}, + {485,169,9.67e-05}, + {485,171,4.84e-05}, + {485,196,3.87e-04}, + {485,198,1.93e-04}, + {485,225,9.67e-05}, + {485,227,4.84e-05}, + {485,458,3.65e-02}, + {485,460,-1.03e-02}, + {485,487,-1.03e-02}, + {485,514,3.65e-02}, + {485,516,-1.03e-02}, + {486,486,2.08e-01}, + {486,170,9.67e-05}, + {486,193,4.84e-05}, + {486,197,3.87e-04}, + {486,223,1.93e-04}, + {486,226,9.67e-05}, + {486,255,4.84e-05}, + {486,459,3.65e-02}, + {486,482,-1.03e-02}, + {486,512,-1.03e-02}, + {486,515,3.65e-02}, + {486,544,-1.03e-02}, + {487,487,8.29e-02}, + {487,169,4.84e-05}, + {487,171,1.93e-04}, + {487,172,4.84e-05}, + {487,196,1.93e-04}, + {487,198,7.74e-04}, + {487,199,1.93e-04}, + {487,225,4.84e-05}, + {487,227,1.93e-04}, + {487,228,4.84e-05}, + {487,458,-1.03e-02}, + {487,460,-1.03e-02}, + {487,461,-1.03e-02}, + {487,485,-1.03e-02}, + {487,488,-1.03e-02}, + {487,514,-1.03e-02}, + {487,516,-1.03e-02}, + {487,517,-1.03e-02}, + {488,488,8.29e-02}, + {488,171,4.84e-05}, + {488,172,1.93e-04}, + {488,173,4.84e-05}, + {488,198,1.93e-04}, + {488,199,7.74e-04}, + {488,200,1.93e-04}, + {488,227,4.84e-05}, + {488,228,1.93e-04}, + {488,229,4.84e-05}, + {488,460,-1.03e-02}, + {488,461,-1.03e-02}, + {488,462,-1.03e-02}, + {488,487,-1.03e-02}, + {488,489,-1.03e-02}, + {488,516,-1.03e-02}, + {488,517,-1.03e-02}, + {488,518,-1.03e-02}, + {489,489,8.29e-02}, + {489,172,4.84e-05}, + {489,173,1.93e-04}, + {489,174,4.84e-05}, + {489,199,1.93e-04}, + {489,200,7.74e-04}, + {489,201,1.93e-04}, + {489,228,4.84e-05}, + {489,229,1.93e-04}, + {489,230,4.84e-05}, + {489,461,-1.03e-02}, + {489,462,-1.03e-02}, + {489,463,-1.03e-02}, + {489,488,-1.03e-02}, + {489,490,-1.03e-02}, + {489,517,-1.03e-02}, + {489,518,-1.03e-02}, + {489,519,-1.03e-02}, + {490,490,8.29e-02}, + {490,173,4.84e-05}, + {490,174,1.93e-04}, + {490,175,4.84e-05}, + {490,200,1.93e-04}, + {490,201,7.74e-04}, + {490,202,1.93e-04}, + {490,229,4.84e-05}, + {490,230,1.93e-04}, + {490,231,4.84e-05}, + {490,462,-1.03e-02}, + {490,463,-1.03e-02}, + {490,464,-1.03e-02}, + {490,489,-1.03e-02}, + {490,491,-1.03e-02}, + {490,518,-1.03e-02}, + {490,519,-1.03e-02}, + {490,520,-1.03e-02}, + {491,491,8.29e-02}, + {491,174,4.84e-05}, + {491,175,1.93e-04}, + {491,176,4.84e-05}, + {491,201,1.93e-04}, + {491,202,7.74e-04}, + {491,203,1.93e-04}, + {491,230,4.84e-05}, + {491,231,1.93e-04}, + {491,232,4.84e-05}, + {491,463,-1.03e-02}, + {491,464,-1.03e-02}, + {491,465,-1.03e-02}, + {491,490,-1.03e-02}, + {491,492,-1.03e-02}, + {491,519,-1.03e-02}, + {491,520,-1.03e-02}, + {491,521,-1.03e-02}, + {492,492,8.29e-02}, + {492,175,4.84e-05}, + {492,176,1.93e-04}, + {492,177,4.84e-05}, + {492,202,1.93e-04}, + {492,203,7.74e-04}, + {492,204,1.93e-04}, + {492,231,4.84e-05}, + {492,232,1.93e-04}, + {492,233,4.84e-05}, + {492,464,-1.03e-02}, + {492,465,-1.03e-02}, + {492,466,-1.03e-02}, + {492,491,-1.03e-02}, + {492,493,-1.03e-02}, + {492,520,-1.03e-02}, + {492,521,-1.03e-02}, + {492,522,-1.03e-02}, + {493,493,8.29e-02}, + {493,176,4.84e-05}, + {493,177,1.93e-04}, + {493,178,4.84e-05}, + {493,203,1.93e-04}, + {493,204,7.74e-04}, + {493,205,1.93e-04}, + {493,232,4.84e-05}, + {493,233,1.93e-04}, + {493,234,4.84e-05}, + {493,465,-1.03e-02}, + {493,466,-1.03e-02}, + {493,467,-1.03e-02}, + {493,492,-1.03e-02}, + {493,494,-1.03e-02}, + {493,521,-1.03e-02}, + {493,522,-1.03e-02}, + {493,523,-1.03e-02}, + {494,494,8.29e-02}, + {494,177,4.84e-05}, + {494,178,1.93e-04}, + {494,179,4.84e-05}, + {494,204,1.93e-04}, + {494,205,7.74e-04}, + {494,206,1.93e-04}, + {494,233,4.84e-05}, + {494,234,1.93e-04}, + {494,235,4.84e-05}, + {494,466,-1.03e-02}, + {494,467,-1.03e-02}, + {494,468,-1.03e-02}, + {494,493,-1.03e-02}, + {494,495,-1.03e-02}, + {494,522,-1.03e-02}, + {494,523,-1.03e-02}, + {494,524,-1.03e-02}, + {495,495,8.29e-02}, + {495,178,4.84e-05}, + {495,179,1.93e-04}, + {495,180,4.84e-05}, + {495,205,1.93e-04}, + {495,206,7.74e-04}, + {495,207,1.93e-04}, + {495,234,4.84e-05}, + {495,235,1.93e-04}, + {495,236,4.84e-05}, + {495,467,-1.03e-02}, + {495,468,-1.03e-02}, + {495,469,-1.03e-02}, + {495,494,-1.03e-02}, + {495,496,-1.03e-02}, + {495,523,-1.03e-02}, + {495,524,-1.03e-02}, + {495,525,-1.03e-02}, + {496,496,8.29e-02}, + {496,179,4.84e-05}, + {496,180,1.93e-04}, + {496,181,4.84e-05}, + {496,206,1.93e-04}, + {496,207,7.74e-04}, + {496,208,1.93e-04}, + {496,235,4.84e-05}, + {496,236,1.93e-04}, + {496,237,4.84e-05}, + {496,468,-1.03e-02}, + {496,469,-1.03e-02}, + {496,470,-1.03e-02}, + {496,495,-1.03e-02}, + {496,497,-1.03e-02}, + {496,524,-1.03e-02}, + {496,525,-1.03e-02}, + {496,526,-1.03e-02}, + {497,497,8.29e-02}, + {497,180,4.84e-05}, + {497,181,1.93e-04}, + {497,182,4.84e-05}, + {497,207,1.93e-04}, + {497,208,7.74e-04}, + {497,209,1.93e-04}, + {497,236,4.84e-05}, + {497,237,1.93e-04}, + {497,238,4.84e-05}, + {497,469,-1.03e-02}, + {497,470,-1.03e-02}, + {497,471,-1.03e-02}, + {497,496,-1.03e-02}, + {497,498,-1.03e-02}, + {497,525,-1.03e-02}, + {497,526,-1.03e-02}, + {497,527,-1.03e-02}, + {498,498,8.29e-02}, + {498,181,4.84e-05}, + {498,182,1.93e-04}, + {498,183,4.84e-05}, + {498,208,1.93e-04}, + {498,209,7.74e-04}, + {498,210,1.93e-04}, + {498,237,4.84e-05}, + {498,238,1.93e-04}, + {498,239,4.84e-05}, + {498,470,-1.03e-02}, + {498,471,-1.03e-02}, + {498,472,-1.03e-02}, + {498,497,-1.03e-02}, + {498,499,-1.03e-02}, + {498,526,-1.03e-02}, + {498,527,-1.03e-02}, + {498,528,-1.03e-02}, + {499,499,8.29e-02}, + {499,182,4.84e-05}, + {499,183,1.93e-04}, + {499,209,1.93e-04}, + {499,210,7.74e-04}, + {499,211,1.93e-04}, + {499,212,4.84e-05}, + {499,238,4.84e-05}, + {499,239,1.93e-04}, + {499,240,4.84e-05}, + {499,471,-1.03e-02}, + {499,472,-1.03e-02}, + {499,498,-1.03e-02}, + {499,500,-1.03e-02}, + {499,501,-1.03e-02}, + {499,527,-1.03e-02}, + {499,528,-1.03e-02}, + {499,529,-1.03e-02}, + {500,500,8.29e-02}, + {500,183,4.84e-05}, + {500,210,1.93e-04}, + {500,211,7.74e-04}, + {500,212,1.93e-04}, + {500,239,4.84e-05}, + {500,240,1.93e-04}, + {500,241,4.84e-05}, + {500,242,1.93e-04}, + {500,243,4.84e-05}, + {500,472,-1.03e-02}, + {500,499,-1.03e-02}, + {500,501,-1.03e-02}, + {500,528,-1.03e-02}, + {500,529,-1.03e-02}, + {500,530,-1.03e-02}, + {500,531,-1.03e-02}, + {500,532,-1.03e-02}, + {501,501,8.29e-02}, + {501,183,1.93e-04}, + {501,184,4.84e-05}, + {501,210,4.84e-05}, + {501,211,1.93e-04}, + {501,212,7.74e-04}, + {501,213,1.93e-04}, + {501,242,4.84e-05}, + {501,243,1.93e-04}, + {501,244,4.84e-05}, + {501,472,-1.03e-02}, + {501,473,-1.03e-02}, + {501,499,-1.03e-02}, + {501,500,-1.03e-02}, + {501,502,-1.03e-02}, + {501,531,-1.03e-02}, + {501,532,-1.03e-02}, + {501,533,-1.03e-02}, + {502,502,8.29e-02}, + {502,183,4.84e-05}, + {502,184,1.93e-04}, + {502,188,4.84e-05}, + {502,212,1.93e-04}, + {502,213,7.74e-04}, + {502,217,1.93e-04}, + {502,243,4.84e-05}, + {502,244,1.93e-04}, + {502,245,4.84e-05}, + {502,472,-1.03e-02}, + {502,473,-1.03e-02}, + {502,477,-1.03e-02}, + {502,501,-1.03e-02}, + {502,506,-1.03e-02}, + {502,532,-1.03e-02}, + {502,533,-1.03e-02}, + {502,534,-1.03e-02}, + {503,503,8.29e-02}, + {503,185,4.84e-05}, + {503,187,1.93e-04}, + {503,188,4.84e-05}, + {503,214,7.74e-04}, + {503,215,1.93e-04}, + {503,217,1.93e-04}, + {503,245,4.84e-05}, + {503,246,1.93e-04}, + {503,247,4.84e-05}, + {503,474,-1.03e-02}, + {503,476,-1.03e-02}, + {503,477,-1.03e-02}, + {503,504,-1.03e-02}, + {503,506,-1.03e-02}, + {503,534,-1.03e-02}, + {503,535,-1.03e-02}, + {503,536,-1.03e-02}, + {504,504,8.29e-02}, + {504,185,1.93e-04}, + {504,186,4.84e-05}, + {504,187,4.84e-05}, + {504,214,1.93e-04}, + {504,215,7.74e-04}, + {504,216,1.93e-04}, + {504,246,4.84e-05}, + {504,247,1.93e-04}, + {504,248,4.84e-05}, + {504,474,-1.03e-02}, + {504,475,-1.03e-02}, + {504,476,-1.03e-02}, + {504,503,-1.03e-02}, + {504,505,-1.03e-02}, + {504,535,-1.03e-02}, + {504,536,-1.03e-02}, + {504,537,-1.03e-02}, + {505,505,8.29e-02}, + {505,185,4.84e-05}, + {505,186,1.93e-04}, + {505,192,4.84e-05}, + {505,215,1.93e-04}, + {505,216,7.74e-04}, + {505,221,1.93e-04}, + {505,247,4.84e-05}, + {505,248,1.93e-04}, + {505,249,4.84e-05}, + {505,474,-1.03e-02}, + {505,475,-1.03e-02}, + {505,481,-1.03e-02}, + {505,504,-1.03e-02}, + {505,510,-1.03e-02}, + {505,536,-1.03e-02}, + {505,537,-1.03e-02}, + {505,538,-1.03e-02}, + {506,506,8.29e-02}, + {506,184,4.84e-05}, + {506,187,4.84e-05}, + {506,188,1.93e-04}, + {506,213,1.93e-04}, + {506,214,1.93e-04}, + {506,217,7.74e-04}, + {506,244,4.84e-05}, + {506,245,1.93e-04}, + {506,246,4.84e-05}, + {506,473,-1.03e-02}, + {506,476,-1.03e-02}, + {506,477,-1.03e-02}, + {506,502,-1.03e-02}, + {506,503,-1.03e-02}, + {506,533,-1.03e-02}, + {506,534,-1.03e-02}, + {506,535,-1.03e-02}, + {507,507,8.29e-02}, + {507,189,4.84e-05}, + {507,191,1.93e-04}, + {507,192,4.84e-05}, + {507,218,7.74e-04}, + {507,219,1.93e-04}, + {507,221,1.93e-04}, + {507,249,4.84e-05}, + {507,250,1.93e-04}, + {507,251,4.84e-05}, + {507,478,-1.03e-02}, + {507,480,-1.03e-02}, + {507,481,-1.03e-02}, + {507,508,-1.03e-02}, + {507,510,-1.03e-02}, + {507,538,-1.03e-02}, + {507,539,-1.03e-02}, + {507,540,-1.03e-02}, + {508,508,8.29e-02}, + {508,189,1.93e-04}, + {508,190,4.84e-05}, + {508,191,4.84e-05}, + {508,218,1.93e-04}, + {508,219,7.74e-04}, + {508,220,1.93e-04}, + {508,250,4.84e-05}, + {508,251,1.93e-04}, + {508,252,4.84e-05}, + {508,478,-1.03e-02}, + {508,479,-1.03e-02}, + {508,480,-1.03e-02}, + {508,507,-1.03e-02}, + {508,509,-1.03e-02}, + {508,539,-1.03e-02}, + {508,540,-1.03e-02}, + {508,541,-1.03e-02}, + {509,509,8.29e-02}, + {509,189,4.84e-05}, + {509,190,1.93e-04}, + {509,195,4.84e-05}, + {509,219,1.93e-04}, + {509,220,7.74e-04}, + {509,224,1.93e-04}, + {509,251,4.84e-05}, + {509,252,1.93e-04}, + {509,253,4.84e-05}, + {509,478,-1.03e-02}, + {509,479,-1.03e-02}, + {509,484,-1.03e-02}, + {509,508,-1.03e-02}, + {509,513,-1.03e-02}, + {509,540,-1.03e-02}, + {509,541,-1.03e-02}, + {509,542,-1.03e-02}, + {510,510,8.29e-02}, + {510,186,4.84e-05}, + {510,191,4.84e-05}, + {510,192,1.93e-04}, + {510,216,1.93e-04}, + {510,218,1.93e-04}, + {510,221,7.74e-04}, + {510,248,4.84e-05}, + {510,249,1.93e-04}, + {510,250,4.84e-05}, + {510,475,-1.03e-02}, + {510,480,-1.03e-02}, + {510,481,-1.03e-02}, + {510,505,-1.03e-02}, + {510,507,-1.03e-02}, + {510,537,-1.03e-02}, + {510,538,-1.03e-02}, + {510,539,-1.03e-02}, + {511,511,8.29e-02}, + {511,193,4.84e-05}, + {511,194,1.93e-04}, + {511,195,4.84e-05}, + {511,222,7.74e-04}, + {511,223,1.93e-04}, + {511,224,1.93e-04}, + {511,253,4.84e-05}, + {511,254,1.93e-04}, + {511,255,4.84e-05}, + {511,482,-1.03e-02}, + {511,483,-1.03e-02}, + {511,484,-1.03e-02}, + {511,512,-1.03e-02}, + {511,513,-1.03e-02}, + {511,542,-1.03e-02}, + {511,543,-1.03e-02}, + {511,544,-1.03e-02}, + {512,512,8.29e-02}, + {512,170,4.84e-05}, + {512,193,1.93e-04}, + {512,194,4.84e-05}, + {512,197,1.93e-04}, + {512,222,1.93e-04}, + {512,223,7.74e-04}, + {512,226,4.84e-05}, + {512,254,4.84e-05}, + {512,255,1.93e-04}, + {512,459,-1.03e-02}, + {512,482,-1.03e-02}, + {512,483,-1.03e-02}, + {512,486,-1.03e-02}, + {512,511,-1.03e-02}, + {512,515,-1.03e-02}, + {512,543,-1.03e-02}, + {512,544,-1.03e-02}, + {513,513,8.29e-02}, + {513,190,4.84e-05}, + {513,194,4.84e-05}, + {513,195,1.93e-04}, + {513,220,1.93e-04}, + {513,222,1.93e-04}, + {513,224,7.74e-04}, + {513,252,4.84e-05}, + {513,253,1.93e-04}, + {513,254,4.84e-05}, + {513,479,-1.03e-02}, + {513,483,-1.03e-02}, + {513,484,-1.03e-02}, + {513,509,-1.03e-02}, + {513,511,-1.03e-02}, + {513,541,-1.03e-02}, + {513,542,-1.03e-02}, + {513,543,-1.03e-02}, + {514,514,2.08e-01}, + {514,196,9.67e-05}, + {514,198,4.84e-05}, + {514,225,3.87e-04}, + {514,227,1.93e-04}, + {514,256,9.67e-05}, + {514,259,4.84e-05}, + {514,485,3.65e-02}, + {514,487,-1.03e-02}, + {514,516,-1.03e-02}, + {514,545,3.65e-02}, + {514,548,-1.03e-02}, + {515,515,2.08e-01}, + {515,197,9.67e-05}, + {515,223,4.84e-05}, + {515,226,3.87e-04}, + {515,255,1.93e-04}, + {515,258,9.67e-05}, + {515,288,4.84e-05}, + {515,486,3.65e-02}, + {515,512,-1.03e-02}, + {515,544,-1.03e-02}, + {515,547,3.65e-02}, + {515,577,-1.03e-02}, + {516,516,8.29e-02}, + {516,196,4.84e-05}, + {516,198,1.93e-04}, + {516,199,4.84e-05}, + {516,225,1.93e-04}, + {516,227,7.74e-04}, + {516,228,1.93e-04}, + {516,256,4.84e-05}, + {516,259,1.93e-04}, + {516,260,4.84e-05}, + {516,485,-1.03e-02}, + {516,487,-1.03e-02}, + {516,488,-1.03e-02}, + {516,514,-1.03e-02}, + {516,517,-1.03e-02}, + {516,545,-1.03e-02}, + {516,548,-1.03e-02}, + {516,549,-1.03e-02}, + {517,517,8.29e-02}, + {517,198,4.84e-05}, + {517,199,1.93e-04}, + {517,200,4.84e-05}, + {517,227,1.93e-04}, + {517,228,7.74e-04}, + {517,229,1.93e-04}, + {517,259,4.84e-05}, + {517,260,1.93e-04}, + {517,261,4.84e-05}, + {517,487,-1.03e-02}, + {517,488,-1.03e-02}, + {517,489,-1.03e-02}, + {517,516,-1.03e-02}, + {517,518,-1.03e-02}, + {517,548,-1.03e-02}, + {517,549,-1.03e-02}, + {517,550,-1.03e-02}, + {518,518,8.29e-02}, + {518,199,4.84e-05}, + {518,200,1.93e-04}, + {518,201,4.84e-05}, + {518,228,1.93e-04}, + {518,229,7.74e-04}, + {518,230,1.93e-04}, + {518,260,4.84e-05}, + {518,261,1.93e-04}, + {518,262,4.84e-05}, + {518,488,-1.03e-02}, + {518,489,-1.03e-02}, + {518,490,-1.03e-02}, + {518,517,-1.03e-02}, + {518,519,-1.03e-02}, + {518,549,-1.03e-02}, + {518,550,-1.03e-02}, + {518,551,-1.03e-02}, + {519,519,8.29e-02}, + {519,200,4.84e-05}, + {519,201,1.93e-04}, + {519,202,4.84e-05}, + {519,229,1.93e-04}, + {519,230,7.74e-04}, + {519,231,1.93e-04}, + {519,261,4.84e-05}, + {519,262,1.93e-04}, + {519,263,4.84e-05}, + {519,489,-1.03e-02}, + {519,490,-1.03e-02}, + {519,491,-1.03e-02}, + {519,518,-1.03e-02}, + {519,520,-1.03e-02}, + {519,550,-1.03e-02}, + {519,551,-1.03e-02}, + {519,552,-1.03e-02}, + {520,520,8.29e-02}, + {520,201,4.84e-05}, + {520,202,1.93e-04}, + {520,203,4.84e-05}, + {520,230,1.93e-04}, + {520,231,7.74e-04}, + {520,232,1.93e-04}, + {520,262,4.84e-05}, + {520,263,1.93e-04}, + {520,264,4.84e-05}, + {520,490,-1.03e-02}, + {520,491,-1.03e-02}, + {520,492,-1.03e-02}, + {520,519,-1.03e-02}, + {520,521,-1.03e-02}, + {520,551,-1.03e-02}, + {520,552,-1.03e-02}, + {520,553,-1.03e-02}, + {521,521,8.29e-02}, + {521,202,4.84e-05}, + {521,203,1.93e-04}, + {521,204,4.84e-05}, + {521,231,1.93e-04}, + {521,232,7.74e-04}, + {521,233,1.93e-04}, + {521,263,4.84e-05}, + {521,264,1.93e-04}, + {521,265,4.84e-05}, + {521,491,-1.03e-02}, + {521,492,-1.03e-02}, + {521,493,-1.03e-02}, + {521,520,-1.03e-02}, + {521,522,-1.03e-02}, + {521,552,-1.03e-02}, + {521,553,-1.03e-02}, + {521,554,-1.03e-02}, + {522,522,8.29e-02}, + {522,203,4.84e-05}, + {522,204,1.93e-04}, + {522,205,4.84e-05}, + {522,232,1.93e-04}, + {522,233,7.74e-04}, + {522,234,1.93e-04}, + {522,264,4.84e-05}, + {522,265,1.93e-04}, + {522,266,4.84e-05}, + {522,492,-1.03e-02}, + {522,493,-1.03e-02}, + {522,494,-1.03e-02}, + {522,521,-1.03e-02}, + {522,523,-1.03e-02}, + {522,553,-1.03e-02}, + {522,554,-1.03e-02}, + {522,555,-1.03e-02}, + {523,523,8.29e-02}, + {523,204,4.84e-05}, + {523,205,1.93e-04}, + {523,206,4.84e-05}, + {523,233,1.93e-04}, + {523,234,7.74e-04}, + {523,235,1.93e-04}, + {523,265,4.84e-05}, + {523,266,1.93e-04}, + {523,267,4.84e-05}, + {523,493,-1.03e-02}, + {523,494,-1.03e-02}, + {523,495,-1.03e-02}, + {523,522,-1.03e-02}, + {523,524,-1.03e-02}, + {523,554,-1.03e-02}, + {523,555,-1.03e-02}, + {523,556,-1.03e-02}, + {524,524,8.29e-02}, + {524,205,4.84e-05}, + {524,206,1.93e-04}, + {524,207,4.84e-05}, + {524,234,1.93e-04}, + {524,235,7.74e-04}, + {524,236,1.93e-04}, + {524,266,4.84e-05}, + {524,267,1.93e-04}, + {524,268,4.84e-05}, + {524,494,-1.03e-02}, + {524,495,-1.03e-02}, + {524,496,-1.03e-02}, + {524,523,-1.03e-02}, + {524,525,-1.03e-02}, + {524,555,-1.03e-02}, + {524,556,-1.03e-02}, + {524,557,-1.03e-02}, + {525,525,8.29e-02}, + {525,206,4.84e-05}, + {525,207,1.93e-04}, + {525,208,4.84e-05}, + {525,235,1.93e-04}, + {525,236,7.74e-04}, + {525,237,1.93e-04}, + {525,267,4.84e-05}, + {525,268,1.93e-04}, + {525,269,4.84e-05}, + {525,495,-1.03e-02}, + {525,496,-1.03e-02}, + {525,497,-1.03e-02}, + {525,524,-1.03e-02}, + {525,526,-1.03e-02}, + {525,556,-1.03e-02}, + {525,557,-1.03e-02}, + {525,558,-1.03e-02}, + {526,526,8.29e-02}, + {526,207,4.84e-05}, + {526,208,1.93e-04}, + {526,209,4.84e-05}, + {526,236,1.93e-04}, + {526,237,7.74e-04}, + {526,238,1.93e-04}, + {526,268,4.84e-05}, + {526,269,1.93e-04}, + {526,270,4.84e-05}, + {526,496,-1.03e-02}, + {526,497,-1.03e-02}, + {526,498,-1.03e-02}, + {526,525,-1.03e-02}, + {526,527,-1.03e-02}, + {526,557,-1.03e-02}, + {526,558,-1.03e-02}, + {526,559,-1.03e-02}, + {527,527,8.29e-02}, + {527,208,4.84e-05}, + {527,209,1.93e-04}, + {527,210,4.84e-05}, + {527,237,1.93e-04}, + {527,238,7.74e-04}, + {527,239,1.93e-04}, + {527,269,4.84e-05}, + {527,270,1.93e-04}, + {527,271,4.84e-05}, + {527,497,-1.03e-02}, + {527,498,-1.03e-02}, + {527,499,-1.03e-02}, + {527,526,-1.03e-02}, + {527,528,-1.03e-02}, + {527,558,-1.03e-02}, + {527,559,-1.03e-02}, + {527,560,-1.03e-02}, + {528,528,8.29e-02}, + {528,209,4.84e-05}, + {528,210,1.93e-04}, + {528,211,4.84e-05}, + {528,238,1.93e-04}, + {528,239,7.74e-04}, + {528,240,1.93e-04}, + {528,270,4.84e-05}, + {528,271,1.93e-04}, + {528,272,4.84e-05}, + {528,498,-1.03e-02}, + {528,499,-1.03e-02}, + {528,500,-1.03e-02}, + {528,527,-1.03e-02}, + {528,529,-1.03e-02}, + {528,559,-1.03e-02}, + {528,560,-1.03e-02}, + {528,561,-1.03e-02}, + {529,529,8.29e-02}, + {529,210,4.84e-05}, + {529,211,1.93e-04}, + {529,239,1.93e-04}, + {529,240,7.74e-04}, + {529,241,1.93e-04}, + {529,242,4.84e-05}, + {529,271,4.84e-05}, + {529,272,1.93e-04}, + {529,273,4.84e-05}, + {529,499,-1.03e-02}, + {529,500,-1.03e-02}, + {529,528,-1.03e-02}, + {529,530,-1.03e-02}, + {529,531,-1.03e-02}, + {529,560,-1.03e-02}, + {529,561,-1.03e-02}, + {529,562,-1.03e-02}, + {530,530,8.29e-02}, + {530,211,4.84e-05}, + {530,240,1.93e-04}, + {530,241,7.74e-04}, + {530,242,1.93e-04}, + {530,257,4.84e-05}, + {530,272,4.84e-05}, + {530,273,1.93e-04}, + {530,274,1.93e-04}, + {530,275,4.84e-05}, + {530,500,-1.03e-02}, + {530,529,-1.03e-02}, + {530,531,-1.03e-02}, + {530,546,-1.03e-02}, + {530,561,-1.03e-02}, + {530,562,-1.03e-02}, + {530,563,-1.03e-02}, + {530,564,-1.03e-02}, + {531,531,8.29e-02}, + {531,211,1.93e-04}, + {531,212,4.84e-05}, + {531,240,4.84e-05}, + {531,241,1.93e-04}, + {531,242,7.74e-04}, + {531,243,1.93e-04}, + {531,274,4.84e-05}, + {531,275,1.93e-04}, + {531,276,4.84e-05}, + {531,500,-1.03e-02}, + {531,501,-1.03e-02}, + {531,529,-1.03e-02}, + {531,530,-1.03e-02}, + {531,532,-1.03e-02}, + {531,563,-1.03e-02}, + {531,564,-1.03e-02}, + {531,565,-1.03e-02}, + {532,532,8.29e-02}, + {532,211,4.84e-05}, + {532,212,1.93e-04}, + {532,213,4.84e-05}, + {532,242,1.93e-04}, + {532,243,7.74e-04}, + {532,244,1.93e-04}, + {532,275,4.84e-05}, + {532,276,1.93e-04}, + {532,277,4.84e-05}, + {532,500,-1.03e-02}, + {532,501,-1.03e-02}, + {532,502,-1.03e-02}, + {532,531,-1.03e-02}, + {532,533,-1.03e-02}, + {532,564,-1.03e-02}, + {532,565,-1.03e-02}, + {532,566,-1.03e-02}, + {533,533,8.29e-02}, + {533,212,4.84e-05}, + {533,213,1.93e-04}, + {533,217,4.84e-05}, + {533,243,1.93e-04}, + {533,244,7.74e-04}, + {533,245,1.93e-04}, + {533,276,4.84e-05}, + {533,277,1.93e-04}, + {533,278,4.84e-05}, + {533,501,-1.03e-02}, + {533,502,-1.03e-02}, + {533,506,-1.03e-02}, + {533,532,-1.03e-02}, + {533,534,-1.03e-02}, + {533,565,-1.03e-02}, + {533,566,-1.03e-02}, + {533,567,-1.03e-02}, + {534,534,8.29e-02}, + {534,213,4.84e-05}, + {534,214,4.84e-05}, + {534,217,1.93e-04}, + {534,244,1.93e-04}, + {534,245,7.74e-04}, + {534,246,1.93e-04}, + {534,277,4.84e-05}, + {534,278,1.93e-04}, + {534,279,4.84e-05}, + {534,502,-1.03e-02}, + {534,503,-1.03e-02}, + {534,506,-1.03e-02}, + {534,533,-1.03e-02}, + {534,535,-1.03e-02}, + {534,566,-1.03e-02}, + {534,567,-1.03e-02}, + {534,568,-1.03e-02}, + {535,535,8.29e-02}, + {535,214,1.93e-04}, + {535,215,4.84e-05}, + {535,217,4.84e-05}, + {535,245,1.93e-04}, + {535,246,7.74e-04}, + {535,247,1.93e-04}, + {535,278,4.84e-05}, + {535,279,1.93e-04}, + {535,280,4.84e-05}, + {535,503,-1.03e-02}, + {535,504,-1.03e-02}, + {535,506,-1.03e-02}, + {535,534,-1.03e-02}, + {535,536,-1.03e-02}, + {535,567,-1.03e-02}, + {535,568,-1.03e-02}, + {535,569,-1.03e-02}, + {536,536,8.29e-02}, + {536,214,4.84e-05}, + {536,215,1.93e-04}, + {536,216,4.84e-05}, + {536,246,1.93e-04}, + {536,247,7.74e-04}, + {536,248,1.93e-04}, + {536,279,4.84e-05}, + {536,280,1.93e-04}, + {536,281,4.84e-05}, + {536,503,-1.03e-02}, + {536,504,-1.03e-02}, + {536,505,-1.03e-02}, + {536,535,-1.03e-02}, + {536,537,-1.03e-02}, + {536,568,-1.03e-02}, + {536,569,-1.03e-02}, + {536,570,-1.03e-02}, + {537,537,8.29e-02}, + {537,215,4.84e-05}, + {537,216,1.93e-04}, + {537,221,4.84e-05}, + {537,247,1.93e-04}, + {537,248,7.74e-04}, + {537,249,1.93e-04}, + {537,280,4.84e-05}, + {537,281,1.93e-04}, + {537,282,4.84e-05}, + {537,504,-1.03e-02}, + {537,505,-1.03e-02}, + {537,510,-1.03e-02}, + {537,536,-1.03e-02}, + {537,538,-1.03e-02}, + {537,569,-1.03e-02}, + {537,570,-1.03e-02}, + {537,571,-1.03e-02}, + {538,538,8.29e-02}, + {538,216,4.84e-05}, + {538,218,4.84e-05}, + {538,221,1.93e-04}, + {538,248,1.93e-04}, + {538,249,7.74e-04}, + {538,250,1.93e-04}, + {538,281,4.84e-05}, + {538,282,1.93e-04}, + {538,283,4.84e-05}, + {538,505,-1.03e-02}, + {538,507,-1.03e-02}, + {538,510,-1.03e-02}, + {538,537,-1.03e-02}, + {538,539,-1.03e-02}, + {538,570,-1.03e-02}, + {538,571,-1.03e-02}, + {538,572,-1.03e-02}, + {539,539,8.29e-02}, + {539,218,1.93e-04}, + {539,219,4.84e-05}, + {539,221,4.84e-05}, + {539,249,1.93e-04}, + {539,250,7.74e-04}, + {539,251,1.93e-04}, + {539,282,4.84e-05}, + {539,283,1.93e-04}, + {539,284,4.84e-05}, + {539,507,-1.03e-02}, + {539,508,-1.03e-02}, + {539,510,-1.03e-02}, + {539,538,-1.03e-02}, + {539,540,-1.03e-02}, + {539,571,-1.03e-02}, + {539,572,-1.03e-02}, + {539,573,-1.03e-02}, + {540,540,8.29e-02}, + {540,218,4.84e-05}, + {540,219,1.93e-04}, + {540,220,4.84e-05}, + {540,250,1.93e-04}, + {540,251,7.74e-04}, + {540,252,1.93e-04}, + {540,283,4.84e-05}, + {540,284,1.93e-04}, + {540,285,4.84e-05}, + {540,507,-1.03e-02}, + {540,508,-1.03e-02}, + {540,509,-1.03e-02}, + {540,539,-1.03e-02}, + {540,541,-1.03e-02}, + {540,572,-1.03e-02}, + {540,573,-1.03e-02}, + {540,574,-1.03e-02}, + {541,541,8.29e-02}, + {541,219,4.84e-05}, + {541,220,1.93e-04}, + {541,224,4.84e-05}, + {541,251,1.93e-04}, + {541,252,7.74e-04}, + {541,253,1.93e-04}, + {541,284,4.84e-05}, + {541,285,1.93e-04}, + {541,286,4.84e-05}, + {541,508,-1.03e-02}, + {541,509,-1.03e-02}, + {541,513,-1.03e-02}, + {541,540,-1.03e-02}, + {541,542,-1.03e-02}, + {541,573,-1.03e-02}, + {541,574,-1.03e-02}, + {541,575,-1.03e-02}, + {542,542,8.29e-02}, + {542,220,4.84e-05}, + {542,222,4.84e-05}, + {542,224,1.93e-04}, + {542,252,1.93e-04}, + {542,253,7.74e-04}, + {542,254,1.93e-04}, + {542,285,4.84e-05}, + {542,286,1.93e-04}, + {542,287,4.84e-05}, + {542,509,-1.03e-02}, + {542,511,-1.03e-02}, + {542,513,-1.03e-02}, + {542,541,-1.03e-02}, + {542,543,-1.03e-02}, + {542,574,-1.03e-02}, + {542,575,-1.03e-02}, + {542,576,-1.03e-02}, + {543,543,8.29e-02}, + {543,222,1.93e-04}, + {543,223,4.84e-05}, + {543,224,4.84e-05}, + {543,253,1.93e-04}, + {543,254,7.74e-04}, + {543,255,1.93e-04}, + {543,286,4.84e-05}, + {543,287,1.93e-04}, + {543,288,4.84e-05}, + {543,511,-1.03e-02}, + {543,512,-1.03e-02}, + {543,513,-1.03e-02}, + {543,542,-1.03e-02}, + {543,544,-1.03e-02}, + {543,575,-1.03e-02}, + {543,576,-1.03e-02}, + {543,577,-1.03e-02}, + {544,544,8.29e-02}, + {544,197,4.84e-05}, + {544,222,4.84e-05}, + {544,223,1.93e-04}, + {544,226,1.93e-04}, + {544,254,1.93e-04}, + {544,255,7.74e-04}, + {544,258,4.84e-05}, + {544,287,4.84e-05}, + {544,288,1.93e-04}, + {544,486,-1.03e-02}, + {544,511,-1.03e-02}, + {544,512,-1.03e-02}, + {544,515,-1.03e-02}, + {544,543,-1.03e-02}, + {544,547,-1.03e-02}, + {544,576,-1.03e-02}, + {544,577,-1.03e-02}, + {545,545,1.87e-01}, + {545,225,9.67e-05}, + {545,227,4.84e-05}, + {545,256,1.93e-04}, + {545,259,9.67e-05}, + {545,514,3.65e-02}, + {545,516,-1.03e-02}, + {545,548,3.65e-02}, + {546,546,1.87e-01}, + {546,241,4.84e-05}, + {546,257,1.93e-04}, + {546,273,9.67e-05}, + {546,274,9.67e-05}, + {546,530,-1.03e-02}, + {546,562,3.65e-02}, + {546,563,3.65e-02}, + {547,547,1.87e-01}, + {547,226,9.67e-05}, + {547,255,4.84e-05}, + {547,258,1.93e-04}, + {547,288,9.67e-05}, + {547,515,3.65e-02}, + {547,544,-1.03e-02}, + {547,577,3.65e-02}, + {548,548,2.08e-01}, + {548,225,4.84e-05}, + {548,227,1.93e-04}, + {548,228,4.84e-05}, + {548,256,9.67e-05}, + {548,259,3.87e-04}, + {548,260,9.67e-05}, + {548,514,-1.03e-02}, + {548,516,-1.03e-02}, + {548,517,-1.03e-02}, + {548,545,3.65e-02}, + {548,549,3.65e-02}, + {549,549,2.08e-01}, + {549,227,4.84e-05}, + {549,228,1.93e-04}, + {549,229,4.84e-05}, + {549,259,9.67e-05}, + {549,260,3.87e-04}, + {549,261,9.67e-05}, + {549,516,-1.03e-02}, + {549,517,-1.03e-02}, + {549,518,-1.03e-02}, + {549,548,3.65e-02}, + {549,550,3.65e-02}, + {550,550,2.08e-01}, + {550,228,4.84e-05}, + {550,229,1.93e-04}, + {550,230,4.84e-05}, + {550,260,9.67e-05}, + {550,261,3.87e-04}, + {550,262,9.67e-05}, + {550,517,-1.03e-02}, + {550,518,-1.03e-02}, + {550,519,-1.03e-02}, + {550,549,3.65e-02}, + {550,551,3.65e-02}, + {551,551,2.08e-01}, + {551,229,4.84e-05}, + {551,230,1.93e-04}, + {551,231,4.84e-05}, + {551,261,9.67e-05}, + {551,262,3.87e-04}, + {551,263,9.67e-05}, + {551,518,-1.03e-02}, + {551,519,-1.03e-02}, + {551,520,-1.03e-02}, + {551,550,3.65e-02}, + {551,552,3.65e-02}, + {552,552,2.08e-01}, + {552,230,4.84e-05}, + {552,231,1.93e-04}, + {552,232,4.84e-05}, + {552,262,9.67e-05}, + {552,263,3.87e-04}, + {552,264,9.67e-05}, + {552,519,-1.03e-02}, + {552,520,-1.03e-02}, + {552,521,-1.03e-02}, + {552,551,3.65e-02}, + {552,553,3.65e-02}, + {553,553,2.08e-01}, + {553,231,4.84e-05}, + {553,232,1.93e-04}, + {553,233,4.84e-05}, + {553,263,9.67e-05}, + {553,264,3.87e-04}, + {553,265,9.67e-05}, + {553,520,-1.03e-02}, + {553,521,-1.03e-02}, + {553,522,-1.03e-02}, + {553,552,3.65e-02}, + {553,554,3.65e-02}, + {554,554,2.08e-01}, + {554,232,4.84e-05}, + {554,233,1.93e-04}, + {554,234,4.84e-05}, + {554,264,9.67e-05}, + {554,265,3.87e-04}, + {554,266,9.67e-05}, + {554,521,-1.03e-02}, + {554,522,-1.03e-02}, + {554,523,-1.03e-02}, + {554,553,3.65e-02}, + {554,555,3.65e-02}, + {555,555,2.08e-01}, + {555,233,4.84e-05}, + {555,234,1.93e-04}, + {555,235,4.84e-05}, + {555,265,9.67e-05}, + {555,266,3.87e-04}, + {555,267,9.67e-05}, + {555,522,-1.03e-02}, + {555,523,-1.03e-02}, + {555,524,-1.03e-02}, + {555,554,3.65e-02}, + {555,556,3.65e-02}, + {556,556,2.08e-01}, + {556,234,4.84e-05}, + {556,235,1.93e-04}, + {556,236,4.84e-05}, + {556,266,9.67e-05}, + {556,267,3.87e-04}, + {556,268,9.67e-05}, + {556,523,-1.03e-02}, + {556,524,-1.03e-02}, + {556,525,-1.03e-02}, + {556,555,3.65e-02}, + {556,557,3.65e-02}, + {557,557,2.08e-01}, + {557,235,4.84e-05}, + {557,236,1.93e-04}, + {557,237,4.84e-05}, + {557,267,9.67e-05}, + {557,268,3.87e-04}, + {557,269,9.67e-05}, + {557,524,-1.03e-02}, + {557,525,-1.03e-02}, + {557,526,-1.03e-02}, + {557,556,3.65e-02}, + {557,558,3.65e-02}, + {558,558,2.08e-01}, + {558,236,4.84e-05}, + {558,237,1.93e-04}, + {558,238,4.84e-05}, + {558,268,9.67e-05}, + {558,269,3.87e-04}, + {558,270,9.67e-05}, + {558,525,-1.03e-02}, + {558,526,-1.03e-02}, + {558,527,-1.03e-02}, + {558,557,3.65e-02}, + {558,559,3.65e-02}, + {559,559,2.08e-01}, + {559,237,4.84e-05}, + {559,238,1.93e-04}, + {559,239,4.84e-05}, + {559,269,9.67e-05}, + {559,270,3.87e-04}, + {559,271,9.67e-05}, + {559,526,-1.03e-02}, + {559,527,-1.03e-02}, + {559,528,-1.03e-02}, + {559,558,3.65e-02}, + {559,560,3.65e-02}, + {560,560,2.08e-01}, + {560,238,4.84e-05}, + {560,239,1.93e-04}, + {560,240,4.84e-05}, + {560,270,9.67e-05}, + {560,271,3.87e-04}, + {560,272,9.67e-05}, + {560,527,-1.03e-02}, + {560,528,-1.03e-02}, + {560,529,-1.03e-02}, + {560,559,3.65e-02}, + {560,561,3.65e-02}, + {561,561,2.08e-01}, + {561,239,4.84e-05}, + {561,240,1.93e-04}, + {561,241,4.84e-05}, + {561,271,9.67e-05}, + {561,272,3.87e-04}, + {561,273,9.67e-05}, + {561,528,-1.03e-02}, + {561,529,-1.03e-02}, + {561,530,-1.03e-02}, + {561,560,3.65e-02}, + {561,562,3.65e-02}, + {562,562,2.08e-01}, + {562,240,4.84e-05}, + {562,241,1.93e-04}, + {562,257,9.67e-05}, + {562,272,9.67e-05}, + {562,273,3.87e-04}, + {562,274,4.84e-05}, + {562,529,-1.03e-02}, + {562,530,-1.03e-02}, + {562,546,3.65e-02}, + {562,561,3.65e-02}, + {562,563,-1.03e-02}, + {563,563,2.08e-01}, + {563,241,1.93e-04}, + {563,242,4.84e-05}, + {563,257,9.67e-05}, + {563,273,4.84e-05}, + {563,274,3.87e-04}, + {563,275,9.67e-05}, + {563,530,-1.03e-02}, + {563,531,-1.03e-02}, + {563,546,3.65e-02}, + {563,562,-1.03e-02}, + {563,564,3.65e-02}, + {564,564,2.08e-01}, + {564,241,4.84e-05}, + {564,242,1.93e-04}, + {564,243,4.84e-05}, + {564,274,9.67e-05}, + {564,275,3.87e-04}, + {564,276,9.67e-05}, + {564,530,-1.03e-02}, + {564,531,-1.03e-02}, + {564,532,-1.03e-02}, + {564,563,3.65e-02}, + {564,565,3.65e-02}, + {565,565,2.08e-01}, + {565,242,4.84e-05}, + {565,243,1.93e-04}, + {565,244,4.84e-05}, + {565,275,9.67e-05}, + {565,276,3.87e-04}, + {565,277,9.67e-05}, + {565,531,-1.03e-02}, + {565,532,-1.03e-02}, + {565,533,-1.03e-02}, + {565,564,3.65e-02}, + {565,566,3.65e-02}, + {566,566,2.08e-01}, + {566,243,4.84e-05}, + {566,244,1.93e-04}, + {566,245,4.84e-05}, + {566,276,9.67e-05}, + {566,277,3.87e-04}, + {566,278,9.67e-05}, + {566,532,-1.03e-02}, + {566,533,-1.03e-02}, + {566,534,-1.03e-02}, + {566,565,3.65e-02}, + {566,567,3.65e-02}, + {567,567,2.08e-01}, + {567,244,4.84e-05}, + {567,245,1.93e-04}, + {567,246,4.84e-05}, + {567,277,9.67e-05}, + {567,278,3.87e-04}, + {567,279,9.67e-05}, + {567,533,-1.03e-02}, + {567,534,-1.03e-02}, + {567,535,-1.03e-02}, + {567,566,3.65e-02}, + {567,568,3.65e-02}, + {568,568,2.08e-01}, + {568,245,4.84e-05}, + {568,246,1.93e-04}, + {568,247,4.84e-05}, + {568,278,9.67e-05}, + {568,279,3.87e-04}, + {568,280,9.67e-05}, + {568,534,-1.03e-02}, + {568,535,-1.03e-02}, + {568,536,-1.03e-02}, + {568,567,3.65e-02}, + {568,569,3.65e-02}, + {569,569,2.08e-01}, + {569,246,4.84e-05}, + {569,247,1.93e-04}, + {569,248,4.84e-05}, + {569,279,9.67e-05}, + {569,280,3.87e-04}, + {569,281,9.67e-05}, + {569,535,-1.03e-02}, + {569,536,-1.03e-02}, + {569,537,-1.03e-02}, + {569,568,3.65e-02}, + {569,570,3.65e-02}, + {570,570,2.08e-01}, + {570,247,4.84e-05}, + {570,248,1.93e-04}, + {570,249,4.84e-05}, + {570,280,9.67e-05}, + {570,281,3.87e-04}, + {570,282,9.67e-05}, + {570,536,-1.03e-02}, + {570,537,-1.03e-02}, + {570,538,-1.03e-02}, + {570,569,3.65e-02}, + {570,571,3.65e-02}, + {571,571,2.08e-01}, + {571,248,4.84e-05}, + {571,249,1.93e-04}, + {571,250,4.84e-05}, + {571,281,9.67e-05}, + {571,282,3.87e-04}, + {571,283,9.67e-05}, + {571,537,-1.03e-02}, + {571,538,-1.03e-02}, + {571,539,-1.03e-02}, + {571,570,3.65e-02}, + {571,572,3.65e-02}, + {572,572,2.08e-01}, + {572,249,4.84e-05}, + {572,250,1.93e-04}, + {572,251,4.84e-05}, + {572,282,9.67e-05}, + {572,283,3.87e-04}, + {572,284,9.67e-05}, + {572,538,-1.03e-02}, + {572,539,-1.03e-02}, + {572,540,-1.03e-02}, + {572,571,3.65e-02}, + {572,573,3.65e-02}, + {573,573,2.08e-01}, + {573,250,4.84e-05}, + {573,251,1.93e-04}, + {573,252,4.84e-05}, + {573,283,9.67e-05}, + {573,284,3.87e-04}, + {573,285,9.67e-05}, + {573,539,-1.03e-02}, + {573,540,-1.03e-02}, + {573,541,-1.03e-02}, + {573,572,3.65e-02}, + {573,574,3.65e-02}, + {574,574,2.08e-01}, + {574,251,4.84e-05}, + {574,252,1.93e-04}, + {574,253,4.84e-05}, + {574,284,9.67e-05}, + {574,285,3.87e-04}, + {574,286,9.67e-05}, + {574,540,-1.03e-02}, + {574,541,-1.03e-02}, + {574,542,-1.03e-02}, + {574,573,3.65e-02}, + {574,575,3.65e-02}, + {575,575,2.08e-01}, + {575,252,4.84e-05}, + {575,253,1.93e-04}, + {575,254,4.84e-05}, + {575,285,9.67e-05}, + {575,286,3.87e-04}, + {575,287,9.67e-05}, + {575,541,-1.03e-02}, + {575,542,-1.03e-02}, + {575,543,-1.03e-02}, + {575,574,3.65e-02}, + {575,576,3.65e-02}, + {576,576,2.08e-01}, + {576,253,4.84e-05}, + {576,254,1.93e-04}, + {576,255,4.84e-05}, + {576,286,9.67e-05}, + {576,287,3.87e-04}, + {576,288,9.67e-05}, + {576,542,-1.03e-02}, + {576,543,-1.03e-02}, + {576,544,-1.03e-02}, + {576,575,3.65e-02}, + {576,577,3.65e-02}, + {577,577,2.08e-01}, + {577,226,4.84e-05}, + {577,254,4.84e-05}, + {577,255,1.93e-04}, + {577,258,9.67e-05}, + {577,287,9.67e-05}, + {577,288,3.87e-04}, + {577,515,-1.03e-02}, + {577,543,-1.03e-02}, + {577,544,-1.03e-02}, + {577,547,3.65e-02}, + {577,576,3.65e-02} +}; const unsigned int n_entries = sizeof(entries)/sizeof(entries[0]); void test () { const unsigned int N = 578; - + SparsityPattern sp (N,N, 30); for (unsigned int i=0; i rhs(N); rhs(0) = 1; { const double tolerance = 1e-8; - + typedef SolverBicgstab<> Solver; SolverControl solver_control (N, tolerance); PrimitiveVectorMemory<> vector_memory; Solver solver (solver_control, vector_memory); - + PreconditionSSOR > preconditioner; preconditioner.initialize (sm, 1.2); @@ -9685,15 +9686,15 @@ void test () sm.residual (tmp, solution, rhs); deallog << "Residual: " << tmp.l2_norm() << std::endl; - // we should be at least under the given - // residual limit + // we should be at least under the given + // residual limit Assert (tmp.l2_norm() < tolerance, ExcInternalError()); } } -int main () +int main () { std::ofstream logfile("solver_01/output"); deallog.attach(logfile); diff --git a/tests/bits/sparse_lu_decomposition_1.cc b/tests/bits/sparse_lu_decomposition_1.cc index d3e3c190db..e3ff873867 100644 --- a/tests/bits/sparse_lu_decomposition_1.cc +++ b/tests/bits/sparse_lu_decomposition_1.cc @@ -29,9 +29,9 @@ #include #include - -int main () + +int main () { std::ofstream logfile("sparse_lu_decomposition_1/output"); deallog.attach(logfile); @@ -41,7 +41,7 @@ int main () SmartPointer > sparse_decomp; deallog << "OK" << std::endl; - + return 0; } diff --git a/tests/bits/sparse_matrix_01.cc b/tests/bits/sparse_matrix_01.cc index 5877dae33a..0b27a2685d 100644 --- a/tests/bits/sparse_matrix_01.cc +++ b/tests/bits/sparse_matrix_01.cc @@ -20,7 +20,7 @@ // SparseMatrix::set() #include "../tests.h" -#include +#include #include #include @@ -35,14 +35,14 @@ void test () sp.compress (); SparseMatrix m(sp); - - // first set a few entries + + // first set a few entries for (unsigned int i=0; i +#include #include #include @@ -37,14 +37,14 @@ void test () sp.compress (); SparseMatrix m(sp); - - // first set a few entries + + // first set a few entries for (unsigned int i=0; i +#include #include @@ -35,13 +35,13 @@ void test () SparseMatrix m(sp); - // first set a few entries + // first set a few entries for (unsigned int i=0; i +#include #include @@ -36,8 +36,8 @@ void test () sp.compress (); SparseMatrix m(sp); - - // first set a few entries + + // first set a few entries for (unsigned int i=0; i +#include #include @@ -39,20 +39,20 @@ void test () sp.compress (); SparseMatrix m(sp); - - // first set a few entries + + // first set a few entries for (unsigned int i=0; i +#include #include @@ -39,20 +39,20 @@ void test () sp.compress (); SparseMatrix m(sp); - - // first set a few entries + + // first set a few entries for (unsigned int i=0; i +#include #include @@ -33,7 +33,7 @@ void test () sp.compress (); SparseMatrix m(sp); - + Assert (m.m() == 5, ExcInternalError()); Assert (m.n() == 5, ExcInternalError()); @@ -56,25 +56,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/sparse_matrix_05.cc b/tests/bits/sparse_matrix_05.cc index ab2aeab1cb..4fdfbf38c3 100644 --- a/tests/bits/sparse_matrix_05.cc +++ b/tests/bits/sparse_matrix_05.cc @@ -20,7 +20,7 @@ // SparseMatrix #include "../tests.h" -#include +#include #include @@ -34,13 +34,13 @@ void test () sp.compress (); SparseMatrix m(sp); - - // first set a few entries. count how many - // entries we have. note that for square - // matrices we also always store the - // diagonal element, so add one per row, - // but don't count it when traversing the - // row + + // first set a few entries. count how many + // entries we have. note that for square + // matrices we also always store the + // diagonal element, so add one per row, + // but don't count it when traversing the + // row unsigned int counter = 0; for (unsigned int i=0; i m(sp); - // first set a few entries. count how many - // entries we have. note that for square - // matrices we also always store the - // diagonal element + // first set a few entries. count how many + // entries we have. note that for square + // matrices we also always store the + // diagonal element unsigned int counter = 0; for (unsigned int i=0; i +#include #include @@ -33,19 +33,19 @@ void test () sp.compress (); SparseMatrix m(sp); - - // first set a few entries. count how many - // entries we have + + // first set a few entries. count how many + // entries we have for (unsigned int i=0; i +#include #include @@ -33,19 +33,19 @@ void test () sp.compress (); SparseMatrix m(sp); - - // first set a few entries. count how many - // entries we have + + // first set a few entries. count how many + // entries we have for (unsigned int i=0; i +#include #include @@ -33,9 +33,9 @@ void test () sp.compress (); SparseMatrix m(sp); - - // first set a few entries. count how many - // entries we have + + // first set a few entries. count how many + // entries we have double norm = 0; for (unsigned int i=0; i +#include #include @@ -33,18 +33,18 @@ void test () sp.compress (); SparseMatrix m(sp); - - // first set a few entries + + // first set a few entries for (unsigned int i=0; i +#include #include @@ -33,18 +33,18 @@ void test () sp.compress (); SparseMatrix m(sp); - - // first set a few entries + + // first set a few entries for (unsigned int i=0; i m(sp); - // prepare structure with indices and values + // prepare structure with indices and values std::vector indices (m.n()); for (unsigned int j=0; j values (m.n()); - // try to add entries from the list. Zeros - // should be filtered out. list is sorted + // try to add entries from the list. Zeros + // should be filtered out. list is sorted for (unsigned int i=0; i m(sp); - // prepare structure with indices and values + // prepare structure with indices and values std::vector indices (m.n()); for (unsigned int j=0; j values (m.n()); - // try to add entries from the list. Zeros - // should be filtered out. list is sorted + // try to add entries from the list. Zeros + // should be filtered out. list is sorted for (unsigned int i=0; i m(sp); - // prepare structure with indices and values + // prepare structure with indices and values std::vector indices (m.n()); for (unsigned int j=0; j values (m.n()); - // try to add entries from the list. Zeros - // need to be filtered out. list is not - // sorted + // try to add entries from the list. Zeros + // need to be filtered out. list is not + // sorted for (unsigned int i=0; i m(sp); - // prepare structure with indices and values + // prepare structure with indices and values std::vector indices (m.n()); for (unsigned int j=0; j values (m.n()); - // try to add entries from the list. Zeros - // should be filtered out. list is sorted + // try to add entries from the list. Zeros + // should be filtered out. list is sorted for (unsigned int i=0; i m(sp); - // prepare structure with indices and values + // prepare structure with indices and values std::vector indices (m.n()); for (unsigned int i=0; i values (m.n()); - // try to add entries from the list. Zeros - // should be filtered out. list is sorted + // try to add entries from the list. Zeros + // should be filtered out. list is sorted for (unsigned int i=0; i m(sp); - // prepare structure with indices and values + // prepare structure with indices and values std::vector indices (m.n()); for (unsigned int j=0; j values (m.n()); - // try to add entries from the list. No - // zeros to be filtered. But less than 3 - // elements, so the program takes another - // path + // try to add entries from the list. No + // zeros to be filtered. But less than 3 + // elements, so the program takes another + // path for (unsigned int i=0; i +#include #include #include @@ -41,7 +41,7 @@ void test () deallog << i->value() << std::endl; i++; deallog << i->value() << std::endl; - + deallog << "OK" << std::endl; } @@ -61,25 +61,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/sparse_matrix_iterator_02.cc b/tests/bits/sparse_matrix_iterator_02.cc index 1354298969..733b9f07b8 100644 --- a/tests/bits/sparse_matrix_iterator_02.cc +++ b/tests/bits/sparse_matrix_iterator_02.cc @@ -20,7 +20,7 @@ // iterator #include "../tests.h" -#include +#include #include #include @@ -43,7 +43,7 @@ void test () || (i==j)) m.set (i,j, i*j); - + SparseMatrix::const_iterator i = m.begin(); for (; i!=m.end(); ++i) { @@ -72,25 +72,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/sparse_matrix_iterator_03.cc b/tests/bits/sparse_matrix_iterator_03.cc index 2cc6792c97..83e10464c7 100644 --- a/tests/bits/sparse_matrix_iterator_03.cc +++ b/tests/bits/sparse_matrix_iterator_03.cc @@ -20,7 +20,7 @@ // iterator #include "../tests.h" -#include +#include #include #include @@ -43,7 +43,7 @@ void test () || (i==j)) m.set (i,j, i*j); - + SparseMatrix::iterator i = m.begin(); for (; i!=m.end(); ++i) { @@ -72,25 +72,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/sparse_matrix_iterator_04.cc b/tests/bits/sparse_matrix_iterator_04.cc index c0cee85804..93c4da96d6 100644 --- a/tests/bits/sparse_matrix_iterator_04.cc +++ b/tests/bits/sparse_matrix_iterator_04.cc @@ -19,7 +19,7 @@ // and reading them back through the matrix itself #include "../tests.h" -#include +#include #include #include @@ -39,7 +39,7 @@ void test () SparseMatrix::iterator i = m.begin(); for (; i!=m.end(); ++i) i->value() = i->row()*i->column(); - + for (unsigned int i=0; i<5; ++i) for (unsigned int j=0; j<5; ++j) if (((i+2*j+1) % 3 == 0) @@ -51,7 +51,7 @@ void test () Assert (std::fabs(m.el(i,j)-i*j) < 1e-14, ExcInternalError()); } - + deallog << "OK" << std::endl; } @@ -71,25 +71,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/sparse_matrix_iterator_05.cc b/tests/bits/sparse_matrix_iterator_05.cc index 5880ee1c51..9fabd75651 100644 --- a/tests/bits/sparse_matrix_iterator_05.cc +++ b/tests/bits/sparse_matrix_iterator_05.cc @@ -19,7 +19,7 @@ // and reading them back through the matrix itself #include "../tests.h" -#include +#include #include #include @@ -46,7 +46,7 @@ void test () SparseMatrix::iterator i = m.begin(); for (; i!=m.end(); ++i) i->value() += i->row()*i->column(); - + for (unsigned int i=0; i<5; ++i) for (unsigned int j=0; j<5; ++j) if (((i+2*j+1) % 3 == 0) @@ -58,7 +58,7 @@ void test () Assert (std::fabs(m.el(i,j)-(1.+i*j)) < 1e-14, ExcInternalError()); } - + deallog << "OK" << std::endl; } @@ -78,25 +78,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/sparse_matrix_iterator_06.cc b/tests/bits/sparse_matrix_iterator_06.cc index 6cb083a0f7..4685b7cef8 100644 --- a/tests/bits/sparse_matrix_iterator_06.cc +++ b/tests/bits/sparse_matrix_iterator_06.cc @@ -19,7 +19,7 @@ // and reading them back through the matrix itself #include "../tests.h" -#include +#include #include #include @@ -46,7 +46,7 @@ void test () SparseMatrix::iterator i = m.begin(); for (; i!=m.end(); ++i) i->value() -= i->row()*i->column(); - + for (unsigned int i=0; i<5; ++i) for (unsigned int j=0; j<5; ++j) if (((i+2*j+1) % 3 == 0) @@ -58,7 +58,7 @@ void test () Assert (std::fabs(m.el(i,j)-(1.-i*j)) < 1e-14, ExcInternalError()); } - + deallog << "OK" << std::endl; } @@ -78,25 +78,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/sparse_matrix_iterator_07.cc b/tests/bits/sparse_matrix_iterator_07.cc index ee69cab849..ace05490de 100644 --- a/tests/bits/sparse_matrix_iterator_07.cc +++ b/tests/bits/sparse_matrix_iterator_07.cc @@ -19,7 +19,7 @@ // and reading them back through the matrix itself #include "../tests.h" -#include +#include #include #include @@ -46,7 +46,7 @@ void test () SparseMatrix::iterator i = m.begin(); for (; i!=m.end(); ++i) i->value() *= 2; - + for (unsigned int i=0; i<5; ++i) for (unsigned int j=0; j<5; ++j) if (((i+2*j+1) % 3 == 0) @@ -58,7 +58,7 @@ void test () Assert (std::fabs(m.el(i,j)-(2.*i*j)) < 1e-14, ExcInternalError()); } - + deallog << "OK" << std::endl; } @@ -78,25 +78,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/sparse_matrix_iterator_08.cc b/tests/bits/sparse_matrix_iterator_08.cc index a357160362..5fb5a9143b 100644 --- a/tests/bits/sparse_matrix_iterator_08.cc +++ b/tests/bits/sparse_matrix_iterator_08.cc @@ -19,7 +19,7 @@ // and reading them back through the matrix itself #include "../tests.h" -#include +#include #include #include @@ -46,7 +46,7 @@ void test () SparseMatrix::iterator i = m.begin(); for (; i!=m.end(); ++i) i->value() /= 2; - + for (unsigned int i=0; i<5; ++i) for (unsigned int j=0; j<5; ++j) if (((i+2*j+1) % 3 == 0) @@ -58,7 +58,7 @@ void test () Assert (std::fabs(m.el(i,j)-(i*j/2.)) < 1e-14, ExcInternalError()); } - + deallog << "OK" << std::endl; } @@ -78,25 +78,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/sparse_matrix_iterator_09.cc b/tests/bits/sparse_matrix_iterator_09.cc index 71c408de90..82179fd034 100644 --- a/tests/bits/sparse_matrix_iterator_09.cc +++ b/tests/bits/sparse_matrix_iterator_09.cc @@ -28,18 +28,18 @@ void test () { - // create a sparsity pattern with totally - // empty lines (not even diagonals, since - // not quadratic) + // create a sparsity pattern with totally + // empty lines (not even diagonals, since + // not quadratic) SparsityPattern sparsity(4,5,1); sparsity.add (1,1); sparsity.add (3,1); sparsity.compress (); - // attach a sparse matrix to it + // attach a sparse matrix to it SparseMatrix A(sparsity); - // and loop over the elements of it + // and loop over the elements of it for (SparseMatrix::const_iterator k=A.begin(); k!=A.end(); ++k) deallog << k->row() << ' ' << k->column() << ' ' << k->value() @@ -62,25 +62,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/sparse_matrix_iterator_10.cc b/tests/bits/sparse_matrix_iterator_10.cc index 3a92306cc7..5889ec8d88 100644 --- a/tests/bits/sparse_matrix_iterator_10.cc +++ b/tests/bits/sparse_matrix_iterator_10.cc @@ -30,18 +30,18 @@ void test () { - // create a sparsity pattern with totally - // empty lines (not even diagonals, since - // not quadratic) + // create a sparsity pattern with totally + // empty lines (not even diagonals, since + // not quadratic) SparsityPattern sparsity(4,5,1); sparsity.add (1,1); sparsity.add (3,1); sparsity.compress (); - // attach a sparse matrix to it + // attach a sparse matrix to it SparseMatrix A(sparsity); - // and loop over the elements of it + // and loop over the elements of it for (SparseMatrix::const_iterator k=A.begin(); k!=A.end(); k++) deallog << k->row() << ' ' << k->column() << ' ' << k->value() @@ -64,25 +64,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/sparse_matrix_iterator_11.cc b/tests/bits/sparse_matrix_iterator_11.cc index 0587b58d5a..19e4d89433 100644 --- a/tests/bits/sparse_matrix_iterator_11.cc +++ b/tests/bits/sparse_matrix_iterator_11.cc @@ -16,7 +16,7 @@ -// certain comparisons between sparse matrix iterators didn't compile. +// certain comparisons between sparse matrix iterators didn't compile. #include "../tests.h" #include @@ -27,15 +27,15 @@ void test () { - // create a sparsity pattern with totally - // empty lines (not even diagonals, since - // not quadratic) + // create a sparsity pattern with totally + // empty lines (not even diagonals, since + // not quadratic) SparsityPattern sparsity(4,5,1); sparsity.add (1,1); sparsity.add (3,1); sparsity.compress (); - // attach a sparse matrix to it + // attach a sparse matrix to it SparseMatrix A(sparsity); SparseMatrix::iterator k = A.begin(), @@ -52,7 +52,7 @@ void test () Assert (k == k, ExcInternalError()); Assert (!(k != k), ExcInternalError()); - + deallog << "OK" << std::endl; } @@ -72,25 +72,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/sparse_matrix_iterator_12.cc b/tests/bits/sparse_matrix_iterator_12.cc index 603ffff44a..f8999a5030 100644 --- a/tests/bits/sparse_matrix_iterator_12.cc +++ b/tests/bits/sparse_matrix_iterator_12.cc @@ -27,15 +27,15 @@ void test () { - // create a sparsity pattern with totally - // empty lines (not even diagonals, since - // not quadratic) + // create a sparsity pattern with totally + // empty lines (not even diagonals, since + // not quadratic) SparsityPattern sparsity(4,5,1); sparsity.add (1,1); sparsity.add (3,1); sparsity.compress (); - // attach a sparse matrix to it + // attach a sparse matrix to it SparseMatrix A(sparsity); SparseMatrix::const_iterator k = A.begin(), @@ -52,7 +52,7 @@ void test () Assert (k == k, ExcInternalError()); Assert (!(k != k), ExcInternalError()); - + deallog << "OK" << std::endl; } @@ -72,25 +72,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/sparse_matrix_iterator_13.cc b/tests/bits/sparse_matrix_iterator_13.cc index 5838c1e08a..496b6ac078 100644 --- a/tests/bits/sparse_matrix_iterator_13.cc +++ b/tests/bits/sparse_matrix_iterator_13.cc @@ -38,24 +38,24 @@ void test () for (unsigned int row=0; row &v, Vector &w) { - // set some entries in the - // matrix. actually, set them all + // set some entries in the + // matrix. actually, set them all SparsityPattern sp (v.size(),v.size(),v.size()); for (unsigned int i=0; i m(sp); for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("sparse_matrix_vector_01/output"); deallog.attach(logfile); @@ -84,25 +84,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/sparse_matrix_vector_02.cc b/tests/bits/sparse_matrix_vector_02.cc index 14bb2518de..ad3650fc82 100644 --- a/tests/bits/sparse_matrix_vector_02.cc +++ b/tests/bits/sparse_matrix_vector_02.cc @@ -29,30 +29,30 @@ void test (Vector &v, Vector &w) { - // set some entries in the - // matrix. actually, set them all + // set some entries in the + // matrix. actually, set them all SparsityPattern sp (v.size(),v.size(),v.size()); for (unsigned int i=0; i m(sp); for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("sparse_matrix_vector_02/output"); deallog.attach(logfile); @@ -84,25 +84,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/sparse_matrix_vector_03.cc b/tests/bits/sparse_matrix_vector_03.cc index 2c9535ca01..d2bcc0b34f 100644 --- a/tests/bits/sparse_matrix_vector_03.cc +++ b/tests/bits/sparse_matrix_vector_03.cc @@ -29,33 +29,33 @@ void test (Vector &v, Vector &w) { - // set some entries in the - // matrix. actually, set them all + // set some entries in the + // matrix. actually, set them all SparsityPattern sp (v.size(),v.size(),v.size()); for (unsigned int i=0; i m(sp); for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("sparse_matrix_vector_03/output"); deallog.attach(logfile); @@ -87,25 +87,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/sparse_matrix_vector_04.cc b/tests/bits/sparse_matrix_vector_04.cc index 48a13a21bf..0c45a323f7 100644 --- a/tests/bits/sparse_matrix_vector_04.cc +++ b/tests/bits/sparse_matrix_vector_04.cc @@ -29,33 +29,33 @@ void test (Vector &v, Vector &w) { - // set some entries in the - // matrix. actually, set them all + // set some entries in the + // matrix. actually, set them all SparsityPattern sp (v.size(),v.size(),v.size()); for (unsigned int i=0; i m(sp); for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("sparse_matrix_vector_04/output"); deallog.attach(logfile); @@ -87,25 +87,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/sparse_matrix_vector_05.cc b/tests/bits/sparse_matrix_vector_05.cc index e1459ae783..6415b15897 100644 --- a/tests/bits/sparse_matrix_vector_05.cc +++ b/tests/bits/sparse_matrix_vector_05.cc @@ -29,33 +29,33 @@ void test (Vector &v, Vector &w) { - // set some entries in the - // matrix. actually, set them all + // set some entries in the + // matrix. actually, set them all SparsityPattern sp (v.size(),v.size(),v.size()); for (unsigned int i=0; i m(sp); for (unsigned int i=0; i + // const double s = m.matrix_scalar_product (w,v); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("sparse_matrix_vector_05/output"); deallog.attach(logfile); @@ -90,25 +90,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/sparse_matrix_vector_06.cc b/tests/bits/sparse_matrix_vector_06.cc index 628f0d9a1f..45727c3734 100644 --- a/tests/bits/sparse_matrix_vector_06.cc +++ b/tests/bits/sparse_matrix_vector_06.cc @@ -28,29 +28,29 @@ void test (Vector &v) { - // set some entries in the - // matrix. actually, set them all + // set some entries in the + // matrix. actually, set them all SparsityPattern sp (v.size(),v.size(),v.size()); for (unsigned int i=0; i m(sp); for (unsigned int i=0; i + // const double s = m.matrix_norm_square (v); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i &v) -int main () +int main () { std::ofstream logfile("sparse_matrix_vector_06/output"); deallog.attach(logfile); @@ -81,25 +81,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/sparse_matrix_vector_07.cc b/tests/bits/sparse_matrix_vector_07.cc index 9b1f80f3c7..eda038e1b9 100644 --- a/tests/bits/sparse_matrix_vector_07.cc +++ b/tests/bits/sparse_matrix_vector_07.cc @@ -30,33 +30,33 @@ void test (Vector &v, Vector &w, Vector &x) { - // set some entries in the - // matrix. actually, set them all + // set some entries in the + // matrix. actually, set them all SparsityPattern sp (v.size(),v.size(),v.size()); for (unsigned int i=0; i m(sp); for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("sparse_matrix_vector_07/output"); deallog.attach(logfile); @@ -93,25 +93,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/sparsity_pattern_01.cc b/tests/bits/sparsity_pattern_01.cc index 3aa8378cc3..30c1b4efc3 100644 --- a/tests/bits/sparsity_pattern_01.cc +++ b/tests/bits/sparsity_pattern_01.cc @@ -39,12 +39,12 @@ void test () for (unsigned int i=0; i +#include #include #include @@ -35,8 +35,8 @@ void test () SparsityPattern::const_iterator i = sp.begin(); for (; i!=sp.end(); ++i) - deallog << i->row() << ' ' << i->column() << std::endl; - + deallog << i->row() << ' ' << i->column() << std::endl; + deallog << "OK" << std::endl; } @@ -56,25 +56,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/step-10.cc b/tests/bits/step-10.cc index 793abafe19..61133ad296 100644 --- a/tests/bits/step-10.cc +++ b/tests/bits/step-10.cc @@ -52,7 +52,7 @@ template void gnuplot_output() { deallog << "Output of grids into gnuplot files:" << std::endl - << "===================================" << std::endl; + << "===================================" << std::endl; Triangulation triangulation; GridGenerator::hyper_ball (triangulation); @@ -68,18 +68,18 @@ void gnuplot_output() filename_base += '0'+refinement; for (unsigned int degree=1; degree<4; ++degree) - { - deallog << "Degree = " << degree << std::endl; + { + deallog << "Degree = " << degree << std::endl; - const MappingQ mapping (degree); + const MappingQ mapping (degree); - GridOut grid_out; - GridOutFlags::Gnuplot gnuplot_flags(false, 30); - grid_out.set_flags(gnuplot_flags); - - grid_out.write_gnuplot (triangulation, deallog.get_file_stream(), &mapping); - } + GridOut grid_out; + GridOutFlags::Gnuplot gnuplot_flags(false, 30); + grid_out.set_flags(gnuplot_flags); + + grid_out.write_gnuplot (triangulation, deallog.get_file_stream(), &mapping); + } deallog << std::endl; } } @@ -88,7 +88,7 @@ template void compute_pi_by_area () { deallog << "Computation of Pi by the area:" << std::endl - << "==============================" << std::endl; + << "==============================" << std::endl; const QGauss quadrature (4); @@ -98,7 +98,7 @@ void compute_pi_by_area () Triangulation triangulation; GridGenerator::hyper_ball (triangulation); - + static const HyperBallBoundary boundary; triangulation.set_boundary (0, boundary); @@ -109,33 +109,33 @@ void compute_pi_by_area () DoFHandler dof_handler (triangulation); FEValues x_fe_values (mapping, dummy_fe, quadrature, - update_JxW_values); + update_JxW_values); ConvergenceTable table; for (unsigned int refinement=0; refinement<6; - ++refinement, triangulation.refine_global (1)) - { - table.add_value("cells", triangulation.n_active_cells()); + ++refinement, triangulation.refine_global (1)) + { + table.add_value("cells", triangulation.n_active_cells()); - dof_handler.distribute_dofs (dummy_fe); + dof_handler.distribute_dofs (dummy_fe); - long double area = 0; + long double area = 0; - typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(), - endc = dof_handler.end(); - for (; cell!=endc; ++cell) - { - x_fe_values.reinit (cell); - const FEValues &fe_values = x_fe_values.get_present_fe_values(); - for (unsigned int i=0; i::active_cell_iterator + cell = dof_handler.begin_active(), + endc = dof_handler.end(); + for (; cell!=endc; ++cell) + { + x_fe_values.reinit (cell); + const FEValues &fe_values = x_fe_values.get_present_fe_values(); + for (unsigned int i=0; i (area)); - table.add_value("error", static_cast (std::fabs(area-pi))); - }; + table.add_value("eval.pi", static_cast (area)); + table.add_value("error", static_cast (std::fabs(area-pi))); + }; table.omit_column_from_convergence_rate_evaluation("cells"); table.omit_column_from_convergence_rate_evaluation("eval.pi"); @@ -155,7 +155,7 @@ template void compute_pi_by_perimeter () { deallog << "Computation of Pi by the perimeter:" << std::endl - << "===================================" << std::endl; + << "===================================" << std::endl; const QGauss quadrature (4); @@ -164,7 +164,7 @@ void compute_pi_by_perimeter () deallog << "Degree = " << degree << std::endl; Triangulation triangulation; GridGenerator::hyper_ball (triangulation); - + static const HyperBallBoundary boundary; triangulation.set_boundary (0, boundary); @@ -174,34 +174,34 @@ void compute_pi_by_perimeter () DoFHandler dof_handler (triangulation); FEFaceValues x_fe_face_values (mapping, fe, quadrature, - update_JxW_values); + update_JxW_values); ConvergenceTable table; for (unsigned int refinement=0; refinement<6; - ++refinement, triangulation.refine_global (1)) - { - table.add_value("cells", triangulation.n_active_cells()); - - dof_handler.distribute_dofs (fe); - - typename DoFHandler::active_cell_iterator - 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) - if (cell->face(face_no)->at_boundary()) - { - x_fe_face_values.reinit (cell, face_no); - const FEFaceValues &fe_face_values - = x_fe_face_values.get_present_fe_values (); - - for (unsigned int i=0; i (perimeter/2.)); - table.add_value("error", static_cast (std::fabs(perimeter/2.-pi))); - }; + ++refinement, triangulation.refine_global (1)) + { + table.add_value("cells", triangulation.n_active_cells()); + + dof_handler.distribute_dofs (fe); + + typename DoFHandler::active_cell_iterator + 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) + if (cell->face(face_no)->at_boundary()) + { + x_fe_face_values.reinit (cell, face_no); + const FEFaceValues &fe_face_values + = x_fe_face_values.get_present_fe_values (); + + for (unsigned int i=0; i (perimeter/2.)); + table.add_value("error", static_cast (std::fabs(perimeter/2.-pi))); + }; table.omit_column_from_convergence_rate_evaluation("cells"); table.omit_column_from_convergence_rate_evaluation("eval.pi"); @@ -217,19 +217,19 @@ void compute_pi_by_perimeter () } -int main () +int main () { deallog << std::setprecision(2); logfile << std::setprecision(2); - + deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); gnuplot_output<2>(); compute_pi_by_area<2> (); compute_pi_by_perimeter<2> (); - + return 0; } diff --git a/tests/bits/step-11.cc b/tests/bits/step-11.cc index cc4dd414c9..37430f430f 100644 --- a/tests/bits/step-11.cc +++ b/tests/bits/step-11.cc @@ -57,44 +57,44 @@ std::ofstream logfile("step-11/output"); template -class LaplaceProblem +class LaplaceProblem { - public: - LaplaceProblem (const unsigned int mapping_degree); - void run (); - - private: - void setup_system (); - void assemble_and_solve (); - void solve (); - - Triangulation triangulation; - FE_Q fe; - DoFHandler dof_handler; - MappingQ mapping; - - SparsityPattern sparsity_pattern; - SparseMatrix system_matrix; - ConstraintMatrix mean_value_constraints; - - Vector solution; - Vector system_rhs; - - TableHandler output_table; +public: + LaplaceProblem (const unsigned int mapping_degree); + void run (); + +private: + void setup_system (); + void assemble_and_solve (); + void solve (); + + Triangulation triangulation; + FE_Q fe; + DoFHandler dof_handler; + MappingQ mapping; + + SparsityPattern sparsity_pattern; + SparseMatrix system_matrix; + ConstraintMatrix mean_value_constraints; + + Vector solution; + Vector system_rhs; + + TableHandler output_table; }; template LaplaceProblem::LaplaceProblem (const unsigned int mapping_degree) : - fe (1), - dof_handler (triangulation), - mapping (mapping_degree) + fe (1), + dof_handler (triangulation), + mapping (mapping_degree) { deallog << "Using mapping with degree " << mapping_degree << ":" - << std::endl - << "============================" - << std::endl; + << std::endl + << "============================" + << std::endl; } @@ -108,24 +108,24 @@ void LaplaceProblem::setup_system () std::vector boundary_dofs (dof_handler.n_dofs(), false); DoFTools::extract_boundary_dofs (dof_handler, std::vector(1,true), - boundary_dofs); + boundary_dofs); const unsigned int first_boundary_dof = std::distance (boundary_dofs.begin(), - std::find (boundary_dofs.begin(), - boundary_dofs.end(), - true)); + std::find (boundary_dofs.begin(), + boundary_dofs.end(), + true)); mean_value_constraints.clear (); mean_value_constraints.add_line (first_boundary_dof); for (unsigned int i=first_boundary_dof+1; i::setup_system () template -void LaplaceProblem::assemble_and_solve () +void LaplaceProblem::assemble_and_solve () { const unsigned int gauss_degree = std::max (static_cast(std::ceil(1.*(mapping.get_degree()+1)/2)), - 2U); + 2U); MatrixTools::create_laplace_matrix (mapping, dof_handler, - QGauss(gauss_degree), - system_matrix); + QGauss(gauss_degree), + system_matrix); VectorTools::create_right_hand_side (mapping, dof_handler, - QGauss(gauss_degree), - ConstantFunction(-2), - system_rhs); + QGauss(gauss_degree), + ConstantFunction(-2), + system_rhs); Vector tmp (system_rhs.size()); VectorTools::create_boundary_right_hand_side (mapping, dof_handler, - QGauss(gauss_degree), - ConstantFunction(1), - tmp); + QGauss(gauss_degree), + ConstantFunction(1), + tmp); system_rhs += tmp; mean_value_constraints.condense (system_matrix); - mean_value_constraints.condense (system_rhs); + mean_value_constraints.condense (system_rhs); solve (); mean_value_constraints.distribute (solution); Vector norm_per_cell (triangulation.n_active_cells()); VectorTools::integrate_difference (mapping, dof_handler, - solution, - ZeroFunction(), - norm_per_cell, - QGauss(gauss_degree+1), - VectorTools::H1_seminorm); + solution, + ZeroFunction(), + norm_per_cell, + QGauss(gauss_degree+1), + VectorTools::H1_seminorm); const double norm = norm_per_cell.l2_norm(); output_table.add_value ("cells", triangulation.n_active_cells()); @@ -179,7 +179,7 @@ void LaplaceProblem::assemble_and_solve () template -void LaplaceProblem::solve () +void LaplaceProblem::solve () { SolverControl solver_control (1000, 1e-12); SolverCG<> cg (solver_control); @@ -188,18 +188,18 @@ void LaplaceProblem::solve () preconditioner.initialize(system_matrix, 1.2); cg.solve (system_matrix, solution, system_rhs, - preconditioner); + preconditioner); } template -void LaplaceProblem::run () +void LaplaceProblem::run () { GridGenerator::hyper_ball (triangulation); static const HyperBallBoundary boundary; triangulation.set_boundary (0, boundary); - + for (unsigned int cycle=0; cycle<6; ++cycle, triangulation.refine_global(1)) { setup_system (); @@ -212,42 +212,42 @@ void LaplaceProblem::run () deallog << std::endl; } - -int main () + +int main () { try { deallog << std::setprecision(2); - + deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); for (unsigned int mapping_degree=1; mapping_degree<=3; ++mapping_degree) - LaplaceProblem<2>(mapping_degree).run (); + LaplaceProblem<2>(mapping_degree).run (); } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; diff --git a/tests/bits/step-12.cc b/tests/bits/step-12.cc index 5e0ff184d1..1b079b537a 100644 --- a/tests/bits/step-12.cc +++ b/tests/bits/step-12.cc @@ -54,40 +54,40 @@ std::ofstream logfile("step-12/output"); template class RHS: public Function { - public: - virtual void value_list (const std::vector > &points, - std::vector &values, - const unsigned int component=0) const; +public: + virtual void value_list (const std::vector > &points, + std::vector &values, + const unsigned int component=0) const; }; template class BoundaryValues: public Function { - public: - virtual void value_list (const std::vector > &points, - std::vector &values, - const unsigned int component=0) const; +public: + virtual void value_list (const std::vector > &points, + std::vector &values, + const unsigned int component=0) const; }; template class Beta { - public: - Beta () {} - void value_list (const std::vector > &points, - std::vector > &values) const; +public: + Beta () {} + void value_list (const std::vector > &points, + std::vector > &values) const; }; template void RHS::value_list(const std::vector > &points, - std::vector &values, - const unsigned int) const + std::vector &values, + const unsigned int) const { Assert(values.size()==points.size(), - ExcDimensionMismatch(values.size(),points.size())); + ExcDimensionMismatch(values.size(),points.size())); for (unsigned int i=0; i::value_list(const std::vector > &points, template void Beta::value_list(const std::vector > &points, - std::vector > &values) const + std::vector > &values) const { Assert(values.size()==points.size(), - ExcDimensionMismatch(values.size(),points.size())); + ExcDimensionMismatch(values.size(),points.size())); for (unsigned int i=0; i::value_list(const std::vector > &points, template void BoundaryValues::value_list(const std::vector > &points, - std::vector &values, - const unsigned int) const + std::vector &values, + const unsigned int) const { Assert(values.size()==points.size(), - ExcDimensionMismatch(values.size(),points.size())); + ExcDimensionMismatch(values.size(),points.size())); for (unsigned int i=0; i::value_list(const std::vector > &points, template class DGTransportEquation { - public: - DGTransportEquation(); - - void assemble_cell_term(const FEValues& fe_v, - FullMatrix &ui_vi_matrix, - Vector &cell_vector) const; - - void assemble_boundary_term(const FEFaceValues& fe_v, - FullMatrix &ui_vi_matrix, - Vector &cell_vector) const; - - void assemble_face_term1(const FEFaceValuesBase& fe_v, - const FEFaceValuesBase& fe_v_neighbor, - FullMatrix &ui_vi_matrix, - FullMatrix &ue_vi_matrix) const; - - void assemble_face_term2(const FEFaceValuesBase& fe_v, - const FEFaceValuesBase& fe_v_neighbor, - FullMatrix &ui_vi_matrix, - FullMatrix &ue_vi_matrix, - FullMatrix &ui_ve_matrix, - FullMatrix &ue_ve_matrix) const; - private: - const Beta beta_function; - const RHS rhs_function; - const BoundaryValues boundary_function; +public: + DGTransportEquation(); + + void assemble_cell_term(const FEValues &fe_v, + FullMatrix &ui_vi_matrix, + Vector &cell_vector) const; + + void assemble_boundary_term(const FEFaceValues &fe_v, + FullMatrix &ui_vi_matrix, + Vector &cell_vector) const; + + void assemble_face_term1(const FEFaceValuesBase &fe_v, + const FEFaceValuesBase &fe_v_neighbor, + FullMatrix &ui_vi_matrix, + FullMatrix &ue_vi_matrix) const; + + void assemble_face_term2(const FEFaceValuesBase &fe_v, + const FEFaceValuesBase &fe_v_neighbor, + FullMatrix &ui_vi_matrix, + FullMatrix &ue_vi_matrix, + FullMatrix &ui_ve_matrix, + FullMatrix &ue_ve_matrix) const; +private: + const Beta beta_function; + const RHS rhs_function; + const BoundaryValues boundary_function; }; template DGTransportEquation::DGTransportEquation () - : - beta_function (), - rhs_function (), - boundary_function () + : + beta_function (), + rhs_function (), + boundary_function () {} @@ -182,26 +182,26 @@ void DGTransportEquation::assemble_cell_term( std::vector > beta (fe_v.n_quadrature_points); std::vector rhs (fe_v.n_quadrature_points); - + beta_function.value_list (fe_v.get_quadrature_points(), beta); rhs_function.value_list (fe_v.get_quadrature_points(), rhs); - + for (unsigned int point=0; point void DGTransportEquation::assemble_boundary_term( - const FEFaceValues& fe_v, + const FEFaceValues &fe_v, FullMatrix &ui_vi_matrix, Vector &cell_vector) const { @@ -210,34 +210,34 @@ void DGTransportEquation::assemble_boundary_term( std::vector > beta (fe_v.n_quadrature_points); std::vector g(fe_v.n_quadrature_points); - + beta_function.value_list (fe_v.get_quadrature_points(), beta); boundary_function.value_list (fe_v.get_quadrature_points(), g); for (unsigned int point=0; point0) - for (unsigned int i=0; i void DGTransportEquation::assemble_face_term1( - const FEFaceValuesBase& fe_v, - const FEFaceValuesBase& fe_v_neighbor, + const FEFaceValuesBase &fe_v, + const FEFaceValuesBase &fe_v_neighbor, FullMatrix &ui_vi_matrix, FullMatrix &ue_vi_matrix) const { @@ -251,27 +251,27 @@ void DGTransportEquation::assemble_face_term1( { const double beta_n=beta[point] * normals[point]; if (beta_n>0) - for (unsigned int i=0; i void DGTransportEquation::assemble_face_term2( - const FEFaceValuesBase& fe_v, - const FEFaceValuesBase& fe_v_neighbor, + const FEFaceValuesBase &fe_v, + const FEFaceValuesBase &fe_v_neighbor, FullMatrix &ui_vi_matrix, FullMatrix &ue_vi_matrix, FullMatrix &ui_ve_matrix, @@ -281,44 +281,44 @@ void DGTransportEquation::assemble_face_term2( const std::vector > &normals = fe_v.get_normal_vectors (); std::vector > beta (fe_v.n_quadrature_points); - + beta_function.value_list (fe_v.get_quadrature_points(), beta); for (unsigned int point=0; point0) - { - for (unsigned int i=0; i::assemble_face_term2( template class DGMethod { - public: - DGMethod (); - ~DGMethod (); - - void run (); - - private: - void setup_system (); - void assemble_system1 (); - void assemble_system2 (); - void solve (Vector &solution); - void refine_grid (); - void output_results (const unsigned int cycle) const; - - Triangulation triangulation; - const MappingQ1 mapping; - - FE_DGQ fe; - DoFHandler dof_handler; - - SparsityPattern sparsity_pattern; - SparseMatrix system_matrix; - - const QGauss quadrature; - const QGauss face_quadrature; - - Vector solution1; - Vector solution2; - Vector right_hand_side; - - const DGTransportEquation dg; +public: + DGMethod (); + ~DGMethod (); + + void run (); + +private: + void setup_system (); + void assemble_system1 (); + void assemble_system2 (); + void solve (Vector &solution); + void refine_grid (); + void output_results (const unsigned int cycle) const; + + Triangulation triangulation; + const MappingQ1 mapping; + + FE_DGQ fe; + DoFHandler dof_handler; + + SparsityPattern sparsity_pattern; + SparseMatrix system_matrix; + + const QGauss quadrature; + const QGauss face_quadrature; + + Vector solution1; + Vector solution2; + Vector right_hand_side; + + const DGTransportEquation dg; }; template DGMethod::DGMethod () - : - mapping (), - fe (1), - dof_handler (triangulation), - quadrature (4), - face_quadrature (4), - dg () + : + mapping (), + fe (1), + dof_handler (triangulation), + quadrature (4), + face_quadrature (4), + dg () {} template -DGMethod::~DGMethod () +DGMethod::~DGMethod () { dof_handler.clear (); } @@ -385,14 +385,14 @@ void DGMethod::setup_system () dof_handler.distribute_dofs (fe); sparsity_pattern.reinit (dof_handler.n_dofs(), - dof_handler.n_dofs(), - (GeometryInfo::faces_per_cell - *GeometryInfo::max_children_per_face+1)*fe.dofs_per_cell); - + dof_handler.n_dofs(), + (GeometryInfo::faces_per_cell + *GeometryInfo::max_children_per_face+1)*fe.dofs_per_cell); + DoFTools::make_flux_sparsity_pattern (dof_handler, sparsity_pattern); - + sparsity_pattern.compress(); - + system_matrix.reinit (sparsity_pattern); solution1.reinit (dof_handler.n_dofs()); @@ -402,7 +402,7 @@ void DGMethod::setup_system () template -void DGMethod::assemble_system1 () +void DGMethod::assemble_system1 () { const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell; std::vector dofs (dofs_per_cell); @@ -417,12 +417,12 @@ void DGMethod::assemble_system1 () | update_q_points | update_JxW_values | update_normal_vectors; - + const UpdateFlags neighbor_face_update_flags = update_values; - + FEValues fe_v ( mapping, fe, quadrature, update_flags); - + FEFaceValues fe_v_face ( mapping, fe, face_quadrature, face_update_flags); FESubfaceValues fe_v_subface ( @@ -438,137 +438,137 @@ void DGMethod::assemble_system1 () Vector cell_vector (dofs_per_cell); 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) + for (; cell!=endc; ++cell) { ui_vi_matrix = 0; cell_vector = 0; - + fe_v.reinit (cell); dg.assemble_cell_term(fe_v, - ui_vi_matrix, - cell_vector); + ui_vi_matrix, + cell_vector); cell->get_dof_indices (dofs); for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no) - { - typename DoFHandler::face_iterator face=cell->face(face_no); - - ue_vi_matrix = 0; - - if (face->at_boundary()) - { - fe_v_face.reinit (cell, face_no); - - dg.assemble_boundary_term(fe_v_face, - ui_vi_matrix, - cell_vector); - } - else - { - typename DoFHandler::cell_iterator neighbor= - cell->neighbor(face_no);; - - if (face->has_children()) - { - const unsigned int neighbor2= - cell->neighbor_of_neighbor(face_no); - - - for (unsigned int subface_no=0; - subface_non_children(); ++subface_no) - { - typename DoFHandler::active_cell_iterator - neighbor_child + { + typename DoFHandler::face_iterator face=cell->face(face_no); + + ue_vi_matrix = 0; + + if (face->at_boundary()) + { + fe_v_face.reinit (cell, face_no); + + dg.assemble_boundary_term(fe_v_face, + ui_vi_matrix, + cell_vector); + } + else + { + typename DoFHandler::cell_iterator neighbor= + cell->neighbor(face_no);; + + if (face->has_children()) + { + const unsigned int neighbor2= + cell->neighbor_of_neighbor(face_no); + + + for (unsigned int subface_no=0; + subface_non_children(); ++subface_no) + { + typename DoFHandler::active_cell_iterator + neighbor_child = cell->neighbor_child_on_subface (face_no, subface_no); - - Assert (neighbor_child->face(neighbor2) == face->child(subface_no), - ExcInternalError()); - Assert (!neighbor_child->has_children(), ExcInternalError()); - - ue_vi_matrix = 0; - - fe_v_subface.reinit (cell, face_no, subface_no); - fe_v_face_neighbor.reinit (neighbor_child, neighbor2); - - dg.assemble_face_term1(fe_v_subface, - fe_v_face_neighbor, - ui_vi_matrix, - ue_vi_matrix); - - neighbor_child->get_dof_indices (dofs_neighbor); - - for (unsigned int i=0; ilevel() == cell->level()) - { - const unsigned int neighbor2=cell->neighbor_of_neighbor(face_no); - - fe_v_face.reinit (cell, face_no); - fe_v_face_neighbor.reinit (neighbor, neighbor2); - - dg.assemble_face_term1(fe_v_face, - fe_v_face_neighbor, - ui_vi_matrix, - ue_vi_matrix); - } - else - { - Assert(neighbor->level() < cell->level(), ExcInternalError()); - - const std::pair faceno_subfaceno= - cell->neighbor_of_coarser_neighbor(face_no); - const unsigned int neighbor_face_no=faceno_subfaceno.first, - neighbor_subface_no=faceno_subfaceno.second; - - Assert (neighbor->neighbor_child_on_subface (neighbor_face_no, + + Assert (neighbor_child->face(neighbor2) == face->child(subface_no), + ExcInternalError()); + Assert (!neighbor_child->has_children(), ExcInternalError()); + + ue_vi_matrix = 0; + + fe_v_subface.reinit (cell, face_no, subface_no); + fe_v_face_neighbor.reinit (neighbor_child, neighbor2); + + dg.assemble_face_term1(fe_v_subface, + fe_v_face_neighbor, + ui_vi_matrix, + ue_vi_matrix); + + neighbor_child->get_dof_indices (dofs_neighbor); + + for (unsigned int i=0; ilevel() == cell->level()) + { + const unsigned int neighbor2=cell->neighbor_of_neighbor(face_no); + + fe_v_face.reinit (cell, face_no); + fe_v_face_neighbor.reinit (neighbor, neighbor2); + + dg.assemble_face_term1(fe_v_face, + fe_v_face_neighbor, + ui_vi_matrix, + ue_vi_matrix); + } + else + { + Assert(neighbor->level() < cell->level(), ExcInternalError()); + + const std::pair faceno_subfaceno= + cell->neighbor_of_coarser_neighbor(face_no); + const unsigned int neighbor_face_no=faceno_subfaceno.first, + neighbor_subface_no=faceno_subfaceno.second; + + Assert (neighbor->neighbor_child_on_subface (neighbor_face_no, neighbor_subface_no) == cell, ExcInternalError()); - fe_v_face.reinit (cell, face_no); - fe_v_subface_neighbor.reinit (neighbor, neighbor_face_no, - neighbor_subface_no); - - dg.assemble_face_term1(fe_v_face, - fe_v_subface_neighbor, - ui_vi_matrix, - ue_vi_matrix); - } - - neighbor->get_dof_indices (dofs_neighbor); - - for (unsigned int i=0; iget_dof_indices (dofs_neighbor); + + for (unsigned int i=0; i -void DGMethod::assemble_system2 () +void DGMethod::assemble_system2 () { const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell; std::vector dofs (dofs_per_cell); @@ -578,12 +578,12 @@ void DGMethod::assemble_system2 () | update_gradients | update_q_points | update_JxW_values; - + const UpdateFlags face_update_flags = update_values | update_q_points | update_JxW_values | update_normal_vectors; - + const UpdateFlags neighbor_face_update_flags = update_values; FEValues fe_v ( @@ -598,16 +598,16 @@ void DGMethod::assemble_system2 () FullMatrix ui_vi_matrix (dofs_per_cell, dofs_per_cell); FullMatrix ue_vi_matrix (dofs_per_cell, dofs_per_cell); - + FullMatrix ui_ve_matrix (dofs_per_cell, dofs_per_cell); FullMatrix ue_ve_matrix (dofs_per_cell, dofs_per_cell); - + Vector cell_vector (dofs_per_cell); typename 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) { ui_vi_matrix = 0; cell_vector = 0; @@ -615,123 +615,123 @@ void DGMethod::assemble_system2 () fe_v.reinit (cell); dg.assemble_cell_term(fe_v, - ui_vi_matrix, - cell_vector); - + ui_vi_matrix, + cell_vector); + cell->get_dof_indices (dofs); for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no) - { - typename DoFHandler::face_iterator face= - cell->face(face_no); - - if (face->at_boundary()) - { - fe_v_face.reinit (cell, face_no); - - dg.assemble_boundary_term(fe_v_face, - ui_vi_matrix, - cell_vector); - } - else - { - Assert (cell->neighbor(face_no).state() == IteratorState::valid, - ExcInternalError()); - typename DoFHandler::cell_iterator neighbor= - cell->neighbor(face_no); - if (face->has_children()) - { - const unsigned int neighbor2= - cell->neighbor_of_neighbor(face_no); - - for (unsigned int subface_no=0; - subface_non_children(); ++subface_no) - { - typename DoFHandler::cell_iterator neighbor_child + { + typename DoFHandler::face_iterator face= + cell->face(face_no); + + if (face->at_boundary()) + { + fe_v_face.reinit (cell, face_no); + + dg.assemble_boundary_term(fe_v_face, + ui_vi_matrix, + cell_vector); + } + else + { + Assert (cell->neighbor(face_no).state() == IteratorState::valid, + ExcInternalError()); + typename DoFHandler::cell_iterator neighbor= + cell->neighbor(face_no); + if (face->has_children()) + { + const unsigned int neighbor2= + cell->neighbor_of_neighbor(face_no); + + for (unsigned int subface_no=0; + subface_non_children(); ++subface_no) + { + typename DoFHandler::cell_iterator neighbor_child = cell->neighbor_child_on_subface (face_no, subface_no); - Assert (neighbor_child->face(neighbor2) == face->child(subface_no), - ExcInternalError()); - Assert (!neighbor_child->has_children(), ExcInternalError()); - - ue_vi_matrix = 0; - ui_ve_matrix = 0; - ue_ve_matrix = 0; - - fe_v_subface.reinit (cell, face_no, subface_no); - fe_v_face_neighbor.reinit (neighbor_child, neighbor2); - - dg.assemble_face_term2(fe_v_subface, - fe_v_face_neighbor, - ui_vi_matrix, - ue_vi_matrix, - ui_ve_matrix, - ue_ve_matrix); - - neighbor_child->get_dof_indices (dofs_neighbor); - - for (unsigned int i=0; ilevel() == cell->level() && - neighbor->index() > cell->index()) - { - const unsigned int neighbor2=cell->neighbor_of_neighbor(face_no); - - ue_vi_matrix = 0; - ui_ve_matrix = 0; - ue_ve_matrix = 0; - - fe_v_face.reinit (cell, face_no); - fe_v_face_neighbor.reinit (neighbor, neighbor2); - - dg.assemble_face_term2(fe_v_face, - fe_v_face_neighbor, - ui_vi_matrix, - ue_vi_matrix, - ui_ve_matrix, - ue_ve_matrix); - - neighbor->get_dof_indices (dofs_neighbor); - - for (unsigned int i=0; iface(neighbor2) == face->child(subface_no), + ExcInternalError()); + Assert (!neighbor_child->has_children(), ExcInternalError()); + + ue_vi_matrix = 0; + ui_ve_matrix = 0; + ue_ve_matrix = 0; + + fe_v_subface.reinit (cell, face_no, subface_no); + fe_v_face_neighbor.reinit (neighbor_child, neighbor2); + + dg.assemble_face_term2(fe_v_subface, + fe_v_face_neighbor, + ui_vi_matrix, + ue_vi_matrix, + ui_ve_matrix, + ue_ve_matrix); + + neighbor_child->get_dof_indices (dofs_neighbor); + + for (unsigned int i=0; ilevel() == cell->level() && + neighbor->index() > cell->index()) + { + const unsigned int neighbor2=cell->neighbor_of_neighbor(face_no); + + ue_vi_matrix = 0; + ui_ve_matrix = 0; + ue_ve_matrix = 0; + + fe_v_face.reinit (cell, face_no); + fe_v_face_neighbor.reinit (neighbor, neighbor2); + + dg.assemble_face_term2(fe_v_face, + fe_v_face_neighbor, + ui_vi_matrix, + ue_vi_matrix, + ui_ve_matrix, + ue_ve_matrix); + + neighbor->get_dof_indices (dofs_neighbor); + + for (unsigned int i=0; i -void DGMethod::solve (Vector &solution) +void DGMethod::solve (Vector &solution) { SolverControl solver_control (1000, 1e-12, false, false); SolverRichardson<> solver (solver_control); @@ -741,7 +741,7 @@ void DGMethod::solve (Vector &solution) preconditioner.initialize(system_matrix, fe.dofs_per_cell); solver.solve (system_matrix, solution, right_hand_side, - preconditioner); + preconditioner); } @@ -751,19 +751,19 @@ void DGMethod::refine_grid () Vector gradient_indicator (triangulation.n_active_cells()); DerivativeApproximation::approximate_gradient (mapping, - dof_handler, - solution2, - gradient_indicator); + dof_handler, + solution2, + gradient_indicator); typename 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 cell_no=0; cell!=endc; ++cell, ++cell_no) gradient_indicator(cell_no)*=std::pow(cell->diameter(), 1+1.0*dim/2); GridRefinement::refine_and_coarsen_fixed_number (triangulation, - gradient_indicator, - 0.3, 0.1); + gradient_indicator, + 0.3, 0.1); triangulation.execute_coarsening_and_refinement (); } @@ -775,57 +775,57 @@ void DGMethod::output_results (const unsigned int cycle) const std::string filename = "grid-"; filename += ('0' + cycle); Assert (cycle < 10, ExcInternalError()); - + filename += ".eps"; deallog << "Writing grid to <" << filename << ">..." << std::endl; - + GridOut grid_out; grid_out.write_eps (triangulation, deallog.get_file_stream()); - + filename = "sol-"; filename += ('0' + cycle); Assert (cycle < 10, ExcInternalError()); - + filename += ".gnuplot"; deallog << "Writing solution to <" << filename << ">..." - << std::endl << std::endl; - + << std::endl << std::endl; + DataOut data_out; data_out.attach_dof_handler (dof_handler); data_out.add_data_vector (solution2, "u"); data_out.build_patches (); - + data_out.write_gnuplot(deallog.get_file_stream()); } template -void DGMethod::run () +void DGMethod::run () { for (unsigned int cycle=0; cycle<4; ++cycle) { deallog << "Cycle " << cycle << ':' << std::endl; if (cycle == 0) - { - GridGenerator::hyper_cube (triangulation); + { + GridGenerator::hyper_cube (triangulation); - triangulation.refine_global (2); - } + triangulation.refine_global (2); + } else - refine_grid (); - + refine_grid (); + 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; Timer assemble_timer; assemble_system1 (); @@ -842,24 +842,24 @@ void DGMethod::run () solution1-=solution2; const double difference=solution1.linfty_norm(); if (difference>1e-13) - deallog << "solution1 and solution2 differ!!" << std::endl; + deallog << "solution1 and solution2 differ!!" << std::endl; else - deallog << "solution1 and solution2 coincide." << std::endl; - + deallog << "solution1 and solution2 coincide." << std::endl; + output_results (cycle); } } -int main () +int main () { try { deallog << std::setprecision(2); logfile << std::setprecision(2); - + deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); DGMethod<2> dgmethod; dgmethod.run (); @@ -867,27 +867,27 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; - + return 0; } diff --git a/tests/bits/step-13.cc b/tests/bits/step-13.cc index 4ff2bcf5ef..67fc18385c 100644 --- a/tests/bits/step-13.cc +++ b/tests/bits/step-13.cc @@ -63,26 +63,26 @@ namespace Evaluation { template - class EvaluationBase + class EvaluationBase { - public: - virtual ~EvaluationBase (); - - void set_refinement_cycle (const unsigned int refinement_cycle); - - virtual void operator () (const DoFHandler &dof_handler, - const Vector &solution) const = 0; - protected: - unsigned int refinement_cycle; + public: + virtual ~EvaluationBase (); + + void set_refinement_cycle (const unsigned int refinement_cycle); + + virtual void operator () (const DoFHandler &dof_handler, + const Vector &solution) const = 0; + protected: + unsigned int refinement_cycle; }; template EvaluationBase::~EvaluationBase () {} - - + + template void EvaluationBase::set_refinement_cycle (const unsigned int step) @@ -95,61 +95,61 @@ namespace Evaluation template class PointValueEvaluation : public EvaluationBase { - public: - PointValueEvaluation (const Point &evaluation_point, - TableHandler &results_table); - - virtual void operator () (const DoFHandler &dof_handler, - const Vector &solution) const; - - DeclException1 (ExcEvaluationPointNotFound, - Point, - << "The evaluation point " << arg1 - << " was not found among the vertices of the present grid."); - private: - const Point evaluation_point; - TableHandler &results_table; + public: + PointValueEvaluation (const Point &evaluation_point, + TableHandler &results_table); + + virtual void operator () (const DoFHandler &dof_handler, + const Vector &solution) const; + + DeclException1 (ExcEvaluationPointNotFound, + Point, + << "The evaluation point " << arg1 + << " was not found among the vertices of the present grid."); + private: + const Point evaluation_point; + TableHandler &results_table; }; template PointValueEvaluation:: PointValueEvaluation (const Point &evaluation_point, - TableHandler &results_table) - : - evaluation_point (evaluation_point), - results_table (results_table) + TableHandler &results_table) + : + evaluation_point (evaluation_point), + results_table (results_table) {} - + template void PointValueEvaluation:: operator () (const DoFHandler &dof_handler, - const Vector &solution) const + const Vector &solution) const { double point_value = 1e20; typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(), - endc = dof_handler.end(); + cell = dof_handler.begin_active(), + endc = dof_handler.end(); bool evaluation_point_found = false; for (; (cell!=endc) && !evaluation_point_found; ++cell) for (unsigned int vertex=0; - vertex::vertices_per_cell; - ++vertex) - if (cell->vertex(vertex) == evaluation_point) - { - point_value = solution(cell->vertex_dof_index(vertex,0)); + vertex::vertices_per_cell; + ++vertex) + if (cell->vertex(vertex) == evaluation_point) + { + point_value = solution(cell->vertex_dof_index(vertex,0)); - evaluation_point_found = true; - break; - }; + evaluation_point_found = true; + break; + }; AssertThrow (evaluation_point_found, - ExcEvaluationPointNotFound(evaluation_point)); - + ExcEvaluationPointNotFound(evaluation_point)); + results_table.add_value ("DoFs", dof_handler.n_dofs()); results_table.add_value ("u(x_0)", point_value); } @@ -161,53 +161,53 @@ namespace Evaluation template class SolutionOutput : public EvaluationBase { - public: - SolutionOutput (const std::string &output_name_base, - const typename DataOut::OutputFormat output_format); - - virtual void operator () (const DoFHandler &dof_handler, - const Vector &solution) const; - private: - const std::string output_name_base; - const typename DataOut::OutputFormat output_format; + public: + SolutionOutput (const std::string &output_name_base, + const typename DataOut::OutputFormat output_format); + + virtual void operator () (const DoFHandler &dof_handler, + const Vector &solution) const; + private: + const std::string output_name_base; + const typename DataOut::OutputFormat output_format; }; template SolutionOutput:: SolutionOutput (const std::string &output_name_base, - const typename DataOut::OutputFormat output_format) - : - output_name_base (output_name_base), - output_format (output_format) + const typename DataOut::OutputFormat output_format) + : + output_name_base (output_name_base), + output_format (output_format) {} - + template void SolutionOutput::operator () (const DoFHandler &, - const Vector &) const + const Vector &) const { // DataOut data_out; // data_out.attach_dof_handler (dof_handler); // data_out.add_data_vector (solution, "solution"); // data_out.build_patches (); - + // std::ostringstream filename; // filename << output_name_base << "-" -// << this->refinement_cycle -// << data_out.default_suffix (output_format) -// << std::ends; - +// << this->refinement_cycle +// << data_out.default_suffix (output_format) +// << std::ends; + // data_out.write (deallog.get_file_stream(), output_format); } - + } - + namespace LaplaceSolver { @@ -215,106 +215,106 @@ namespace LaplaceSolver template class Base { - public: - Base (Triangulation &coarse_grid); - virtual ~Base (); - - virtual void solve_problem () = 0; - virtual void postprocess (const Evaluation::EvaluationBase &postprocessor) const = 0; - virtual void refine_grid () = 0; - virtual unsigned int n_dofs () const = 0; - - protected: - const SmartPointer > triangulation; + public: + Base (Triangulation &coarse_grid); + virtual ~Base (); + + virtual void solve_problem () = 0; + virtual void postprocess (const Evaluation::EvaluationBase &postprocessor) const = 0; + virtual void refine_grid () = 0; + virtual unsigned int n_dofs () const = 0; + + protected: + const SmartPointer > triangulation; }; template Base::Base (Triangulation &coarse_grid) - : - triangulation (&coarse_grid) + : + triangulation (&coarse_grid) {} template - Base::~Base () + Base::~Base () {} - + template class Solver : public virtual Base { - public: - Solver (Triangulation &triangulation, - const FiniteElement &fe, - const Quadrature &quadrature, - const Function &boundary_values); - virtual - ~Solver (); - - virtual - void - solve_problem (); - - virtual - void - postprocess (const Evaluation::EvaluationBase &postprocessor) const; - - virtual - unsigned int - n_dofs () const; - - protected: - const SmartPointer > fe; - const SmartPointer > quadrature; - DoFHandler dof_handler; - Vector solution; - const SmartPointer > boundary_values; - - virtual void assemble_rhs (Vector &rhs) const = 0; - - private: - struct LinearSystem - { - LinearSystem (const DoFHandler &dof_handler); - - void solve (Vector &solution) const; - - ConstraintMatrix hanging_node_constraints; - SparsityPattern sparsity_pattern; - SparseMatrix matrix; - Vector rhs; - }; + public: + Solver (Triangulation &triangulation, + const FiniteElement &fe, + const Quadrature &quadrature, + const Function &boundary_values); + virtual + ~Solver (); + + virtual + void + solve_problem (); + + virtual + void + postprocess (const Evaluation::EvaluationBase &postprocessor) const; + + virtual + unsigned int + n_dofs () const; + + protected: + const SmartPointer > fe; + const SmartPointer > quadrature; + DoFHandler dof_handler; + Vector solution; + const SmartPointer > boundary_values; + + virtual void assemble_rhs (Vector &rhs) const = 0; + + private: + struct LinearSystem + { + LinearSystem (const DoFHandler &dof_handler); + + void solve (Vector &solution) const; - void - assemble_linear_system (LinearSystem &linear_system); + ConstraintMatrix hanging_node_constraints; + SparsityPattern sparsity_pattern; + SparseMatrix matrix; + Vector rhs; + }; - void - assemble_matrix (LinearSystem &linear_system, - const typename DoFHandler::active_cell_iterator &begin_cell, - const typename DoFHandler::active_cell_iterator &end_cell, - Threads::ThreadMutex &mutex) const; + void + assemble_linear_system (LinearSystem &linear_system); + + void + assemble_matrix (LinearSystem &linear_system, + const typename DoFHandler::active_cell_iterator &begin_cell, + const typename DoFHandler::active_cell_iterator &end_cell, + Threads::ThreadMutex &mutex) const; }; template Solver::Solver (Triangulation &triangulation, - const FiniteElement &fe, - const Quadrature &quadrature, - const Function &boundary_values) - : - Base (triangulation), - fe (&fe), - quadrature (&quadrature), - dof_handler (triangulation), - boundary_values (&boundary_values) + const FiniteElement &fe, + const Quadrature &quadrature, + const Function &boundary_values) + : + Base (triangulation), + fe (&fe), + quadrature (&quadrature), + dof_handler (triangulation), + boundary_values (&boundary_values) {} template - Solver::~Solver () + Solver::~Solver () { dof_handler.clear (); } @@ -348,22 +348,22 @@ namespace LaplaceSolver { return dof_handler.n_dofs(); } - + template void Solver::assemble_linear_system (LinearSystem &linear_system) { typedef - typename DoFHandler::active_cell_iterator - active_cell_iterator; + typename DoFHandler::active_cell_iterator + active_cell_iterator; const unsigned int n_threads = multithread_info.n_default_threads; std::vector > - thread_ranges + thread_ranges = Threads::split_range (dof_handler.begin_active (), - dof_handler.end (), - n_threads); + dof_handler.end (), + n_threads); Threads::ThreadMutex mutex; Threads::ThreadGroup<> threads; @@ -379,18 +379,18 @@ namespace LaplaceSolver std::map boundary_value_map; VectorTools::interpolate_boundary_values (dof_handler, - 0, - *boundary_values, - boundary_value_map); - - + 0, + *boundary_values, + boundary_value_map); + + threads.join_all (); linear_system.hanging_node_constraints.condense (linear_system.matrix); MatrixTools::apply_boundary_values (boundary_value_map, - linear_system.matrix, - solution, - linear_system.rhs); + linear_system.matrix, + solution, + linear_system.rhs); } @@ -398,12 +398,12 @@ namespace LaplaceSolver template void Solver::assemble_matrix (LinearSystem &linear_system, - const typename DoFHandler::active_cell_iterator &begin_cell, - const typename DoFHandler::active_cell_iterator &end_cell, - Threads::ThreadMutex &mutex) const + const typename DoFHandler::active_cell_iterator &begin_cell, + const typename DoFHandler::active_cell_iterator &end_cell, + Threads::ThreadMutex &mutex) const { - FEValues fe_values (*fe, *quadrature, - update_gradients | update_JxW_values); + FEValues fe_values (*fe, *quadrature, + update_gradients | update_JxW_values); const unsigned int dofs_per_cell = fe->dofs_per_cell; const unsigned int n_q_points = quadrature->size(); @@ -413,28 +413,28 @@ namespace LaplaceSolver std::vector local_dof_indices (dofs_per_cell); for (typename DoFHandler::active_cell_iterator cell=begin_cell; - cell!=end_cell; ++cell) + cell!=end_cell; ++cell) { - cell_matrix = 0; + cell_matrix = 0; - fe_values.reinit (cell); + fe_values.reinit (cell); - for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); + cell->get_dof_indices (local_dof_indices); Threads::ThreadMutex::ScopedLock lock (mutex); - for (unsigned int i=0; i &, - ConstraintMatrix &) + ConstraintMatrix &) = &DoFTools::make_hanging_node_constraints; - + Threads::Thread<> - mhnc_thread = Threads::spawn (mhnc_p)(dof_handler, - hanging_node_constraints); + mhnc_thread = Threads::spawn (mhnc_p)(dof_handler, + hanging_node_constraints); sparsity_pattern.reinit (dof_handler.n_dofs(), - dof_handler.n_dofs(), - dof_handler.max_couplings_between_dofs()); + dof_handler.n_dofs(), + dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern); mhnc_thread.join (); @@ -491,30 +491,30 @@ namespace LaplaceSolver template class PrimalSolver : public Solver { - public: - PrimalSolver (Triangulation &triangulation, - const FiniteElement &fe, - const Quadrature &quadrature, - const Function &rhs_function, - const Function &boundary_values); - protected: - const SmartPointer > rhs_function; - virtual void assemble_rhs (Vector &rhs) const; + public: + PrimalSolver (Triangulation &triangulation, + const FiniteElement &fe, + const Quadrature &quadrature, + const Function &rhs_function, + const Function &boundary_values); + protected: + const SmartPointer > rhs_function; + virtual void assemble_rhs (Vector &rhs) const; }; template PrimalSolver:: PrimalSolver (Triangulation &triangulation, - const FiniteElement &fe, - const Quadrature &quadrature, - const Function &rhs_function, - const Function &boundary_values) - : - Base (triangulation), - Solver (triangulation, fe, - quadrature, boundary_values), - rhs_function (&rhs_function) + const FiniteElement &fe, + const Quadrature &quadrature, + const Function &rhs_function, + const Function &boundary_values) + : + Base (triangulation), + Solver (triangulation, fe, + quadrature, boundary_values), + rhs_function (&rhs_function) {} @@ -522,10 +522,10 @@ namespace LaplaceSolver template void PrimalSolver:: - assemble_rhs (Vector &rhs) const + assemble_rhs (Vector &rhs) const { - FEValues fe_values (*this->fe, *this->quadrature, - update_values | update_q_points | + FEValues fe_values (*this->fe, *this->quadrature, + update_values | update_q_points | update_JxW_values); const unsigned int dofs_per_cell = this->fe->dofs_per_cell; @@ -536,24 +536,24 @@ namespace LaplaceSolver std::vector local_dof_indices (dofs_per_cell); typename DoFHandler::active_cell_iterator - cell = this->dof_handler.begin_active(), - endc = this->dof_handler.end(); + cell = this->dof_handler.begin_active(), + endc = this->dof_handler.end(); for (; cell!=endc; ++cell) { - cell_rhs = 0; - fe_values.reinit (cell); - rhs_function->value_list (fe_values.get_quadrature_points(), - rhs_values); - - for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); - for (unsigned int i=0; ivalue_list (fe_values.get_quadrature_points(), + rhs_values); + + for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); + for (unsigned int i=0; i class RefinementGlobal : public PrimalSolver { - public: - RefinementGlobal (Triangulation &coarse_grid, - const FiniteElement &fe, - const Quadrature &quadrature, - const Function &rhs_function, - const Function &boundary_values); - - virtual void refine_grid (); + public: + RefinementGlobal (Triangulation &coarse_grid, + const FiniteElement &fe, + const Quadrature &quadrature, + const Function &rhs_function, + const Function &boundary_values); + + virtual void refine_grid (); }; @@ -577,14 +577,14 @@ namespace LaplaceSolver template RefinementGlobal:: RefinementGlobal (Triangulation &coarse_grid, - const FiniteElement &fe, - const Quadrature &quadrature, - const Function &rhs_function, - const Function &boundary_values) - : - Base (coarse_grid), - PrimalSolver (coarse_grid, fe, quadrature, - rhs_function, boundary_values) + const FiniteElement &fe, + const Quadrature &quadrature, + const Function &rhs_function, + const Function &boundary_values) + : + Base (coarse_grid), + PrimalSolver (coarse_grid, fe, quadrature, + rhs_function, boundary_values) {} @@ -601,14 +601,14 @@ namespace LaplaceSolver template class RefinementKelly : public PrimalSolver { - public: - RefinementKelly (Triangulation &coarse_grid, - const FiniteElement &fe, - const Quadrature &quadrature, - const Function &rhs_function, - const Function &boundary_values); - - virtual void refine_grid (); + public: + RefinementKelly (Triangulation &coarse_grid, + const FiniteElement &fe, + const Quadrature &quadrature, + const Function &rhs_function, + const Function &boundary_values); + + virtual void refine_grid (); }; @@ -616,14 +616,14 @@ namespace LaplaceSolver template RefinementKelly:: RefinementKelly (Triangulation &coarse_grid, - const FiniteElement &fe, - const Quadrature &quadrature, - const Function &rhs_function, - const Function &boundary_values) - : - Base (coarse_grid), - PrimalSolver (coarse_grid, fe, quadrature, - rhs_function, boundary_values) + const FiniteElement &fe, + const Quadrature &quadrature, + const Function &rhs_function, + const Function &boundary_values) + : + Base (coarse_grid), + PrimalSolver (coarse_grid, fe, quadrature, + rhs_function, boundary_values) {} @@ -634,13 +634,13 @@ namespace LaplaceSolver { Vector estimated_error_per_cell (this->triangulation->n_active_cells()); KellyErrorEstimator::estimate (this->dof_handler, - QGauss(3), - typename FunctionMap::type(), - this->solution, - estimated_error_per_cell); + QGauss(3), + typename FunctionMap::type(), + this->solution, + estimated_error_per_cell); GridRefinement::refine_and_coarsen_fixed_number (*this->triangulation, - estimated_error_per_cell, - 0.3, 0.03); + estimated_error_per_cell, + 0.3, 0.03); this->triangulation->execute_coarsening_and_refinement (); } @@ -653,18 +653,18 @@ namespace LaplaceSolver template class Solution : public Function { - public: - Solution () : Function () {} - - virtual double value (const Point &p, - const unsigned int component) const; +public: + Solution () : Function () {} + + virtual double value (const Point &p, + const unsigned int component) const; }; template double Solution::value (const Point &p, - const unsigned int /*component*/) const + const unsigned int /*component*/) const { double q = p(0); for (unsigned int i=1; i::value (const Point &p, template class RightHandSide : public Function { - public: - RightHandSide () : Function () {} - - virtual double value (const Point &p, - const unsigned int component) const; +public: + RightHandSide () : Function () {} + + virtual double value (const Point &p, + const unsigned int component) const; }; template double RightHandSide::value (const Point &p, - const unsigned int /*component*/) const + const unsigned int /*component*/) const { double q = p(0); for (unsigned int i=1; i::value (const Point &p, template void run_simulation (LaplaceSolver::Base &solver, - const std::list *> &postprocessor_list) + const std::list *> &postprocessor_list) { deallog << "Refinement cycle: "; @@ -728,18 +728,18 @@ run_simulation (LaplaceSolver::Base &solver, solver.solve_problem (); for (typename std::list *>::const_iterator - i = postprocessor_list.begin(); - i != postprocessor_list.end(); ++i) - { - (*i)->set_refinement_cycle (step); - solver.postprocess (**i); - }; + i = postprocessor_list.begin(); + i != postprocessor_list.end(); ++i) + { + (*i)->set_refinement_cycle (step); + solver.postprocess (**i); + }; if (solver.n_dofs() < 2000) - solver.refine_grid (); + solver.refine_grid (); else - break; + break; }; deallog << std::endl; @@ -748,12 +748,12 @@ run_simulation (LaplaceSolver::Base &solver, template -void solve_problem (const std::string &solver_name) +void solve_problem (const std::string &solver_name) { const std::string header = "Running tests with \"" + solver_name + - "\" refinement criterion:"; + "\" refinement criterion:"; deallog << header << std::endl - << std::string (header.size(), '-') << std::endl; + << std::string (header.size(), '-') << std::endl; Triangulation triangulation; GridGenerator::hyper_cube (triangulation, -1, 1); @@ -763,27 +763,27 @@ void solve_problem (const std::string &solver_name) const RightHandSide rhs_function; const Solution boundary_values; - LaplaceSolver::Base * solver = 0; + LaplaceSolver::Base *solver = 0; if (solver_name == "global") solver = new LaplaceSolver::RefinementGlobal (triangulation, fe, - quadrature, - rhs_function, - boundary_values); + quadrature, + rhs_function, + boundary_values); else if (solver_name == "kelly") solver = new LaplaceSolver::RefinementKelly (triangulation, fe, - quadrature, - rhs_function, - boundary_values); + quadrature, + rhs_function, + boundary_values); else AssertThrow (false, ExcNotImplemented()); TableHandler results_table; Evaluation::PointValueEvaluation - postprocessor1 (Point(0.5,0.5), results_table); + postprocessor1 (Point(0.5,0.5), results_table); Evaluation::SolutionOutput - postprocessor2 (std::string("solution-")+solver_name, - DataOut::gnuplot); + postprocessor2 (std::string("solution-")+solver_name, + DataOut::gnuplot); std::list *> postprocessor_list; postprocessor_list.push_back (&postprocessor1); @@ -799,40 +799,40 @@ void solve_problem (const std::string &solver_name) -int main () +int main () { try { deallog << std::setprecision(2); - + deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); solve_problem<2> ("global"); - solve_problem<2> ("kelly"); + solve_problem<2> ("kelly"); } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; diff --git a/tests/bits/step-14.cc b/tests/bits/step-14.cc index 054d6aed7b..a4a756abc0 100644 --- a/tests/bits/step-14.cc +++ b/tests/bits/step-14.cc @@ -66,15 +66,15 @@ namespace Evaluation template class EvaluationBase { - public: - virtual ~EvaluationBase (); + public: + virtual ~EvaluationBase (); - void set_refinement_cycle (const unsigned int refinement_cycle); + void set_refinement_cycle (const unsigned int refinement_cycle); - virtual void operator () (const DoFHandler &dof_handler, - const Vector &solution) const = 0; - protected: - unsigned int refinement_cycle; + virtual void operator () (const DoFHandler &dof_handler, + const Vector &solution) const = 0; + protected: + unsigned int refinement_cycle; }; @@ -95,26 +95,26 @@ namespace Evaluation template class PointValueEvaluation : public EvaluationBase { - public: - PointValueEvaluation (const Point &evaluation_point); + public: + PointValueEvaluation (const Point &evaluation_point); - virtual void operator () (const DoFHandler &dof_handler, - const Vector &solution) const; + virtual void operator () (const DoFHandler &dof_handler, + const Vector &solution) const; - DeclException1 (ExcEvaluationPointNotFound, - Point, - << "The evaluation point " << arg1 - << " was not found among the vertices of the present grid."); - private: - const Point evaluation_point; + DeclException1 (ExcEvaluationPointNotFound, + Point, + << "The evaluation point " << arg1 + << " was not found among the vertices of the present grid."); + private: + const Point evaluation_point; }; template PointValueEvaluation:: PointValueEvaluation (const Point &evaluation_point) - : - evaluation_point (evaluation_point) + : + evaluation_point (evaluation_point) {} @@ -123,33 +123,33 @@ namespace Evaluation void PointValueEvaluation:: operator () (const DoFHandler &dof_handler, - const Vector &solution) const + const Vector &solution) const { double point_value = 1e20; typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(), - endc = dof_handler.end(); + cell = dof_handler.begin_active(), + endc = dof_handler.end(); bool evaluation_point_found = false; for (; (cell!=endc) && !evaluation_point_found; ++cell) for (unsigned int vertex=0; - vertex::vertices_per_cell; - ++vertex) - if (cell->vertex(vertex).distance (evaluation_point) - < - cell->diameter() * 1e-8) - { - point_value = solution(cell->vertex_dof_index(vertex,0)); - - evaluation_point_found = true; - break; - }; + vertex::vertices_per_cell; + ++vertex) + if (cell->vertex(vertex).distance (evaluation_point) + < + cell->diameter() * 1e-8) + { + point_value = solution(cell->vertex_dof_index(vertex,0)); + + evaluation_point_found = true; + break; + }; AssertThrow (evaluation_point_found, - ExcEvaluationPointNotFound(evaluation_point)); + ExcEvaluationPointNotFound(evaluation_point)); deallog << " Point value=" << point_value - << std::endl; + << std::endl; } @@ -157,26 +157,26 @@ namespace Evaluation template class PointXDerivativeEvaluation : public EvaluationBase { - public: - PointXDerivativeEvaluation (const Point &evaluation_point); + public: + PointXDerivativeEvaluation (const Point &evaluation_point); - virtual void operator () (const DoFHandler &dof_handler, - const Vector &solution) const; + virtual void operator () (const DoFHandler &dof_handler, + const Vector &solution) const; - DeclException1 (ExcEvaluationPointNotFound, - Point, - << "The evaluation point " << arg1 - << " was not found among the vertices of the present grid."); - private: - const Point evaluation_point; + DeclException1 (ExcEvaluationPointNotFound, + Point, + << "The evaluation point " << arg1 + << " was not found among the vertices of the present grid."); + private: + const Point evaluation_point; }; template PointXDerivativeEvaluation:: PointXDerivativeEvaluation (const Point &evaluation_point) - : - evaluation_point (evaluation_point) + : + evaluation_point (evaluation_point) {} @@ -184,51 +184,51 @@ namespace Evaluation void PointXDerivativeEvaluation:: operator () (const DoFHandler &dof_handler, - const Vector &solution) const + const Vector &solution) const { double point_derivative = 0; QTrapez vertex_quadrature; FEValues fe_values (dof_handler.get_fe(), - vertex_quadrature, - update_gradients | update_q_points); + vertex_quadrature, + update_gradients | update_q_points); std::vector > - solution_gradients (vertex_quadrature.size()); + solution_gradients (vertex_quadrature.size()); typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(), - endc = dof_handler.end(); + cell = dof_handler.begin_active(), + endc = dof_handler.end(); unsigned int evaluation_point_hits = 0; for (; cell!=endc; ++cell) for (unsigned int vertex=0; - vertex::vertices_per_cell; - ++vertex) - if (cell->vertex(vertex) == evaluation_point) - { - fe_values.reinit (cell); - fe_values.get_function_grads (solution, - solution_gradients); - - unsigned int q_point = 0; - for (; q_point::vertices_per_cell; + ++vertex) + if (cell->vertex(vertex) == evaluation_point) + { + fe_values.reinit (cell); + fe_values.get_function_grads (solution, + solution_gradients); + + unsigned int q_point = 0; + for (; q_point 0, - ExcEvaluationPointNotFound(evaluation_point)); + ExcEvaluationPointNotFound(evaluation_point)); point_derivative /= evaluation_point_hits; deallog << " Point x-derivative=" << point_derivative - << std::endl; + << std::endl; } @@ -237,37 +237,37 @@ namespace Evaluation template class GridOutput : public EvaluationBase { - public: - GridOutput (const std::string &output_name_base); + public: + GridOutput (const std::string &output_name_base); - virtual void operator () (const DoFHandler &dof_handler, - const Vector &solution) const; - private: - const std::string output_name_base; + virtual void operator () (const DoFHandler &dof_handler, + const Vector &solution) const; + private: + const std::string output_name_base; }; template GridOutput:: GridOutput (const std::string &output_name_base) - : - output_name_base (output_name_base) + : + output_name_base (output_name_base) {} template void GridOutput::operator () (const DoFHandler &dof_handler, - const Vector &/*solution*/) const + const Vector &/*solution*/) const { std::ostringstream filename; filename << output_name_base << "-" - << this->refinement_cycle - << ".eps" - << std::ends; + << this->refinement_cycle + << ".eps" + << std::ends; GridOut().write_eps (dof_handler.get_tria(), - deallog.get_file_stream()); + deallog.get_file_stream()); } } @@ -282,30 +282,30 @@ namespace LaplaceSolver template class Base { - public: - Base (Triangulation &coarse_grid); - virtual ~Base (); + public: + Base (Triangulation &coarse_grid); + virtual ~Base (); - virtual void solve_problem () = 0; - virtual void postprocess (const Evaluation::EvaluationBase &postprocessor) const = 0; - virtual void refine_grid () = 0; - virtual unsigned int n_dofs () const = 0; + virtual void solve_problem () = 0; + virtual void postprocess (const Evaluation::EvaluationBase &postprocessor) const = 0; + virtual void refine_grid () = 0; + virtual unsigned int n_dofs () const = 0; - virtual void set_refinement_cycle (const unsigned int cycle); + virtual void set_refinement_cycle (const unsigned int cycle); - virtual void output_solution () const = 0; + virtual void output_solution () const = 0; - protected: - const SmartPointer > triangulation; + protected: + const SmartPointer > triangulation; - unsigned int refinement_cycle; + unsigned int refinement_cycle; }; template Base::Base (Triangulation &coarse_grid) - : - triangulation (&coarse_grid) + : + triangulation (&coarse_grid) {} @@ -327,75 +327,75 @@ namespace LaplaceSolver template class Solver : public virtual Base { - public: - Solver (Triangulation &triangulation, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &boundary_values); - virtual - ~Solver (); - - virtual - void - solve_problem (); - - virtual - void - postprocess (const Evaluation::EvaluationBase &postprocessor) const; - - virtual - unsigned int - n_dofs () const; - - protected: - const SmartPointer > fe; - const SmartPointer > quadrature; - const SmartPointer > face_quadrature; - DoFHandler dof_handler; - Vector solution; - const SmartPointer > boundary_values; - - virtual void assemble_rhs (Vector &rhs) const = 0; - - private: - struct LinearSystem - { - LinearSystem (const DoFHandler &dof_handler); + public: + Solver (Triangulation &triangulation, + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &boundary_values); + virtual + ~Solver (); + + virtual + void + solve_problem (); + + virtual + void + postprocess (const Evaluation::EvaluationBase &postprocessor) const; + + virtual + unsigned int + n_dofs () const; + + protected: + const SmartPointer > fe; + const SmartPointer > quadrature; + const SmartPointer > face_quadrature; + DoFHandler dof_handler; + Vector solution; + const SmartPointer > boundary_values; + + virtual void assemble_rhs (Vector &rhs) const = 0; + + private: + struct LinearSystem + { + LinearSystem (const DoFHandler &dof_handler); - void solve (Vector &solution) const; + void solve (Vector &solution) const; - ConstraintMatrix hanging_node_constraints; - SparsityPattern sparsity_pattern; - SparseMatrix matrix; - Vector rhs; - }; + ConstraintMatrix hanging_node_constraints; + SparsityPattern sparsity_pattern; + SparseMatrix matrix; + Vector rhs; + }; - void - assemble_linear_system (LinearSystem &linear_system); + void + assemble_linear_system (LinearSystem &linear_system); - void - assemble_matrix (LinearSystem &linear_system, - const typename DoFHandler::active_cell_iterator &begin_cell, - const typename DoFHandler::active_cell_iterator &end_cell, - Threads::ThreadMutex &mutex) const; + void + assemble_matrix (LinearSystem &linear_system, + const typename DoFHandler::active_cell_iterator &begin_cell, + const typename DoFHandler::active_cell_iterator &end_cell, + Threads::ThreadMutex &mutex) const; }; template Solver::Solver (Triangulation &triangulation, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &boundary_values) - : - Base (triangulation), - fe (&fe), - quadrature (&quadrature), - face_quadrature (&face_quadrature), - dof_handler (triangulation), - boundary_values (&boundary_values) + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &boundary_values) + : + Base (triangulation), + fe (&fe), + quadrature (&quadrature), + face_quadrature (&face_quadrature), + dof_handler (triangulation), + boundary_values (&boundary_values) {} @@ -441,55 +441,55 @@ namespace LaplaceSolver Solver::assemble_linear_system (LinearSystem &linear_system) { typedef - typename DoFHandler::active_cell_iterator - active_cell_iterator; + typename DoFHandler::active_cell_iterator + active_cell_iterator; const unsigned int n_threads = multithread_info.n_default_threads; std::vector > - thread_ranges + thread_ranges = Threads::split_range (dof_handler.begin_active (), - dof_handler.end (), - n_threads); - + dof_handler.end (), + n_threads); + { Threads::ThreadMutex mutex; for (unsigned int thread=0; thread boundary_value_map; VectorTools::interpolate_boundary_values (dof_handler, - 0, - *boundary_values, - boundary_value_map); + 0, + *boundary_values, + boundary_value_map); linear_system.hanging_node_constraints.condense (linear_system.matrix); MatrixTools::apply_boundary_values (boundary_value_map, - linear_system.matrix, - solution, - linear_system.rhs); + linear_system.matrix, + solution, + linear_system.rhs); } template void Solver::assemble_matrix (LinearSystem &linear_system, - const typename DoFHandler::active_cell_iterator &begin_cell, - const typename DoFHandler::active_cell_iterator &end_cell, - Threads::ThreadMutex &mutex) const + const typename DoFHandler::active_cell_iterator &begin_cell, + const typename DoFHandler::active_cell_iterator &end_cell, + Threads::ThreadMutex &mutex) const { FEValues fe_values (*fe, *quadrature, - update_gradients | update_JxW_values); + update_gradients | update_JxW_values); const unsigned int dofs_per_cell = fe->dofs_per_cell; const unsigned int n_q_points = quadrature->size(); @@ -499,27 +499,27 @@ namespace LaplaceSolver std::vector local_dof_indices (dofs_per_cell); for (typename DoFHandler::active_cell_iterator cell=begin_cell; - cell!=end_cell; ++cell) + cell!=end_cell; ++cell) { - cell_matrix = 0; + cell_matrix = 0; - fe_values.reinit (cell); + fe_values.reinit (cell); - for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); - Threads::ThreadMutex::ScopedLock lock (mutex); - for (unsigned int i=0; iget_dof_indices (local_dof_indices); + Threads::ThreadMutex::ScopedLock lock (mutex); + for (unsigned int i=0; i &, - ConstraintMatrix &) + ConstraintMatrix &) = &DoFTools::make_hanging_node_constraints; Threads::Thread<> - mhnc_thread = Threads::spawn (mhnc_p)(dof_handler, hanging_node_constraints); + mhnc_thread = Threads::spawn (mhnc_p)(dof_handler, hanging_node_constraints); sparsity_pattern.reinit (dof_handler.n_dofs(), - dof_handler.n_dofs(), - dof_handler.max_couplings_between_dofs()); + dof_handler.n_dofs(), + dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern); mhnc_thread.join (); @@ -575,48 +575,48 @@ namespace LaplaceSolver template class PrimalSolver : public Solver { - public: - PrimalSolver (Triangulation &triangulation, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &rhs_function, - const Function &boundary_values); + public: + PrimalSolver (Triangulation &triangulation, + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &boundary_values); - virtual - void solve_problem (); + virtual + void solve_problem (); - virtual - unsigned int n_dofs () const; + virtual + unsigned int n_dofs () const; - virtual - void postprocess (const Evaluation::EvaluationBase &postprocessor) const; + virtual + void postprocess (const Evaluation::EvaluationBase &postprocessor) const; - virtual - void output_solution () const; + virtual + void output_solution () const; - protected: - const SmartPointer > rhs_function; - virtual void assemble_rhs (Vector &rhs) const; + protected: + const SmartPointer > rhs_function; + virtual void assemble_rhs (Vector &rhs) const; - friend class WeightedResidual; + friend class WeightedResidual; }; template PrimalSolver:: PrimalSolver (Triangulation &triangulation, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &rhs_function, - const Function &boundary_values) - : - Base (triangulation), - Solver (triangulation, fe, - quadrature, face_quadrature, - boundary_values), - rhs_function (&rhs_function) + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &boundary_values) + : + Base (triangulation), + Solver (triangulation, fe, + quadrature, face_quadrature, + boundary_values), + rhs_function (&rhs_function) {} @@ -657,9 +657,9 @@ namespace LaplaceSolver std::ostringstream filename; filename << "solution-" - << this->refinement_cycle - << ".gnuplot" - << std::ends; + << this->refinement_cycle + << ".gnuplot" + << std::ends; data_out.write (deallog.get_file_stream(), DataOut::gnuplot); } @@ -671,7 +671,7 @@ namespace LaplaceSolver assemble_rhs (Vector &rhs) const { FEValues fe_values (*this->fe, *this->quadrature, - update_values | update_q_points | + update_values | update_q_points | update_JxW_values); const unsigned int dofs_per_cell = this->fe->dofs_per_cell; @@ -682,26 +682,26 @@ namespace LaplaceSolver std::vector local_dof_indices (dofs_per_cell); typename DoFHandler::active_cell_iterator - cell = this->dof_handler.begin_active(), - endc = this->dof_handler.end(); + cell = this->dof_handler.begin_active(), + endc = this->dof_handler.end(); for (; cell!=endc; ++cell) { - cell_rhs = 0; + cell_rhs = 0; - fe_values.reinit (cell); + fe_values.reinit (cell); - rhs_function->value_list (fe_values.get_quadrature_points(), - rhs_values); + rhs_function->value_list (fe_values.get_quadrature_points(), + rhs_values); - for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); - for (unsigned int i=0; iget_dof_indices (local_dof_indices); + for (unsigned int i=0; i class RefinementGlobal : public PrimalSolver { - public: - RefinementGlobal (Triangulation &coarse_grid, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &rhs_function, - const Function &boundary_values); - - virtual void refine_grid (); + public: + RefinementGlobal (Triangulation &coarse_grid, + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &boundary_values); + + virtual void refine_grid (); }; @@ -726,16 +726,16 @@ namespace LaplaceSolver template RefinementGlobal:: RefinementGlobal (Triangulation &coarse_grid, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &rhs_function, - const Function &boundary_values) - : - Base (coarse_grid), - PrimalSolver (coarse_grid, fe, quadrature, - face_quadrature, rhs_function, - boundary_values) + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &boundary_values) + : + Base (coarse_grid), + PrimalSolver (coarse_grid, fe, quadrature, + face_quadrature, rhs_function, + boundary_values) {} @@ -752,15 +752,15 @@ namespace LaplaceSolver template class RefinementKelly : public PrimalSolver { - public: - RefinementKelly (Triangulation &coarse_grid, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &rhs_function, - const Function &boundary_values); - - virtual void refine_grid (); + public: + RefinementKelly (Triangulation &coarse_grid, + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &boundary_values); + + virtual void refine_grid (); }; @@ -768,16 +768,16 @@ namespace LaplaceSolver template RefinementKelly:: RefinementKelly (Triangulation &coarse_grid, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &rhs_function, - const Function &boundary_values) - : - Base (coarse_grid), - PrimalSolver (coarse_grid, fe, quadrature, - face_quadrature, - rhs_function, boundary_values) + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &boundary_values) + : + Base (coarse_grid), + PrimalSolver (coarse_grid, fe, quadrature, + face_quadrature, + rhs_function, boundary_values) {} @@ -788,13 +788,13 @@ namespace LaplaceSolver { Vector estimated_error_per_cell (this->triangulation->n_active_cells()); KellyErrorEstimator::estimate (this->dof_handler, - QGauss(3), - typename FunctionMap::type(), - this->solution, - estimated_error_per_cell); + QGauss(3), + typename FunctionMap::type(), + this->solution, + estimated_error_per_cell); GridRefinement::refine_and_coarsen_fixed_number (*this->triangulation, - estimated_error_per_cell, - 0.3, 0.03); + estimated_error_per_cell, + 0.3, 0.03); this->triangulation->execute_coarsening_and_refinement (); } @@ -804,19 +804,19 @@ namespace LaplaceSolver template class RefinementWeightedKelly : public PrimalSolver { - public: - RefinementWeightedKelly (Triangulation &coarse_grid, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &rhs_function, - const Function &boundary_values, - const Function &weighting_function); - - virtual void refine_grid (); - - private: - const SmartPointer > weighting_function; + public: + RefinementWeightedKelly (Triangulation &coarse_grid, + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &boundary_values, + const Function &weighting_function); + + virtual void refine_grid (); + + private: + const SmartPointer > weighting_function; }; @@ -824,18 +824,18 @@ namespace LaplaceSolver template RefinementWeightedKelly:: RefinementWeightedKelly (Triangulation &coarse_grid, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &rhs_function, - const Function &boundary_values, - const Function &weighting_function) - : - Base (coarse_grid), - PrimalSolver (coarse_grid, fe, quadrature, - face_quadrature, - rhs_function, boundary_values), - weighting_function (&weighting_function) + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &boundary_values, + const Function &weighting_function) + : + Base (coarse_grid), + PrimalSolver (coarse_grid, fe, quadrature, + face_quadrature, + rhs_function, boundary_values), + weighting_function (&weighting_function) {} @@ -846,21 +846,21 @@ namespace LaplaceSolver { Vector estimated_error (this->triangulation->n_active_cells()); KellyErrorEstimator::estimate (this->dof_handler, - *this->face_quadrature, - typename FunctionMap::type(), - this->solution, - estimated_error); + *this->face_quadrature, + typename FunctionMap::type(), + this->solution, + estimated_error); typename DoFHandler::active_cell_iterator - cell = this->dof_handler.begin_active(), - endc = this->dof_handler.end(); + cell = this->dof_handler.begin_active(), + endc = this->dof_handler.end(); for (unsigned int cell_index=0; cell!=endc; ++cell, ++cell_index) estimated_error(cell_index) - *= weighting_function->value (cell->center()); + *= weighting_function->value (cell->center()); GridRefinement::refine_and_coarsen_fixed_number (*this->triangulation, - estimated_error, - 0.3, 0.03); + estimated_error, + 0.3, 0.03); this->triangulation->execute_coarsening_and_refinement (); } @@ -873,35 +873,35 @@ namespace Data template struct SetUpBase : public Subscriptor { - virtual - const Function & get_boundary_values () const = 0; + virtual + const Function &get_boundary_values () const = 0; - virtual - const Function & get_right_hand_side () const = 0; + virtual + const Function &get_right_hand_side () const = 0; - virtual - void create_coarse_grid (Triangulation &coarse_grid) const = 0; + virtual + void create_coarse_grid (Triangulation &coarse_grid) const = 0; }; template struct SetUp : public SetUpBase { - SetUp () {} + SetUp () {} - virtual - const Function & get_boundary_values () const; + virtual + const Function &get_boundary_values () const; - virtual - const Function & get_right_hand_side () const; + virtual + const Function &get_right_hand_side () const; - virtual - void create_coarse_grid (Triangulation &coarse_grid) const; + virtual + void create_coarse_grid (Triangulation &coarse_grid) const; - private: - static const typename Traits::BoundaryValues boundary_values; - static const typename Traits::RightHandSide right_hand_side; + private: + static const typename Traits::BoundaryValues boundary_values; + static const typename Traits::RightHandSide right_hand_side; }; template @@ -938,28 +938,28 @@ namespace Data template struct CurvedRidges { - class BoundaryValues : public Function - { - public: - BoundaryValues () : Function () {} + class BoundaryValues : public Function + { + public: + BoundaryValues () : Function () {} - virtual double value (const Point &p, - const unsigned int component) const; - }; + virtual double value (const Point &p, + const unsigned int component) const; + }; - class RightHandSide : public Function - { - public: - RightHandSide () : Function () {} + class RightHandSide : public Function + { + public: + RightHandSide () : Function () {} - virtual double value (const Point &p, - const unsigned int component) const; - }; + virtual double value (const Point &p, + const unsigned int component) const; + }; - static - void - create_coarse_grid (Triangulation &coarse_grid); + static + void + create_coarse_grid (Triangulation &coarse_grid); }; @@ -967,7 +967,7 @@ namespace Data double CurvedRidges::BoundaryValues:: value (const Point &p, - const unsigned int /*component*/) const + const unsigned int /*component*/) const { double q = p(0); for (unsigned int i=1; i double CurvedRidges::RightHandSide::value (const Point &p, - const unsigned int /*component*/) const + const unsigned int /*component*/) const { double q = p(0); for (unsigned int i=1; i struct Exercise_2_3 { - typedef ZeroFunction BoundaryValues; + typedef ZeroFunction BoundaryValues; - class RightHandSide : public ConstantFunction - { - public: - RightHandSide () : ConstantFunction (1.) {} - }; + class RightHandSide : public ConstantFunction + { + public: + RightHandSide () : ConstantFunction (1.) {} + }; - static - void - create_coarse_grid (Triangulation &coarse_grid); + static + void + create_coarse_grid (Triangulation &coarse_grid); }; @@ -1041,68 +1041,70 @@ namespace Data static const Point<2> vertices_1[] = { Point<2> (-1., -1.), - Point<2> (-1./2, -1.), - Point<2> (0., -1.), - Point<2> (+1./2, -1.), - Point<2> (+1, -1.), - - Point<2> (-1., -1./2.), - Point<2> (-1./2, -1./2.), - Point<2> (0., -1./2.), - Point<2> (+1./2, -1./2.), - Point<2> (+1, -1./2.), - - Point<2> (-1., 0.), - Point<2> (-1./2, 0.), - Point<2> (+1./2, 0.), - Point<2> (+1, 0.), - - Point<2> (-1., 1./2.), - Point<2> (-1./2, 1./2.), - Point<2> (0., 1./2.), - Point<2> (+1./2, 1./2.), - Point<2> (+1, 1./2.), - - Point<2> (-1., 1.), - Point<2> (-1./2, 1.), - Point<2> (0., 1.), - Point<2> (+1./2, 1.), - Point<2> (+1, 1.) }; + Point<2> (-1./2, -1.), + Point<2> (0., -1.), + Point<2> (+1./2, -1.), + Point<2> (+1, -1.), + + Point<2> (-1., -1./2.), + Point<2> (-1./2, -1./2.), + Point<2> (0., -1./2.), + Point<2> (+1./2, -1./2.), + Point<2> (+1, -1./2.), + + Point<2> (-1., 0.), + Point<2> (-1./2, 0.), + Point<2> (+1./2, 0.), + Point<2> (+1, 0.), + + Point<2> (-1., 1./2.), + Point<2> (-1./2, 1./2.), + Point<2> (0., 1./2.), + Point<2> (+1./2, 1./2.), + Point<2> (+1, 1./2.), + + Point<2> (-1., 1.), + Point<2> (-1./2, 1.), + Point<2> (0., 1.), + Point<2> (+1./2, 1.), + Point<2> (+1, 1.) + }; const unsigned int - n_vertices = sizeof(vertices_1) / sizeof(vertices_1[0]); + n_vertices = sizeof(vertices_1) / sizeof(vertices_1[0]); const std::vector > vertices (&vertices_1[0], - &vertices_1[n_vertices]); + &vertices_1[n_vertices]); static const int cell_vertices[][GeometryInfo::vertices_per_cell] - = {{0, 1, 5, 6}, - {1, 2, 6, 7}, - {2, 3, 7, 8}, - {3, 4, 8, 9}, - {5, 6, 10, 11}, - {8, 9, 12, 13}, - {10, 11, 14, 15}, - {12, 13, 17, 18}, - {14, 15, 19, 20}, - {15, 16, 20, 21}, - {16, 17, 21, 22}, - {17, 18, 22, 23}}; + = {{0, 1, 5, 6}, + {1, 2, 6, 7}, + {2, 3, 7, 8}, + {3, 4, 8, 9}, + {5, 6, 10, 11}, + {8, 9, 12, 13}, + {10, 11, 14, 15}, + {12, 13, 17, 18}, + {14, 15, 19, 20}, + {15, 16, 20, 21}, + {16, 17, 21, 22}, + {17, 18, 22, 23} + }; const unsigned int - n_cells = sizeof(cell_vertices) / sizeof(cell_vertices[0]); + n_cells = sizeof(cell_vertices) / sizeof(cell_vertices[0]); std::vector > cells (n_cells, CellData()); for (unsigned int i=0; i::vertices_per_cell; - ++j) - cells[i].vertices[j] = cell_vertices[i][j]; - cells[i].material_id = 0; + for (unsigned int j=0; + j::vertices_per_cell; + ++j) + cells[i].vertices[j] = cell_vertices[i][j]; + cells[i].material_id = 0; }; coarse_grid.create_triangulation (vertices, - cells, - SubCellData()); + cells, + SubCellData()); coarse_grid.refine_global (1); } @@ -1117,11 +1119,11 @@ namespace DualFunctional template class DualFunctionalBase : public Subscriptor { - public: - virtual - void - assemble_rhs (const DoFHandler &dof_handler, - Vector &rhs) const = 0; + public: + virtual + void + assemble_rhs (const DoFHandler &dof_handler, + Vector &rhs) const = 0; }; @@ -1129,29 +1131,29 @@ namespace DualFunctional template class PointValueEvaluation : public DualFunctionalBase { - public: - PointValueEvaluation (const Point &evaluation_point); + public: + PointValueEvaluation (const Point &evaluation_point); - virtual - void - assemble_rhs (const DoFHandler &dof_handler, - Vector &rhs) const; + virtual + void + assemble_rhs (const DoFHandler &dof_handler, + Vector &rhs) const; - DeclException1 (ExcEvaluationPointNotFound, - Point, - << "The evaluation point " << arg1 - << " was not found among the vertices of the present grid."); + DeclException1 (ExcEvaluationPointNotFound, + Point, + << "The evaluation point " << arg1 + << " was not found among the vertices of the present grid."); - protected: - const Point evaluation_point; + protected: + const Point evaluation_point; }; template PointValueEvaluation:: PointValueEvaluation (const Point &evaluation_point) - : - evaluation_point (evaluation_point) + : + evaluation_point (evaluation_point) {} @@ -1159,23 +1161,23 @@ namespace DualFunctional void PointValueEvaluation:: assemble_rhs (const DoFHandler &dof_handler, - Vector &rhs) const + Vector &rhs) const { rhs.reinit (dof_handler.n_dofs()); 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) for (unsigned int vertex=0; - vertex::vertices_per_cell; - ++vertex) - if (cell->vertex(vertex).distance(evaluation_point) - < cell->diameter()*1e-8) - { - rhs(cell->vertex_dof_index(vertex,0)) = 1; - return; - }; + vertex::vertices_per_cell; + ++vertex) + if (cell->vertex(vertex).distance(evaluation_point) + < cell->diameter()*1e-8) + { + rhs(cell->vertex_dof_index(vertex,0)) = 1; + return; + }; AssertThrow (false, ExcEvaluationPointNotFound(evaluation_point)); } @@ -1185,29 +1187,29 @@ namespace DualFunctional template class PointXDerivativeEvaluation : public DualFunctionalBase { - public: - PointXDerivativeEvaluation (const Point &evaluation_point); + public: + PointXDerivativeEvaluation (const Point &evaluation_point); - virtual - void - assemble_rhs (const DoFHandler &dof_handler, - Vector &rhs) const; + virtual + void + assemble_rhs (const DoFHandler &dof_handler, + Vector &rhs) const; - DeclException1 (ExcEvaluationPointNotFound, - Point, - << "The evaluation point " << arg1 - << " was not found among the vertices of the present grid."); + DeclException1 (ExcEvaluationPointNotFound, + Point, + << "The evaluation point " << arg1 + << " was not found among the vertices of the present grid."); - protected: - const Point evaluation_point; + protected: + const Point evaluation_point; }; template PointXDerivativeEvaluation:: PointXDerivativeEvaluation (const Point &evaluation_point) - : - evaluation_point (evaluation_point) + : + evaluation_point (evaluation_point) {} @@ -1215,15 +1217,15 @@ namespace DualFunctional void PointXDerivativeEvaluation:: assemble_rhs (const DoFHandler &dof_handler, - Vector &rhs) const + Vector &rhs) const { rhs.reinit (dof_handler.n_dofs()); QGauss quadrature(4); FEValues fe_values (dof_handler.get_fe(), quadrature, - update_gradients | - update_q_points | - update_JxW_values); + update_gradients | + update_q_points | + update_JxW_values); const unsigned int n_q_points = fe_values.n_quadrature_points; const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell; @@ -1233,30 +1235,30 @@ namespace DualFunctional double total_volume = 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) if (cell->center().distance(evaluation_point) <= - cell->diameter()) - { - fe_values.reinit (cell); - cell_rhs = 0; - - for (unsigned int q=0; qget_dof_indices (local_dof_indices); - for (unsigned int i=0; idiameter()) + { + fe_values.reinit (cell); + cell_rhs = 0; + + for (unsigned int q=0; qget_dof_indices (local_dof_indices); + for (unsigned int i=0; i 0, - ExcEvaluationPointNotFound(evaluation_point)); + ExcEvaluationPointNotFound(evaluation_point)); rhs.scale (1./total_volume); } @@ -1272,32 +1274,32 @@ namespace LaplaceSolver template class DualSolver : public Solver { - public: - DualSolver (Triangulation &triangulation, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const DualFunctional::DualFunctionalBase &dual_functional); + public: + DualSolver (Triangulation &triangulation, + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const DualFunctional::DualFunctionalBase &dual_functional); - virtual - void - solve_problem (); + virtual + void + solve_problem (); - virtual - unsigned int - n_dofs () const; + virtual + unsigned int + n_dofs () const; - virtual - void - postprocess (const Evaluation::EvaluationBase &postprocessor) const; + virtual + void + postprocess (const Evaluation::EvaluationBase &postprocessor) const; - protected: - const SmartPointer > dual_functional; - virtual void assemble_rhs (Vector &rhs) const; + protected: + const SmartPointer > dual_functional; + virtual void assemble_rhs (Vector &rhs) const; - static const ZeroFunction boundary_values; + static const ZeroFunction boundary_values; - friend class WeightedResidual; + friend class WeightedResidual; }; template @@ -1306,16 +1308,16 @@ namespace LaplaceSolver template DualSolver:: DualSolver (Triangulation &triangulation, - const FiniteElement &fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const DualFunctional::DualFunctionalBase &dual_functional) - : - Base (triangulation), - Solver (triangulation, fe, - quadrature, face_quadrature, - boundary_values), - dual_functional (&dual_functional) + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const DualFunctional::DualFunctionalBase &dual_functional) + : + Base (triangulation), + Solver (triangulation, fe, + quadrature, face_quadrature, + boundary_values), + dual_functional (&dual_functional) {} @@ -1358,109 +1360,109 @@ namespace LaplaceSolver template class WeightedResidual : public PrimalSolver, - public DualSolver + public DualSolver { - public: - WeightedResidual (Triangulation &coarse_grid, - const FiniteElement &primal_fe, - const FiniteElement &dual_fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &rhs_function, - const Function &boundary_values, - const DualFunctional::DualFunctionalBase &dual_functional); - - virtual - void - solve_problem (); - - virtual - void - postprocess (const Evaluation::EvaluationBase &postprocessor) const; - - virtual - unsigned int - n_dofs () const; - - virtual void refine_grid (); - - virtual - void - output_solution () const; - - private: - void solve_primal_problem (); - void solve_dual_problem (); - - typedef - typename DoFHandler::active_cell_iterator - active_cell_iterator; - - typedef - typename std::map::face_iterator,double> - FaceIntegrals; - - struct CellData - { - FEValues fe_values; - const SmartPointer > right_hand_side; - - std::vector cell_residual; - std::vector rhs_values; - std::vector dual_weights; - typename std::vector > cell_grad_grads; - CellData (const FiniteElement &fe, - const Quadrature &quadrature, - const Function &right_hand_side); - }; + public: + WeightedResidual (Triangulation &coarse_grid, + const FiniteElement &primal_fe, + const FiniteElement &dual_fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &boundary_values, + const DualFunctional::DualFunctionalBase &dual_functional); - struct FaceData - { - FEFaceValues fe_face_values_cell; - FEFaceValues fe_face_values_neighbor; - FESubfaceValues fe_subface_values_cell; - - std::vector jump_residual; - std::vector dual_weights; - typename std::vector > cell_grads; - typename std::vector > neighbor_grads; - FaceData (const FiniteElement &fe, - const Quadrature &face_quadrature); - }; + virtual + void + solve_problem (); + + virtual + void + postprocess (const Evaluation::EvaluationBase &postprocessor) const; + + virtual + unsigned int + n_dofs () const; + + virtual void refine_grid (); + + virtual + void + output_solution () const; + + private: + void solve_primal_problem (); + void solve_dual_problem (); + + typedef + typename DoFHandler::active_cell_iterator + active_cell_iterator; + + typedef + typename std::map::face_iterator,double> + FaceIntegrals; + + struct CellData + { + FEValues fe_values; + const SmartPointer > right_hand_side; + + std::vector cell_residual; + std::vector rhs_values; + std::vector dual_weights; + typename std::vector > cell_grad_grads; + CellData (const FiniteElement &fe, + const Quadrature &quadrature, + const Function &right_hand_side); + }; + + struct FaceData + { + FEFaceValues fe_face_values_cell; + FEFaceValues fe_face_values_neighbor; + FESubfaceValues fe_subface_values_cell; + + std::vector jump_residual; + std::vector dual_weights; + typename std::vector > cell_grads; + typename std::vector > neighbor_grads; + FaceData (const FiniteElement &fe, + const Quadrature &face_quadrature); + }; - void estimate_error (Vector &error_indicators) const; - - void estimate_some (const Vector &primal_solution, - const Vector &dual_weights, - const unsigned int n_threads, - const unsigned int this_thread, - Vector &error_indicators, - FaceIntegrals &face_integrals) const; - - void - integrate_over_cell (const active_cell_iterator &cell, - const unsigned int cell_index, - const Vector &primal_solution, - const Vector &dual_weights, - CellData &cell_data, - Vector &error_indicators) const; - - void - integrate_over_regular_face (const active_cell_iterator &cell, - const unsigned int face_no, - const Vector &primal_solution, - const Vector &dual_weights, - FaceData &face_data, - FaceIntegrals &face_integrals) const; - void - integrate_over_irregular_face (const active_cell_iterator &cell, - const unsigned int face_no, - const Vector &primal_solution, - const Vector &dual_weights, - FaceData &face_data, - FaceIntegrals &face_integrals) const; + void estimate_error (Vector &error_indicators) const; + + void estimate_some (const Vector &primal_solution, + const Vector &dual_weights, + const unsigned int n_threads, + const unsigned int this_thread, + Vector &error_indicators, + FaceIntegrals &face_integrals) const; + + void + integrate_over_cell (const active_cell_iterator &cell, + const unsigned int cell_index, + const Vector &primal_solution, + const Vector &dual_weights, + CellData &cell_data, + Vector &error_indicators) const; + + void + integrate_over_regular_face (const active_cell_iterator &cell, + const unsigned int face_no, + const Vector &primal_solution, + const Vector &dual_weights, + FaceData &face_data, + FaceIntegrals &face_integrals) const; + void + integrate_over_irregular_face (const active_cell_iterator &cell, + const unsigned int face_no, + const Vector &primal_solution, + const Vector &dual_weights, + FaceData &face_data, + FaceIntegrals &face_integrals) const; }; @@ -1468,15 +1470,15 @@ namespace LaplaceSolver template WeightedResidual::CellData:: CellData (const FiniteElement &fe, - const Quadrature &quadrature, - const Function &right_hand_side) - : - fe_values (fe, quadrature, - update_values | - update_second_derivatives | - update_q_points | - update_JxW_values), - right_hand_side (&right_hand_side) + const Quadrature &quadrature, + const Function &right_hand_side) + : + fe_values (fe, quadrature, + update_values | + update_second_derivatives | + update_q_points | + update_JxW_values), + right_hand_side (&right_hand_side) { const unsigned int n_q_points = quadrature.size(); @@ -1492,20 +1494,20 @@ namespace LaplaceSolver template WeightedResidual::FaceData:: FaceData (const FiniteElement &fe, - const Quadrature &face_quadrature) - : - fe_face_values_cell (fe, face_quadrature, - update_values | - update_gradients | - update_JxW_values | - update_normal_vectors), - fe_face_values_neighbor (fe, face_quadrature, - update_values | - update_gradients | - update_JxW_values | - update_normal_vectors), - fe_subface_values_cell (fe, face_quadrature, - update_gradients) + const Quadrature &face_quadrature) + : + fe_face_values_cell (fe, face_quadrature, + update_values | + update_gradients | + update_JxW_values | + update_normal_vectors), + fe_face_values_neighbor (fe, face_quadrature, + update_values | + update_gradients | + update_JxW_values | + update_normal_vectors), + fe_subface_values_cell (fe, face_quadrature, + update_gradients) { const unsigned int n_face_q_points = face_quadrature.size(); @@ -1522,21 +1524,21 @@ namespace LaplaceSolver template WeightedResidual:: WeightedResidual (Triangulation &coarse_grid, - const FiniteElement &primal_fe, - const FiniteElement &dual_fe, - const Quadrature &quadrature, - const Quadrature &face_quadrature, - const Function &rhs_function, - const Function &bv, - const DualFunctional::DualFunctionalBase &dual_functional) - : - Base (coarse_grid), - PrimalSolver (coarse_grid, primal_fe, - quadrature, face_quadrature, - rhs_function, bv), - DualSolver (coarse_grid, dual_fe, - quadrature, face_quadrature, - dual_functional) + const FiniteElement &primal_fe, + const FiniteElement &dual_fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &bv, + const DualFunctional::DualFunctionalBase &dual_functional) + : + Base (coarse_grid), + PrimalSolver (coarse_grid, primal_fe, + quadrature, face_quadrature, + rhs_function, bv), + DualSolver (coarse_grid, dual_fe, + quadrature, face_quadrature, + dual_functional) {} @@ -1590,12 +1592,12 @@ namespace LaplaceSolver estimate_error (error_indicators); for (Vector::iterator i=error_indicators.begin(); - i != error_indicators.end(); ++i) + i != error_indicators.end(); ++i) *i = std::fabs (*i); GridRefinement::refine_and_coarsen_fixed_fraction (*this->triangulation, - error_indicators, - 0.8, 0.02); + error_indicators, + 0.8, 0.02); this->triangulation->execute_coarsening_and_refinement (); } @@ -1609,30 +1611,30 @@ namespace LaplaceSolver ConstraintMatrix primal_hanging_node_constraints; DoFTools::make_hanging_node_constraints (primal_solver.dof_handler, - primal_hanging_node_constraints); + primal_hanging_node_constraints); primal_hanging_node_constraints.close(); Vector dual_solution (primal_solver.dof_handler.n_dofs()); FETools::interpolate (dual_solver.dof_handler, - dual_solver.solution, - primal_solver.dof_handler, - primal_hanging_node_constraints, - dual_solution); + dual_solver.solution, + primal_solver.dof_handler, + primal_hanging_node_constraints, + dual_solution); DataOut data_out; data_out.attach_dof_handler (primal_solver.dof_handler); data_out.add_data_vector (primal_solver.solution, - "primal_solution"); + "primal_solution"); data_out.add_data_vector (dual_solution, - "dual_solution"); + "dual_solution"); data_out.build_patches (); std::ostringstream filename; filename << "solution-" - << this->refinement_cycle - << ".gnuplot" - << std::ends; + << this->refinement_cycle + << ".gnuplot" + << std::ends; data_out.write (deallog.get_file_stream(), DataOut::gnuplot); } @@ -1649,68 +1651,68 @@ namespace LaplaceSolver ConstraintMatrix dual_hanging_node_constraints; DoFTools::make_hanging_node_constraints (dual_solver.dof_handler, - dual_hanging_node_constraints); + dual_hanging_node_constraints); dual_hanging_node_constraints.close(); Vector primal_solution (dual_solver.dof_handler.n_dofs()); FETools::interpolate (primal_solver.dof_handler, - primal_solver.solution, - dual_solver.dof_handler, - dual_hanging_node_constraints, - primal_solution); + primal_solver.solution, + dual_solver.dof_handler, + dual_hanging_node_constraints, + primal_solution); ConstraintMatrix primal_hanging_node_constraints; DoFTools::make_hanging_node_constraints (primal_solver.dof_handler, - primal_hanging_node_constraints); + primal_hanging_node_constraints); primal_hanging_node_constraints.close(); Vector dual_weights (dual_solver.dof_handler.n_dofs()); FETools::interpolation_difference (dual_solver.dof_handler, - dual_hanging_node_constraints, - dual_solver.solution, - primal_solver.dof_handler, - primal_hanging_node_constraints, - dual_weights); + dual_hanging_node_constraints, + dual_solver.solution, + primal_solver.dof_handler, + primal_hanging_node_constraints, + dual_weights); FaceIntegrals face_integrals; for (active_cell_iterator cell=dual_solver.dof_handler.begin_active(); - cell!=dual_solver.dof_handler.end(); - ++cell) + cell!=dual_solver.dof_handler.end(); + ++cell) for (unsigned int face_no=0; - face_no::faces_per_cell; - ++face_no) - face_integrals[cell->face(face_no)] = -1e20; + face_no::faces_per_cell; + ++face_no) + face_integrals[cell->face(face_no)] = -1e20; error_indicators.reinit (dual_solver.dof_handler - .get_tria().n_active_cells()); + .get_tria().n_active_cells()); const unsigned int n_threads = multithread_info.n_default_threads; for (unsigned int i=0; i::faces_per_cell; - ++face_no) - { - Assert(face_integrals.find(cell->face(face_no)) != - face_integrals.end(), - ExcInternalError()); - error_indicators(present_cell) - -= 0.5*face_integrals[cell->face(face_no)]; - }; + ++face_no) + { + Assert(face_integrals.find(cell->face(face_no)) != + face_integrals.end(), + ExcInternalError()); + error_indicators(present_cell) + -= 0.5*face_integrals[cell->face(face_no)]; + }; deallog << " Estimated error=" - << std::accumulate (error_indicators.begin(), - error_indicators.end(), 0.) - << std::endl; + << std::accumulate (error_indicators.begin(), + error_indicators.end(), 0.) + << std::endl; } @@ -1719,25 +1721,25 @@ namespace LaplaceSolver void WeightedResidual:: estimate_some (const Vector &primal_solution, - const Vector &dual_weights, - const unsigned int n_threads, - const unsigned int this_thread, - Vector &error_indicators, - FaceIntegrals &face_integrals) const + const Vector &dual_weights, + const unsigned int n_threads, + const unsigned int this_thread, + Vector &error_indicators, + FaceIntegrals &face_integrals) const { const PrimalSolver &primal_solver = *this; const DualSolver &dual_solver = *this; CellData cell_data (*dual_solver.fe, - *dual_solver.quadrature, - *primal_solver.rhs_function); + *dual_solver.quadrature, + *primal_solver.rhs_function); FaceData face_data (*dual_solver.fe, - *dual_solver.face_quadrature); + *dual_solver.face_quadrature); active_cell_iterator cell=dual_solver.dof_handler.begin_active(); for (unsigned int t=0; - (t::faces_per_cell; - ++face_no) - { - if (cell->face(face_no)->at_boundary()) - { - face_integrals[cell->face(face_no)] = 0; - continue; - }; - - if ((cell->neighbor(face_no)->has_children() == false) && - (cell->neighbor(face_no)->level() == cell->level()) && - (cell->neighbor(face_no)->index() < cell->index())) - continue; - - if (cell->at_boundary(face_no) == false) - if (cell->neighbor(face_no)->level() < cell->level()) - continue; - - - if (cell->face(face_no)->has_children() == false) - integrate_over_regular_face (cell, face_no, - primal_solution, - dual_weights, - face_data, - face_integrals); - else - integrate_over_irregular_face (cell, face_no, - primal_solution, - dual_weights, - face_data, - face_integrals); - }; - - for (unsigned int t=0; - ((t::faces_per_cell; + ++face_no) + { + if (cell->face(face_no)->at_boundary()) + { + face_integrals[cell->face(face_no)] = 0; + continue; + }; + + if ((cell->neighbor(face_no)->has_children() == false) && + (cell->neighbor(face_no)->level() == cell->level()) && + (cell->neighbor(face_no)->index() < cell->index())) + continue; + + if (cell->at_boundary(face_no) == false) + if (cell->neighbor(face_no)->level() < cell->level()) + continue; + + + if (cell->face(face_no)->has_children() == false) + integrate_over_regular_face (cell, face_no, + primal_solution, + dual_weights, + face_data, + face_integrals); + else + integrate_over_irregular_face (cell, face_no, + primal_solution, + dual_weights, + face_data, + face_integrals); + }; + + for (unsigned int t=0; + ((t void WeightedResidual:: integrate_over_cell (const active_cell_iterator &cell, - const unsigned int cell_index, - const Vector &primal_solution, - const Vector &dual_weights, - CellData &cell_data, - Vector &error_indicators) const + const unsigned int cell_index, + const Vector &primal_solution, + const Vector &dual_weights, + CellData &cell_data, + Vector &error_indicators) const { cell_data.fe_values.reinit (cell); cell_data.right_hand_side - ->value_list (cell_data.fe_values.get_quadrature_points(), - cell_data.rhs_values); + ->value_list (cell_data.fe_values.get_quadrature_points(), + cell_data.rhs_values); cell_data.fe_values.get_function_2nd_derivatives (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); + cell_data.dual_weights); double sum = 0; for (unsigned int p=0; p void WeightedResidual:: integrate_over_regular_face (const active_cell_iterator &cell, - const unsigned int face_no, - const Vector &primal_solution, - const Vector &dual_weights, - FaceData &face_data, - FaceIntegrals &face_integrals) const + const unsigned int face_no, + const Vector &primal_solution, + const Vector &dual_weights, + FaceData &face_data, + FaceIntegrals &face_integrals) const { const unsigned int - n_q_points = face_data.fe_face_values_cell.n_quadrature_points; + n_q_points = face_data.fe_face_values_cell.n_quadrature_points; face_data.fe_face_values_cell.reinit (cell, face_no); face_data.fe_face_values_cell.get_function_grads (primal_solution, - face_data.cell_grads); + face_data.cell_grads); Assert (cell->neighbor(face_no).state() == IteratorState::valid, - ExcInternalError()); + ExcInternalError()); const unsigned int - neighbor_neighbor = cell->neighbor_of_neighbor (face_no); + neighbor_neighbor = cell->neighbor_of_neighbor (face_no); 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_grads (primal_solution, - face_data.neighbor_grads); + face_data.neighbor_grads); for (unsigned int p=0; pface(face_no)) != face_integrals.end(), - ExcInternalError()); + ExcInternalError()); Assert (face_integrals[cell->face(face_no)] == -1e20, - ExcInternalError()); + ExcInternalError()); face_integrals[cell->face(face_no)] = face_integral; } @@ -1881,72 +1883,72 @@ namespace LaplaceSolver template void WeightedResidual:: integrate_over_irregular_face (const active_cell_iterator &cell, - const unsigned int face_no, - const Vector &primal_solution, - const Vector &dual_weights, - FaceData &face_data, - FaceIntegrals &face_integrals) const + const unsigned int face_no, + const Vector &primal_solution, + const Vector &dual_weights, + FaceData &face_data, + FaceIntegrals &face_integrals) const { const unsigned int - n_q_points = face_data.fe_face_values_cell.n_quadrature_points; + n_q_points = face_data.fe_face_values_cell.n_quadrature_points; const typename DoFHandler::face_iterator - face = cell->face(face_no); + face = cell->face(face_no); const typename DoFHandler::cell_iterator - neighbor = cell->neighbor(face_no); + neighbor = cell->neighbor(face_no); Assert (neighbor.state() == IteratorState::valid, - ExcInternalError()); + ExcInternalError()); Assert (neighbor->has_children(), - ExcInternalError()); + ExcInternalError()); const unsigned int - neighbor_neighbor = cell->neighbor_of_neighbor (face_no); + neighbor_neighbor = cell->neighbor_of_neighbor (face_no); for (unsigned int subface_no=0; - subface_non_children(); ++subface_no) + subface_non_children(); ++subface_no) { - const active_cell_iterator neighbor_child + const active_cell_iterator neighbor_child = cell->neighbor_child_on_subface (face_no, subface_no); - Assert (neighbor_child->face(neighbor_neighbor) == - cell->face(face_no)->child(subface_no), - ExcInternalError()); - - face_data.fe_subface_values_cell.reinit (cell, face_no, subface_no); - face_data.fe_subface_values_cell.get_function_grads (primal_solution, - face_data.cell_grads); - face_data.fe_face_values_neighbor.reinit (neighbor_child, - neighbor_neighbor); - face_data.fe_face_values_neighbor.get_function_grads (primal_solution, - face_data.neighbor_grads); - - for (unsigned int p=0; pface(neighbor_neighbor)] - = face_integral; + Assert (neighbor_child->face(neighbor_neighbor) == + cell->face(face_no)->child(subface_no), + ExcInternalError()); + + face_data.fe_subface_values_cell.reinit (cell, face_no, subface_no); + face_data.fe_subface_values_cell.get_function_grads (primal_solution, + face_data.cell_grads); + face_data.fe_face_values_neighbor.reinit (neighbor_child, + neighbor_neighbor); + face_data.fe_face_values_neighbor.get_function_grads (primal_solution, + face_data.neighbor_grads); + + for (unsigned int p=0; pface(neighbor_neighbor)] + = face_integral; }; double sum = 0; for (unsigned int subface_no=0; - subface_non_children(); ++subface_no) + subface_non_children(); ++subface_no) { - Assert (face_integrals.find(face->child(subface_no)) != - face_integrals.end(), - ExcInternalError()); - Assert (face_integrals[face->child(subface_no)] != -1e20, - ExcInternalError()); + Assert (face_integrals.find(face->child(subface_no)) != + face_integrals.end(), + ExcInternalError()); + Assert (face_integrals[face->child(subface_no)] != -1e20, + ExcInternalError()); - sum += face_integrals[face->child(subface_no)]; + sum += face_integrals[face->child(subface_no)]; }; face_integrals[face] = sum; } @@ -1958,49 +1960,50 @@ namespace LaplaceSolver template struct Framework { - public: - typedef Evaluation::EvaluationBase Evaluator; - typedef std::list EvaluatorList; +public: + typedef Evaluation::EvaluationBase Evaluator; + typedef std::list EvaluatorList; - struct ProblemDescription - { - unsigned int primal_fe_degree; - unsigned int dual_fe_degree; + struct ProblemDescription + { + unsigned int primal_fe_degree; + unsigned int dual_fe_degree; - SmartPointer > data; + SmartPointer > data; - enum RefinementCriterion { - dual_weighted_error_estimator, - global_refinement, - kelly_indicator, - weighted_kelly_indicator - }; + enum RefinementCriterion + { + dual_weighted_error_estimator, + global_refinement, + kelly_indicator, + weighted_kelly_indicator + }; - RefinementCriterion refinement_criterion; + RefinementCriterion refinement_criterion; - SmartPointer > dual_functional; + SmartPointer > dual_functional; - EvaluatorList evaluator_list; + EvaluatorList evaluator_list; - SmartPointer > kelly_weight; + SmartPointer > kelly_weight; - unsigned int max_degrees_of_freedom; + unsigned int max_degrees_of_freedom; - ProblemDescription (); - }; + ProblemDescription (); + }; - static void run (const ProblemDescription &descriptor); + static void run (const ProblemDescription &descriptor); }; template Framework::ProblemDescription::ProblemDescription () - : - primal_fe_degree (1), - dual_fe_degree (2), - refinement_criterion (dual_weighted_error_estimator), - max_degrees_of_freedom (5000) + : + primal_fe_degree (1), + dual_fe_degree (2), + refinement_criterion (dual_weighted_error_estimator), + max_degrees_of_freedom (5000) {} @@ -2009,7 +2012,7 @@ template void Framework::run (const ProblemDescription &descriptor) { Triangulation - triangulation (Triangulation::smoothing_on_refinement); + triangulation (Triangulation::smoothing_on_refinement); descriptor.data->create_coarse_grid (triangulation); const FE_Q primal_fe(descriptor.primal_fe_degree); @@ -2017,89 +2020,89 @@ void Framework::run (const ProblemDescription &descriptor) const QGauss quadrature(descriptor.dual_fe_degree+1); const QGauss face_quadrature(descriptor.dual_fe_degree+1); - LaplaceSolver::Base * solver = 0; + LaplaceSolver::Base *solver = 0; switch (descriptor.refinement_criterion) { - case ProblemDescription::dual_weighted_error_estimator: - { - solver - = new LaplaceSolver::WeightedResidual (triangulation, - primal_fe, - dual_fe, - quadrature, - face_quadrature, - descriptor.data->get_right_hand_side(), - descriptor.data->get_boundary_values(), - *descriptor.dual_functional); - break; - }; + case ProblemDescription::dual_weighted_error_estimator: + { + solver + = new LaplaceSolver::WeightedResidual (triangulation, + primal_fe, + dual_fe, + quadrature, + face_quadrature, + descriptor.data->get_right_hand_side(), + descriptor.data->get_boundary_values(), + *descriptor.dual_functional); + break; + }; - case ProblemDescription::global_refinement: - { - solver - = new LaplaceSolver::RefinementGlobal (triangulation, - primal_fe, - quadrature, - face_quadrature, - descriptor.data->get_right_hand_side(), - descriptor.data->get_boundary_values()); - break; - }; + case ProblemDescription::global_refinement: + { + solver + = new LaplaceSolver::RefinementGlobal (triangulation, + primal_fe, + quadrature, + face_quadrature, + descriptor.data->get_right_hand_side(), + descriptor.data->get_boundary_values()); + break; + }; - case ProblemDescription::kelly_indicator: - { - solver - = new LaplaceSolver::RefinementKelly (triangulation, - primal_fe, - quadrature, - face_quadrature, - descriptor.data->get_right_hand_side(), - descriptor.data->get_boundary_values()); - break; - }; + case ProblemDescription::kelly_indicator: + { + solver + = new LaplaceSolver::RefinementKelly (triangulation, + primal_fe, + quadrature, + face_quadrature, + descriptor.data->get_right_hand_side(), + descriptor.data->get_boundary_values()); + break; + }; - case ProblemDescription::weighted_kelly_indicator: - { - solver - = new LaplaceSolver::RefinementWeightedKelly (triangulation, - primal_fe, - quadrature, - face_quadrature, - descriptor.data->get_right_hand_side(), - descriptor.data->get_boundary_values(), - *descriptor.kelly_weight); - break; - }; + case ProblemDescription::weighted_kelly_indicator: + { + solver + = new LaplaceSolver::RefinementWeightedKelly (triangulation, + primal_fe, + quadrature, + face_quadrature, + descriptor.data->get_right_hand_side(), + descriptor.data->get_boundary_values(), + *descriptor.kelly_weight); + break; + }; - default: - AssertThrow (false, ExcInternalError()); + default: + AssertThrow (false, ExcInternalError()); }; for (unsigned int step=0; true; ++step) { - deallog << "Refinement cycle: " << step - << std::endl; + deallog << "Refinement cycle: " << step + << std::endl; solver->set_refinement_cycle (step); solver->solve_problem (); solver->output_solution (); deallog << " Number of degrees of freedom=" - << solver->n_dofs() << std::endl; + << solver->n_dofs() << std::endl; for (typename EvaluatorList::const_iterator - e = descriptor.evaluator_list.begin(); - e != descriptor.evaluator_list.end(); ++e) - { - (*e)->set_refinement_cycle (step); - solver->postprocess (**e); - }; + e = descriptor.evaluator_list.begin(); + e != descriptor.evaluator_list.end(); ++e) + { + (*e)->set_refinement_cycle (step); + solver->postprocess (**e); + }; if (solver->n_dofs() < descriptor.max_degrees_of_freedom) - solver->refine_grid (); + solver->refine_grid (); else - break; + break; }; deallog << std::endl; @@ -2127,7 +2130,7 @@ int main () Framework::ProblemDescription descriptor; descriptor.refinement_criterion - = Framework::ProblemDescription::dual_weighted_error_estimator; + = Framework::ProblemDescription::dual_weighted_error_estimator; descriptor.primal_fe_degree = 1; descriptor.dual_fe_degree = 2; @@ -2136,12 +2139,12 @@ int main () const Point evaluation_point (0.75, 0.75); descriptor.dual_functional - = new DualFunctional::PointValueEvaluation (evaluation_point); + = new DualFunctional::PointValueEvaluation (evaluation_point); Evaluation::PointValueEvaluation - postprocessor1 (evaluation_point); + postprocessor1 (evaluation_point); Evaluation::GridOutput - postprocessor2 ("grid"); + postprocessor2 ("grid"); descriptor.evaluator_list.push_back (&postprocessor1); descriptor.evaluator_list.push_back (&postprocessor2); @@ -2154,24 +2157,24 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; diff --git a/tests/bits/step-15.cc b/tests/bits/step-15.cc index 4db2458d80..5e637fb656 100644 --- a/tests/bits/step-15.cc +++ b/tests/bits/step-15.cc @@ -70,19 +70,19 @@ double gradient_power (const Tensor<1,dim> &v, -class InitializationValues : public Function<1> +class InitializationValues : public Function<1> { - public: - InitializationValues () : Function<1>() {} - - virtual double value (const Point<1> &p, - const unsigned int component = 0) const; +public: + InitializationValues () : Function<1>() {} + + virtual double value (const Point<1> &p, + const unsigned int component = 0) const; }; double InitializationValues::value (const Point<1> &p, - const unsigned int) const + const unsigned int) const { const double base = std::pow(p(0), 1./3.); const double random = 2.*rand()/RAND_MAX-1; @@ -92,54 +92,54 @@ double InitializationValues::value (const Point<1> &p, template -class MinimizationProblem +class MinimizationProblem { - public: - MinimizationProblem (const unsigned int run_number); - void run (); - - private: - void initialize_solution (); - void setup_system_on_mesh (); - void assemble_step (); - double line_search (const Vector & update) const; - void do_step (); - void output_results () const; - void refine_grid (); - - static double energy (const DoFHandler &dof_handler, - const Vector &function); - - - const unsigned int run_number; - - Triangulation triangulation; - - FE_Q fe; - DoFHandler dof_handler; - - ConstraintMatrix hanging_node_constraints; - - SparsityPattern sparsity_pattern; - SparseMatrix matrix; - - Vector present_solution; - Vector residual; +public: + MinimizationProblem (const unsigned int run_number); + void run (); + +private: + void initialize_solution (); + void setup_system_on_mesh (); + void assemble_step (); + double line_search (const Vector &update) const; + void do_step (); + void output_results () const; + void refine_grid (); + + static double energy (const DoFHandler &dof_handler, + const Vector &function); + + + const unsigned int run_number; + + Triangulation triangulation; + + FE_Q fe; + DoFHandler dof_handler; + + ConstraintMatrix hanging_node_constraints; + + SparsityPattern sparsity_pattern; + SparseMatrix matrix; + + Vector present_solution; + Vector residual; }; template MinimizationProblem::MinimizationProblem (const unsigned int run_number) - : - run_number (run_number), - fe (1), - dof_handler (triangulation) + : + run_number (run_number), + fe (1), + dof_handler (triangulation) {} template <> -void MinimizationProblem<1>::initialize_solution () +void MinimizationProblem<1>::initialize_solution () { present_solution.reinit (dof_handler.n_dofs()); VectorTools::interpolate (dof_handler, @@ -168,12 +168,12 @@ void MinimizationProblem::setup_system_on_mesh () { hanging_node_constraints.clear (); DoFTools::make_hanging_node_constraints (dof_handler, - hanging_node_constraints); + hanging_node_constraints); hanging_node_constraints.close (); sparsity_pattern.reinit (dof_handler.n_dofs(), - dof_handler.n_dofs(), - dof_handler.max_couplings_between_dofs()); + dof_handler.n_dofs(), + dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern); hanging_node_constraints.condense (sparsity_pattern); @@ -190,8 +190,8 @@ void MinimizationProblem::assemble_step () residual.reinit (dof_handler.n_dofs()); QGauss quadrature_formula(4); - FEValues fe_values (fe, quadrature_formula, - update_values | update_gradients | + FEValues fe_values (fe, quadrature_formula, + update_values | update_gradients | update_q_points | update_JxW_values); const unsigned int dofs_per_cell = fe.dofs_per_cell; @@ -206,8 +206,8 @@ void MinimizationProblem::assemble_step () std::vector > local_solution_grads (n_q_points); 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) { cell_matrix = 0; @@ -230,14 +230,14 @@ void MinimizationProblem::assemble_step () for (unsigned int i=0; idiameter() * - cell->diameter() - + - fe_values.shape_value(i,q_point) * - fe_values.shape_value(j,q_point)) * - fe_values.JxW(q_point); + += (fe_values.shape_grad(i,q_point) * + fe_values.shape_grad(j,q_point) * + cell->diameter() * + cell->diameter() + + + fe_values.shape_value(i,q_point) * + fe_values.shape_value(j,q_point)) * + fe_values.JxW(q_point); for (unsigned int i=0; i::assemble_step () fe_values.shape_value(i,q_point) * (x_minus_u3 * - (u_prime * + (u_prime * fe_values.shape_grad(i,q_point)) - (u_prime*u_prime) * u * u * fe_values.shape_value(i,q_point)) - ) + ) * fe_values.JxW(q_point)); } - + cell->get_dof_indices (local_dof_indices); for (unsigned int i=0; i::assemble_step () std::map boundary_values; VectorTools::interpolate_boundary_values (dof_handler, - 0, - ZeroFunction(), - boundary_values); + 0, + ZeroFunction(), + boundary_values); if (dim == 1) VectorTools::interpolate_boundary_values (dof_handler, 1, @@ -282,9 +282,9 @@ void MinimizationProblem::assemble_step () boundary_values); Vector dummy (residual.size()); MatrixTools::apply_boundary_values (boundary_values, - matrix, - dummy, - residual); + matrix, + dummy, + residual); } @@ -302,7 +302,7 @@ MinimizationProblem::line_search (const Vector &update) const const double f_a = energy (dof_handler, tmp); const double dalpha = (alpha != 0 ? alpha/100 : 0.01); - + tmp = present_solution; tmp.add (alpha+dalpha, update); const double f_a_plus = energy (dof_handler, tmp); @@ -328,7 +328,7 @@ MinimizationProblem::line_search (const Vector &update) const tmp = present_solution; tmp.add (alpha+step_length, update); const double e = energy (dof_handler, tmp); - + if (e >= f_a) step_length /= 2; else @@ -345,7 +345,7 @@ MinimizationProblem::line_search (const Vector &update) const template void MinimizationProblem::do_step () -{ +{ assemble_step (); Vector update (present_solution.size()); @@ -353,7 +353,7 @@ void MinimizationProblem::do_step () SolverControl solver_control (residual.size(), 1e-2*residual.l2_norm()); SolverCG<> solver (solver_control); - + PreconditionSSOR<> preconditioner; preconditioner.initialize(matrix); @@ -392,7 +392,7 @@ template <> void MinimizationProblem<1>::refine_grid () { const unsigned int dim = 1; - + Vector error_indicators (triangulation.n_active_cells()); QTrapez quadrature; @@ -409,8 +409,8 @@ void MinimizationProblem<1>::refine_grid () std::vector > local_2nd_derivs (quadrature.size()); 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 cell_index = 0; cell!=endc; ++cell, ++cell_index) { fe_values.reinit (cell); @@ -432,7 +432,7 @@ void MinimizationProblem<1>::refine_grid () 5*(x-u*u*u)*u_doubleprime + 2*u_prime*(1-3*u*u*u_prime))); - + cell_residual_norm += (local_residual_value * local_residual_value * fe_values.JxW(q)); } @@ -474,23 +474,23 @@ void MinimizationProblem<1>::refine_grid () DoFHandler::cell_iterator right_neighbor = cell->neighbor(1); while (right_neighbor->has_children()) right_neighbor = right_neighbor->child(0); - + neighbor_fe_values.reinit (right_neighbor); neighbor_fe_values.get_function_grads (present_solution, local_gradients); const double neighbor_u_prime_right = local_gradients[0][0]; const double right_jump = std::pow(x_right-std::pow(u_right,3), 2) * - (std::pow(neighbor_u_prime_right,5) - - std::pow(u_prime_right,5)); + (std::pow(neighbor_u_prime_right,5) - + std::pow(u_prime_right,5)); error_indicators(cell_index) += right_jump * right_jump * cell->diameter(); - } - } + } + } GridRefinement::refine_and_coarsen_fixed_number (triangulation, - error_indicators, - 0.3, 0.03); + error_indicators, + 0.3, 0.03); triangulation.prepare_coarsening_and_refinement(); SolutionTransfer solution_transfer(dof_handler); @@ -505,8 +505,8 @@ void MinimizationProblem<1>::refine_grid () hanging_node_constraints.clear (); DoFTools::make_hanging_node_constraints (dof_handler, - hanging_node_constraints); - hanging_node_constraints.close (); + hanging_node_constraints); + hanging_node_constraints.close (); hanging_node_constraints.distribute (present_solution); } @@ -518,8 +518,8 @@ MinimizationProblem::energy (const DoFHandler &dof_handler, const Vector &function) { QGauss quadrature_formula(4); - FEValues fe_values (dof_handler.get_fe(), quadrature_formula, - update_values | update_gradients | + FEValues fe_values (dof_handler.get_fe(), quadrature_formula, + update_values | update_gradients | update_q_points | update_JxW_values); const unsigned int n_q_points = quadrature_formula.size(); @@ -530,8 +530,8 @@ MinimizationProblem::energy (const DoFHandler &dof_handler, double energy = 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) { fe_values.reinit (cell); @@ -554,7 +554,7 @@ MinimizationProblem::energy (const DoFHandler &dof_handler, template -void MinimizationProblem::run () +void MinimizationProblem::run () { GridGenerator::hyper_cube (triangulation, 0., 1.); triangulation.refine_global (4); @@ -562,11 +562,11 @@ void MinimizationProblem::run () initialize_solution (); double last_energy = energy (dof_handler, present_solution); - + while (true) { setup_system_on_mesh (); - + for (unsigned int iteration=0; iteration<5; ++iteration) do_step (); @@ -580,20 +580,20 @@ void MinimizationProblem::run () refine_grid (); } - + output_results (); - + deallog << std::endl; } -int main () +int main () { try { deallog << std::setprecision(2); logfile << std::setprecision(2); - + deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); @@ -602,7 +602,7 @@ int main () for (unsigned int realization=0; realization minimization_problem_1d (realization); minimization_problem_1d.run (); } @@ -610,24 +610,24 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } return 0; diff --git a/tests/bits/step-16.cc b/tests/bits/step-16.cc index 46c212fc0a..a5761f861d 100644 --- a/tests/bits/step-16.cc +++ b/tests/bits/step-16.cc @@ -60,38 +60,38 @@ std::ofstream logfile("step-16/output"); template -class LaplaceProblem +class LaplaceProblem { - public: - LaplaceProblem (); - void run (); - - private: - void setup_system (); - void assemble_system (); - void assemble_multigrid (); - void solve (); - void output_results (const unsigned int cycle) const; - - Triangulation triangulation; - FE_Q fe; - MGDoFHandler mg_dof_handler; - - SparsityPattern sparsity_pattern; - SparseMatrix system_matrix; - - MGLevelObject mg_sparsity; - MGLevelObject > mg_matrices; - - Vector solution; - Vector system_rhs; +public: + LaplaceProblem (); + void run (); + +private: + void setup_system (); + void assemble_system (); + void assemble_multigrid (); + void solve (); + void output_results (const unsigned int cycle) const; + + Triangulation triangulation; + FE_Q fe; + MGDoFHandler mg_dof_handler; + + SparsityPattern sparsity_pattern; + SparseMatrix system_matrix; + + MGLevelObject mg_sparsity; + MGLevelObject > mg_matrices; + + Vector solution; + Vector system_rhs; }; template LaplaceProblem::LaplaceProblem () : - fe (1), - mg_dof_handler (triangulation) + fe (1), + mg_dof_handler (triangulation) {} @@ -102,12 +102,12 @@ void LaplaceProblem::setup_system () mg_dof_handler.distribute_dofs (fe); deallog << " Number of degrees of freedom: " - << mg_dof_handler.n_dofs() - << std::endl; + << mg_dof_handler.n_dofs() + << std::endl; sparsity_pattern.reinit (mg_dof_handler.n_dofs(), - mg_dof_handler.n_dofs(), - mg_dof_handler.max_couplings_between_dofs()); + mg_dof_handler.n_dofs(), + mg_dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (static_cast&>(mg_dof_handler), sparsity_pattern); sparsity_pattern.compress(); @@ -121,11 +121,11 @@ void LaplaceProblem::setup_system () mg_matrices.resize(0, nlevels-1); mg_sparsity.resize(0, nlevels-1); - for (unsigned int level=0;level::setup_system () } template -void LaplaceProblem::assemble_system () -{ +void LaplaceProblem::assemble_system () +{ QGauss quadrature_formula(2); - FEValues fe_values (fe, quadrature_formula, - update_values | update_gradients | + FEValues fe_values (fe, quadrature_formula, + update_values | update_gradients | update_q_points | update_JxW_values); const unsigned int dofs_per_cell = fe.dofs_per_cell; @@ -150,39 +150,39 @@ void LaplaceProblem::assemble_system () std::vector local_dof_indices (dofs_per_cell); typename DoFHandler::active_cell_iterator cell = mg_dof_handler.begin_active(), - endc = mg_dof_handler.end(); + endc = mg_dof_handler.end(); for (; cell!=endc; ++cell) { cell_matrix = 0; cell_rhs = 0; fe_values.reinit (cell); - + for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); for (unsigned int i=0; i::assemble_system () template -void LaplaceProblem::assemble_multigrid () -{ +void LaplaceProblem::assemble_multigrid () +{ QGauss quadrature_formula(2); - FEValues fe_values (fe, quadrature_formula, - update_values | update_gradients | + FEValues fe_values (fe, quadrature_formula, + update_values | update_gradients | update_q_points | update_JxW_values); const unsigned int dofs_per_cell = fe.dofs_per_cell; @@ -206,7 +206,7 @@ void LaplaceProblem::assemble_multigrid () std::vector local_dof_indices (dofs_per_cell); typename MGDoFHandler::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(); @@ -215,25 +215,25 @@ void LaplaceProblem::assemble_multigrid () fe_values.reinit (cell); for (unsigned int q_point=0; q_pointget_mg_dof_indices (local_dof_indices); for (unsigned int i=0; i::assemble_multigrid () template -void LaplaceProblem::solve () +void LaplaceProblem::solve () { GrowingVectorMemory<> vector_memory; @@ -255,36 +255,36 @@ void LaplaceProblem::solve () typedef PreconditionSOR > RELAXATION; MGSmootherRelaxation, RELAXATION, Vector > - mg_smoother(vector_memory); + mg_smoother(vector_memory); RELAXATION::AdditionalData smoother_data; mg_smoother.initialize(mg_matrices, smoother_data); - + mg_smoother.set_steps(2); mg_smoother.set_symmetric(true); MGMatrix, Vector > - mg_matrix(&mg_matrices); + mg_matrix(&mg_matrices); Multigrid > mg(mg_dof_handler, - mg_matrix, - mg_coarse, - mg_transfer, - mg_smoother, - mg_smoother); + mg_matrix, + mg_coarse, + mg_transfer, + mg_smoother, + mg_smoother); PreconditionMG, - MGTransferPrebuilt > > - preconditioner(mg_dof_handler, mg, mg_transfer); - + MGTransferPrebuilt > > + preconditioner(mg_dof_handler, mg, mg_transfer); + SolverControl solver_control (1000, 1e-12); SolverCG<> cg (solver_control); - + cg.solve (system_matrix, solution, system_rhs, - preconditioner); + preconditioner); deallog << " " << solver_control.last_step() - << " CG iterations needed to obtain convergence." - << std::endl; + << " CG iterations needed to obtain convergence." + << std::endl; } @@ -300,8 +300,8 @@ void LaplaceProblem::output_results (const unsigned int cycle) const std::ostringstream filename; filename << "solution-" - << cycle - << ".gnuplot"; + << cycle + << ".gnuplot"; data_out.write_gnuplot (deallog.get_file_stream()); } @@ -309,26 +309,26 @@ void LaplaceProblem::output_results (const unsigned int cycle) const template -void LaplaceProblem::run () +void LaplaceProblem::run () { for (unsigned int cycle=0; cycle<6; ++cycle) { deallog << "Cycle " << cycle << ':' << std::endl; if (cycle == 0) - { - GridGenerator::hyper_cube(triangulation); - - } + { + GridGenerator::hyper_cube(triangulation); + + } else - triangulation.refine_global (1); + triangulation.refine_global (1); deallog << " Number of active cells: " - << triangulation.n_active_cells() - << std::endl - << " Total number of cells: " - << triangulation.n_cells() - << std::endl; + << triangulation.n_active_cells() + << std::endl + << " Total number of cells: " + << triangulation.n_cells() + << std::endl; setup_system (); assemble_system (); @@ -338,20 +338,20 @@ void LaplaceProblem::run () }; } - -int main () + +int main () { deallog.depth_console (0); deallog << std::setprecision(2); logfile << std::setprecision(2); - + deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); LaplaceProblem<2> laplace_problem_2d; laplace_problem_2d.run (); - + return 0; } diff --git a/tests/bits/step-16b.cc b/tests/bits/step-16b.cc index 2ffb1b69cf..1e56c9edae 100644 --- a/tests/bits/step-16b.cc +++ b/tests/bits/step-16b.cc @@ -62,38 +62,38 @@ std::ofstream logfile("step-16b/output"); template -class LaplaceProblem +class LaplaceProblem { - public: - LaplaceProblem (); - void run (); - - private: - void setup_system (); - void assemble_system (); - void assemble_multigrid (); - void solve (); - void output_results (const unsigned int cycle) const; - - Triangulation triangulation; - FE_Q fe; - DoFHandler mg_dof_handler; - - SparsityPattern sparsity_pattern; - SparseMatrix system_matrix; - - MGLevelObject mg_sparsity; - MGLevelObject > mg_matrices; - - Vector solution; - Vector system_rhs; +public: + LaplaceProblem (); + void run (); + +private: + void setup_system (); + void assemble_system (); + void assemble_multigrid (); + void solve (); + void output_results (const unsigned int cycle) const; + + Triangulation triangulation; + FE_Q fe; + DoFHandler mg_dof_handler; + + SparsityPattern sparsity_pattern; + SparseMatrix system_matrix; + + MGLevelObject mg_sparsity; + MGLevelObject > mg_matrices; + + Vector solution; + Vector system_rhs; }; template LaplaceProblem::LaplaceProblem () : - fe (1), - mg_dof_handler (triangulation) + fe (1), + mg_dof_handler (triangulation) {} @@ -105,12 +105,12 @@ void LaplaceProblem::setup_system () mg_dof_handler.distribute_mg_dofs (fe); deallog << " Number of degrees of freedom: " - << mg_dof_handler.n_dofs() - << std::endl; + << mg_dof_handler.n_dofs() + << std::endl; sparsity_pattern.reinit (mg_dof_handler.n_dofs(), - mg_dof_handler.n_dofs(), - mg_dof_handler.max_couplings_between_dofs()); + mg_dof_handler.n_dofs(), + mg_dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (static_cast&>(mg_dof_handler), sparsity_pattern); sparsity_pattern.compress(); @@ -124,11 +124,11 @@ void LaplaceProblem::setup_system () mg_matrices.resize(0, nlevels-1); mg_sparsity.resize(0, nlevels-1); - for (unsigned int level=0;level::setup_system () } template -void LaplaceProblem::assemble_system () -{ +void LaplaceProblem::assemble_system () +{ QGauss quadrature_formula(2); - FEValues fe_values (fe, quadrature_formula, - update_values | update_gradients | + FEValues fe_values (fe, quadrature_formula, + update_values | update_gradients | update_q_points | update_JxW_values); const unsigned int dofs_per_cell = fe.dofs_per_cell; @@ -153,39 +153,39 @@ void LaplaceProblem::assemble_system () std::vector local_dof_indices (dofs_per_cell); typename DoFHandler::active_cell_iterator cell = mg_dof_handler.begin_active(), - endc = mg_dof_handler.end(); + endc = mg_dof_handler.end(); for (; cell!=endc; ++cell) { cell_matrix = 0; cell_rhs = 0; fe_values.reinit (cell); - + for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); for (unsigned int i=0; i::assemble_system () template -void LaplaceProblem::assemble_multigrid () -{ +void LaplaceProblem::assemble_multigrid () +{ QGauss quadrature_formula(2); - FEValues fe_values (fe, quadrature_formula, - update_values | update_gradients | + FEValues fe_values (fe, quadrature_formula, + update_values | update_gradients | update_q_points | update_JxW_values); const unsigned int dofs_per_cell = fe.dofs_per_cell; @@ -209,7 +209,7 @@ void LaplaceProblem::assemble_multigrid () std::vector local_dof_indices (dofs_per_cell); typename MGDoFHandler::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(); @@ -218,25 +218,25 @@ void LaplaceProblem::assemble_multigrid () fe_values.reinit (cell); for (unsigned int q_point=0; q_pointget_mg_dof_indices (local_dof_indices); for (unsigned int i=0; i::assemble_multigrid () template -void LaplaceProblem::solve () +void LaplaceProblem::solve () { GrowingVectorMemory<> vector_memory; @@ -258,36 +258,36 @@ void LaplaceProblem::solve () typedef PreconditionSOR > RELAXATION; MGSmootherRelaxation, RELAXATION, Vector > - mg_smoother(vector_memory); + mg_smoother(vector_memory); RELAXATION::AdditionalData smoother_data; mg_smoother.initialize(mg_matrices, smoother_data); - + mg_smoother.set_steps(2); mg_smoother.set_symmetric(true); MGMatrix, Vector > - mg_matrix(&mg_matrices); + mg_matrix(&mg_matrices); Multigrid > mg(mg_dof_handler, - mg_matrix, - mg_coarse, - mg_transfer, - mg_smoother, - mg_smoother); + mg_matrix, + mg_coarse, + mg_transfer, + mg_smoother, + mg_smoother); PreconditionMG, - MGTransferPrebuilt > > - preconditioner(mg_dof_handler, mg, mg_transfer); - + MGTransferPrebuilt > > + preconditioner(mg_dof_handler, mg, mg_transfer); + SolverControl solver_control (1000, 1e-12); SolverCG<> cg (solver_control); - + cg.solve (system_matrix, solution, system_rhs, - preconditioner); + preconditioner); deallog << " " << solver_control.last_step() - << " CG iterations needed to obtain convergence." - << std::endl; + << " CG iterations needed to obtain convergence." + << std::endl; } @@ -303,8 +303,8 @@ void LaplaceProblem::output_results (const unsigned int cycle) const std::ostringstream filename; filename << "solution-" - << cycle - << ".gnuplot"; + << cycle + << ".gnuplot"; data_out.write_gnuplot (deallog.get_file_stream()); } @@ -312,26 +312,26 @@ void LaplaceProblem::output_results (const unsigned int cycle) const template -void LaplaceProblem::run () +void LaplaceProblem::run () { for (unsigned int cycle=0; cycle<6; ++cycle) { deallog << "Cycle " << cycle << ':' << std::endl; if (cycle == 0) - { - GridGenerator::hyper_cube(triangulation); - - } + { + GridGenerator::hyper_cube(triangulation); + + } else - triangulation.refine_global (1); + triangulation.refine_global (1); deallog << " Number of active cells: " - << triangulation.n_active_cells() - << std::endl - << " Total number of cells: " - << triangulation.n_cells() - << std::endl; + << triangulation.n_active_cells() + << std::endl + << " Total number of cells: " + << triangulation.n_cells() + << std::endl; setup_system (); assemble_system (); @@ -341,20 +341,20 @@ void LaplaceProblem::run () }; } - -int main () + +int main () { deallog.depth_console (0); deallog << std::setprecision(2); logfile << std::setprecision(2); - + deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); LaplaceProblem<2> laplace_problem_2d; laplace_problem_2d.run (); - + return 0; } diff --git a/tests/bits/step-2.cc b/tests/bits/step-2.cc index f456c9d7b5..1d8541bdd2 100644 --- a/tests/bits/step-2.cc +++ b/tests/bits/step-2.cc @@ -43,47 +43,47 @@ void make_grid (Triangulation<2> &triangulation) { const Point<2> center (1,0); const double inner_radius = 0.5, - outer_radius = 1.0; + outer_radius = 1.0; GridGenerator::hyper_shell (triangulation, - center, inner_radius, outer_radius, + center, inner_radius, outer_radius, 10); static const HyperShellBoundary<2> boundary_description(center); triangulation.set_boundary (0, boundary_description); - + for (unsigned int step=0; step<5; ++step) { 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 vertex=0; - vertex < GeometryInfo<2>::vertices_per_cell; - ++vertex) - { + for (unsigned int vertex=0; + vertex < GeometryInfo<2>::vertices_per_cell; + ++vertex) + { const double distance_from_center = center.distance (cell->vertex(vertex)); - - if (std::fabs(distance_from_center - inner_radius) < 1e-10) - { - cell->set_refine_flag (); - break; - } - } + + if (std::fabs(distance_from_center - inner_radius) < 1e-10) + { + cell->set_refine_flag (); + break; + } + } triangulation.execute_coarsening_and_refinement (); } } -void distribute_dofs (DoFHandler<2> &dof_handler) +void distribute_dofs (DoFHandler<2> &dof_handler) { static const FE_Q<2> finite_element(1); dof_handler.distribute_dofs (finite_element); SparsityPattern sparsity_pattern (dof_handler.n_dofs(), - dof_handler.n_dofs(), + dof_handler.n_dofs(), 20); DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern); @@ -94,11 +94,11 @@ void distribute_dofs (DoFHandler<2> &dof_handler) -void renumber_dofs (DoFHandler<2> &dof_handler) +void renumber_dofs (DoFHandler<2> &dof_handler) { DoFRenumbering::Cuthill_McKee (dof_handler); SparsityPattern sparsity_pattern (dof_handler.n_dofs(), - dof_handler.n_dofs()); + dof_handler.n_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern); sparsity_pattern.compress (); @@ -110,13 +110,13 @@ void renumber_dofs (DoFHandler<2> &dof_handler) -int main () +int main () { deallog << std::setprecision(2); - + deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); Triangulation<2> triangulation; make_grid (triangulation); diff --git a/tests/bits/step-3.cc b/tests/bits/step-3.cc index bc3533cf89..4b87d0209c 100644 --- a/tests/bits/step-3.cc +++ b/tests/bits/step-3.cc @@ -55,34 +55,34 @@ std::ofstream logfile("step-3/output"); -class LaplaceProblem +class LaplaceProblem { - public: - LaplaceProblem (); - - void run (); - - private: - void make_grid_and_dofs (); - void assemble_system (); - void solve (); - void output_results () const; - - Triangulation<2> triangulation; - FE_Q<2> fe; - DoFHandler<2> dof_handler; - - SparsityPattern sparsity_pattern; - SparseMatrix system_matrix; - - Vector solution; - Vector system_rhs; +public: + LaplaceProblem (); + + void run (); + +private: + void make_grid_and_dofs (); + void assemble_system (); + void solve (); + void output_results () const; + + Triangulation<2> triangulation; + FE_Q<2> fe; + DoFHandler<2> dof_handler; + + SparsityPattern sparsity_pattern; + SparseMatrix system_matrix; + + Vector solution; + Vector system_rhs; }; LaplaceProblem::LaplaceProblem () : - fe (1), - dof_handler (triangulation) + fe (1), + dof_handler (triangulation) {} @@ -92,20 +92,20 @@ void LaplaceProblem::make_grid_and_dofs () GridGenerator::hyper_cube (triangulation, -1, 1); triangulation.refine_global (5); deallog << "Number of active cells: " - << triangulation.n_active_cells() - << std::endl; + << triangulation.n_active_cells() + << std::endl; deallog << "Total number of cells: " - << triangulation.n_cells() - << std::endl; - + << triangulation.n_cells() + << std::endl; + dof_handler.distribute_dofs (fe); deallog << "Number of degrees of freedom: " - << dof_handler.n_dofs() - << std::endl; + << dof_handler.n_dofs() + << std::endl; sparsity_pattern.reinit (dof_handler.n_dofs(), - dof_handler.n_dofs(), - dof_handler.max_couplings_between_dofs()); + dof_handler.n_dofs(), + dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern); sparsity_pattern.compress(); @@ -117,12 +117,12 @@ void LaplaceProblem::make_grid_and_dofs () -void LaplaceProblem::assemble_system () +void LaplaceProblem::assemble_system () { QGauss<2> quadrature_formula(2); - FEValues<2> x_fe_values (fe, quadrature_formula, - update_values | update_gradients | update_JxW_values); - + FEValues<2> x_fe_values (fe, quadrature_formula, + update_values | update_gradients | update_JxW_values); + const unsigned int dofs_per_cell = fe.dofs_per_cell; const unsigned int n_q_points = quadrature_formula.size(); @@ -132,63 +132,63 @@ void LaplaceProblem::assemble_system () 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) { x_fe_values.reinit (cell); const FEValues<2> &fe_values = x_fe_values.get_present_fe_values(); - + cell_matrix = 0; cell_rhs = 0; for (unsigned int i=0; iget_dof_indices (local_dof_indices); for (unsigned int i=0; i boundary_values; VectorTools::interpolate_boundary_values (dof_handler, - 0, - ZeroFunction<2>(), - boundary_values); + 0, + ZeroFunction<2>(), + boundary_values); MatrixTools::apply_boundary_values (boundary_values, - system_matrix, - solution, - system_rhs); + system_matrix, + solution, + system_rhs); } -void LaplaceProblem::solve () +void LaplaceProblem::solve () { SolverControl solver_control (1000, 1e-12); SolverCG<> cg (solver_control); cg.solve (system_matrix, solution, system_rhs, - PreconditionIdentity()); + PreconditionIdentity()); } @@ -205,7 +205,7 @@ void LaplaceProblem::output_results () const -void LaplaceProblem::run () +void LaplaceProblem::run () { make_grid_and_dofs (); assemble_system (); @@ -215,14 +215,14 @@ void LaplaceProblem::run () -int main () +int main () { deallog << std::setprecision(2); logfile << std::setprecision(2); - + deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); LaplaceProblem laplace_problem; laplace_problem.run (); diff --git a/tests/bits/step-4.cc b/tests/bits/step-4.cc index eb867d58ee..2afb325c57 100644 --- a/tests/bits/step-4.cc +++ b/tests/bits/step-4.cc @@ -54,51 +54,51 @@ std::ofstream logfile("step-4/output"); template -class LaplaceProblem +class LaplaceProblem { - public: - LaplaceProblem (); - void run (); - - private: - void make_grid_and_dofs (); - void assemble_system (); - void solve (); - void output_results () const; - - Triangulation triangulation; - FE_Q fe; - DoFHandler dof_handler; - - SparsityPattern sparsity_pattern; - SparseMatrix system_matrix; - - Vector solution; - Vector system_rhs; +public: + LaplaceProblem (); + void run (); + +private: + void make_grid_and_dofs (); + void assemble_system (); + void solve (); + void output_results () const; + + Triangulation triangulation; + FE_Q fe; + DoFHandler dof_handler; + + SparsityPattern sparsity_pattern; + SparseMatrix system_matrix; + + Vector solution; + Vector system_rhs; }; template -class RightHandSide : public Function +class RightHandSide : public Function { - public: - RightHandSide () : Function() {} - - virtual double value (const Point &p, - const unsigned int component = 0) const; +public: + RightHandSide () : Function() {} + + virtual double value (const Point &p, + const unsigned int component = 0) const; }; template -class BoundaryValues : public Function +class BoundaryValues : public Function { - public: - BoundaryValues () : Function() {} - - virtual double value (const Point &p, - const unsigned int component = 0) const; +public: + BoundaryValues () : Function() {} + + virtual double value (const Point &p, + const unsigned int component = 0) const; }; @@ -106,7 +106,7 @@ class BoundaryValues : public Function template double RightHandSide::value (const Point &p, - const unsigned int /*component*/) const + const unsigned int /*component*/) const { double return_value = 0; for (unsigned int i=0; i::value (const Point &p, template double BoundaryValues::value (const Point &p, - const unsigned int /*component*/) const + const unsigned int /*component*/) const { return p.square(); } @@ -131,8 +131,8 @@ double BoundaryValues::value (const Point &p, template LaplaceProblem::LaplaceProblem () : - fe (1), - dof_handler (triangulation) + fe (1), + dof_handler (triangulation) {} @@ -142,23 +142,23 @@ void LaplaceProblem::make_grid_and_dofs () { GridGenerator::hyper_cube (triangulation, -1, 1); triangulation.refine_global (2); - + deallog << " Number of active cells: " - << triangulation.n_active_cells() - << std::endl - << " Total number of cells: " - << triangulation.n_cells() - << std::endl; + << triangulation.n_active_cells() + << std::endl + << " Total number of cells: " + << triangulation.n_cells() + << std::endl; dof_handler.distribute_dofs (fe); deallog << " Number of degrees of freedom: " - << dof_handler.n_dofs() - << std::endl; + << dof_handler.n_dofs() + << std::endl; sparsity_pattern.reinit (dof_handler.n_dofs(), - dof_handler.n_dofs(), - dof_handler.max_couplings_between_dofs()); + dof_handler.n_dofs(), + dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern); sparsity_pattern.compress(); @@ -171,15 +171,15 @@ void LaplaceProblem::make_grid_and_dofs () template -void LaplaceProblem::assemble_system () -{ +void LaplaceProblem::assemble_system () +{ QGauss quadrature_formula (2); const RightHandSide right_hand_side; - FEValues x_fe_values (fe, quadrature_formula, - update_values | update_gradients | - update_q_points | update_JxW_values); + FEValues x_fe_values (fe, quadrature_formula, + update_values | update_gradients | + update_q_points | update_JxW_values); const unsigned int dofs_per_cell = fe.dofs_per_cell; const unsigned int n_q_points = quadrature_formula.size(); @@ -190,66 +190,66 @@ void LaplaceProblem::assemble_system () std::vector local_dof_indices (dofs_per_cell); typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), - endc = dof_handler.end(); + endc = dof_handler.end(); for (; cell!=endc; ++cell) { x_fe_values.reinit (cell); const FEValues &fe_values = x_fe_values.get_present_fe_values(); - + cell_matrix = 0; cell_rhs = 0; for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); for (unsigned int i=0; i boundary_values; VectorTools::interpolate_boundary_values (dof_handler, - 0, - BoundaryValues(), - boundary_values); + 0, + BoundaryValues(), + boundary_values); MatrixTools::apply_boundary_values (boundary_values, - system_matrix, - solution, - system_rhs); + system_matrix, + solution, + system_rhs); } template -void LaplaceProblem::solve () +void LaplaceProblem::solve () { SolverControl solver_control (1000, 1e-12); SolverCG<> cg (solver_control); cg.solve (system_matrix, solution, system_rhs, - PreconditionIdentity()); + PreconditionIdentity()); deallog << " " << solver_control.last_step() - << " CG iterations needed to obtain convergence." - << std::endl; + << " CG iterations needed to obtain convergence." + << std::endl; } @@ -271,10 +271,10 @@ void LaplaceProblem::output_results () const template -void LaplaceProblem::run () +void LaplaceProblem::run () { deallog << "Solving problem in " << dim << " space dimensions." << std::endl; - + make_grid_and_dofs(); assemble_system (); solve (); @@ -283,25 +283,25 @@ void LaplaceProblem::run () -int main () +int main () { deallog << std::setprecision(2); logfile << std::setprecision(2); - + deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); deallog.depth_console (0); { LaplaceProblem<2> laplace_problem_2d; laplace_problem_2d.run (); } - + { LaplaceProblem<3> laplace_problem_3d; laplace_problem_3d.run (); } - + return 0; } diff --git a/tests/bits/step-5.cc b/tests/bits/step-5.cc index 28c5c0f7f8..0602fcdde5 100644 --- a/tests/bits/step-5.cc +++ b/tests/bits/step-5.cc @@ -56,50 +56,50 @@ std::ofstream logfile("step-5/output"); template -class LaplaceProblem +class LaplaceProblem { - public: - LaplaceProblem (); - void run (); - - private: - void setup_system (); - void assemble_system (); - void solve (); - void output_results (const unsigned int cycle) const; - - Triangulation triangulation; - FE_Q fe; - DoFHandler dof_handler; - - SparsityPattern sparsity_pattern; - SparseMatrix system_matrix; - - Vector solution; - Vector system_rhs; +public: + LaplaceProblem (); + void run (); + +private: + void setup_system (); + void assemble_system (); + void solve (); + void output_results (const unsigned int cycle) const; + + Triangulation triangulation; + FE_Q fe; + DoFHandler dof_handler; + + SparsityPattern sparsity_pattern; + SparseMatrix system_matrix; + + Vector solution; + Vector system_rhs; }; template -class Coefficient : public Function +class Coefficient : public Function { - public: - Coefficient () : Function() {} - - virtual double value (const Point &p, - const unsigned int component = 0) const; - - virtual void value_list (const std::vector > &points, - std::vector &values, - const unsigned int component = 0) const; +public: + Coefficient () : Function() {} + + virtual double value (const Point &p, + const unsigned int component = 0) const; + + virtual void value_list (const std::vector > &points, + std::vector &values, + const unsigned int component = 0) const; }; template double Coefficient::value (const Point &p, - const unsigned int /*component*/) const + const unsigned int /*component*/) const { if (p.square() < 0.5*0.5) return 20; @@ -112,23 +112,23 @@ double Coefficient::value (const Point &p, template void Coefficient::value_list (const std::vector > &points, - std::vector &values, - const unsigned int component) const + std::vector &values, + const unsigned int component) const { - Assert (values.size() == points.size(), - ExcDimensionMismatch (values.size(), points.size())); - - Assert (component == 0, - ExcIndexRange (component, 0, 1)); + Assert (values.size() == points.size(), + ExcDimensionMismatch (values.size(), points.size())); + + Assert (component == 0, + ExcIndexRange (component, 0, 1)); const unsigned int n_points = points.size(); for (unsigned int i=0; i::value_list (const std::vector > &points, template LaplaceProblem::LaplaceProblem () : - fe (1), - dof_handler (triangulation) + fe (1), + dof_handler (triangulation) {} @@ -150,12 +150,12 @@ void LaplaceProblem::setup_system () dof_handler.distribute_dofs (fe); deallog << " Number of degrees of freedom: " - << dof_handler.n_dofs() - << std::endl; + << dof_handler.n_dofs() + << std::endl; sparsity_pattern.reinit (dof_handler.n_dofs(), - dof_handler.n_dofs(), - dof_handler.max_couplings_between_dofs()); + dof_handler.n_dofs(), + dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern); sparsity_pattern.compress(); @@ -169,13 +169,13 @@ void LaplaceProblem::setup_system () template -void LaplaceProblem::assemble_system () -{ +void LaplaceProblem::assemble_system () +{ QGauss quadrature_formula (2); - FEValues x_fe_values (fe, quadrature_formula, - update_values | update_gradients | - update_q_points | update_JxW_values); + FEValues x_fe_values (fe, quadrature_formula, + update_values | update_gradients | + update_q_points | update_JxW_values); const unsigned int dofs_per_cell = fe.dofs_per_cell; const unsigned int n_q_points = quadrature_formula.size(); @@ -189,8 +189,8 @@ void LaplaceProblem::assemble_system () std::vector coefficient_values (n_q_points); 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) { cell_matrix = 0; @@ -200,50 +200,50 @@ void LaplaceProblem::assemble_system () const FEValues<2> &fe_values = x_fe_values.get_present_fe_values(); coefficient.value_list (fe_values.get_quadrature_points(), - coefficient_values); - + coefficient_values); + for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); for (unsigned int i=0; i boundary_values; VectorTools::interpolate_boundary_values (dof_handler, - 0, - ZeroFunction(), - boundary_values); + 0, + ZeroFunction(), + boundary_values); MatrixTools::apply_boundary_values (boundary_values, - system_matrix, - solution, - system_rhs); + system_matrix, + solution, + system_rhs); } template -void LaplaceProblem::solve () +void LaplaceProblem::solve () { SolverControl solver_control (1000, 1e-12); SolverCG<> cg (solver_control); @@ -252,11 +252,11 @@ void LaplaceProblem::solve () preconditioner.initialize(system_matrix, 1.2); cg.solve (system_matrix, solution, system_rhs, - preconditioner); + preconditioner); deallog << " " << solver_control.last_step() - << " CG iterations needed to obtain convergence." - << std::endl; + << " CG iterations needed to obtain convergence." + << std::endl; } @@ -264,10 +264,10 @@ void LaplaceProblem::solve () template void LaplaceProblem::output_results (const unsigned int cycle) const { - // reduce output a bit + // reduce output a bit if (cycle >= 2) return; - + DataOut > data_out; data_out.attach_dof_handler (dof_handler); @@ -288,33 +288,33 @@ void LaplaceProblem::output_results (const unsigned int cycle) const template -void LaplaceProblem::run () +void LaplaceProblem::run () { for (unsigned int cycle=0; cycle<6; ++cycle) { deallog << "Cycle " << cycle << ':' << std::endl; if (cycle != 0) - triangulation.refine_global (1); + triangulation.refine_global (1); else - { - GridIn grid_in; - grid_in.attach_triangulation (triangulation); - std::ifstream input_file("step-5/circle-grid.inp"); - Assert (dim==2, ExcInternalError()); - - grid_in.read_ucd (input_file); - - static const HyperBallBoundary boundary; - triangulation.set_boundary (0, boundary); - } + { + GridIn grid_in; + grid_in.attach_triangulation (triangulation); + std::ifstream input_file("step-5/circle-grid.inp"); + Assert (dim==2, ExcInternalError()); + + grid_in.read_ucd (input_file); + + static const HyperBallBoundary boundary; + triangulation.set_boundary (0, boundary); + } deallog << " Number of active cells: " - << triangulation.n_active_cells() - << std::endl - << " Total number of cells: " - << triangulation.n_cells() - << std::endl; + << triangulation.n_active_cells() + << std::endl + << " Total number of cells: " + << triangulation.n_cells() + << std::endl; setup_system (); assemble_system (); @@ -325,26 +325,26 @@ void LaplaceProblem::run () -int main () +int main () { deallog << std::setprecision(2); logfile << std::setprecision(2); - + deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); deallog.depth_console (0); LaplaceProblem<2> laplace_problem_2d; laplace_problem_2d.run (); -/* - Coefficient<2> coefficient; - std::vector > points (2); - std::vector coefficient_values (1); - coefficient.value_list (points, coefficient_values); -*/ - + /* + Coefficient<2> coefficient; + std::vector > points (2); + std::vector coefficient_values (1); + coefficient.value_list (points, coefficient_values); + */ + return 0; } diff --git a/tests/bits/step-6.cc b/tests/bits/step-6.cc index 09be3cc438..d81074dd7f 100644 --- a/tests/bits/step-6.cc +++ b/tests/bits/step-6.cc @@ -64,57 +64,57 @@ std::ofstream logfile("step-6/output"); template -class LaplaceProblem +class LaplaceProblem { - public: - LaplaceProblem (); - ~LaplaceProblem (); +public: + LaplaceProblem (); + ~LaplaceProblem (); - void run (); - - private: - void setup_system (); - void assemble_system (); - void solve (); - void refine_grid (); - void output_results (const unsigned int cycle) const; + void run (); - Triangulation triangulation; +private: + void setup_system (); + void assemble_system (); + void solve (); + void refine_grid (); + void output_results (const unsigned int cycle) const; - DoFHandler dof_handler; - FE_Q fe; + Triangulation triangulation; - ConstraintMatrix hanging_node_constraints; + DoFHandler dof_handler; + FE_Q fe; - SparsityPattern sparsity_pattern; - SparseMatrix system_matrix; + ConstraintMatrix hanging_node_constraints; - Vector solution; - Vector system_rhs; + SparsityPattern sparsity_pattern; + SparseMatrix system_matrix; + + Vector solution; + Vector system_rhs; }; template -class Coefficient : public Function +class Coefficient : public Function { - public: - Coefficient () : Function() {} - - virtual double value (const Point &p, - const unsigned int component = 0) const; - - virtual void value_list (const std::vector > &points, - std::vector &values, - const unsigned int component = 0) const; +public: + Coefficient () : Function() {} + + virtual double value (const Point &p, + const unsigned int component = 0) const; + + virtual void value_list (const std::vector > &points, + std::vector &values, + const unsigned int component = 0) const; }; template double Coefficient::value (const Point &p, - const unsigned int) const + const unsigned int) const { if (p.square() < 0.5*0.5) return 20; @@ -126,23 +126,23 @@ double Coefficient::value (const Point &p, template void Coefficient::value_list (const std::vector > &points, - std::vector &values, - const unsigned int component) const + std::vector &values, + const unsigned int component) const { const unsigned int n_points = points.size(); - Assert (values.size() == n_points, - ExcDimensionMismatch (values.size(), n_points)); - - Assert (component == 0, - ExcIndexRange (component, 0, 1)); - + Assert (values.size() == n_points, + ExcDimensionMismatch (values.size(), n_points)); + + Assert (component == 0, + ExcIndexRange (component, 0, 1)); + for (unsigned int i=0; i::value_list (const std::vector > &points, template LaplaceProblem::LaplaceProblem () : - dof_handler (triangulation), - fe (2) + dof_handler (triangulation), + fe (2) {} template -LaplaceProblem::~LaplaceProblem () +LaplaceProblem::~LaplaceProblem () { dof_handler.clear (); } @@ -171,17 +171,17 @@ void LaplaceProblem::setup_system () dof_handler.distribute_dofs (fe); sparsity_pattern.reinit (dof_handler.n_dofs(), - dof_handler.n_dofs(), - dof_handler.max_couplings_between_dofs()); + dof_handler.n_dofs(), + dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern); solution.reinit (dof_handler.n_dofs()); system_rhs.reinit (dof_handler.n_dofs()); - + hanging_node_constraints.clear (); DoFTools::make_hanging_node_constraints (dof_handler, - hanging_node_constraints); + hanging_node_constraints); hanging_node_constraints.close (); @@ -194,13 +194,13 @@ void LaplaceProblem::setup_system () template -void LaplaceProblem::assemble_system () -{ +void LaplaceProblem::assemble_system () +{ const QGauss quadrature_formula (3); - FEValues x_fe_values (fe, quadrature_formula, - update_values | update_gradients | - update_q_points | update_JxW_values); + FEValues x_fe_values (fe, quadrature_formula, + update_values | update_gradients | + update_q_points | update_JxW_values); const unsigned int dofs_per_cell = fe.dofs_per_cell; const unsigned int n_q_points = quadrature_formula.size(); @@ -214,8 +214,8 @@ void LaplaceProblem::assemble_system () std::vector coefficient_values (n_q_points); 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) { cell_matrix = 0; @@ -223,34 +223,34 @@ void LaplaceProblem::assemble_system () x_fe_values.reinit (cell); const FEValues &fe_values = x_fe_values.get_present_fe_values(); - + coefficient.value_list (fe_values.get_quadrature_points(), - coefficient_values); - + coefficient_values); + for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); for (unsigned int i=0; i::assemble_system () std::map boundary_values; VectorTools::interpolate_boundary_values (dof_handler, - 0, - ZeroFunction(), - boundary_values); + 0, + ZeroFunction(), + boundary_values); MatrixTools::apply_boundary_values (boundary_values, - system_matrix, - solution, - system_rhs); + system_matrix, + solution, + system_rhs); } @@ -272,7 +272,7 @@ void LaplaceProblem::assemble_system () template -void LaplaceProblem::solve () +void LaplaceProblem::solve () { SolverControl solver_control (1000, 1e-12); SolverCG<> cg (solver_control); @@ -281,7 +281,7 @@ void LaplaceProblem::solve () preconditioner.initialize(system_matrix, 1.2); cg.solve (system_matrix, solution, system_rhs, - preconditioner); + preconditioner); hanging_node_constraints.distribute (solution); } @@ -294,14 +294,14 @@ void LaplaceProblem::refine_grid () Vector estimated_error_per_cell (triangulation.n_active_cells()); KellyErrorEstimator::estimate (dof_handler, - QGauss(3), - typename FunctionMap::type(), - solution, - estimated_error_per_cell); + QGauss(3), + typename FunctionMap::type(), + solution, + estimated_error_per_cell); GridRefinement::refine_and_coarsen_fixed_number (triangulation, - estimated_error_per_cell, - 0.3, 0.03); + estimated_error_per_cell, + 0.3, 0.03); triangulation.execute_coarsening_and_refinement (); } @@ -313,13 +313,13 @@ void LaplaceProblem::output_results (const unsigned int cycle) const { if (cycle%3 != 0) return; - + Assert (cycle < 10, ExcNotImplemented()); std::string filename = "grid-"; filename += ('0' + cycle); filename += ".eps"; - + GridOut grid_out; grid_out.write_eps (triangulation, deallog.get_file_stream()); } @@ -328,35 +328,35 @@ void LaplaceProblem::output_results (const unsigned int cycle) const template -void LaplaceProblem::run () +void LaplaceProblem::run () { for (unsigned int cycle=0; cycle<4; ++cycle) { deallog << "Cycle " << cycle << ':' << std::endl; if (cycle == 0) - { - GridGenerator::hyper_ball (triangulation); + { + GridGenerator::hyper_ball (triangulation); - static const HyperBallBoundary boundary; - triangulation.set_boundary (0, boundary); + static const HyperBallBoundary boundary; + triangulation.set_boundary (0, boundary); - triangulation.refine_global (1); - } + triangulation.refine_global (1); + } else - refine_grid (); - + refine_grid (); + 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 (); output_results (cycle); @@ -364,27 +364,27 @@ void LaplaceProblem::run () DataOutBase::EpsFlags eps_flags; eps_flags.z_scaling = 4; - + DataOut > data_out; data_out.set_flags (eps_flags); data_out.attach_dof_handler (dof_handler); data_out.add_data_vector (solution, "solution"); data_out.build_patches (); - + data_out.write_eps (deallog.get_file_stream()); } -int main () +int main () { deallog << std::setprecision(2); logfile << std::setprecision(2); - + deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); try { @@ -396,25 +396,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } diff --git a/tests/bits/step-7.cc b/tests/bits/step-7.cc index 0cdd150b96..2e65593c03 100644 --- a/tests/bits/step-7.cc +++ b/tests/bits/step-7.cc @@ -62,28 +62,30 @@ std::ofstream logfile("step-7/output"); template -class SolutionBase +class SolutionBase { - protected: - static const unsigned int n_source_centers = 3; - static const Point source_centers[n_source_centers]; - static const double width; +protected: + static const unsigned int n_source_centers = 3; + static const Point source_centers[n_source_centers]; + static const double width; }; 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 double SolutionBase::width = 1./3.; @@ -92,51 +94,51 @@ const double SolutionBase::width = 1./3.; template class Solution : public Function, - protected SolutionBase + protected SolutionBase { - public: - Solution () : Function() {} - - virtual double value (const Point &p, - const unsigned int component = 0) const; - - virtual Tensor<1,dim> gradient (const Point &p, - const unsigned int component = 0) const; +public: + Solution () : Function() {} + + virtual double value (const Point &p, + const unsigned int component = 0) const; + + virtual Tensor<1,dim> gradient (const Point &p, + const unsigned int component = 0) const; }; template double Solution::value (const Point &p, - const unsigned int) const + const unsigned int) const { double return_value = 0; for (unsigned int i=0; in_source_centers; ++i) { const Point x_minus_xi = p - this->source_centers[i]; return_value += std::exp(-x_minus_xi.square() / - (this->width * this->width)); + (this->width * this->width)); } - + return return_value; } template Tensor<1,dim> Solution::gradient (const Point &p, - const unsigned int) const + const unsigned int) const { Tensor<1,dim> return_value; for (unsigned int i=0; in_source_centers; ++i) { const Point x_minus_xi = p - this->source_centers[i]; - + return_value += (-2 / (this->width * this->width) * - std::exp(-x_minus_xi.square() / - (this->width * this->width)) * - x_minus_xi); + std::exp(-x_minus_xi.square() / + (this->width * this->width)) * + x_minus_xi); } - + return return_value; } @@ -144,77 +146,78 @@ Tensor<1,dim> Solution::gradient (const Point &p, template class RightHandSide : public Function, - protected SolutionBase + protected SolutionBase { - public: - RightHandSide () : Function() {} - - virtual double value (const Point &p, - const unsigned int component = 0) const; +public: + RightHandSide () : Function() {} + + virtual double value (const Point &p, + const unsigned int component = 0) const; }; template double RightHandSide::value (const Point &p, - const unsigned int) const + const unsigned int) const { double return_value = 0; for (unsigned int i=0; in_source_centers; ++i) { const Point x_minus_xi = p - this->source_centers[i]; - + return_value += ((2*dim - 4*x_minus_xi.square()/ - (this->width * this->width)) / - (this->width * this->width) * - std::exp(-x_minus_xi.square() / - (this->width * this->width))); + (this->width * this->width)) / + (this->width * this->width) * + std::exp(-x_minus_xi.square() / + (this->width * this->width))); return_value += std::exp(-x_minus_xi.square() / - (this->width * this->width)); + (this->width * this->width)); } - + return return_value; } template -class HelmholtzProblem +class HelmholtzProblem { - public: - enum RefinementMode { - global_refinement, adaptive_refinement - }; - - HelmholtzProblem (const FiniteElement &fe, - const RefinementMode refinement_mode); +public: + enum RefinementMode + { + global_refinement, adaptive_refinement + }; - ~HelmholtzProblem (); + HelmholtzProblem (const FiniteElement &fe, + const RefinementMode refinement_mode); - void run (); - - private: - void setup_system (); - void assemble_system (); - void solve (); - void refine_grid (); - void process_solution (const unsigned int cycle); + ~HelmholtzProblem (); - Triangulation triangulation; - DoFHandler dof_handler; + void run (); - SmartPointer > fe; +private: + void setup_system (); + void assemble_system (); + void solve (); + void refine_grid (); + void process_solution (const unsigned int cycle); - ConstraintMatrix hanging_node_constraints; + Triangulation triangulation; + DoFHandler dof_handler; - SparsityPattern sparsity_pattern; - SparseMatrix system_matrix; + SmartPointer > fe; - Vector solution; - Vector system_rhs; + ConstraintMatrix hanging_node_constraints; - const RefinementMode refinement_mode; + SparsityPattern sparsity_pattern; + SparseMatrix system_matrix; - ConvergenceTable convergence_table; + Vector solution; + Vector system_rhs; + + const RefinementMode refinement_mode; + + ConvergenceTable convergence_table; }; @@ -223,15 +226,15 @@ class HelmholtzProblem template HelmholtzProblem::HelmholtzProblem (const FiniteElement &fe, const RefinementMode refinement_mode) : - dof_handler (triangulation), - fe (&fe), - refinement_mode (refinement_mode) + dof_handler (triangulation), + fe (&fe), + refinement_mode (refinement_mode) {} template -HelmholtzProblem::~HelmholtzProblem () +HelmholtzProblem::~HelmholtzProblem () { dof_handler.clear (); } @@ -246,12 +249,12 @@ void HelmholtzProblem::setup_system () hanging_node_constraints.clear (); DoFTools::make_hanging_node_constraints (dof_handler, - hanging_node_constraints); + hanging_node_constraints); hanging_node_constraints.close (); sparsity_pattern.reinit (dof_handler.n_dofs(), - dof_handler.n_dofs(), - dof_handler.max_couplings_between_dofs()); + dof_handler.n_dofs(), + dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern); hanging_node_constraints.condense (sparsity_pattern); sparsity_pattern.compress(); @@ -265,8 +268,8 @@ void HelmholtzProblem::setup_system () template -void HelmholtzProblem::assemble_system () -{ +void HelmholtzProblem::assemble_system () +{ QGauss quadrature_formula (3); QGauss face_quadrature_formula (3); @@ -279,23 +282,23 @@ void HelmholtzProblem::assemble_system () Vector cell_rhs (dofs_per_cell); std::vector local_dof_indices (dofs_per_cell); - - FEValues x_fe_values (*fe, quadrature_formula, - update_values | update_gradients | - update_q_points | update_JxW_values); - FEFaceValues x_fe_face_values (*fe, face_quadrature_formula, - update_values | update_q_points | - update_normal_vectors | update_JxW_values); + FEValues x_fe_values (*fe, quadrature_formula, + update_values | update_gradients | + update_q_points | update_JxW_values); + + FEFaceValues x_fe_face_values (*fe, face_quadrature_formula, + update_values | update_q_points | + update_normal_vectors | update_JxW_values); const RightHandSide right_hand_side; std::vector rhs_values (n_q_points); const Solution exact_solution; - + 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) { cell_matrix = 0; @@ -306,55 +309,55 @@ void HelmholtzProblem::assemble_system () right_hand_side.value_list (fe_values.get_quadrature_points(), rhs_values); - + for (unsigned int q_point=0; q_point::faces_per_cell; ++face) - if (cell->face(face)->at_boundary() + if (cell->face(face)->at_boundary() && (cell->face(face)->boundary_indicator() == 1)) - { - x_fe_face_values.reinit (cell, face); - const FEFaceValues &fe_face_values - = x_fe_face_values.get_present_fe_values (); - - for (unsigned int q_point=0; q_point &fe_face_values + = x_fe_face_values.get_present_fe_values (); + + for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); for (unsigned int i=0; i::assemble_system () std::map boundary_values; VectorTools::interpolate_boundary_values (dof_handler, - 0, - Solution(), - boundary_values); + 0, + Solution(), + boundary_values); MatrixTools::apply_boundary_values (boundary_values, - system_matrix, - solution, - system_rhs); + system_matrix, + solution, + system_rhs); } template -void HelmholtzProblem::solve () +void HelmholtzProblem::solve () { SolverControl solver_control (1000, 1e-12); SolverCG<> cg (solver_control); @@ -383,7 +386,7 @@ void HelmholtzProblem::solve () preconditioner.initialize(system_matrix, 1.2); cg.solve (system_matrix, solution, system_rhs, - preconditioner); + preconditioner); hanging_node_constraints.distribute (solution); } @@ -393,38 +396,38 @@ void HelmholtzProblem::solve () template void HelmholtzProblem::refine_grid () { - switch (refinement_mode) + switch (refinement_mode) { - case global_refinement: - { - triangulation.refine_global (1); - break; - } + case global_refinement: + { + triangulation.refine_global (1); + break; + } - case adaptive_refinement: - { - Vector estimated_error_per_cell (triangulation.n_active_cells()); - - typename FunctionMap::type neumann_boundary; - KellyErrorEstimator::estimate (dof_handler, - QGauss(3), - neumann_boundary, - solution, - estimated_error_per_cell); - - GridRefinement::refine_and_coarsen_fixed_number (triangulation, - estimated_error_per_cell, - 0.3, 0.03); - - triangulation.execute_coarsening_and_refinement (); - - break; - } + case adaptive_refinement: + { + Vector estimated_error_per_cell (triangulation.n_active_cells()); - default: - { - Assert (false, ExcNotImplemented()); - } + typename FunctionMap::type neumann_boundary; + KellyErrorEstimator::estimate (dof_handler, + QGauss(3), + neumann_boundary, + solution, + estimated_error_per_cell); + + GridRefinement::refine_and_coarsen_fixed_number (triangulation, + estimated_error_per_cell, + 0.3, 0.03); + + triangulation.execute_coarsening_and_refinement (); + + break; + } + + default: + { + Assert (false, ExcNotImplemented()); + } } } @@ -435,42 +438,42 @@ void HelmholtzProblem::process_solution (const unsigned int cycle) { Vector difference_per_cell (triangulation.n_active_cells()); VectorTools::integrate_difference (dof_handler, - solution, - Solution(), - difference_per_cell, - QGauss(3), - VectorTools::L2_norm); + solution, + Solution(), + difference_per_cell, + QGauss(3), + VectorTools::L2_norm); const double L2_error = difference_per_cell.l2_norm(); VectorTools::integrate_difference (dof_handler, - solution, - Solution(), - difference_per_cell, - QGauss(3), - VectorTools::H1_seminorm); + solution, + Solution(), + difference_per_cell, + QGauss(3), + VectorTools::H1_seminorm); const double H1_error = difference_per_cell.l2_norm(); const QTrapez<1> q_trapez; const QIterated q_iterated (q_trapez, 5); VectorTools::integrate_difference (dof_handler, - solution, - Solution(), - difference_per_cell, - q_iterated, - VectorTools::Linfty_norm); + solution, + Solution(), + difference_per_cell, + q_iterated, + VectorTools::Linfty_norm); const double Linfty_error = difference_per_cell.linfty_norm(); const unsigned int n_active_cells=triangulation.n_active_cells(); const unsigned int n_dofs=dof_handler.n_dofs(); - - deallog << "Cycle " << cycle << ':' - << std::endl - << " Number of active cells: " - << n_active_cells - << std::endl - << " Number of degrees of freedom: " - << n_dofs - << std::endl; + + deallog << "Cycle " << cycle << ':' + << std::endl + << " Number of active cells: " + << n_active_cells + << std::endl + << " Number of degrees of freedom: " + << n_dofs + << std::endl; convergence_table.add_value("cycle", cycle); convergence_table.add_value("cells", n_active_cells); @@ -483,67 +486,67 @@ void HelmholtzProblem::process_solution (const unsigned int cycle) template -void HelmholtzProblem::run () +void HelmholtzProblem::run () { for (unsigned int cycle=0; cycle<4; ++cycle) { if (cycle == 0) - { - GridGenerator::hyper_cube (triangulation, -1, 1); - triangulation.refine_global (1); + { + GridGenerator::hyper_cube (triangulation, -1, 1); + triangulation.refine_global (1); typename Triangulation::cell_iterator - cell = triangulation.begin (), - endc = triangulation.end(); - for (; cell!=endc; ++cell) - for (unsigned int face=0; + cell = triangulation.begin (), + endc = triangulation.end(); + for (; cell!=endc; ++cell) + for (unsigned int face=0; face::faces_per_cell; ++face) - if ((cell->face(face)->center()(0) == -1) - || - (cell->face(face)->center()(1) == -1)) - cell->face(face)->set_boundary_indicator (1); - } + if ((cell->face(face)->center()(0) == -1) + || + (cell->face(face)->center()(1) == -1)) + cell->face(face)->set_boundary_indicator (1); + } else refine_grid (); - + setup_system (); - + assemble_system (); solve (); process_solution (cycle); } - + if (refinement_mode == adaptive_refinement) { std::string gmv_filename; switch (refinement_mode) - { - case global_refinement: - gmv_filename = "solution-global"; - break; - case adaptive_refinement: - gmv_filename = "solution-adaptive"; - break; - default: - Assert (false, ExcNotImplemented()); - } + { + case global_refinement: + gmv_filename = "solution-global"; + break; + case adaptive_refinement: + gmv_filename = "solution-adaptive"; + break; + default: + Assert (false, ExcNotImplemented()); + } switch ((*fe).degree) - { - case 1: - gmv_filename += "-q1"; - break; - case 2: - gmv_filename += "-q2"; - break; - - default: - Assert (false, ExcNotImplemented()); - } + { + case 1: + gmv_filename += "-q1"; + break; + case 2: + gmv_filename += "-q2"; + break; + + default: + Assert (false, ExcNotImplemented()); + } gmv_filename += ".gmv"; @@ -554,9 +557,9 @@ void HelmholtzProblem::run () data_out.build_patches ((*fe).degree); data_out.write_gmv (deallog.get_file_stream()); } - - - + + + convergence_table.set_precision("L2", 3); convergence_table.set_precision("H1", 3); convergence_table.set_precision("Linfty", 3); @@ -576,43 +579,43 @@ void HelmholtzProblem::run () deallog << std::endl; convergence_table.write_text(deallog.get_file_stream()); - + std::string error_filename = "error"; switch (refinement_mode) { - case global_refinement: - error_filename += "-global"; - break; - case adaptive_refinement: - error_filename += "-adaptive"; - break; - default: - Assert (false, ExcNotImplemented()); + case global_refinement: + error_filename += "-global"; + break; + case adaptive_refinement: + error_filename += "-adaptive"; + break; + default: + Assert (false, ExcNotImplemented()); } switch ((*fe).degree) { - case 1: - error_filename += "-q1"; - break; - case 2: - error_filename += "-q2"; - break; - default: - Assert (false, ExcNotImplemented()); + case 1: + error_filename += "-q1"; + break; + case 2: + error_filename += "-q2"; + break; + default: + Assert (false, ExcNotImplemented()); } - + error_filename += ".tex"; - + convergence_table.write_tex(deallog.get_file_stream()); - + if (refinement_mode==global_refinement) { convergence_table.add_column_to_supercolumn("cycle", "n cells"); convergence_table.add_column_to_supercolumn("cells", "n cells"); - + std::vector new_order; new_order.push_back("n cells"); new_order.push_back("H1"); @@ -620,38 +623,38 @@ void HelmholtzProblem::run () convergence_table.set_column_order (new_order); convergence_table - .evaluate_convergence_rates("L2", ConvergenceTable::reduction_rate); + .evaluate_convergence_rates("L2", ConvergenceTable::reduction_rate); convergence_table - .evaluate_convergence_rates("L2", ConvergenceTable::reduction_rate_log2); + .evaluate_convergence_rates("L2", ConvergenceTable::reduction_rate_log2); convergence_table - .evaluate_convergence_rates("H1", ConvergenceTable::reduction_rate_log2); + .evaluate_convergence_rates("H1", ConvergenceTable::reduction_rate_log2); deallog << std::endl; convergence_table.write_text(deallog.get_file_stream()); std::string conv_filename = "convergence"; switch (refinement_mode) - { - case global_refinement: - conv_filename += "-global"; - break; - case adaptive_refinement: - conv_filename += "-adaptive"; - break; - default: - Assert (false, ExcNotImplemented()); - } + { + case global_refinement: + conv_filename += "-global"; + break; + case adaptive_refinement: + conv_filename += "-adaptive"; + break; + default: + Assert (false, ExcNotImplemented()); + } switch ((*fe).degree) - { - case 1: - conv_filename += "-q1"; - break; - case 2: - conv_filename += "-q2"; - break; - default: - Assert (false, ExcNotImplemented()); - } + { + case 1: + conv_filename += "-q1"; + break; + case 2: + conv_filename += "-q2"; + break; + default: + Assert (false, ExcNotImplemented()); + } conv_filename += ".tex"; convergence_table.write_tex(deallog.get_file_stream()); @@ -659,86 +662,86 @@ void HelmholtzProblem::run () } -int main () +int main () { deallog << std::setprecision(2); logfile << std::setprecision(2); - + deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); const unsigned int dim = 2; try { deallog.depth_console (0); - - + + { - deallog << "Solving with Q1 elements, adaptive refinement" << std::endl - << "=============================================" << std::endl - << std::endl; - - FE_Q fe(1); - HelmholtzProblem - helmholtz_problem_2d (fe, HelmholtzProblem::adaptive_refinement); + deallog << "Solving with Q1 elements, adaptive refinement" << std::endl + << "=============================================" << std::endl + << std::endl; - helmholtz_problem_2d.run (); + FE_Q fe(1); + HelmholtzProblem + helmholtz_problem_2d (fe, HelmholtzProblem::adaptive_refinement); - deallog << std::endl; + helmholtz_problem_2d.run (); + + deallog << std::endl; } - + { - deallog << "Solving with Q1 elements, global refinement" << std::endl - << "===========================================" << std::endl - << std::endl; - - FE_Q fe(1); - HelmholtzProblem - helmholtz_problem_2d (fe, HelmholtzProblem::global_refinement); + deallog << "Solving with Q1 elements, global refinement" << std::endl + << "===========================================" << std::endl + << std::endl; + + FE_Q fe(1); + HelmholtzProblem + helmholtz_problem_2d (fe, HelmholtzProblem::global_refinement); - helmholtz_problem_2d.run (); + helmholtz_problem_2d.run (); - deallog << std::endl; + deallog << std::endl; } - + { - deallog << "Solving with Q2 elements, global refinement" << std::endl - << "===========================================" << std::endl - << std::endl; - - FE_Q fe(2); - HelmholtzProblem - helmholtz_problem_2d (fe, HelmholtzProblem::global_refinement); + deallog << "Solving with Q2 elements, global refinement" << std::endl + << "===========================================" << std::endl + << std::endl; + + FE_Q fe(2); + HelmholtzProblem + helmholtz_problem_2d (fe, HelmholtzProblem::global_refinement); - helmholtz_problem_2d.run (); + helmholtz_problem_2d.run (); - deallog << std::endl; + deallog << std::endl; } - + } catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } diff --git a/tests/bits/step-8.cc b/tests/bits/step-8.cc index a78da97b73..13821512c9 100644 --- a/tests/bits/step-8.cc +++ b/tests/bits/step-8.cc @@ -59,96 +59,96 @@ std::ofstream logfile("step-8/output"); template -class ElasticProblem +class ElasticProblem { - public: - ElasticProblem (); - ~ElasticProblem (); - void run (); - - private: - void setup_system (); - void assemble_system (); - void solve (); - void refine_grid (); - void output_results (const unsigned int cycle) const; - - Triangulation triangulation; - DoFHandler dof_handler; - - FESystem fe; - - ConstraintMatrix hanging_node_constraints; - - SparsityPattern sparsity_pattern; - SparseMatrix system_matrix; - - Vector solution; - Vector system_rhs; +public: + ElasticProblem (); + ~ElasticProblem (); + void run (); + +private: + void setup_system (); + void assemble_system (); + void solve (); + void refine_grid (); + void output_results (const unsigned int cycle) const; + + Triangulation triangulation; + DoFHandler dof_handler; + + FESystem fe; + + ConstraintMatrix hanging_node_constraints; + + SparsityPattern sparsity_pattern; + SparseMatrix system_matrix; + + Vector solution; + Vector system_rhs; }; template -class RightHandSide : public Function +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; +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; }; template RightHandSide::RightHandSide () - : - Function (dim) + : + Function (dim) {} template inline void RightHandSide::vector_value (const Point &p, - Vector &values) const + Vector &values) const { - Assert (values.size() == dim, - ExcDimensionMismatch (values.size(), dim)); + Assert (values.size() == dim, + ExcDimensionMismatch (values.size(), dim)); Assert (dim >= 2, ExcNotImplemented()); - + Point point_1, point_2; point_1(0) = 0.5; point_2(0) = -0.5; - + if (((p-point_1).square() < 0.2*0.2) || ((p-point_2).square() < 0.2*0.2)) values(0) = 1; else values(0) = 0; - + if (p.square() < 0.2*0.2) values(1) = 1; else - values(1) = 0; + values(1) = 0; } template void RightHandSide::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())); + 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]); + value_list[p]); } @@ -158,16 +158,16 @@ void RightHandSide::vector_value_list (const std::vector > &poin template ElasticProblem::ElasticProblem () - : - dof_handler (triangulation), - fe (FE_Q(1), dim) + : + dof_handler (triangulation), + fe (FE_Q(1), dim) {} template -ElasticProblem::~ElasticProblem () +ElasticProblem::~ElasticProblem () { dof_handler.clear (); } @@ -180,11 +180,11 @@ void ElasticProblem::setup_system () dof_handler.distribute_dofs (fe); hanging_node_constraints.clear (); DoFTools::make_hanging_node_constraints (dof_handler, - hanging_node_constraints); + hanging_node_constraints); hanging_node_constraints.close (); sparsity_pattern.reinit (dof_handler.n_dofs(), - dof_handler.n_dofs(), - dof_handler.max_couplings_between_dofs()); + dof_handler.n_dofs(), + dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern); hanging_node_constraints.condense (sparsity_pattern); @@ -200,13 +200,13 @@ void ElasticProblem::setup_system () template -void ElasticProblem::assemble_system () -{ +void ElasticProblem::assemble_system () +{ QGauss quadrature_formula (2); - FEValues x_fe_values (fe, quadrature_formula, - update_values | update_gradients | - update_q_points | update_JxW_values); + FEValues x_fe_values (fe, quadrature_formula, + update_values | update_gradients | + update_q_points | update_JxW_values); const unsigned int dofs_per_cell = fe.dofs_per_cell; const unsigned int n_q_points = quadrature_formula.size(); @@ -223,11 +223,11 @@ void ElasticProblem::assemble_system () RightHandSide right_hand_side; std::vector > rhs_values (n_q_points, - Vector(dim)); + Vector(dim)); typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), - endc = dof_handler.end(); + endc = dof_handler.end(); for (; cell!=endc; ++cell) { cell_matrix = 0; @@ -235,70 +235,70 @@ void ElasticProblem::assemble_system () x_fe_values.reinit (cell); const FEValues &fe_values = x_fe_values.get_present_fe_values(); - + lambda.value_list (fe_values.get_quadrature_points(), lambda_values); mu.value_list (fe_values.get_quadrature_points(), mu_values); right_hand_side.vector_value_list (fe_values.get_quadrature_points(), - rhs_values); - + rhs_values); + for (unsigned int i=0; iget_dof_indices (local_dof_indices); for (unsigned int i=0; i::assemble_system () std::map boundary_values; VectorTools::interpolate_boundary_values (dof_handler, - 0, - ZeroFunction(dim), - boundary_values); + 0, + ZeroFunction(dim), + boundary_values); MatrixTools::apply_boundary_values (boundary_values, - system_matrix, - solution, - system_rhs); + system_matrix, + solution, + system_rhs); } template -void ElasticProblem::solve () +void ElasticProblem::solve () { SolverControl solver_control (1000, 1e-12); SolverCG<> cg (solver_control); @@ -328,7 +328,7 @@ void ElasticProblem::solve () preconditioner.initialize(system_matrix, 1.2); cg.solve (system_matrix, solution, system_rhs, - preconditioner); + preconditioner); hanging_node_constraints.distribute (solution); } @@ -342,14 +342,14 @@ void ElasticProblem::refine_grid () typename FunctionMap::type neumann_boundary; KellyErrorEstimator::estimate (dof_handler, - QGauss(2), - neumann_boundary, - solution, - estimated_error_per_cell); + QGauss(2), + neumann_boundary, + solution, + estimated_error_per_cell); GridRefinement::refine_and_coarsen_fixed_number (triangulation, - estimated_error_per_cell, - 0.3, 0.03); + estimated_error_per_cell, + 0.3, 0.03); triangulation.execute_coarsening_and_refinement (); } @@ -362,33 +362,33 @@ void ElasticProblem::output_results (const unsigned int cycle) const std::string filename = "solution-"; filename += ('0' + cycle); Assert (cycle < 10, ExcInternalError()); - + filename += ".gmv"; DataOut > data_out; data_out.attach_dof_handler (dof_handler); - + std::vector solution_names; switch (dim) { - case 1: - solution_names.push_back ("displacement"); - break; - case 2: - solution_names.push_back ("x_displacement"); - solution_names.push_back ("y_displacement"); - break; - case 3: - solution_names.push_back ("x_displacement"); - solution_names.push_back ("y_displacement"); - solution_names.push_back ("z_displacement"); - break; - default: - Assert (false, ExcNotImplemented()); + case 1: + solution_names.push_back ("displacement"); + break; + case 2: + solution_names.push_back ("x_displacement"); + solution_names.push_back ("y_displacement"); + break; + case 3: + solution_names.push_back ("x_displacement"); + solution_names.push_back ("y_displacement"); + solution_names.push_back ("z_displacement"); + break; + default: + Assert (false, ExcNotImplemented()); } - + data_out.add_data_vector (solution, solution_names); data_out.build_patches (); data_out.write_gmv (deallog.get_file_stream()); @@ -398,30 +398,30 @@ void ElasticProblem::output_results (const unsigned int cycle) const template -void ElasticProblem::run () +void ElasticProblem::run () { for (unsigned int cycle=0; cycle<4; ++cycle) { deallog << "Cycle " << cycle << ':' << std::endl; if (cycle == 0) - { - GridGenerator::hyper_cube (triangulation, -1, 1); - triangulation.refine_global (2); - } + { + GridGenerator::hyper_cube (triangulation, -1, 1); + triangulation.refine_global (2); + } else - refine_grid (); + refine_grid (); 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 (); output_results (cycle); @@ -429,14 +429,14 @@ void ElasticProblem::run () } -int main () +int main () { deallog << std::setprecision(2); logfile << std::setprecision(2); - + deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); try { @@ -448,25 +448,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } diff --git a/tests/bits/subdomain_ids_01.cc b/tests/bits/subdomain_ids_01.cc index 3b3f0f64d2..2c883cb6a2 100644 --- a/tests/bits/subdomain_ids_01.cc +++ b/tests/bits/subdomain_ids_01.cc @@ -47,40 +47,40 @@ void test () GridGenerator::hyper_cube(tria, -1, 1); tria.refine_global (2); - // we now have a number of cells, - // flag them with some subdomain - // ids based on their position, in - // particular we take the quadrant - // (octant) + // we now have a number of cells, + // flag them with some subdomain + // ids based on their position, in + // particular we take the quadrant + // (octant) typename Triangulation::active_cell_iterator - cell = tria.begin_active (), - endc = tria.end (); + cell = tria.begin_active (), + endc = tria.end (); for (; cell!=endc; ++cell) { unsigned int subdomain = 0; for (unsigned int d=0; dcenter()(d) > 0) - subdomain |= (1<center()(d) > 0) + subdomain |= (1<set_subdomain_id (subdomain); }; - // distribute some degrees of freedom and - // output some information on them + // distribute some degrees of freedom and + // output some information on them FESystem fe(FE_Q(2),dim, FE_DGQ(1), 1); DoFHandler dof_handler (tria); dof_handler.distribute_dofs (fe); deallog << dof_handler.n_dofs() << std::endl; - + std::vector selected_dofs (dof_handler.n_dofs()); for (unsigned int subdomain=0; subdomain<(1< (); test<2> (); test<3> (); - + return 0; } diff --git a/tests/bits/subdomain_ids_02.cc b/tests/bits/subdomain_ids_02.cc index af263c1f05..8055b9cd93 100644 --- a/tests/bits/subdomain_ids_02.cc +++ b/tests/bits/subdomain_ids_02.cc @@ -47,53 +47,53 @@ void test () GridGenerator::hyper_cube(tria, -1, 1); tria.refine_global (2); - // we now have a number of cells, - // flag them with some subdomain - // ids based on their position, in - // particular we take the quadrant - // (octant) + // we now have a number of cells, + // flag them with some subdomain + // ids based on their position, in + // particular we take the quadrant + // (octant) typename Triangulation::active_cell_iterator - cell = tria.begin_active (), - endc = tria.end (); + cell = tria.begin_active (), + endc = tria.end (); for (; cell!=endc; ++cell) { unsigned int subdomain = 0; for (unsigned int d=0; dcenter()(d) > 0) - subdomain |= (1<center()(d) > 0) + subdomain |= (1<set_subdomain_id (subdomain); }; - // distribute some degrees of freedom and - // output some information on them + // distribute some degrees of freedom and + // output some information on them FESystem fe(FE_Q(2),dim, FE_DGQ(1), 1); DoFHandler dof_handler (tria); dof_handler.distribute_dofs (fe); deallog << dof_handler.n_dofs() << std::endl; - + std::vector subdomain_association (dof_handler.n_dofs()); DoFTools::get_subdomain_association (dof_handler, subdomain_association); for (unsigned int subdomain=0; subdomain<(1< (); test<2> (); test<3> (); - + return 0; } diff --git a/tests/bits/subdomain_ids_03.cc b/tests/bits/subdomain_ids_03.cc index fd5b03fb71..424de837b2 100644 --- a/tests/bits/subdomain_ids_03.cc +++ b/tests/bits/subdomain_ids_03.cc @@ -48,27 +48,27 @@ void test () GridGenerator::hyper_cube(tria, -1, 1); tria.refine_global (2); - // we now have a number of cells, - // flag them with some subdomain - // ids based on their position, in - // particular we take the quadrant - // (octant) + // we now have a number of cells, + // flag them with some subdomain + // ids based on their position, in + // particular we take the quadrant + // (octant) typename Triangulation::active_cell_iterator - cell = tria.begin_active (), - endc = tria.end (); + cell = tria.begin_active (), + endc = tria.end (); for (; cell!=endc; ++cell) { unsigned int subdomain = 0; for (unsigned int d=0; dcenter()(d) > 0) - subdomain |= (1<center()(d) > 0) + subdomain |= (1<set_subdomain_id (subdomain); }; - // distribute some degrees of freedom and - // output some information on them + // distribute some degrees of freedom and + // output some information on them FESystem fe(FE_Q(2),dim, FE_DGQ(1), 1); DoFHandler dof_handler (tria); dof_handler.distribute_dofs (fe); @@ -92,6 +92,6 @@ int main () test<1> (); test<2> (); test<3> (); - + return 0; } diff --git a/tests/bits/subdomain_ids_04.cc b/tests/bits/subdomain_ids_04.cc index 8c9dde3403..03128047b4 100644 --- a/tests/bits/subdomain_ids_04.cc +++ b/tests/bits/subdomain_ids_04.cc @@ -48,41 +48,41 @@ void test () GridGenerator::hyper_cube(tria, -1, 1); tria.refine_global (2); - // we now have a number of cells, - // flag them with some subdomain - // ids based on their position, in - // particular we take the quadrant - // (octant) + // we now have a number of cells, + // flag them with some subdomain + // ids based on their position, in + // particular we take the quadrant + // (octant) typename Triangulation::active_cell_iterator - cell = tria.begin_active (), - endc = tria.end (); + cell = tria.begin_active (), + endc = tria.end (); for (; cell!=endc; ++cell) { unsigned int subdomain = 0; for (unsigned int d=0; dcenter()(d) > 0) - subdomain |= (1<center()(d) > 0) + subdomain |= (1<set_subdomain_id (subdomain); }; - // distribute some degrees of freedom and - // output some information on them + // distribute some degrees of freedom and + // output some information on them FESystem fe(FE_Q(2),dim, FE_DGQ(1), 1); DoFHandler dof_handler (tria); dof_handler.distribute_dofs (fe); deallog << dof_handler.n_dofs() << std::endl; - // renumber by subdomain + // renumber by subdomain DoFRenumbering::subdomain_wise (dof_handler); - // then get the subdomain association of - // all dofs. this should yield consecutive - // regions of dofs with increasing - // subdomain numbers. first output these - // numbers, then also check that this is - // indeed so + // then get the subdomain association of + // all dofs. this should yield consecutive + // regions of dofs with increasing + // subdomain numbers. first output these + // numbers, then also check that this is + // indeed so std::vector subdomain_association (dof_handler.n_dofs()); DoFTools::get_subdomain_association (dof_handler, subdomain_association); @@ -93,8 +93,8 @@ void test () for (unsigned int i=0; i (); test<2> (); test<3> (); - + return 0; } diff --git a/tests/bits/subdomain_ids_05.cc b/tests/bits/subdomain_ids_05.cc index a0c1e864a6..6e8ef37b36 100644 --- a/tests/bits/subdomain_ids_05.cc +++ b/tests/bits/subdomain_ids_05.cc @@ -47,39 +47,39 @@ void test () GridGenerator::hyper_cube(tria, -1, 1); tria.refine_global (2); - // we now have a number of cells, - // flag them with some subdomain - // ids based on their position, in - // particular we take the quadrant - // (octant) + // we now have a number of cells, + // flag them with some subdomain + // ids based on their position, in + // particular we take the quadrant + // (octant) typename Triangulation::active_cell_iterator - cell = tria.begin_active (), - endc = tria.end (); + cell = tria.begin_active (), + endc = tria.end (); for (; cell!=endc; ++cell) { unsigned int subdomain = 0; for (unsigned int d=0; dcenter()(d) > 0) - subdomain |= (1<center()(d) > 0) + subdomain |= (1<set_subdomain_id (subdomain); }; - // distribute some degrees of freedom and - // output some information on them + // distribute some degrees of freedom and + // output some information on them FESystem fe(FE_Q(2),dim, FE_DGQ(1), 1); DoFHandler dof_handler (tria); dof_handler.distribute_dofs (fe); deallog << dof_handler.n_dofs() << std::endl; - + std::vector subdomain_association (dof_handler.n_dofs()); DoFTools::get_subdomain_association (dof_handler, subdomain_association); for (unsigned int subdomain=0; subdomain<(1< (std::count (subdomain_association.begin(), subdomain_association.end(), subdomain)) @@ -102,6 +102,6 @@ int main () test<1> (); test<2> (); test<3> (); - + return 0; } diff --git a/tests/bits/subdomain_ids_06.cc b/tests/bits/subdomain_ids_06.cc index 2177aed099..1a757f25da 100644 --- a/tests/bits/subdomain_ids_06.cc +++ b/tests/bits/subdomain_ids_06.cc @@ -47,20 +47,20 @@ void test () GridGenerator::hyper_cube(tria, -1, 1); tria.refine_global (2); - // we now have a number of cells, - // flag them with some subdomain - // ids based on their position, in - // particular we take the quadrant - // (octant) + // we now have a number of cells, + // flag them with some subdomain + // ids based on their position, in + // particular we take the quadrant + // (octant) typename Triangulation::active_cell_iterator - cell = tria.begin_active (), - endc = tria.end (); + cell = tria.begin_active (), + endc = tria.end (); for (; cell!=endc; ++cell) { unsigned int subdomain = 0; for (unsigned int d=0; dcenter()(d) > 0) - subdomain |= (1<center()(d) > 0) + subdomain |= (1<set_subdomain_id (subdomain); @@ -71,9 +71,9 @@ void test () subdomain_association); for (unsigned int subdomain=0; subdomain<(1< (std::count (subdomain_association.begin(), subdomain_association.end(), subdomain)) @@ -82,14 +82,14 @@ void test () subdomain), ExcInternalError()); - // ...and that this is also the correct - // number + // ...and that this is also the correct + // number Assert (GridTools::count_cells_with_subdomain_association (tria, subdomain) == (tria.n_active_cells() / (1< (); test<2> (); test<3> (); - + return 0; } diff --git a/tests/bits/subdomain_ids_07.cc b/tests/bits/subdomain_ids_07.cc index 3ca5236f0a..cea67bc4d3 100644 --- a/tests/bits/subdomain_ids_07.cc +++ b/tests/bits/subdomain_ids_07.cc @@ -47,27 +47,27 @@ void test () GridGenerator::hyper_cube(tria, -1, 1); tria.refine_global (2); - // we now have a number of cells, - // flag them with some subdomain - // ids based on their position, in - // particular we take the quadrant - // (octant) + // we now have a number of cells, + // flag them with some subdomain + // ids based on their position, in + // particular we take the quadrant + // (octant) typename Triangulation::active_cell_iterator - cell = tria.begin_active (), - endc = tria.end (); + cell = tria.begin_active (), + endc = tria.end (); for (; cell!=endc; ++cell) { unsigned int subdomain = 0; for (unsigned int d=0; dcenter()(d) > 0) - subdomain |= (1<center()(d) > 0) + subdomain |= (1<set_subdomain_id (subdomain); }; - // distribute some degrees of freedom and - // output some information on them + // distribute some degrees of freedom and + // output some information on them FESystem fe(FE_Q(2),dim, FE_DGQ(1), 1); DoFHandler dof_handler (tria); dof_handler.distribute_dofs (fe); @@ -79,18 +79,18 @@ void test () for (unsigned int subdomain=0; subdomain<(1< &fe1, if (dim == 1) return; - // check all combinations of fe1 and fe2 + // check all combinations of fe1 and fe2 for (unsigned int subface=0; subface::max_children_per_face; ++subface) { FullMatrix face_constraints; try - { - face_constraints.reinit (fe1.dofs_per_face, - fe1.dofs_per_face); - fe1.get_subface_interpolation_matrix (fe1, subface, face_constraints); - - deallog << fe1.get_name() - << " vs. " - << fe1.get_name() - << std::endl; - output_matrix (face_constraints); - } + { + face_constraints.reinit (fe1.dofs_per_face, + fe1.dofs_per_face); + fe1.get_subface_interpolation_matrix (fe1, subface, face_constraints); + + deallog << fe1.get_name() + << " vs. " + << fe1.get_name() + << std::endl; + output_matrix (face_constraints); + } catch (...) - { - } + { + } try - { - face_constraints.reinit (fe2.dofs_per_face, - fe2.dofs_per_face); - fe2.get_subface_interpolation_matrix (fe2, subface, face_constraints); - - deallog << fe2.get_name() - << " vs. " - << fe2.get_name() - << std::endl; - output_matrix (face_constraints); - } + { + face_constraints.reinit (fe2.dofs_per_face, + fe2.dofs_per_face); + fe2.get_subface_interpolation_matrix (fe2, subface, face_constraints); + + deallog << fe2.get_name() + << " vs. " + << fe2.get_name() + << std::endl; + output_matrix (face_constraints); + } catch (...) - { - } + { + } if (fe1.dofs_per_face <= fe2.dofs_per_face) - try - { - face_constraints.reinit (fe2.dofs_per_face, - fe1.dofs_per_face); - fe1.get_subface_interpolation_matrix (fe2, subface, face_constraints); - - deallog << fe1.get_name() - << " vs. " - << fe2.get_name() - << std::endl; - output_matrix (face_constraints); - } - catch (...) - { - } + try + { + face_constraints.reinit (fe2.dofs_per_face, + fe1.dofs_per_face); + fe1.get_subface_interpolation_matrix (fe2, subface, face_constraints); + + deallog << fe1.get_name() + << " vs. " + << fe2.get_name() + << std::endl; + output_matrix (face_constraints); + } + catch (...) + { + } if (fe2.dofs_per_face <= fe1.dofs_per_face) - try - { - face_constraints.reinit (fe1.dofs_per_face, - fe2.dofs_per_face); - fe2.get_subface_interpolation_matrix (fe1, subface, face_constraints); - - deallog << fe2.get_name() - << " vs. " - << fe1.get_name() - << std::endl; - output_matrix (face_constraints); - } - catch (...) - { - } + try + { + face_constraints.reinit (fe1.dofs_per_face, + fe2.dofs_per_face); + fe2.get_subface_interpolation_matrix (fe1, subface, face_constraints); + + deallog << fe2.get_name() + << " vs. " + << fe1.get_name() + << std::endl; + output_matrix (face_constraints); + } + catch (...) + { + } } } diff --git a/tests/bits/tria_crash_01.cc b/tests/bits/tria_crash_01.cc index b7139abd60..490e935692 100644 --- a/tests/bits/tria_crash_01.cc +++ b/tests/bits/tria_crash_01.cc @@ -32,7 +32,7 @@ bool predicate (const Point<3> &p, - const double diameter) + const double diameter) { return ((p[0]-.2)*(p[0]-.2) + (p[2]-p[1]/4)*(p[2]-p[1]/4) < diameter * diameter); } @@ -53,14 +53,14 @@ int main () tria.refine_global(2); deallog << "n_cells=" << tria.n_active_cells() << std::endl; - - // build up a map of vertex indices - // of boundary vertices to the new - // boundary points + + // build up a map of vertex indices + // of boundary vertices to the new + // boundary points std::map > new_points; - + Triangulation::active_cell_iterator cell=tria.begin_active(), - endc=tria.end(); + endc=tria.end(); for (cell=tria.begin_active(); cell!=endc; ++cell) if (predicate(cell->center(), cell->diameter())) @@ -74,8 +74,8 @@ int main () if (!predicate (cell->center(), cell->diameter())) cell->set_coarsen_flag (); - // make sure there really are no refinement - // flags set + // make sure there really are no refinement + // flags set tria.prepare_coarsening_and_refinement(); for (cell=tria.begin_active(); cell!=endc; ++cell) Assert (!cell->refine_flag_set(), ExcInternalError()); @@ -83,6 +83,6 @@ int main () tria.execute_coarsening_and_refinement(); deallog << "n_cells=" << tria.n_active_cells() << std::endl; - + return 0; } diff --git a/tests/bits/unit_support_points.cc b/tests/bits/unit_support_points.cc index 30abfd72cb..7560dd7862 100644 --- a/tests/bits/unit_support_points.cc +++ b/tests/bits/unit_support_points.cc @@ -22,7 +22,7 @@ #include "../tests.h" #include -#include +#include #include #include #include @@ -31,7 +31,7 @@ template -void check_cell1 (const FiniteElement &fe) +void check_cell1 (const FiniteElement &fe) { for (unsigned int i=0; i &fe) template -void check_face1 (const FiniteElement &fe) +void check_face1 (const FiniteElement &fe) { for (unsigned int i=0; i &fe) } -void check_face1 (const FiniteElement<1> &) +void check_face1 (const FiniteElement<1> &) {} template -void check1 (const FiniteElement &fe) +void check1 (const FiniteElement &fe) { check_cell1 (fe); check_face1 (fe); @@ -67,7 +67,7 @@ void check1 (const FiniteElement &fe) template void check_cell2 (const FiniteElement &fe, - const unsigned int comp) + const unsigned int comp) { for (unsigned int i=0; i &fe, template void check_face2 (const FiniteElement &fe, - const unsigned int comp) + const unsigned int comp) { - for (unsigned int i=0; i &, - const unsigned int) + const unsigned int) {} template void check2 (const FiniteElement &fe, - const unsigned int comp) + const unsigned int comp) { check_cell2 (fe, comp); check_face2 (fe, comp); @@ -106,7 +106,7 @@ void check2 (const FiniteElement &fe, template -void check () +void check () { check1 (FE_Q(2)); check1 (FE_DGQ(2)); @@ -124,9 +124,9 @@ void check () 0); } - -int main () + +int main () { std::ofstream logfile("unit_support_points/output"); deallog.attach(logfile); diff --git a/tests/bits/unit_support_points_02.cc b/tests/bits/unit_support_points_02.cc index 32ae7e316e..4e83dd2b2e 100644 --- a/tests/bits/unit_support_points_02.cc +++ b/tests/bits/unit_support_points_02.cc @@ -42,7 +42,7 @@ void check2 (const FiniteElement &fe) { deallog << fe.get_name() << std::endl; const std::vector > unit_f_s_p - = fe.get_unit_face_support_points (); + = fe.get_unit_face_support_points (); for (unsigned int i=0; i::size() #include "../tests.h" -#include +#include #include #include void test (Vector &v) { - // set only certain elements of the vector + // set only certain elements of the vector for (unsigned int i=0; i &v) -int main () +int main () { std::ofstream logfile("vector_11/output"); deallog.attach(logfile); @@ -54,25 +54,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_12.cc b/tests/bits/vector_12.cc index 899601c4b4..a819258391 100644 --- a/tests/bits/vector_12.cc +++ b/tests/bits/vector_12.cc @@ -19,7 +19,7 @@ // check Vector::operator() in set-mode #include "../tests.h" -#include +#include #include #include #include @@ -27,9 +27,9 @@ void test (Vector &v) { - // set only certain elements of the - // vector. have a bit pattern of where we - // actually wrote elements to + // set only certain elements of the + // vector. have a bit pattern of where we + // actually wrote elements to std::vector pattern (v.size(), false); for (unsigned int i=0; i &v) v.compress (); - // check that they are ok, and this time - // all of them + // check that they are ok, and this time + // all of them for (unsigned int i=0; i::operator() in add-mode #include "../tests.h" -#include +#include #include #include #include @@ -27,9 +27,9 @@ void test (Vector &v) { - // set only certain elements of the - // vector. have a bit pattern of where we - // actually wrote elements to + // set only certain elements of the + // vector. have a bit pattern of where we + // actually wrote elements to std::vector pattern (v.size(), false); for (unsigned int i=0; i &v) v.compress (); - // check that they are ok, and this time - // all of them + // check that they are ok, and this time + // all of them for (unsigned int i=0; i::operator() in set/add-mode alternatingly #include "../tests.h" -#include +#include #include #include #include @@ -27,9 +27,9 @@ void test (Vector &v) { - // set only certain elements of the - // vector. have a bit pattern of where we - // actually wrote elements to + // set only certain elements of the + // vector. have a bit pattern of where we + // actually wrote elements to std::vector pattern (v.size(), false); bool flag = false; for (unsigned int i=0; i &v) else v(i) = i; flag = !flag; - + pattern[i] = true; } v.compress (); - // check that they are ok, and this time - // all of them + // check that they are ok, and this time + // all of them for (unsigned int i=0; i +#include #include #include #include @@ -28,9 +28,9 @@ void test (Vector &v) { - // set only certain elements of the - // vector. have a bit pattern of where we - // actually wrote elements to + // set only certain elements of the + // vector. have a bit pattern of where we + // actually wrote elements to std::vector pattern (v.size(), false); for (unsigned int i=0; i &v) v.compress (); - // check that they are ok, and this time - // all of them + // check that they are ok, and this time + // all of them for (unsigned int i=0; i +#include #include #include #include @@ -28,9 +28,9 @@ void test (Vector &v) { - // set only certain elements of the - // vector. have a bit pattern of where we - // actually wrote elements to + // set only certain elements of the + // vector. have a bit pattern of where we + // actually wrote elements to std::vector pattern (v.size(), false); for (unsigned int i=0; i &v) v.compress (); - // check that they are ok, and this time - // all of them + // check that they are ok, and this time + // all of them for (unsigned int i=0; i::l1_norm() #include "../tests.h" -#include +#include #include #include #include @@ -27,7 +27,7 @@ void test (Vector &v) { - // set some elements of the vector + // set some elements of the vector double norm = 0; for (unsigned int i=0; i &v) } v.compress (); - // then check the norm + // then check the norm Assert (v.l1_norm() == norm, ExcInternalError()); deallog << "OK" << std::endl; @@ -44,7 +44,7 @@ void test (Vector &v) -int main () +int main () { std::ofstream logfile("vector_17/output"); deallog.attach(logfile); @@ -59,25 +59,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_18.cc b/tests/bits/vector_18.cc index 9da00f7d70..39d4f55529 100644 --- a/tests/bits/vector_18.cc +++ b/tests/bits/vector_18.cc @@ -19,7 +19,7 @@ // check Vector::l2_norm() #include "../tests.h" -#include +#include #include #include #include @@ -27,7 +27,7 @@ void test (Vector &v) { - // set some elements of the vector + // set some elements of the vector double norm = 0; for (unsigned int i=0; i &v) } v.compress (); - // then check the norm + // then check the norm Assert (std::fabs((v.l2_norm() - std::sqrt(norm))/std::sqrt(norm)) < 1e-14, ExcInternalError()); deallog << "OK" << std::endl; @@ -44,7 +44,7 @@ void test (Vector &v) -int main () +int main () { std::ofstream logfile("vector_18/output"); deallog.attach(logfile); @@ -59,25 +59,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_19.cc b/tests/bits/vector_19.cc index 6e52c410ec..ce58039685 100644 --- a/tests/bits/vector_19.cc +++ b/tests/bits/vector_19.cc @@ -19,7 +19,7 @@ // check Vector::linfty_norm() #include "../tests.h" -#include +#include #include #include #include @@ -27,7 +27,7 @@ void test (Vector &v) { - // set some elements of the vector + // set some elements of the vector double norm = 0; for (unsigned int i=0; i &v) } v.compress (); - // then check the norm + // then check the norm Assert (v.linfty_norm() == norm, ExcInternalError()); deallog << "OK" << std::endl; @@ -44,7 +44,7 @@ void test (Vector &v) -int main () +int main () { std::ofstream logfile("vector_19/output"); deallog.attach(logfile); @@ -59,25 +59,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_20.cc b/tests/bits/vector_20.cc index ea0dbf5471..9f013e1a0f 100644 --- a/tests/bits/vector_20.cc +++ b/tests/bits/vector_20.cc @@ -19,7 +19,7 @@ // check Vector::operator *= #include "../tests.h" -#include +#include #include #include #include @@ -27,9 +27,9 @@ void test (Vector &v) { - // set only certain elements of the - // vector. have a bit pattern of where we - // actually wrote elements to + // set only certain elements of the + // vector. have a bit pattern of where we + // actually wrote elements to std::vector pattern (v.size(), false); for (unsigned int i=0; i &v) } v.compress (); - // multiply v with 5/4 + // multiply v with 5/4 v *= 5./4.; - // check that the entries are ok + // check that the entries are ok for (unsigned int i=0; i::operator /= #include "../tests.h" -#include +#include #include #include #include @@ -27,9 +27,9 @@ void test (Vector &v) { - // set only certain elements of the - // vector. have a bit pattern of where we - // actually wrote elements to + // set only certain elements of the + // vector. have a bit pattern of where we + // actually wrote elements to std::vector pattern (v.size(), false); for (unsigned int i=0; i &v) } v.compress (); - // multiply v with 3/4 + // multiply v with 3/4 v /= 4./3.; - // check that the entries are ok + // check that the entries are ok for (unsigned int i=0; i +#include #include #include #include @@ -29,9 +29,9 @@ void test (Vector &v) { - // set only certain elements of the - // vector. have a bit pattern of where we - // actually wrote elements to + // set only certain elements of the + // vector. have a bit pattern of where we + // actually wrote elements to std::vector pattern (v.size(), false); for (unsigned int i=0; i &v) } v.compress (); - // multiply v with 3/4 + // multiply v with 3/4 v /= -4./3.; - // check that the entries are ok + // check that the entries are ok for (unsigned int i=0; i +#include #include #include #include @@ -29,8 +29,8 @@ void test (Vector &v, Vector &w) { - // set only certain elements of each - // vector, but disjoint sets of elements + // set only certain elements of each + // vector, but disjoint sets of elements for (unsigned int i=0; i &v, v.compress (); w.compress (); - // make sure the scalar product is zero + // make sure the scalar product is zero Assert (v*w == 0, ExcInternalError()); deallog << "OK" << std::endl; @@ -47,7 +47,7 @@ void test (Vector &v, -int main () +int main () { std::ofstream logfile("vector_22/output"); deallog.attach(logfile); @@ -63,25 +63,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_23.cc b/tests/bits/vector_23.cc index a23335ce0d..c781b83f88 100644 --- a/tests/bits/vector_23.cc +++ b/tests/bits/vector_23.cc @@ -20,7 +20,7 @@ // not orthogonal #include "../tests.h" -#include +#include #include #include #include @@ -29,9 +29,9 @@ void test (Vector &v, Vector &w) { - // set only certain elements of each - // vector, and record the expected scalar - // product + // set only certain elements of each + // vector, and record the expected scalar + // product double product = 0; for (unsigned int i=0; i &v, product += i*(i+1); } } - + v.compress (); w.compress (); - // make sure the scalar product is zero + // make sure the scalar product is zero Assert (v*w == product, ExcInternalError()); deallog << "OK" << std::endl; @@ -54,7 +54,7 @@ void test (Vector &v, -int main () +int main () { std::ofstream logfile("vector_23/output"); deallog.attach(logfile); @@ -70,25 +70,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_24.cc b/tests/bits/vector_24.cc index 6e317205ab..bc98120989 100644 --- a/tests/bits/vector_24.cc +++ b/tests/bits/vector_24.cc @@ -21,7 +21,7 @@ // may be covered by one of the other tests #include "../tests.h" -#include +#include #include #include #include @@ -29,14 +29,14 @@ void test (Vector &v) { - // set some entries of the vector + // set some entries of the vector for (unsigned int i=0; i &v) -int main () +int main () { std::ofstream logfile("vector_24/output"); deallog.attach(logfile); @@ -62,25 +62,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_25.cc b/tests/bits/vector_25.cc index ae0225107c..b6daa05561 100644 --- a/tests/bits/vector_25.cc +++ b/tests/bits/vector_25.cc @@ -18,7 +18,7 @@ // check Vector::operator = (Scalar) with setting to zero #include "../tests.h" -#include +#include #include #include #include @@ -26,14 +26,14 @@ void test (Vector &v) { - // set some entries of the vector + // set some entries of the vector for (unsigned int i=0; i &v) } -int main () +int main () { std::ofstream logfile("vector_25/output"); deallog.attach(logfile); @@ -58,25 +58,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_26.cc b/tests/bits/vector_26.cc index 55bb2934ff..77ff9c9e84 100644 --- a/tests/bits/vector_26.cc +++ b/tests/bits/vector_26.cc @@ -19,7 +19,7 @@ // nonzero value #include "../tests.h" -#include +#include #include #include #include @@ -27,7 +27,7 @@ void test (Vector &v) { - // set some entries of the vector + // set some entries of the vector for (unsigned int i=0; i &v) } -int main () +int main () { std::ofstream logfile("vector_26/output"); deallog.attach(logfile); @@ -57,25 +57,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_27.cc b/tests/bits/vector_27.cc index 829dd00b33..5a6a819c2c 100644 --- a/tests/bits/vector_27.cc +++ b/tests/bits/vector_27.cc @@ -16,10 +16,10 @@ -// check Vector::operator = (Vector) +// check Vector::operator = (Vector) #include "../tests.h" -#include +#include #include #include #include @@ -27,19 +27,19 @@ void test (Vector &v) { - // set some entries of the vector + // set some entries of the vector for (unsigned int i=0; i w (v.size()); w = v; - // make sure they're equal - deallog << v*w << ' ' << v.l2_norm() * w.l2_norm() - << ' ' << v*w - v.l2_norm() * w.l2_norm() << std::endl; + // make sure they're equal + deallog << v *w << ' ' << v.l2_norm() * w.l2_norm() + << ' ' << v *w - v.l2_norm() * w.l2_norm() << std::endl; Assert (std::fabs(v*w - v.l2_norm() * w.l2_norm()) < 1e-14*(v*w), ExcInternalError()); @@ -48,7 +48,7 @@ void test (Vector &v) -int main () +int main () { std::ofstream logfile("vector_27/output"); deallog.attach(logfile); @@ -63,25 +63,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_28.cc b/tests/bits/vector_28.cc index c7fede9677..512e4ded45 100644 --- a/tests/bits/vector_28.cc +++ b/tests/bits/vector_28.cc @@ -20,7 +20,7 @@ // resize the vector to be copied to beforehand #include "../tests.h" -#include +#include #include #include #include @@ -28,20 +28,20 @@ void test (Vector &v) { - // set some entries of the vector + // set some entries of the vector for (unsigned int i=0; i w (1); w = v; - // make sure they're equal - deallog << v*w << ' ' << v.l2_norm() * w.l2_norm() - << ' ' << v*w - v.l2_norm() * w.l2_norm() << std::endl; + // make sure they're equal + deallog << v *w << ' ' << v.l2_norm() * w.l2_norm() + << ' ' << v *w - v.l2_norm() * w.l2_norm() << std::endl; Assert (std::fabs(v*w - v.l2_norm() * w.l2_norm()) < 1e-14*(v*w), ExcInternalError()); @@ -50,7 +50,7 @@ void test (Vector &v) -int main () +int main () { std::ofstream logfile("vector_28/output"); deallog.attach(logfile); @@ -65,25 +65,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_29.cc b/tests/bits/vector_29.cc index 01d9c9affa..83b31ae90c 100644 --- a/tests/bits/vector_29.cc +++ b/tests/bits/vector_29.cc @@ -19,7 +19,7 @@ // check Vector::reinit(fast) #include "../tests.h" -#include +#include #include #include #include @@ -28,7 +28,7 @@ void test (Vector &v) { v.reinit (13, true); - + Assert (v.size() == 13, ExcInternalError()); deallog << "OK" << std::endl; @@ -36,7 +36,7 @@ void test (Vector &v) -int main () +int main () { std::ofstream logfile("vector_29/output"); deallog.attach(logfile); @@ -51,25 +51,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_30.cc b/tests/bits/vector_30.cc index fdae91eb9f..2122ed3995 100644 --- a/tests/bits/vector_30.cc +++ b/tests/bits/vector_30.cc @@ -19,7 +19,7 @@ // check Vector::reinit(!fast) #include "../tests.h" -#include +#include #include #include #include @@ -27,15 +27,15 @@ void test (Vector &v) { - // set some entries of the vector + // set some entries of the vector for (unsigned int i=0; i &v) -int main () +int main () { std::ofstream logfile("vector_30/output"); deallog.attach(logfile); @@ -59,25 +59,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_31.cc b/tests/bits/vector_31.cc index 0667f1c7e6..ad5972c9bb 100644 --- a/tests/bits/vector_31.cc +++ b/tests/bits/vector_31.cc @@ -19,7 +19,7 @@ // check Vector::l2_norm() #include "../tests.h" -#include +#include #include #include #include @@ -27,7 +27,7 @@ void test (Vector &v) { - // set some elements of the vector + // set some elements of the vector double norm = 0; for (unsigned int i=0; i &v) } v.compress (); - // then check the norm + // then check the norm Assert (std::fabs(v.norm_sqr() - norm) < 1e-14*norm, ExcInternalError()); @@ -45,7 +45,7 @@ void test (Vector &v) -int main () +int main () { std::ofstream logfile("vector_31/output"); deallog.attach(logfile); @@ -60,25 +60,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_32.cc b/tests/bits/vector_32.cc index e161634189..826fd8a664 100644 --- a/tests/bits/vector_32.cc +++ b/tests/bits/vector_32.cc @@ -19,7 +19,7 @@ // check Vector::mean_value() #include "../tests.h" -#include +#include #include #include #include @@ -27,7 +27,7 @@ void test (Vector &v) { - // set some elements of the vector + // set some elements of the vector double sum = 0; for (unsigned int i=0; i &v) } v.compress (); - // then check the norm + // then check the norm Assert (std::fabs(v.mean_value() - sum/v.size()) < 1e-14*sum/v.size(), ExcInternalError()); @@ -45,7 +45,7 @@ void test (Vector &v) -int main () +int main () { std::ofstream logfile("vector_32/output"); deallog.attach(logfile); @@ -60,25 +60,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_33.cc b/tests/bits/vector_33.cc index a4602d347b..1ac266f297 100644 --- a/tests/bits/vector_33.cc +++ b/tests/bits/vector_33.cc @@ -19,7 +19,7 @@ // check Vector::lp_norm(3) #include "../tests.h" -#include +#include #include #include #include @@ -27,7 +27,7 @@ void test (Vector &v) { - // set some elements of the vector + // set some elements of the vector double sum = 0; for (unsigned int i=0; i &v) } v.compress (); - // then check the norm + // then check the norm Assert (std::fabs(v.lp_norm(3) - std::pow(sum, 1./3.)) < 1e-14*std::pow(sum, 1./3.), ExcInternalError()); @@ -46,7 +46,7 @@ void test (Vector &v) -int main () +int main () { std::ofstream logfile("vector_33/output"); deallog.attach(logfile); @@ -61,25 +61,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_34.cc b/tests/bits/vector_34.cc index 0d854e738f..cd87e63449 100644 --- a/tests/bits/vector_34.cc +++ b/tests/bits/vector_34.cc @@ -19,7 +19,7 @@ // check Vector::all_zero #include "../tests.h" -#include +#include #include #include #include @@ -27,7 +27,7 @@ void test (Vector &v) { - // set some elements of the vector + // set some elements of the vector double sum = 0; for (unsigned int i=0; i &v) } v.compress (); - // set them to zero again + // set them to zero again v = 0; - // then check all_zero + // then check all_zero Assert (v.all_zero() == true, ExcInternalError()); deallog << "OK" << std::endl; @@ -47,7 +47,7 @@ void test (Vector &v) -int main () +int main () { std::ofstream logfile("vector_34/output"); deallog.attach(logfile); @@ -62,25 +62,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_35.cc b/tests/bits/vector_35.cc index 99311d3069..cc2f06176e 100644 --- a/tests/bits/vector_35.cc +++ b/tests/bits/vector_35.cc @@ -16,10 +16,10 @@ -// check Vector::operator+=(Vector) +// check Vector::operator+=(Vector) #include "../tests.h" -#include +#include #include #include #include @@ -28,21 +28,21 @@ void test (Vector &v, Vector &w) { - // set only certain elements of each - // vector + // set only certain elements of each + // vector for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("vector_35/output"); deallog.attach(logfile); @@ -79,25 +79,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_36.cc b/tests/bits/vector_36.cc index d275ee0bde..d63b8a34a6 100644 --- a/tests/bits/vector_36.cc +++ b/tests/bits/vector_36.cc @@ -16,10 +16,10 @@ -// check Vector::operator-=(Vector) +// check Vector::operator-=(Vector) #include "../tests.h" -#include +#include #include #include #include @@ -28,21 +28,21 @@ void test (Vector &v, Vector &w) { - // set only certain elements of each - // vector + // set only certain elements of each + // vector for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("vector_36/output"); deallog.attach(logfile); @@ -79,25 +79,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_37.cc b/tests/bits/vector_37.cc index 8cdb3ef749..5e6bc08252 100644 --- a/tests/bits/vector_37.cc +++ b/tests/bits/vector_37.cc @@ -19,7 +19,7 @@ // check Vector::add (scalar) #include "../tests.h" -#include +#include #include #include #include @@ -29,12 +29,12 @@ void test (Vector &v) { for (unsigned int i=0; i &v) -int main () +int main () { std::ofstream logfile("vector_37/output"); deallog.attach(logfile); @@ -58,25 +58,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_38.cc b/tests/bits/vector_38.cc index 6ea4ef6a6a..0a327b5315 100644 --- a/tests/bits/vector_38.cc +++ b/tests/bits/vector_38.cc @@ -16,10 +16,10 @@ -// check Vector::add(Vector) +// check Vector::add(Vector) #include "../tests.h" -#include +#include #include #include #include @@ -33,13 +33,13 @@ void test (Vector &v, v(i) = i; w(i) = i+1.; } - + v.compress (); w.compress (); v.add (w); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("vector_38/output"); deallog.attach(logfile); @@ -67,25 +67,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_39.cc b/tests/bits/vector_39.cc index 72ec18a981..a0934f45ca 100644 --- a/tests/bits/vector_39.cc +++ b/tests/bits/vector_39.cc @@ -16,10 +16,10 @@ -// check Vector::add(scalar, Vector) +// check Vector::add(scalar, Vector) #include "../tests.h" -#include +#include #include #include #include @@ -33,13 +33,13 @@ void test (Vector &v, v(i) = i; w(i) = i+1.; } - + v.compress (); w.compress (); v.add (2, w); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("vector_39/output"); deallog.attach(logfile); @@ -67,25 +67,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_40.cc b/tests/bits/vector_40.cc index be693d0fc2..ee270a1731 100644 --- a/tests/bits/vector_40.cc +++ b/tests/bits/vector_40.cc @@ -19,7 +19,7 @@ // check Vector::add(s,V,s,V) #include "../tests.h" -#include +#include #include #include #include @@ -35,14 +35,14 @@ void test (Vector &v, w(i) = i+1.; x(i) = i+2.; } - + v.compress (); w.compress (); x.compress (); v.add (2, w, 3, x); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("vector_40/output"); deallog.attach(logfile); @@ -72,25 +72,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_41.cc b/tests/bits/vector_41.cc index a1330412ff..fda226953d 100644 --- a/tests/bits/vector_41.cc +++ b/tests/bits/vector_41.cc @@ -16,10 +16,10 @@ -// check Vector::sadd(s, Vector) +// check Vector::sadd(s, Vector) #include "../tests.h" -#include +#include #include #include #include @@ -33,13 +33,13 @@ void test (Vector &v, v(i) = i; w(i) = i+1.; } - + v.compress (); w.compress (); v.sadd (2, w); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("vector_41/output"); deallog.attach(logfile); @@ -67,25 +67,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_42.cc b/tests/bits/vector_42.cc index de8d9718c4..74b3851729 100644 --- a/tests/bits/vector_42.cc +++ b/tests/bits/vector_42.cc @@ -16,10 +16,10 @@ -// check Vector::sadd(scalar, scalar, Vector) +// check Vector::sadd(scalar, scalar, Vector) #include "../tests.h" -#include +#include #include #include #include @@ -33,13 +33,13 @@ void test (Vector &v, v(i) = i; w(i) = i+1.; } - + v.compress (); w.compress (); v.sadd (3, 2, w); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("vector_42/output"); deallog.attach(logfile); @@ -67,25 +67,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_43.cc b/tests/bits/vector_43.cc index d8c5737177..b72354a4ac 100644 --- a/tests/bits/vector_43.cc +++ b/tests/bits/vector_43.cc @@ -19,7 +19,7 @@ // check Vector::sadd(s,s,V,s,V) #include "../tests.h" -#include +#include #include #include #include @@ -35,14 +35,14 @@ void test (Vector &v, w(i) = i+1.; x(i) = i+2.; } - + v.compress (); w.compress (); x.compress (); v.sadd (1.5, 2, w, 3, x); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("vector_43/output"); deallog.attach(logfile); @@ -72,25 +72,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_44.cc b/tests/bits/vector_44.cc index 91a5028d89..cc6ef26c07 100644 --- a/tests/bits/vector_44.cc +++ b/tests/bits/vector_44.cc @@ -19,7 +19,7 @@ // check Vector::sadd(s,s,V,s,V,s,V) #include "../tests.h" -#include +#include #include #include #include @@ -37,7 +37,7 @@ void test (Vector &v, x(i) = i+2.; y(i) = i+3.; } - + v.compress (); w.compress (); x.compress (); @@ -45,7 +45,7 @@ void test (Vector &v, v.sadd (1.5, 2, w, 3, x, 4, y); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("vector_44/output"); deallog.attach(logfile); @@ -77,25 +77,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_45.cc b/tests/bits/vector_45.cc index 19584ff0b5..f89cce9f26 100644 --- a/tests/bits/vector_45.cc +++ b/tests/bits/vector_45.cc @@ -19,7 +19,7 @@ // check Vector::scale #include "../tests.h" -#include +#include #include #include #include @@ -33,13 +33,13 @@ void test (Vector &v, v(i) = i; w(i) = i+1.; } - + v.compress (); w.compress (); v.scale (w); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("vector_45/output"); deallog.attach(logfile); @@ -67,25 +67,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_46.cc b/tests/bits/vector_46.cc index 23a3207c45..a5a56cd99c 100644 --- a/tests/bits/vector_46.cc +++ b/tests/bits/vector_46.cc @@ -19,7 +19,7 @@ // check Vector::equ (s,V) #include "../tests.h" -#include +#include #include #include #include @@ -33,13 +33,13 @@ void test (Vector &v, v(i) = i; w(i) = i+1.; } - + v.compress (); w.compress (); v.equ (2, w); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("vector_46/output"); deallog.attach(logfile); @@ -67,25 +67,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_47.cc b/tests/bits/vector_47.cc index 52da500395..9c40a4055b 100644 --- a/tests/bits/vector_47.cc +++ b/tests/bits/vector_47.cc @@ -19,7 +19,7 @@ // check Vector::equ (s,V,s,V) #include "../tests.h" -#include +#include #include #include #include @@ -35,14 +35,14 @@ void test (Vector &v, w(i) = i+1.; x(i) = i+2.; } - + v.compress (); w.compress (); x.compress (); v.equ (2, w, 3, x); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("vector_47/output"); deallog.attach(logfile); @@ -72,25 +72,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_48.cc b/tests/bits/vector_48.cc index ad192e4f44..8a5bf8b693 100644 --- a/tests/bits/vector_48.cc +++ b/tests/bits/vector_48.cc @@ -19,7 +19,7 @@ // check Vector::ratio #include "../tests.h" -#include +#include #include #include #include @@ -35,14 +35,14 @@ void test (Vector &v, w(i) = i+1.; x(i) = i+2.; } - + v.compress (); w.compress (); x.compress (); v.ratio (w, x); - // make sure we get the expected result + // make sure we get the expected result for (unsigned int i=0; i &v, -int main () +int main () { std::ofstream logfile("vector_48/output"); deallog.attach(logfile); @@ -73,25 +73,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_49.cc b/tests/bits/vector_49.cc index 4af8fda0eb..627c77cd7e 100644 --- a/tests/bits/vector_49.cc +++ b/tests/bits/vector_49.cc @@ -20,7 +20,7 @@ // argument #include "../tests.h" -#include +#include #include #include #include @@ -28,18 +28,18 @@ void test (Vector &v) { - // set some entries of the vector + // set some entries of the vector for (unsigned int i=0; i w (v); - // make sure they're equal - deallog << v*w << ' ' << v.l2_norm() * w.l2_norm() - << ' ' << v*w - v.l2_norm() * w.l2_norm() << std::endl; + // make sure they're equal + deallog << v *w << ' ' << v.l2_norm() * w.l2_norm() + << ' ' << v *w - v.l2_norm() * w.l2_norm() << std::endl; Assert (std::fabs(v*w - v.l2_norm() * w.l2_norm()) < 1e-14*(v*w), ExcInternalError()); @@ -48,7 +48,7 @@ void test (Vector &v) -int main () +int main () { std::ofstream logfile("vector_49/output"); deallog.attach(logfile); @@ -63,25 +63,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_57.cc b/tests/bits/vector_57.cc index 684c6c3dce..fe1e27a259 100644 --- a/tests/bits/vector_57.cc +++ b/tests/bits/vector_57.cc @@ -19,7 +19,7 @@ // check Vector::is_non_zero #include "../tests.h" -#include +#include #include #include #include @@ -27,8 +27,8 @@ void test (Vector &v) { - // set only certain elements of the - // vector. they are all positive + // set only certain elements of the + // vector. they are all positive std::vector pattern (v.size(), false); for (unsigned int i=0; i &v) v.compress (); - // check that the vector is really - // non-negative + // check that the vector is really + // non-negative Assert (v.is_non_negative() == true, ExcInternalError()); - // then set a single element to a negative - // value and check again + // then set a single element to a negative + // value and check again v(v.size()/2) = -1; - Assert (v.is_non_negative() == false, ExcInternalError()); + Assert (v.is_non_negative() == false, ExcInternalError()); deallog << "OK" << std::endl; } @@ -67,25 +67,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/vector_equality_1.cc b/tests/bits/vector_equality_1.cc index 5e6cdb2f95..3055841898 100644 --- a/tests/bits/vector_equality_1.cc +++ b/tests/bits/vector_equality_1.cc @@ -20,7 +20,7 @@ // equal #include "../tests.h" -#include +#include #include #include #include @@ -29,8 +29,8 @@ void test (Vector &v, Vector &w) { - // set only certain elements of each - // vector + // set only certain elements of each + // vector for (unsigned int i=0; i +#include #include #include #include @@ -29,16 +29,16 @@ void test (Vector &v, Vector &w) { - // set only certain elements of each - // vector + // set only certain elements of each + // vector for (unsigned int i=0; i +#include #include #include #include @@ -29,8 +29,8 @@ void test (Vector &v, Vector &w) { - // set only certain elements of each - // vector + // set only certain elements of each + // vector for (unsigned int i=0; i +#include #include #include #include @@ -29,16 +29,16 @@ void test (Vector &v, Vector &w) { - // set only certain elements of each - // vector + // set only certain elements of each + // vector for (unsigned int i=0; i +#include #include #include #include @@ -29,8 +29,8 @@ void test (Vector &v, Vector &w) { - // set only certain elements of each - // vector + // set only certain elements of each + // vector for (unsigned int i=0; i +#include #include #include #include @@ -29,16 +29,16 @@ void test (Vector &v, Vector &w) { - // set only certain elements of each - // vector + // set only certain elements of each + // vector for (unsigned int i=0; i +#include #include #include #include @@ -29,8 +29,8 @@ void test (Vector &v, Vector &w) { - // set only certain elements of each - // vector + // set only certain elements of each + // vector for (unsigned int i=0; i +#include #include #include #include @@ -29,16 +29,16 @@ void test (Vector &v, Vector &w) { - // set only certain elements of each - // vector + // set only certain elements of each + // vector for (unsigned int i=0; i +#include #include #include @@ -34,13 +34,13 @@ void test (Vector &v) Vector w(v); Assert (w==v, ExcInternalError()); - + deallog << "OK" << std::endl; } -int main () +int main () { std::ofstream logfile("vector_vector_01/output"); deallog.attach(logfile); @@ -55,25 +55,25 @@ int main () catch (std::exception &exc) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; - + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; } - catch (...) + catch (...) { deallog << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; deallog << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; } diff --git a/tests/bits/volume_1.cc b/tests/bits/volume_1.cc index 7428d6fed7..e4c2377dae 100644 --- a/tests/bits/volume_1.cc +++ b/tests/bits/volume_1.cc @@ -43,7 +43,7 @@ void check (const Triangulation &tria) dof_handler.distribute_dofs (fe); QGauss q_face(3); - + FEFaceValues fe_face_values (fe, q_face, update_normal_vectors | update_q_points | @@ -55,14 +55,14 @@ void check (const Triangulation &tria) double v1=0, v2=0; for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell!=dof_handler.end(); ++cell) { - // first integrate over faces - // and make sure that the - // result of the integration is - // close to zero + // first integrate over faces + // and make sure that the + // result of the integration is + // close to zero for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f)) { @@ -73,8 +73,8 @@ void check (const Triangulation &tria) fe_face_values.JxW(q); } - // now same for subface - // integration + // now same for subface + // integration for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f)) for (unsigned int sf=0; sf::max_children_per_face; ++sf) @@ -97,39 +97,39 @@ void check (const Triangulation &tria) } -int main () +int main () { std::ofstream logfile("volume_1/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<2> coarse_grid; GridGenerator::hyper_cube (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_cube (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<2> coarse_grid; GridGenerator::hyper_ball (coarse_grid); check (coarse_grid); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); check (coarse_grid); } - + } - - + + diff --git a/tests/bits/volume_2.cc b/tests/bits/volume_2.cc index c1c1fcd8bc..152b992750 100644 --- a/tests/bits/volume_2.cc +++ b/tests/bits/volume_2.cc @@ -53,7 +53,7 @@ void check (const Triangulation &tria, dof_handler.distribute_dofs (fe); QGauss q_face(3); - + FEFaceValues fe_face_values (mapping, fe, q_face, update_normal_vectors | update_q_points | @@ -65,14 +65,14 @@ void check (const Triangulation &tria, double v1=0, v2=0; for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell!=dof_handler.end(); ++cell) { - // first integrate over faces - // and make sure that the - // result of the integration is - // close to zero + // first integrate over faces + // and make sure that the + // result of the integration is + // close to zero for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f)) { @@ -83,8 +83,8 @@ void check (const Triangulation &tria, fe_face_values.JxW(q); } - // now same for subface - // integration + // now same for subface + // integration for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f)) for (unsigned int sf=0; sf::max_children_per_face; ++sf) @@ -107,14 +107,14 @@ void check (const Triangulation &tria, } -int main () +int main () { std::ofstream logfile("volume_2/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<2> coarse_grid; GridGenerator::hyper_ball (coarse_grid); static const HyperBallBoundary<2> boundary; @@ -123,8 +123,8 @@ int main () check (coarse_grid, 2); check (coarse_grid, 4); } - - { + + { Triangulation<3> coarse_grid; GridGenerator::hyper_ball (coarse_grid); static const HyperBallBoundary<3> boundary; @@ -133,8 +133,8 @@ int main () check (coarse_grid, 2); check (coarse_grid, 3); } - + } - - + + diff --git a/tests/bits/volume_3.cc b/tests/bits/volume_3.cc index 7ce5a082c9..fc574422eb 100644 --- a/tests/bits/volume_3.cc +++ b/tests/bits/volume_3.cc @@ -49,7 +49,7 @@ void check (const Triangulation &tria) dof_handler.distribute_dofs (fe); QGauss q_face(3); - + FEFaceValues fe_face_values (mapping, fe, q_face, update_normal_vectors | update_q_points | @@ -61,14 +61,14 @@ void check (const Triangulation &tria) double v1=0, v2=0; for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell!=dof_handler.end(); ++cell) { - // first integrate over faces - // and make sure that the - // result of the integration is - // close to zero + // first integrate over faces + // and make sure that the + // result of the integration is + // close to zero for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f)) { @@ -79,8 +79,8 @@ void check (const Triangulation &tria) fe_face_values.JxW(q); } - // now same for subface - // integration + // now same for subface + // integration for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f)) for (unsigned int sf=0; sf::max_children_per_face; ++sf) @@ -103,14 +103,14 @@ void check (const Triangulation &tria) } -int main () +int main () { std::ofstream logfile("volume_3/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<2> coarse_grid; GridGenerator::hyper_ball (coarse_grid); static const HyperBallBoundary<2> boundary; @@ -118,16 +118,16 @@ int main () check (coarse_grid); } - // the C1 mapping is not fully - // implemented in 3d, unfortunately -// { + // the C1 mapping is not fully + // implemented in 3d, unfortunately +// { // Triangulation<3> coarse_grid; // GridGenerator::hyper_ball (coarse_grid); // static const HyperBallBoundary<3> boundary; // coarse_grid.set_boundary (0, boundary); // check (coarse_grid); -// } +// } } - - + + diff --git a/tests/bits/volume_4.cc b/tests/bits/volume_4.cc index f0fc970f6d..9df59ba9c9 100644 --- a/tests/bits/volume_4.cc +++ b/tests/bits/volume_4.cc @@ -49,7 +49,7 @@ void check (const Triangulation &tria) dof_handler.distribute_dofs (fe); QGauss q_face(3); - + FEFaceValues fe_face_values (mapping, fe, q_face, update_normal_vectors | update_q_points | @@ -61,14 +61,14 @@ void check (const Triangulation &tria) double v1=0, v2=0; for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell!=dof_handler.end(); ++cell) { - // first integrate over faces - // and make sure that the - // result of the integration is - // close to zero + // first integrate over faces + // and make sure that the + // result of the integration is + // close to zero for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f)) { @@ -79,8 +79,8 @@ void check (const Triangulation &tria) fe_face_values.JxW(q); } - // now same for subface - // integration + // now same for subface + // integration for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f)) for (unsigned int sf=0; sf::max_children_per_face; ++sf) @@ -103,25 +103,25 @@ void check (const Triangulation &tria) } -int main () +int main () { std::ofstream logfile("volume_4/output"); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - { + { Triangulation<2> coarse_grid; GridGenerator::hyper_cube (coarse_grid); check (coarse_grid); } - { + { Triangulation<3> coarse_grid; GridGenerator::hyper_cube (coarse_grid); check (coarse_grid); - } + } } - - + + diff --git a/tests/codim_one/bem.cc b/tests/codim_one/bem.cc index a29621b3e1..bca014b1f2 100644 --- a/tests/codim_one/bem.cc +++ b/tests/codim_one/bem.cc @@ -56,172 +56,173 @@ std::ofstream logfile("bem/output"); template -class BEM { +class BEM +{ public: - BEM(); - - void run(); + BEM(); + + void run(); private: - void make_dofs(); - void assemble_system(); - void solve(); - void output_results(); + void make_dofs(); + void assemble_system(); + void solve(); + void output_results(); + + void read_grid(std::string filename); + void write_grid(std::string filename); + - void read_grid(std::string filename); - void write_grid(std::string filename); + Triangulation tria; + FE_DGQ fe; + DoFHandler dof_handler; + // finite elements used to smoothen + // the solution (from piecewise + // constant to continuous piecewise + // quadratic) + FE_Q fe_q; + DoFHandler dof_handler_q; - Triangulation tria; - FE_DGQ fe; - DoFHandler dof_handler; + FullMatrix system_matrix; - // finite elements used to smoothen - // the solution (from piecewise - // constant to continuous piecewise - // quadratic) - FE_Q fe_q; - DoFHandler dof_handler_q; + Vector solution, + smooth_solution, + system_rhs, + tangential_derivative, + tangential_velocity, + error; - FullMatrix system_matrix; - - Vector solution, - smooth_solution, - system_rhs, - tangential_derivative, - tangential_velocity, - error; + Point velocity; - Point velocity; - }; template BEM::BEM() - : - fe(0), - dof_handler(tria), - fe_q(1), - dof_handler_q(tria) + : + fe(0), + dof_handler(tria), + fe_q(1), + dof_handler_q(tria) { - velocity[0] = 1.; + velocity[0] = 1.; } template void -BEM::run() +BEM::run() { - deallog.attach(logfile); - deallog.depth_console(0); + deallog.attach(logfile); + deallog.depth_console(0); - ConvergenceTable table; + ConvergenceTable table; - if (spacedim == 2) + if (spacedim == 2) { - read_grid("grids/circle_R10.inp"); - - Point p; - HyperBallBoundary boundary(p,10.); - tria.set_boundary(1, boundary); - - // works up to cycle<9, but for testin purpose, we stop at 4 - for(unsigned int cycle=0; cycle<4; ++cycle) - { - - tria.set_boundary(1, boundary); - tria.refine_global(1); - - double side_length = - tria.begin_active()->vertex(0).norm() // CIRCLE RADIUS - *2*sin( numbers::PI / tria.n_active_cells() ), - global_error = 0.; - - table.add_value("cycle", cycle); - table.add_value("cells", tria.n_active_cells()); - - make_dofs(); - assemble_system(); - solve(); - output_results(); - - tria.set_boundary(1); - - -// std::cout -// << "solution" -// << std::endl; -// for(unsigned int i=0; i p; + HyperBallBoundary boundary(p,10.); + tria.set_boundary(1, boundary); + + // works up to cycle<9, but for testin purpose, we stop at 4 + for (unsigned int cycle=0; cycle<4; ++cycle) + { + + tria.set_boundary(1, boundary); + tria.refine_global(1); + + double side_length = + tria.begin_active()->vertex(0).norm() // CIRCLE RADIUS + *2*sin( numbers::PI / tria.n_active_cells() ), + global_error = 0.; + + table.add_value("cycle", cycle); + table.add_value("cells", tria.n_active_cells()); + + make_dofs(); + assemble_system(); + solve(); + output_results(); + + tria.set_boundary(1); + + +// std::cout +// << "solution" +// << std::endl; +// for(unsigned int i=0; i void BEM::make_dofs() { - dof_handler.distribute_dofs(fe); - dof_handler_q.distribute_dofs(fe_q); - - system_matrix.reinit(dof_handler.n_dofs(), dof_handler.n_dofs()); - solution.reinit (dof_handler.n_dofs()); - system_rhs.reinit (dof_handler.n_dofs()); + dof_handler.distribute_dofs(fe); + dof_handler_q.distribute_dofs(fe_q); + + system_matrix.reinit(dof_handler.n_dofs(), dof_handler.n_dofs()); + solution.reinit (dof_handler.n_dofs()); + system_rhs.reinit (dof_handler.n_dofs()); } template void BEM::assemble_system() { - const QGauss quadrature_formula(2); - const QGaussLog<1> qlog(1); - FEValues - fe_values_i (fe, quadrature_formula, - update_JxW_values | - update_cell_normal_vectors | - update_quadrature_points ), - fe_values_j (fe, quadrature_formula, - update_JxW_values | - update_cell_normal_vectors | - update_quadrature_points ); - - const unsigned int dofs_per_cell = fe.dofs_per_cell; - const unsigned int n_q_points = quadrature_formula.size(); - - // The following two matrices will - // be subtracted to obtain the - // system matrix. - FullMatrix DLP_matrix(dof_handler.n_dofs()); // DLP stands for double layer potential - FullMatrix mass_matrix(dof_handler.n_dofs()); - - FullMatrix cell_mass_matrix (dofs_per_cell, dofs_per_cell); - FullMatrix cell_DLP_matrix (dofs_per_cell, dofs_per_cell); - Vector cell_rhs (dofs_per_cell); - - std::vector< Point > cell_normals_i, cell_normals_j; - - std::vector local_dof_indices_i (dofs_per_cell); - std::vector local_dof_indices_j (dofs_per_cell); - + const QGauss quadrature_formula(2); + const QGaussLog<1> qlog(1); + FEValues + fe_values_i (fe, quadrature_formula, + update_JxW_values | + update_cell_normal_vectors | + update_quadrature_points ), + fe_values_j (fe, quadrature_formula, + update_JxW_values | + update_cell_normal_vectors | + update_quadrature_points ); + + const unsigned int dofs_per_cell = fe.dofs_per_cell; + const unsigned int n_q_points = quadrature_formula.size(); + + // The following two matrices will + // be subtracted to obtain the + // system matrix. + FullMatrix DLP_matrix(dof_handler.n_dofs()); // DLP stands for double layer potential + FullMatrix mass_matrix(dof_handler.n_dofs()); + + FullMatrix cell_mass_matrix (dofs_per_cell, dofs_per_cell); + FullMatrix cell_DLP_matrix (dofs_per_cell, dofs_per_cell); + Vector cell_rhs (dofs_per_cell); + + std::vector< Point > cell_normals_i, cell_normals_j; + + std::vector local_dof_indices_i (dofs_per_cell); + std::vector local_dof_indices_j (dofs_per_cell); + // std::cout -// << "no. of cells: "<< tria.n_active_cells()<< std::endl -// << "no. of dofs: "<< dof_handler.n_dofs()<< std::endl -// << "dofs per cell: "<< dofs_per_cell<< std::endl -// << "side length (r=10): "<< 10 * 2*sin(numbers::PI/tria.n_cells())<::active_cell_iterator - cell_i = dof_handler.begin_active(), - cell_j = dof_handler.begin_active(), - endc = dof_handler.end(); - - // cycle on i index - for (; cell_i!=endc; ++cell_i) +// << "no. of cells: "<< tria.n_active_cells()<< std::endl +// << "no. of dofs: "<< dof_handler.n_dofs()<< std::endl +// << "dofs per cell: "<< dofs_per_cell<< std::endl +// << "side length (r=10): "<< 10 * 2*sin(numbers::PI/tria.n_cells())<::active_cell_iterator + cell_i = dof_handler.begin_active(), + cell_j = dof_handler.begin_active(), + endc = dof_handler.end(); + + // cycle on i index + for (; cell_i!=endc; ++cell_i) { - fe_values_i.reinit (cell_i); - cell_normals_i = fe_values_i.get_cell_normal_vectors(); - cell_i->get_dof_indices (local_dof_indices_i); - -// if (cell_i->index()%100==0) -// std::cout -// << cell_i->index()<< " || "; -// << cell_i->vertex(0)<< " || " -// << velocity*cell_normals_i[0] << "; " -// << local_dof_indices_i[0] -// << std::endl; - - cell_DLP_matrix = 0.; - cell_mass_matrix = 0.; - - - - - // assembling of the right hand side - Point - a_unit(0.), - b_unit(1.); - Point - A = fe_values_i.get_mapping(). - transform_unit_to_real_cell(cell_i, - a_unit), - B = fe_values_i.get_mapping(). - transform_unit_to_real_cell(cell_i, - b_unit); - - cell_rhs = 0.; - - - // In order to obtain the Gram - // determinant it is used JxW and - // then it is divided by the weight. - // Both the jacobian and the normals - // are constant on the cell, so they - // are taken in the first quadrature - // point. - double constant_factor = - - pow(fe_values_i.JxW (0)/fe_values_i.get_quadrature().weight(0), 2) - / numbers::PI - * velocity*cell_normals_i[0]; - - // These are constant on the cell so - // there is no need to loop on - // quadrature points. Besides, the - // cell_rhs vector element index is - // chosen = 0 because it is actually - // a 1x1 matrix. There should be a - // loop over cell dofs, but this is - // necessary just for higher degree - // elements. - cell_rhs(0) += - constant_factor - *( - log( A.distance(B) ) + 8.*qlog.weight(0) - ); - // A Gauss integration is performed to compute the - // integrals on K_i X K_j in the case when i!=j. - // cycle on j index - for (cell_j=dof_handler.begin_active(); cell_j!=endc; ++cell_j) - { - fe_values_j.reinit (cell_j); - cell_normals_j = fe_values_j.get_cell_normal_vectors(); - cell_j->get_dof_indices (local_dof_indices_j); - - if (cell_j != cell_i) - { - // The mass matrix has only diagonal - // elements. - mass_matrix(cell_i->index(), cell_j->index())= 0.; - - // with constant elements there is - // only 1 dof per cell, so there is - // no real cycle over cell dofs - for (unsigned int a=0; aindex()==0) && (cell_j->index()==5) ) -// std::cout -// << "("<< cell_i->index()<<","<index()<<"; " -// <index()<< " -- " -// << cell_rhs(i); - } - for (unsigned int a=0; aindex(), cell_i->index()) - += - fe_values_i.JxW(q_point_i); - - // The double layer potential matrix - // has no diagonal terms since the - // scalar product between the cell - // normal and the difference - // x-y<\tt> is always zero. This - // is because, if x<\tt> and - // y<\tt> are on the same - // element and the element is a - // straight segment, their - // difference is always orthogonal - // to the cell normal. - DLP_matrix(cell_i->index(), cell_i->index()) = 0.; - } - - cell_DLP_matrix = 0.; - -// std::cout -// << cell_DLP_matrix(0,0)<< " - "; - - } - -// std::cout -// << cell_rhs(0)<get_dof_indices (local_dof_indices_i); + +// if (cell_i->index()%100==0) +// std::cout +// << cell_i->index()<< " || "; +// << cell_i->vertex(0)<< " || " +// << velocity*cell_normals_i[0] << "; " +// << local_dof_indices_i[0] +// << std::endl; + + cell_DLP_matrix = 0.; + cell_mass_matrix = 0.; + + + + + // assembling of the right hand side + Point + a_unit(0.), + b_unit(1.); + Point + A = fe_values_i.get_mapping(). + transform_unit_to_real_cell(cell_i, + a_unit), + B = fe_values_i.get_mapping(). + transform_unit_to_real_cell(cell_i, + b_unit); + + cell_rhs = 0.; + + + // In order to obtain the Gram + // determinant it is used JxW and + // then it is divided by the weight. + // Both the jacobian and the normals + // are constant on the cell, so they + // are taken in the first quadrature + // point. + double constant_factor = + - pow(fe_values_i.JxW (0)/fe_values_i.get_quadrature().weight(0), 2) + / numbers::PI + * velocity*cell_normals_i[0]; + + // These are constant on the cell so + // there is no need to loop on + // quadrature points. Besides, the + // cell_rhs vector element index is + // chosen = 0 because it is actually + // a 1x1 matrix. There should be a + // loop over cell dofs, but this is + // necessary just for higher degree + // elements. + cell_rhs(0) += + constant_factor + *( + log( A.distance(B) ) + 8.*qlog.weight(0) + ); + // A Gauss integration is performed to compute the + // integrals on K_i X K_j in the case when i!=j. + // cycle on j index + for (cell_j=dof_handler.begin_active(); cell_j!=endc; ++cell_j) + { + fe_values_j.reinit (cell_j); + cell_normals_j = fe_values_j.get_cell_normal_vectors(); + cell_j->get_dof_indices (local_dof_indices_j); + + if (cell_j != cell_i) + { + // The mass matrix has only diagonal + // elements. + mass_matrix(cell_i->index(), cell_j->index())= 0.; + + // with constant elements there is + // only 1 dof per cell, so there is + // no real cycle over cell dofs + for (unsigned int a=0; aindex()==0) && (cell_j->index()==5) ) +// std::cout +// << "("<< cell_i->index()<<","<index()<<"; " +// <index()<< " -- " +// << cell_rhs(i); + } + for (unsigned int a=0; aindex(), cell_i->index()) + += + fe_values_i.JxW(q_point_i); + + // The double layer potential matrix + // has no diagonal terms since the + // scalar product between the cell + // normal and the difference + // x-y<\tt> is always zero. This + // is because, if x<\tt> and + // y<\tt> are on the same + // element and the element is a + // straight segment, their + // difference is always orthogonal + // to the cell normal. + DLP_matrix(cell_i->index(), cell_i->index()) = 0.; + } + + cell_DLP_matrix = 0.; + +// std::cout +// << cell_DLP_matrix(0,0)<< " - "; + + } + +// std::cout +// << cell_rhs(0)< table_indices(dof_handler.n_dofs(), dof_handler.n_dofs()); - system_matrix.add( - 1, mass_matrix, - -1, DLP_matrix - ); + system_matrix.add( + 1, mass_matrix, + -1, DLP_matrix + ); // std::cout -// << "rhs"<< std::endl; +// << "rhs"<< std::endl; // for (unsigned int i=0; i @@ -534,152 +535,152 @@ void BEM::solve() { - SolverControl solver_control(1000, 1e-12); - SolverCG<> cg(solver_control); - - cg.solve( system_matrix, - solution, - system_rhs, - PreconditionIdentity() ); - - // Smoothen the piecewise constant - // solution to a continuous piecewise - // quadratic function. - smooth_solution.reinit(dof_handler_q.n_dofs()); - - FETools::interpolate( dof_handler, - solution, - dof_handler_q, - smooth_solution); - - // Calculate the tangential derivative - // of the smoothened potential, that - // is the tangential component of the - // perturbation induced in the - // velocity. - tangential_derivative.reinit(dof_handler_q.n_dofs()); - tangential_velocity.reinit(dof_handler_q.n_dofs()); - error.reinit(dof_handler_q.n_dofs()); - QMidpoint q_midpoint; - QTrapez q_trapez; - const QIterated q_iterated(q_midpoint, 1); - - FEValues fe_values_q(fe_q, - q_iterated, - update_values | - update_gradients | - update_cell_normal_vectors ); - - std::vector< Point > cell_normals(q_iterated.size()); - std::vector< Point > cell_tangentials(q_iterated.size()); - std::vector local_dof_indices (fe_q.dofs_per_cell); - - typename DoFHandler::active_cell_iterator - cell = dof_handler_q.begin_active(), - endc = dof_handler_q.end(); - for (; cell!=endc; ++cell) + SolverControl solver_control(1000, 1e-12); + SolverCG<> cg(solver_control); + + cg.solve( system_matrix, + solution, + system_rhs, + PreconditionIdentity() ); + + // Smoothen the piecewise constant + // solution to a continuous piecewise + // quadratic function. + smooth_solution.reinit(dof_handler_q.n_dofs()); + + FETools::interpolate( dof_handler, + solution, + dof_handler_q, + smooth_solution); + + // Calculate the tangential derivative + // of the smoothened potential, that + // is the tangential component of the + // perturbation induced in the + // velocity. + tangential_derivative.reinit(dof_handler_q.n_dofs()); + tangential_velocity.reinit(dof_handler_q.n_dofs()); + error.reinit(dof_handler_q.n_dofs()); + QMidpoint q_midpoint; + QTrapez q_trapez; + const QIterated q_iterated(q_midpoint, 1); + + FEValues fe_values_q(fe_q, + q_iterated, + update_values | + update_gradients | + update_cell_normal_vectors ); + + std::vector< Point > cell_normals(q_iterated.size()); + std::vector< Point > cell_tangentials(q_iterated.size()); + std::vector local_dof_indices (fe_q.dofs_per_cell); + + typename DoFHandler::active_cell_iterator + cell = dof_handler_q.begin_active(), + endc = dof_handler_q.end(); + for (; cell!=endc; ++cell) { - fe_values_q.reinit(cell); - cell->get_dof_indices (local_dof_indices); + fe_values_q.reinit(cell); + cell->get_dof_indices (local_dof_indices); //QUADRATIC INTERPOLATION OF THE POTENTIAL -// std::cout -// << "indices - "; -// for(unsigned int i=0; i > gradient(q_iterated.size()); - for(unsigned int pnt=0; pnt > gradient(q_iterated.size()); + for (unsigned int pnt=0; pntindex() -// << std::endl; - - - for(unsigned int pnt=0; pntindex())= - contract( - gradient[pnt], - cell_tangentials[pnt] - ) - + - contract(velocity, - cell_tangentials[0] - ); - error(cell->index())= - tangential_derivative(cell->index()) - - - 2. * velocity[0] - * sin (numbers::PI/2. - (1./2.+cell->index()) * 2.*numbers::PI/tria.n_active_cells() ); - tangential_velocity(cell->index())= - contract(velocity, - cell_tangentials[0] - ); - - } - -// // for(unsigned int pnt=0; pntindex()) -// << std::endl; - } +// smooth_solution(local_dof_indices[(fun==0? 0 +// : +// fun==1 ? 2 +// : +// 1 +// )] +// ) + * + fe_values_q.shape_grad(fun, pnt); + +// std::cout +// << smooth_solution(local_dof_indices[(fun==0? 0 +// : +// fun==1 ? 2 +// : +// 1 +// )])<< " | " +// << fe_values_q.shape_grad(fun, pnt) +// << std::endl; + } + +// std::cout +// << "gradienti "<index() +// << std::endl; + + + for (unsigned int pnt=0; pntindex())= + contract( + gradient[pnt], + cell_tangentials[pnt] + ) + + + contract(velocity, + cell_tangentials[0] + ); + error(cell->index())= + tangential_derivative(cell->index()) + - + 2. * velocity[0] + * sin (numbers::PI/2. - (1./2.+cell->index()) * 2.*numbers::PI/tria.n_active_cells() ); + tangential_velocity(cell->index())= + contract(velocity, + cell_tangentials[0] + ); + + } + +// // for(unsigned int pnt=0; pntindex()) +// << std::endl; + } // DataOut > dataout; @@ -687,12 +688,12 @@ BEM::solve() // dataout.add_data_vector(smooth_solution, "quadratic_potential"); // dataout.build_patches(fe_q.degree); // char outname[50]; -// sprintf(outname, "bem/bem_gradient.vtk"); +// sprintf(outname, "bem/bem_gradient.vtk"); // std::ofstream file(outname); // dataout.write_vtk(file); // dataout.write_vtk(logfile); - - + + } @@ -701,44 +702,44 @@ void BEM::output_results() { - DataOut > dataout; - dataout.attach_dof_handler(dof_handler_q); - dataout.add_data_vector(smooth_solution, "linear_potential"); - dataout.add_data_vector(tangential_derivative, "tangential_velocity"); - dataout.add_data_vector(error, "error"); - dataout.build_patches(); + DataOut > dataout; + dataout.attach_dof_handler(dof_handler_q); + dataout.add_data_vector(smooth_solution, "linear_potential"); + dataout.add_data_vector(tangential_derivative, "tangential_velocity"); + dataout.add_data_vector(error, "error"); + dataout.build_patches(); // dataout.build_patches(fe_q.degree); - dataout.write_vtk(logfile); - + dataout.write_vtk(logfile); + } template void -BEM::read_grid(std::string filename) +BEM::read_grid(std::string filename) { - GridIn gi; - gi.attach_triangulation (tria); - std::ifstream in (filename.c_str()); - gi.read_ucd (in); + GridIn gi; + gi.attach_triangulation (tria); + std::ifstream in (filename.c_str()); + gi.read_ucd (in); } template -void -BEM::write_grid(std::string filename) +void +BEM::write_grid(std::string filename) { - GridOut grid_out; - grid_out.set_flags (GridOutFlags::Ucd(true)); - grid_out.write_ucd (tria, logfile); - grid_out.write_msh (tria, logfile); + GridOut grid_out; + grid_out.set_flags (GridOutFlags::Ucd(true)); + grid_out.write_ucd (tria, logfile); + grid_out.write_msh (tria, logfile); } -int main () +int main () { - - BEM<2> bem; - bem.run(); - return 0; + BEM<2> bem; + bem.run(); + + return 0; } - + diff --git a/tests/codim_one/bem_integration.cc b/tests/codim_one/bem_integration.cc index 9bf6caee12..e4115f23d3 100644 --- a/tests/codim_one/bem_integration.cc +++ b/tests/codim_one/bem_integration.cc @@ -16,7 +16,7 @@ -// +// #include "../tests.h" @@ -64,130 +64,131 @@ class LaplaceKernelIntegration { public: - LaplaceKernelIntegration(); - ~LaplaceKernelIntegration(); - - void run(); - - void compute_SD_integral_on_cell(vector &dst, - typename DoFHandler::active_cell_iterator &cell, - const Point &point); + LaplaceKernelIntegration(); + ~LaplaceKernelIntegration(); + + void run(); + + void compute_SD_integral_on_cell(vector &dst, + typename DoFHandler::active_cell_iterator &cell, + const Point &point); private: - double term_S(const Point<3> &r, - const Point<3> &a1, - const Point<3> &a2, - const Point<3> &n, - const double &rn_c); + double term_S(const Point<3> &r, + const Point<3> &a1, + const Point<3> &a2, + const Point<3> &n, + const double &rn_c); - double term_D(const Point<3> &r, - const Point<3> &a1, - const Point<3> &a2); + double term_D(const Point<3> &r, + const Point<3> &a1, + const Point<3> &a2); - SmartPointer > fe_values; + SmartPointer > fe_values; }; template <> LaplaceKernelIntegration<2>::LaplaceKernelIntegration() { - static FE_DGP<2,3> fe(0); - vector > qps(5); - qps[0] = Point<2>(0,0); - qps[1] = Point<2>(0,1); - qps[2] = Point<2>(1,0); - qps[3] = Point<2>(1,1); - qps[4] = Point<2>(.5,.5); - vector ws(5,1.); - static Quadrature<2> quadrature(qps, ws); - fe_values = new FEValues<2,3>(fe,quadrature, - update_values | - update_jacobians | - update_normal_vectors); + static FE_DGP<2,3> fe(0); + vector > qps(5); + qps[0] = Point<2>(0,0); + qps[1] = Point<2>(0,1); + qps[2] = Point<2>(1,0); + qps[3] = Point<2>(1,1); + qps[4] = Point<2>(.5,.5); + vector ws(5,1.); + static Quadrature<2> quadrature(qps, ws); + fe_values = new FEValues<2,3>(fe,quadrature, + update_values | + update_jacobians | + update_normal_vectors); } template -LaplaceKernelIntegration::~LaplaceKernelIntegration() { - FEValues *fp = fe_values; - fe_values = 0; - delete fp; +LaplaceKernelIntegration::~LaplaceKernelIntegration() +{ + FEValues *fp = fe_values; + fe_values = 0; + delete fp; } template <> void LaplaceKernelIntegration<2>::compute_SD_integral_on_cell(vector &dst, - DoFHandler<2,3>::active_cell_iterator &cell, - const Point<3> &point) + DoFHandler<2,3>::active_cell_iterator &cell, + const Point<3> &point) { - Assert(dst.size() == 2, - ExcDimensionMismatch(dst.size(), 2)); - fe_values->reinit(cell); - vector > jacobians = fe_values->get_jacobians(); - vector > normals = fe_values->get_normal_vectors(); - - Point<3> r,a1,a2,n,r_c,n_c; - r_c = point-cell->center(); - n_c = normals[4]; - - double rn_c = r_c*n_c; - vector i_S(4); - vector i_D(4); - for (unsigned int q_point=0; q_point < 4; ++q_point) + Assert(dst.size() == 2, + ExcDimensionMismatch(dst.size(), 2)); + fe_values->reinit(cell); + vector > jacobians = fe_values->get_jacobians(); + vector > normals = fe_values->get_normal_vectors(); + + Point<3> r,a1,a2,n,r_c,n_c; + r_c = point-cell->center(); + n_c = normals[4]; + + double rn_c = r_c*n_c; + vector i_S(4); + vector i_D(4); + for (unsigned int q_point=0; q_point < 4; ++q_point) { - r = point-cell->vertex(q_point); - a1 = transpose(jacobians[q_point])[0]; - a2 = transpose(jacobians[q_point])[1]; - n = normals[q_point]; - i_S[q_point]=term_S(r,a1,a2,n,rn_c); - i_D[q_point]=term_D(r,a1,a2); + r = point-cell->vertex(q_point); + a1 = transpose(jacobians[q_point])[0]; + a2 = transpose(jacobians[q_point])[1]; + n = normals[q_point]; + i_S[q_point]=term_S(r,a1,a2,n,rn_c); + i_D[q_point]=term_D(r,a1,a2); } - dst[0] = (i_S[3]-i_S[1]-i_S[2]+i_S[0]); - dst[1] = (i_D[3]-i_D[1]-i_D[2]+i_D[0]); + dst[0] = (i_S[3]-i_S[1]-i_S[2]+i_S[0]); + dst[1] = (i_D[3]-i_D[1]-i_D[2]+i_D[0]); } template double LaplaceKernelIntegration::term_S (const Point<3> &r, - const Point<3> &a1, - const Point<3> &a2, - const Point<3> &n, - const double &rn_c) + const Point<3> &a1, + const Point<3> &a2, + const Point<3> &n, + const double &rn_c) { - Point<3> ra1, ra2, a12; - - cross_product(ra1,r,a1); - cross_product(ra2,r,a2); - cross_product(a12,a1,a2); - - double integral = - -1./2./numbers::PI - *( - - ra1*n/a1.norm() * asinh( r*a1/ra1.norm() ) - + ra2*n/a2.norm() * asinh( r*a2/ra2.norm() ) - + rn_c * atan( ra1*ra2 / (r.norm()* (r*(a12)))) - ); - - return integral; + Point<3> ra1, ra2, a12; + + cross_product(ra1,r,a1); + cross_product(ra2,r,a2); + cross_product(a12,a1,a2); + + double integral = + -1./2./numbers::PI + *( + - ra1*n/a1.norm() * asinh( r*a1/ra1.norm() ) + + ra2*n/a2.norm() * asinh( r*a2/ra2.norm() ) + + rn_c * atan( ra1*ra2 / (r.norm()* (r*(a12)))) + ); + + return integral; } template double LaplaceKernelIntegration::term_D (const Point<3> &r, - const Point<3> &a1, - const Point<3> &a2) + const Point<3> &a1, + const Point<3> &a2) { - Point<3> ra1, ra2, a12; + Point<3> ra1, ra2, a12; - cross_product(ra1,r,a1); - cross_product(ra2,r,a2); - cross_product(a12,a1,a2); - - double integral = 1./2./numbers::PI - *atan( ra1*ra2 / (r.norm()* (r*(a12)))); + cross_product(ra1,r,a1); + cross_product(ra2,r,a2); + cross_product(a12,a1,a2); - return integral; + double integral = 1./2./numbers::PI + *atan( ra1*ra2 / (r.norm()* (r*(a12)))); + + return integral; } @@ -195,48 +196,48 @@ LaplaceKernelIntegration::term_D (const Point<3> &r, double integration(Point<3> point) { - Triangulation<2,3> square; - GridGenerator::hyper_cube<2,3>(square,0,2); - DoFHandler<2,3> dof_handler(square); - static const FE_DGP<2,3> fe(0); - dof_handler.distribute_dofs(fe); - - DoFHandler<2,3>::active_cell_iterator - cell = dof_handler.begin_active(); - - LaplaceKernelIntegration<2> laplace; - vector integrals(2); - laplace.compute_SD_integral_on_cell(integrals, - cell, - point); - return integrals[0]; - + Triangulation<2,3> square; + GridGenerator::hyper_cube<2,3>(square,0,2); + DoFHandler<2,3> dof_handler(square); + static const FE_DGP<2,3> fe(0); + dof_handler.distribute_dofs(fe); + + DoFHandler<2,3>::active_cell_iterator + cell = dof_handler.begin_active(); + + LaplaceKernelIntegration<2> laplace; + vector integrals(2); + laplace.compute_SD_integral_on_cell(integrals, + cell, + point); + return integrals[0]; + } int main() { - - deallog.attach(logfile); - deallog.depth_console(0); - deallog< point(.5, .5, 0); - double true_result= -3.163145629/numbers::PI; - deallog<< "Error on " << point - << " : " << integration(point)-true_result <(3, 3, 0); - true_result= -.2306783616; - deallog<< "Error on " << point - << " : " << integration(point)-true_result <(1.5, .5, 0); - true_result= -1.006860525; - deallog<< "Error on " << point - << " : " << integration(point)-true_result < point(.5, .5, 0); + double true_result= -3.163145629/numbers::PI; + deallog<< "Error on " << point + << " : " << integration(point)-true_result <(3, 3, 0); + true_result= -.2306783616; + deallog<< "Error on " << point + << " : " << integration(point)-true_result <(1.5, .5, 0); + true_result= -1.006860525; + deallog<< "Error on " << point + << " : " << integration(point)-true_result < -void save_mesh(const Triangulation& tria) +void save_mesh(const Triangulation &tria) { GridOut grid_out; grid_out.write_gnuplot (tria, deallog.get_file_stream()); @@ -54,7 +54,7 @@ int main () deallog.attach(logfile); deallog.depth_console(0); - // Extract the boundary of 3/4 of a sphere + // Extract the boundary of 3/4 of a sphere { const int dim = 3; deallog << "Testing hyper_cube in dim: " << dim << "..."<< endl; @@ -64,51 +64,51 @@ int main () GridGenerator::hyper_ball(volume_mesh); volume_mesh.set_boundary (0, boundary_description); - // exclude one of the 6 faces - // from the surface mesh - // extraction + // exclude one of the 6 faces + // from the surface mesh + // extraction for (Triangulation::active_cell_iterator - cell = volume_mesh.begin_active(); - cell != volume_mesh.end(); ++cell) + cell = volume_mesh.begin_active(); + cell != volume_mesh.end(); ++cell) { - bool done = false; - for (unsigned int f=0; f::faces_per_cell; ++f) - if (cell->at_boundary(f)) - { - cell->face(f)->set_boundary_indicator(1); - done = true; - break; - } - if (done) - break; + bool done = false; + for (unsigned int f=0; f::faces_per_cell; ++f) + if (cell->at_boundary(f)) + { + cell->face(f)->set_boundary_indicator(1); + done = true; + break; + } + if (done) + break; } const HyperBallBoundary surface_description; Triangulation boundary_mesh; boundary_mesh.set_boundary (0, surface_description); - // now extract a mesh of the 5 - // surface faces + // now extract a mesh of the 5 + // surface faces std::set boundary_indicators; boundary_indicators.insert (0); GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh, - boundary_indicators); + boundary_indicators); deallog << volume_mesh.n_active_cells () << std::endl; deallog << boundary_mesh.n_active_cells () << std::endl; - // at this point, all cells and - // edges of the surface mesh - // should have boundary indicator - // 0. set those at the boundary - // of the mesh to 1 to force - // straight line refinement, then - // refine + // at this point, all cells and + // edges of the surface mesh + // should have boundary indicator + // 0. set those at the boundary + // of the mesh to 1 to force + // straight line refinement, then + // refine for (Triangulation::active_cell_iterator - cell = boundary_mesh.begin_active(); - cell != boundary_mesh.end(); ++cell) + cell = boundary_mesh.begin_active(); + cell != boundary_mesh.end(); ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) - if (cell->at_boundary(f)) - cell->face(f)->set_boundary_indicator(1); + if (cell->at_boundary(f)) + cell->face(f)->set_boundary_indicator(1); boundary_mesh.refine_global (2); diff --git a/tests/codim_one/data_out.cc b/tests/codim_one/data_out.cc index 3b2fd8673e..4d9a7bfac0 100644 --- a/tests/codim_one/data_out.cc +++ b/tests/codim_one/data_out.cc @@ -46,7 +46,8 @@ std::ofstream logfile("data_out/output"); template -void test(std::string filename) { +void test(std::string filename) +{ Triangulation triangulation; GridIn gi; @@ -59,12 +60,12 @@ void test(std::string filename) { DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); - + // Output the vertex numbering Vector numbering(dof_handler.n_dofs()); - for(unsigned int i=0; i > dataout; dataout.attach_dof_handler(dof_handler); dataout.add_data_vector(numbering, "numbering"); @@ -74,7 +75,7 @@ void test(std::string filename) { -int main () +int main () { deallog.attach(logfile); deallog.depth_console(0); diff --git a/tests/codim_one/data_out_02.cc b/tests/codim_one/data_out_02.cc index 2e3d70e278..774efc62a4 100644 --- a/tests/codim_one/data_out_02.cc +++ b/tests/codim_one/data_out_02.cc @@ -65,7 +65,7 @@ int main () data_out.attach_dof_handler (dof_handler); data_out.add_data_vector (soln, "scalar_data", - DataOut >::type_dof_data); + DataOut >::type_dof_data); data_out.build_patches (); data_out.write_vtk (deallog.get_file_stream()); diff --git a/tests/codim_one/data_out_03.cc b/tests/codim_one/data_out_03.cc index c626eced78..e181f9b635 100644 --- a/tests/codim_one/data_out_03.cc +++ b/tests/codim_one/data_out_03.cc @@ -42,26 +42,26 @@ std::ofstream logfile("data_out_03/output"); template class Identity : public Function { - public: - Identity () - : - Function(dim) - { - } - - - virtual double value (const Point &p, - const unsigned int component) const - { - return p(component); - } - - virtual void vector_value(const Point &p, - Vector< double > & values) const - { - for (unsigned int i=0;i(dim) + { + } + + + virtual double value (const Point &p, + const unsigned int component) const + { + return p(component); + } + + virtual void vector_value(const Point &p, + Vector< double > &values) const + { + for (unsigned int i=0; i tria; std::map< Triangulation<2,3>::cell_iterator, - Triangulation<3,3>::face_iterator> surface_to_volume_mapping; + Triangulation<3,3>::face_iterator> surface_to_volume_mapping; HyperBallBoundary<3> boundary_description; Triangulation<3> volume_mesh; @@ -95,13 +95,13 @@ int main () boundary_ids.insert(0); GridTools::extract_boundary_mesh (volume_mesh, tria, - boundary_ids); + boundary_ids); // test for the position MappingQ<2,3> mapping(mapping_degree,true); FESystem<2,3> fe_test (FE_Q<2,3> - (fe_degree),3); + (fe_degree),3); DoFHandler<2,3> dh_test(tria); dh_test.distribute_dofs(fe_test); @@ -109,17 +109,17 @@ int main () VectorTools::interpolate(mapping,dh_test,Identity<3>(),position); std::vector - data_component_interpretation - (3, DataComponentInterpretation::component_is_part_of_vector); + data_component_interpretation + (3, DataComponentInterpretation::component_is_part_of_vector); std::vector solution_names (3, "position"); DataOut<2, DoFHandler<2,3> > data_out; data_out.attach_dof_handler (dh_test); data_out.add_data_vector (position, solution_names, - DataOut<2,DoFHandler<2, - 3> >::type_dof_data, - data_component_interpretation); + DataOut<2,DoFHandler<2, + 3> >::type_dof_data, + data_component_interpretation); data_out.build_patches (mapping, 2); data_out.write_gnuplot (deallog.get_file_stream()); diff --git a/tests/codim_one/direction_flag_01.cc b/tests/codim_one/direction_flag_01.cc index e9a0d12805..4aa106ceae 100644 --- a/tests/codim_one/direction_flag_01.cc +++ b/tests/codim_one/direction_flag_01.cc @@ -38,25 +38,25 @@ void test () GridGenerator::hyper_cube(volume_mesh); GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh); for (Triangulation::active_cell_iterator - cell = boundary_mesh.begin_active(); + cell = boundary_mesh.begin_active(); cell != boundary_mesh.end(); ++cell) { deallog << "Cell=" << cell; deallog << ", direction flag=" - << (cell->direction_flag() ? "true" : "false") - << std::endl; + << (cell->direction_flag() ? "true" : "false") + << std::endl; } boundary_mesh.refine_global(1); for (Triangulation::active_cell_iterator - cell = boundary_mesh.begin_active(); + cell = boundary_mesh.begin_active(); cell != boundary_mesh.end(); ++cell) { deallog << "Cell=" << cell << std::endl; deallog << ", direction flag=" - << (cell->direction_flag() ? "true" : "false") - << std::endl; + << (cell->direction_flag() ? "true" : "false") + << std::endl; } } @@ -69,4 +69,4 @@ int main () deallog.depth_console(0); test (); - } +} diff --git a/tests/codim_one/direction_flag_02.cc b/tests/codim_one/direction_flag_02.cc index 3f69c272d0..262f6bcd7d 100644 --- a/tests/codim_one/direction_flag_02.cc +++ b/tests/codim_one/direction_flag_02.cc @@ -38,25 +38,25 @@ void test () GridGenerator::hyper_cube(volume_mesh); GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh); for (Triangulation::active_cell_iterator - cell = boundary_mesh.begin_active(); + cell = boundary_mesh.begin_active(); cell != boundary_mesh.end(); ++cell) { deallog << "Cell=" << cell; deallog << ", direction flag=" - << (cell->direction_flag() ? "true" : "false") - << std::endl; + << (cell->direction_flag() ? "true" : "false") + << std::endl; } boundary_mesh.refine_global(1); for (Triangulation::active_cell_iterator - cell = boundary_mesh.begin_active(); + cell = boundary_mesh.begin_active(); cell != boundary_mesh.end(); ++cell) { deallog << "Cell=" << cell << std::endl; deallog << ", direction flag=" - << (cell->direction_flag() ? "true" : "false") - << std::endl; + << (cell->direction_flag() ? "true" : "false") + << std::endl; } } @@ -69,4 +69,4 @@ int main () deallog.depth_console(0); test (); - } +} diff --git a/tests/codim_one/direction_flag_03.cc b/tests/codim_one/direction_flag_03.cc index 8fc700b5d9..f425bbfd32 100644 --- a/tests/codim_one/direction_flag_03.cc +++ b/tests/codim_one/direction_flag_03.cc @@ -37,10 +37,10 @@ void test () volume_mesh.refine_global(1); for (typename Triangulation::active_cell_iterator - cell = volume_mesh.begin_active(); + cell = volume_mesh.begin_active(); cell != volume_mesh.end(); ++cell) Assert (cell->direction_flag() == true, - ExcInternalError()); + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/codim_one/error_estimator_01.cc b/tests/codim_one/error_estimator_01.cc index d93b950142..be7564e7a6 100644 --- a/tests/codim_one/error_estimator_01.cc +++ b/tests/codim_one/error_estimator_01.cc @@ -41,17 +41,21 @@ template class MySquareFunction : public Function { - public: - MySquareFunction () : Function(2) {} - - virtual double value (const Point &p, - const unsigned int component) const - { return (component+1)*p.square(); } - - virtual void vector_value (const Point &p, - Vector &values) const - { values(0) = value(p,0); - values(1) = value(p,1); } +public: + MySquareFunction () : Function(2) {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return (component+1)*p.square(); + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + values(0) = value(p,0); + values(1) = value(p,1); + } }; @@ -75,38 +79,38 @@ get_q_face <1>() template void make_mesh (Triangulation &tria) { - + GridGenerator::hyper_cube(tria, -1, 1); - // refine the mesh in a random way so as to - // generate as many cells with - // hanging nodes as possible + // refine the mesh in a random way so as to + // generate as many cells with + // hanging nodes as possible tria.refine_global (4-dim); const double steps[4] = { /*d=0*/ 0, 7, 3, 3 }; for (unsigned int i=0; i::active_cell_iterator - cell = tria.begin_active(); + cell = tria.begin_active(); for (unsigned int index=0; cell != tria.end(); ++cell, ++index) if (index % (3*dim) == 0) cell->set_refine_flag(); tria.execute_coarsening_and_refinement (); } - // we now have a number of cells, - // flag them with some subdomain - // ids based on their position, in - // particular we take the quadrant - // (octant) + // we now have a number of cells, + // flag them with some subdomain + // ids based on their position, in + // particular we take the quadrant + // (octant) typename Triangulation::active_cell_iterator - cell = tria.begin_active (), - endc = tria.end (); + cell = tria.begin_active (), + endc = tria.end (); for (; cell!=endc; ++cell) { unsigned int subdomain = 0; for (unsigned int d=0; dcenter()(d) > 0) - subdomain |= (1<center()(d) > 0) + subdomain |= (1<set_subdomain_id (subdomain); @@ -121,10 +125,10 @@ void check () { Functions::CosineFunction function; - + Triangulation tria; make_mesh (tria); - + FE_Q element(3); DoFHandler dof(tria); dof.distribute_dofs(element); @@ -134,53 +138,53 @@ check () std::map*> neumann_bc; neumann_bc[0] = &function; - + Vector v (dof.n_dofs()); VectorTools::interpolate (mapping, dof, function, v); Vector error1 (tria.n_active_cells()); Vector error2 (tria.n_active_cells()); - // compute error by looking at all cells at - // once and output this as the base line - // results. scale results so that they show - // up in the output file as a reasonable - // number + // compute error by looking at all cells at + // once and output this as the base line + // results. scale results so that they show + // up in the output file as a reasonable + // number KellyErrorEstimator::estimate (mapping, dof, q_face, neumann_bc, - v, error1); + v, error1); const double scaling_factor = 10000.*error1.size()/error1.l1_norm(); error1 *= scaling_factor; - + deallog << "Estimated error indicators:" << std::endl; for (unsigned int i=0; i (); deallog.pop(); diff --git a/tests/codim_one/extract_boundary_mesh_00.cc b/tests/codim_one/extract_boundary_mesh_00.cc index ae73d053e4..75de68acfa 100644 --- a/tests/codim_one/extract_boundary_mesh_00.cc +++ b/tests/codim_one/extract_boundary_mesh_00.cc @@ -38,46 +38,49 @@ using namespace std; template bool test_vertices_orientation(const Triangulation &boundary_mesh, - map< typename Triangulation::cell_iterator, - typename Triangulation::face_iterator > - &surface_to_volume_mapping, - const int verbosity = 1) + map< typename Triangulation::cell_iterator, + typename Triangulation::face_iterator > + &surface_to_volume_mapping, + const int verbosity = 1) { typename Triangulation::active_cell_iterator - cell = boundary_mesh.begin_active(), - endc = boundary_mesh.end(); + cell = boundary_mesh.begin_active(), + endc = boundary_mesh.end(); typename Triangulation::face_iterator face; bool success = true; if (verbosity>1) deallog << "Vol faces" << "\t" << "Surf cell" << - "\t" << "Distance" <::vertices_per_cell; ++k) - { - Point diff(face->vertex(k)); - diff -= cell->vertex(k); - if (verbosity>1){ - deallog << face->vertex(k) << "\t\t"; - deallog << cell->vertex(k) << "\t\t\t" << diff.square() << endl; - } - if (diff.square()>0){ - success = false; - break; - } - } - if (verbosity>1) deallog << endl; - } + "\t" << "Distance" <::vertices_per_cell; ++k) + { + Point diff(face->vertex(k)); + diff -= cell->vertex(k); + if (verbosity>1) + { + deallog << face->vertex(k) << "\t\t"; + deallog << cell->vertex(k) << "\t\t\t" << diff.square() << endl; + } + if (diff.square()>0) + { + success = false; + break; + } + } + if (verbosity>1) deallog << endl; + } return success; } template -void save_mesh(const Triangulation& tria) +void save_mesh(const Triangulation &tria) { GridOut grid_out; grid_out.write_ucd (tria, deallog.get_file_stream()); @@ -91,13 +94,14 @@ int main () deallog.attach(logfile); deallog.depth_console(0); - { // Extract the whole boundary of a hyper-cube + { + // Extract the whole boundary of a hyper-cube const int dim = 2; deallog << "Testing hyper_cube in dim: " << dim << "..."<< endl; map< Triangulation::cell_iterator, - Triangulation::face_iterator> - surface_to_volume_mapping; + Triangulation::face_iterator> + surface_to_volume_mapping; Triangulation volume_mesh; GridGenerator::hyper_cube(volume_mesh); @@ -121,13 +125,14 @@ int main () } - { // Extract the whole boundary of a hyper-cube + { + // Extract the whole boundary of a hyper-cube const int dim = 3; deallog << "Testing hyper_cube in dim: " << dim << "..."<< endl; map< Triangulation::cell_iterator, - Triangulation::face_iterator> - surface_to_volume_mapping; + Triangulation::face_iterator> + surface_to_volume_mapping; Triangulation volume_mesh; GridGenerator::hyper_cube(volume_mesh); @@ -152,14 +157,15 @@ int main () } - { // Extract a piece of the boundary of a hyper-cube + { + // Extract a piece of the boundary of a hyper-cube const int dim = 3; deallog << "Testing hyper_cube in dim: " << dim << "..."<< endl; map< Triangulation::cell_iterator, - Triangulation::face_iterator> - surface_to_volume_mapping; + Triangulation::face_iterator> + surface_to_volume_mapping; Triangulation volume_mesh; GridGenerator::hyper_cube(volume_mesh); @@ -174,7 +180,7 @@ int main () surface_to_volume_mapping = GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh, - boundary_ids); + boundary_ids); if (test_vertices_orientation(boundary_mesh, surface_to_volume_mapping)) deallog << "Passed."; @@ -190,5 +196,5 @@ int main () - return 0; - } + return 0; +} diff --git a/tests/codim_one/extract_boundary_mesh_01.cc b/tests/codim_one/extract_boundary_mesh_01.cc index ad346484ca..729a35cc8d 100644 --- a/tests/codim_one/extract_boundary_mesh_01.cc +++ b/tests/codim_one/extract_boundary_mesh_01.cc @@ -40,48 +40,52 @@ using namespace std; template bool test_vertices_orientation(const Triangulation &boundary_mesh, - map< typename Triangulation::cell_iterator, - typename Triangulation::face_iterator > - &surface_to_volume_mapping, - const int verbosity = 1) + map< typename Triangulation::cell_iterator, + typename Triangulation::face_iterator > + &surface_to_volume_mapping, + const int verbosity = 1) { typename Triangulation::active_cell_iterator - cell = boundary_mesh.begin_active(), - endc = boundary_mesh.end(); + cell = boundary_mesh.begin_active(), + endc = boundary_mesh.end(); typename Triangulation::face_iterator face; bool success = true; - if (verbosity>1){ - deallog << "The last column should be 0" <::vertices_per_cell; ++k) - { - Point diff(face->vertex(k)); - diff -= cell->vertex(k); - if (verbosity>1){ - deallog << face->vertex(k) << "\t\t"; - deallog << cell->vertex(k) << "\t\t\t" << diff.square() << endl; - } - if (diff.square()>0){ - success = false; - break; - } - } - if (verbosity>1) deallog << endl; - } + if (verbosity>1) + { + deallog << "The last column should be 0" <::vertices_per_cell; ++k) + { + Point diff(face->vertex(k)); + diff -= cell->vertex(k); + if (verbosity>1) + { + deallog << face->vertex(k) << "\t\t"; + deallog << cell->vertex(k) << "\t\t\t" << diff.square() << endl; + } + if (diff.square()>0) + { + success = false; + break; + } + } + if (verbosity>1) deallog << endl; + } return success; } template -void save_mesh(const Triangulation& tria) +void save_mesh(const Triangulation &tria) { GridOut grid_out; grid_out.write_gnuplot (tria, deallog.get_file_stream()); @@ -96,14 +100,15 @@ int main () deallog.depth_console(0); - { // Extract the boundary of a hyper-sphere + { + // Extract the boundary of a hyper-sphere const int dim = 3; deallog << "Testing hyper_cube in dim: " << dim << "..."<< endl; map< Triangulation::cell_iterator, - Triangulation::face_iterator> - surface_to_volume_mapping; + Triangulation::face_iterator> + surface_to_volume_mapping; Triangulation volume_mesh; GridGenerator::hyper_ball(volume_mesh); @@ -115,10 +120,10 @@ int main () = GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh); Assert (test_vertices_orientation(boundary_mesh, surface_to_volume_mapping,2), - ExcInternalError()); + ExcInternalError()); save_mesh(boundary_mesh); } - return 0; - } + return 0; +} diff --git a/tests/codim_one/extract_boundary_mesh_02.cc b/tests/codim_one/extract_boundary_mesh_02.cc index 0287d6c3b7..949b40c708 100644 --- a/tests/codim_one/extract_boundary_mesh_02.cc +++ b/tests/codim_one/extract_boundary_mesh_02.cc @@ -40,38 +40,39 @@ using namespace std; template void test_vertices_orientation(const Triangulation &boundary_mesh, - map< typename Triangulation::cell_iterator, - typename Triangulation::face_iterator > - &surface_to_volume_mapping) + map< typename Triangulation::cell_iterator, + typename Triangulation::face_iterator > + &surface_to_volume_mapping) { typename Triangulation::active_cell_iterator - cell = boundary_mesh.begin_active(), - endc = boundary_mesh.end(); + cell = boundary_mesh.begin_active(), + endc = boundary_mesh.end(); typename Triangulation::face_iterator face; - for (; cell!=endc; ++cell){ + for (; cell!=endc; ++cell) + { - face = surface_to_volume_mapping [cell]; + face = surface_to_volume_mapping [cell]; - deallog << "Surface cell: " << cell << " with vertices:" << std::endl; - for (unsigned int k=0; k::vertices_per_cell; ++k) - deallog << " " << cell->vertex(k) << std::endl; + deallog << "Surface cell: " << cell << " with vertices:" << std::endl; + for (unsigned int k=0; k::vertices_per_cell; ++k) + deallog << " " << cell->vertex(k) << std::endl; - deallog << "Volume face: " << face << " with vertices:" << std::endl; - for (unsigned int k=0; k::vertices_per_cell; ++k) - deallog << " " << face->vertex(k) << std::endl; + deallog << "Volume face: " << face << " with vertices:" << std::endl; + for (unsigned int k=0; k::vertices_per_cell; ++k) + deallog << " " << face->vertex(k) << std::endl; - for (unsigned int k=0; k::vertices_per_cell; ++k) - { - Point diff(face->vertex(k)); - diff -= cell->vertex(k); - Assert (diff.square() == 0, ExcInternalError()); - } - } + for (unsigned int k=0; k::vertices_per_cell; ++k) + { + Point diff(face->vertex(k)); + diff -= cell->vertex(k); + Assert (diff.square() == 0, ExcInternalError()); + } + } } template -void save_mesh(const Triangulation& tria) +void save_mesh(const Triangulation &tria) { GridOut grid_out; grid_out.write_gnuplot (tria, deallog.get_file_stream()); @@ -86,14 +87,15 @@ int main () deallog.depth_console(0); - { // Extract the boundary of a hyper-sphere + { + // Extract the boundary of a hyper-sphere const int dim = 3; deallog << "Testing hyper_cube in dim: " << dim << "..."<< endl; map< Triangulation::cell_iterator, - Triangulation::face_iterator> - surface_to_volume_mapping; + Triangulation::face_iterator> + surface_to_volume_mapping; const HyperBallBoundary boundary_description; Triangulation volume_mesh; GridGenerator::hyper_ball(volume_mesh); @@ -116,5 +118,5 @@ int main () } - return 0; - } + return 0; +} diff --git a/tests/codim_one/extract_boundary_mesh_03.cc b/tests/codim_one/extract_boundary_mesh_03.cc index ae6d80898c..f0976c9384 100644 --- a/tests/codim_one/extract_boundary_mesh_03.cc +++ b/tests/codim_one/extract_boundary_mesh_03.cc @@ -38,48 +38,49 @@ using namespace std; template void test_vertices_orientation(const Triangulation &boundary_mesh, - map< typename Triangulation::cell_iterator, - typename Triangulation::face_iterator > - &surface_to_volume_mapping) + map< typename Triangulation::cell_iterator, + typename Triangulation::face_iterator > + &surface_to_volume_mapping) { typename Triangulation::active_cell_iterator - cell = boundary_mesh.begin_active(), - endc = boundary_mesh.end(); + cell = boundary_mesh.begin_active(), + endc = boundary_mesh.end(); typename Triangulation::face_iterator face; - for (; cell!=endc; ++cell){ - - face = surface_to_volume_mapping [cell]; - Assert (face->at_boundary(), ExcInternalError()); - - deallog << "Surface cell: " << cell << " with vertices:" << std::endl; - for (unsigned int k=0; k::vertices_per_cell; ++k) - { - deallog << " " << cell->vertex(k) << std::endl; - Assert (std::fabs(cell->vertex(k).distance (Point()) - 1) < 1e-12, - ExcInternalError()); - } - - deallog << "Volume face: " << face << " with vertices:" << std::endl; - for (unsigned int k=0; k::vertices_per_cell; ++k) - { - deallog << " " << face->vertex(k) << std::endl; - Assert (std::fabs(face->vertex(k).distance (Point()) - 1) < 1e-12, - ExcInternalError()); - } - - - for (unsigned int k=0; k::vertices_per_cell; ++k) - { - Point diff(face->vertex(k)); - diff -= cell->vertex(k); - Assert (diff.square() == 0, ExcInternalError()); - } - } + for (; cell!=endc; ++cell) + { + + face = surface_to_volume_mapping [cell]; + Assert (face->at_boundary(), ExcInternalError()); + + deallog << "Surface cell: " << cell << " with vertices:" << std::endl; + for (unsigned int k=0; k::vertices_per_cell; ++k) + { + deallog << " " << cell->vertex(k) << std::endl; + Assert (std::fabs(cell->vertex(k).distance (Point()) - 1) < 1e-12, + ExcInternalError()); + } + + deallog << "Volume face: " << face << " with vertices:" << std::endl; + for (unsigned int k=0; k::vertices_per_cell; ++k) + { + deallog << " " << face->vertex(k) << std::endl; + Assert (std::fabs(face->vertex(k).distance (Point()) - 1) < 1e-12, + ExcInternalError()); + } + + + for (unsigned int k=0; k::vertices_per_cell; ++k) + { + Point diff(face->vertex(k)); + diff -= cell->vertex(k); + Assert (diff.square() == 0, ExcInternalError()); + } + } } template -void save_mesh(const Triangulation& tria) +void save_mesh(const Triangulation &tria) { GridOut grid_out; grid_out.write_gnuplot (tria, deallog.get_file_stream()); @@ -94,23 +95,24 @@ int main () deallog.depth_console(0); - { // Extract the boundary of a hyper-sphere + { + // Extract the boundary of a hyper-sphere const int dim = 3; deallog << "Testing hyper_cube in dim: " << dim << "..."<< endl; map< Triangulation::cell_iterator, - Triangulation::face_iterator> - surface_to_volume_mapping; + Triangulation::face_iterator> + surface_to_volume_mapping; const HyperBallBoundary boundary_description; Triangulation volume_mesh; GridGenerator::hyper_ball(volume_mesh); for (Triangulation::active_cell_iterator - cell = volume_mesh.begin_active(); - cell != volume_mesh.end(); ++cell) + cell = volume_mesh.begin_active(); + cell != volume_mesh.end(); ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) - if (cell->at_boundary(f)) - cell->face(f)->set_all_boundary_indicators (1); + if (cell->at_boundary(f)) + cell->face(f)->set_all_boundary_indicators (1); volume_mesh.set_boundary (1, boundary_description); volume_mesh.refine_global (1); @@ -130,5 +132,5 @@ int main () } - return 0; - } + return 0; +} diff --git a/tests/codim_one/extract_boundary_mesh_04.cc b/tests/codim_one/extract_boundary_mesh_04.cc index 74d7d0ea46..8b388a94d0 100644 --- a/tests/codim_one/extract_boundary_mesh_04.cc +++ b/tests/codim_one/extract_boundary_mesh_04.cc @@ -38,48 +38,49 @@ using namespace std; template void test_vertices_orientation(const Triangulation &boundary_mesh, - map< typename Triangulation::cell_iterator, - typename Triangulation::face_iterator > - &surface_to_volume_mapping) + map< typename Triangulation::cell_iterator, + typename Triangulation::face_iterator > + &surface_to_volume_mapping) { typename Triangulation::active_cell_iterator - cell = boundary_mesh.begin_active(), - endc = boundary_mesh.end(); + cell = boundary_mesh.begin_active(), + endc = boundary_mesh.end(); typename Triangulation::face_iterator face; - for (; cell!=endc; ++cell){ - - face = surface_to_volume_mapping [cell]; - Assert (face->at_boundary(), ExcInternalError()); - - deallog << "Surface cell: " << cell << " with vertices:" << std::endl; - for (unsigned int k=0; k::vertices_per_cell; ++k) - { - deallog << " " << cell->vertex(k) << std::endl; - Assert (std::fabs(cell->vertex(k).distance (Point()) - 1) < 1e-12, - ExcInternalError()); - } - - deallog << "Volume face: " << face << " with vertices:" << std::endl; - for (unsigned int k=0; k::vertices_per_cell; ++k) - { - deallog << " " << face->vertex(k) << std::endl; - Assert (std::fabs(face->vertex(k).distance (Point()) - 1) < 1e-12, - ExcInternalError()); - } - - - for (unsigned int k=0; k::vertices_per_cell; ++k) - { - Point diff(face->vertex(k)); - diff -= cell->vertex(k); - Assert (diff.square() == 0, ExcInternalError()); - } - } + for (; cell!=endc; ++cell) + { + + face = surface_to_volume_mapping [cell]; + Assert (face->at_boundary(), ExcInternalError()); + + deallog << "Surface cell: " << cell << " with vertices:" << std::endl; + for (unsigned int k=0; k::vertices_per_cell; ++k) + { + deallog << " " << cell->vertex(k) << std::endl; + Assert (std::fabs(cell->vertex(k).distance (Point()) - 1) < 1e-12, + ExcInternalError()); + } + + deallog << "Volume face: " << face << " with vertices:" << std::endl; + for (unsigned int k=0; k::vertices_per_cell; ++k) + { + deallog << " " << face->vertex(k) << std::endl; + Assert (std::fabs(face->vertex(k).distance (Point()) - 1) < 1e-12, + ExcInternalError()); + } + + + for (unsigned int k=0; k::vertices_per_cell; ++k) + { + Point diff(face->vertex(k)); + diff -= cell->vertex(k); + Assert (diff.square() == 0, ExcInternalError()); + } + } } template -void save_mesh(const Triangulation& tria) +void save_mesh(const Triangulation &tria) { GridOut grid_out; grid_out.write_gnuplot (tria, deallog.get_file_stream()); @@ -94,23 +95,24 @@ int main () deallog.depth_console(0); - { // Extract the boundary of a hyper-sphere + { + // Extract the boundary of a hyper-sphere const int dim = 3; deallog << "Testing hyper_cube in dim: " << dim << "..."<< endl; map< Triangulation::cell_iterator, - Triangulation::face_iterator> - surface_to_volume_mapping; + Triangulation::face_iterator> + surface_to_volume_mapping; const HyperBallBoundary boundary_description; Triangulation volume_mesh; GridGenerator::hyper_ball(volume_mesh); for (Triangulation::active_cell_iterator - cell = volume_mesh.begin_active(); - cell != volume_mesh.end(); ++cell) + cell = volume_mesh.begin_active(); + cell != volume_mesh.end(); ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) - if (cell->at_boundary(f) && (cell->center()[dim-1]>0)) - cell->face(f)->set_all_boundary_indicators (1); + if (cell->at_boundary(f) && (cell->center()[dim-1]>0)) + cell->face(f)->set_all_boundary_indicators (1); volume_mesh.set_boundary (1, boundary_description); volume_mesh.set_boundary (0, boundary_description); @@ -126,7 +128,7 @@ int main () surface_to_volume_mapping = GridTools::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; @@ -137,5 +139,5 @@ int main () } - return 0; - } + return 0; +} diff --git a/tests/codim_one/extract_boundary_mesh_05.cc b/tests/codim_one/extract_boundary_mesh_05.cc index b2218eb983..c8bfbc29cc 100644 --- a/tests/codim_one/extract_boundary_mesh_05.cc +++ b/tests/codim_one/extract_boundary_mesh_05.cc @@ -38,7 +38,7 @@ void test () Triangulation boundary_mesh; map::cell_iterator,Triangulation::face_iterator > - surface_to_volume_mapping; + surface_to_volume_mapping; Triangulation volume_mesh; GridGenerator::hyper_cube(volume_mesh); @@ -52,17 +52,17 @@ void test () deallog << "n_dofs=" << boundary_dh.n_dofs() << std::endl; for (DoFHandler::active_cell_iterator - cell = boundary_dh.begin_active(), - endc = boundary_dh.end(); cell!=endc; ++cell) + cell = boundary_dh.begin_active(), + endc = boundary_dh.end(); cell!=endc; ++cell) { deallog << "Cell: " << cell << std::endl; for (unsigned int v=0; v::vertices_per_cell; ++v) - { - unsigned int index = cell->vertex_dof_index(v,0); - deallog << "vertex: " << v - << ", global: " << cell->vertex_index(v) - << " index: " << index << std::endl; - } + { + unsigned int index = cell->vertex_dof_index(v,0); + deallog << "vertex: " << v + << ", global: " << cell->vertex_index(v) + << " index: " << index << std::endl; + } deallog << std::endl; } @@ -78,4 +78,4 @@ int main () deallog.depth_console(0); test (); - } +} diff --git a/tests/codim_one/extract_boundary_mesh_06.cc b/tests/codim_one/extract_boundary_mesh_06.cc index 8b87d3f602..f00bb4c90c 100644 --- a/tests/codim_one/extract_boundary_mesh_06.cc +++ b/tests/codim_one/extract_boundary_mesh_06.cc @@ -39,7 +39,7 @@ void test () Triangulation boundary_mesh; map::cell_iterator,Triangulation::face_iterator > - surface_to_volume_mapping; + surface_to_volume_mapping; Triangulation volume_mesh; GridGenerator::hyper_cube(volume_mesh); volume_mesh.refine_global(1); @@ -48,12 +48,12 @@ void test () boundary_mesh.refine_global(1); for (Triangulation::active_cell_iterator - cell = boundary_mesh.begin_active(); + cell = boundary_mesh.begin_active(); cell != boundary_mesh.end(); ++cell) { deallog << "Cell=" << cell << std::endl; deallog << " neighbors: " << cell->neighbor(0) << ' ' << cell->neighbor(1) - << std::endl; + << std::endl; } } @@ -66,4 +66,4 @@ int main () deallog.depth_console(0); test (); - } +} diff --git a/tests/codim_one/extract_boundary_mesh_07.cc b/tests/codim_one/extract_boundary_mesh_07.cc index 68b97f3f24..c92143821c 100644 --- a/tests/codim_one/extract_boundary_mesh_07.cc +++ b/tests/codim_one/extract_boundary_mesh_07.cc @@ -55,13 +55,13 @@ namespace Step38 private: static const unsigned int boundary_dim = spacedim-1; - Triangulation volume_mesh_triangulation; + Triangulation volume_mesh_triangulation; Triangulation boundary_triangulation; - FE_Q space_fe; + FE_Q space_fe; FE_Q boundary_fe; - DoFHandler space_dof_handler; + DoFHandler space_dof_handler; DoFHandler contact_dof_handler; }; @@ -70,11 +70,11 @@ namespace Step38 template Extract_Mesh_Test:: Extract_Mesh_Test () - : - space_fe (spacedim), - boundary_fe (1), - space_dof_handler(volume_mesh_triangulation), - contact_dof_handler(boundary_triangulation) + : + space_fe (spacedim), + boundary_fe (1), + space_dof_handler(volume_mesh_triangulation), + contact_dof_handler(boundary_triangulation) {} template @@ -87,19 +87,19 @@ namespace Step38 space_dof_handler.distribute_dofs(space_fe); std::map::cell_iterator, - typename DoFHandler::face_iterator> - element_assignment = - GridTools::extract_boundary_mesh(space_dof_handler, - contact_dof_handler, - boundary_ids); + typename DoFHandler::face_iterator> + element_assignment = + GridTools::extract_boundary_mesh(space_dof_handler, + contact_dof_handler, + boundary_ids); contact_dof_handler.distribute_dofs(boundary_fe); typename std::map::cell_iterator,typename DoFHandler::face_iterator>::iterator Iterator; - for (Iterator = element_assignment.begin();Iterator != element_assignment.end(); ++Iterator) + for (Iterator = element_assignment.begin(); Iterator != element_assignment.end(); ++Iterator) { - deallog << "element_assignment maps " << Iterator->first << " onto " << Iterator->second << std::endl; + deallog << "element_assignment maps " << Iterator->first << " onto " << Iterator->second << std::endl; } } @@ -119,4 +119,4 @@ int main () Extract_Mesh_Test<2> Test; Test.run(); } - } +} diff --git a/tests/codim_one/fe_dgq_prolongation_01.cc b/tests/codim_one/fe_dgq_prolongation_01.cc index 0248c80d33..401306b56d 100644 --- a/tests/codim_one/fe_dgq_prolongation_01.cc +++ b/tests/codim_one/fe_dgq_prolongation_01.cc @@ -41,8 +41,8 @@ int main () deallog << "Degree=" << degree << std::endl; FE_DGQ fe(degree); for (unsigned int i=0; i triangulation; - FESystem fe (FE_Q (1), dim+1); - DoFHandler dof_handler(triangulation); + Triangulation triangulation; + FESystem fe (FE_Q (1), dim+1); + DoFHandler dof_handler(triangulation); - Vector soln; + Vector soln; - GridIn grid_in; - grid_in.attach_triangulation (triangulation); - std::ifstream fname("data_out_02/square.msh"); - grid_in.read_msh (fname); + GridIn grid_in; + grid_in.attach_triangulation (triangulation); + std::ifstream fname("data_out_02/square.msh"); + grid_in.read_msh (fname); - dof_handler.distribute_dofs (fe); - soln.reinit (dof_handler.n_dofs()); - soln = 1; + dof_handler.distribute_dofs (fe); + soln.reinit (dof_handler.n_dofs()); + soln = 1; - std::vector > local_velocity_values (1); - const FEValuesExtractors::Vector velocities (0); - QGauss quadrature_formula(1); - DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(), - endc = dof_handler.end(); - FEValues fe_v (fe, quadrature_formula, update_values); + std::vector > local_velocity_values (1); + const FEValuesExtractors::Vector velocities (0); + QGauss quadrature_formula(1); + DoFHandler::active_cell_iterator + cell = dof_handler.begin_active(), + endc = dof_handler.end(); + FEValues fe_v (fe, quadrature_formula, update_values); - for (; cell!=endc; ++cell) { - fe_v.reinit (cell); + for (; cell!=endc; ++cell) + { + fe_v.reinit (cell); - fe_v[velocities].get_function_values (soln, local_velocity_values); + fe_v[velocities].get_function_values (soln, local_velocity_values); - deallog << local_velocity_values.at(0) << std::endl; - } + deallog << local_velocity_values.at(0) << std::endl; + } } diff --git a/tests/codim_one/gradients.cc b/tests/codim_one/gradients.cc index 04ddfabafe..02120ab21c 100644 --- a/tests/codim_one/gradients.cc +++ b/tests/codim_one/gradients.cc @@ -66,25 +66,25 @@ void test(std::string filename) const QMidpoint q_midpoint; - // finite elements used for the - // projection + // finite elements used for the + // projection const FE_Q fe (1); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); FEValues fe_values (fe, q_midpoint, - update_values | - update_JxW_values | - update_cell_normal_vectors | + update_values | + update_JxW_values | + update_cell_normal_vectors | update_gradients); - // finite elements used for the - // graphical representation with - // data_out + // finite elements used for the + // graphical representation with + // data_out const FE_DGQ fe_help(0); DoFHandler dof_handler_help (triangulation); dof_handler_help.distribute_dofs (fe_help); FEValues fe_values_help (fe_help, q_midpoint, - update_cell_normal_vectors); + update_cell_normal_vectors); deallog << "no. of cells "<< triangulation.n_cells() < projected_one(dof_handler.n_dofs()); // Functions::CosineFunction cosine; @@ -109,8 +109,8 @@ void test(std::string filename) Tensor<1,spacedim> exp; exp[0]=1; exp[1]=0; - if(spacedim==3) - exp[2]=0; + if (spacedim==3) + exp[2]=0; Functions::Monomial monomial(exp); const QGauss quad(5); @@ -119,7 +119,7 @@ void test(std::string filename) VectorTools::project(dof_handler, constraints, quad, monomial, projected_one); - // calculate its gradient + // calculate its gradient const unsigned int dofs_per_cell = fe.dofs_per_cell; @@ -133,62 +133,62 @@ void test(std::string filename) std::vector local_dof_indices (fe.dofs_per_cell); 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) - { + { fe_values.reinit(cell); cell-> get_dof_indices (local_dof_indices); cell_normals = fe_values.get_cell_normal_vectors(); - // The cell tangential is calculated - // in the midpoint of the cell. For - // the <2,3> case the tangential with - // z component = 0 is chosen out of - // the plane tangential to the - // element surface. + // The cell tangential is calculated + // in the midpoint of the cell. For + // the <2,3> case the tangential with + // z component = 0 is chosen out of + // the plane tangential to the + // element surface. cell_tangentials[0][0] = cell_normals[0][1] - / sqrt( pow(cell_normals[0][0],2) + pow(cell_normals[0][1],2) ); + / sqrt( pow(cell_normals[0][0],2) + pow(cell_normals[0][1],2) ); cell_tangentials[0][1] = -cell_normals[0][0] - / sqrt( pow(cell_normals[0][0],2) + pow(cell_normals[0][1],2) ); + / sqrt( pow(cell_normals[0][0],2) + pow(cell_normals[0][1],2) ); if (spacedim == 3) - cell_tangentials[0][2]=0.; + cell_tangentials[0][2]=0.; for (unsigned int i=0; iindex()) - += - projected_one(local_dof_indices[i]) - * - shape_directional_derivative[i]; - } + { + shape_directional_derivative[i]= + contract( + fe_values.shape_grad(i,0), + cell_tangentials[0]); + + // notice that the dof_index for + // fe_dgq(0) is the same as that of + // the cell + projected_directional_derivative(cell->index()) + += + projected_one(local_dof_indices[i]) + * + shape_directional_derivative[i]; + } deallog - << "cell no. " - << cell->index()<< "; " - << "dir.deriv. " - << projected_directional_derivative(cell->index())<< "; "<index()<< "; " + << "dir.deriv. " + << projected_directional_derivative(cell->index())<< "; "<index()+.5) / triangulation.n_cells() ) - << std::endl; + deallog + << "exact solution " + << cos( 2*numbers::PI* + (cell->index()+.5) / triangulation.n_cells() ) + << std::endl; - } + } - // write graphical output + // write graphical output DataOut > dataout; dataout.attach_dof_handler(dof_handler_help); dataout.add_data_vector(projected_directional_derivative, "derivative"); @@ -205,18 +205,18 @@ int main () deallog.depth_console(0); deallog.threshold_double(1.e-12); - deallog<<"Test <1,2>"<("grids/circle_4.inp"); + deallog<<"Test <1,2>"<("grids/circle_4.inp"); - deallog<"<("grids/sphere_1.inp"); + deallog<<"Test <2,3>"<("grids/sphere_1.inp"); // test<2,3>("grids/sphere_2.inp"); // test<2,3>("grids/sphere_3.inp"); // test<2,3>("grids/sphere_4.inp"); - return 0; + return 0; } diff --git a/tests/codim_one/gradients_1.cc b/tests/codim_one/gradients_1.cc index 3724aff000..036af20898 100644 --- a/tests/codim_one/gradients_1.cc +++ b/tests/codim_one/gradients_1.cc @@ -63,8 +63,8 @@ void test(std::string filename, unsigned int degree = 1) std::ifstream in (filename.c_str()); gi.read_ucd (in); - // finite elements used for the - // projection + // finite elements used for the + // projection const FE_Q fe (degree); const MappingQ mapping(degree); @@ -79,9 +79,9 @@ void test(std::string filename, unsigned int degree = 1) << "no. of dofs per cell "<< fe.dofs_per_cell<< std::endl; - // definition of the exact function - // and calculation of the projected - // one + // definition of the exact function + // and calculation of the projected + // one Vector projected_one(dof_handler.n_dofs()); Functions::CosineFunction the_function; @@ -97,17 +97,17 @@ void test(std::string filename, unsigned int degree = 1) ConstraintMatrix constraints; constraints.close(); VectorTools::project(mapping, dof_handler, constraints, - quad, the_function, projected_one); + quad, the_function, projected_one); deallog << "L2 norm of projected vector: " - << projected_one.l2_norm() << std::endl; + << projected_one.l2_norm() << std::endl; - // compute the H1 difference + // compute the H1 difference Vector difference_per_cell (triangulation.n_active_cells()); VectorTools::integrate_difference (dof_handler, projected_one, - the_function, difference_per_cell, - quad, VectorTools::H1_norm); + the_function, difference_per_cell, + quad, VectorTools::H1_norm); deallog << "H1 error: " << difference_per_cell.l2_norm() << std::endl; } @@ -121,19 +121,19 @@ int main () deallog.depth_console(0); deallog.threshold_double(1.e-12); - deallog<<"Test <1,2>, Q1, Q2, Q3"<("grids/circle_4.inp",1); - test<1,2>("grids/circle_4.inp",2); - test<1,2>("grids/circle_4.inp",3); + deallog<<"Test <1,2>, Q1, Q2, Q3"<("grids/circle_4.inp",1); + test<1,2>("grids/circle_4.inp",2); + test<1,2>("grids/circle_4.inp",3); - deallog<, Q1, Q2, Q3"<("grids/sphere_1.inp",1); - test<2,3>("grids/sphere_1.inp",2); - test<2,3>("grids/sphere_1.inp",3); + deallog<<"Test <2,3>, Q1, Q2, Q3"<("grids/sphere_1.inp",1); + test<2,3>("grids/sphere_1.inp",2); + test<2,3>("grids/sphere_1.inp",3); - return 0; + return 0; } diff --git a/tests/codim_one/grid_in_out.cc b/tests/codim_one/grid_in_out.cc index 4e7cd81f1d..62121a8fe0 100644 --- a/tests/codim_one/grid_in_out.cc +++ b/tests/codim_one/grid_in_out.cc @@ -30,17 +30,18 @@ std::ofstream logfile("grid_in_out/output"); template -void test(std::string filename) { - Triangulation tria; - GridIn gi; - gi.attach_triangulation (tria); - std::ifstream in (filename.c_str()); - gi.read_ucd (in); - - GridOut grid_out; - grid_out.set_flags (GridOutFlags::Ucd(true)); - grid_out.write_ucd (tria, logfile); - grid_out.write_msh (tria, logfile); +void test(std::string filename) +{ + Triangulation tria; + GridIn gi; + gi.attach_triangulation (tria); + std::ifstream in (filename.c_str()); + gi.read_ucd (in); + + GridOut grid_out; + grid_out.set_flags (GridOutFlags::Ucd(true)); + grid_out.write_ucd (tria, logfile); + grid_out.write_msh (tria, logfile); } int main () diff --git a/tests/codim_one/grid_in_out_02.cc b/tests/codim_one/grid_in_out_02.cc index 7ce037024a..8b7bec2183 100644 --- a/tests/codim_one/grid_in_out_02.cc +++ b/tests/codim_one/grid_in_out_02.cc @@ -30,15 +30,16 @@ std::ofstream logfile("grid_in_out_02/output"); template -void test(std::string filename) { - Triangulation tria; - GridIn gi; - gi.attach_triangulation (tria); - std::ifstream in (filename.c_str()); - gi.read_ucd (in); - - GridOut grid_out; - grid_out.write_gnuplot (tria, logfile); +void test(std::string filename) +{ + Triangulation tria; + GridIn gi; + gi.attach_triangulation (tria); + std::ifstream in (filename.c_str()); + gi.read_ucd (in); + + GridOut grid_out; + grid_out.write_gnuplot (tria, logfile); } int main () diff --git a/tests/codim_one/grid_in_out_03.cc b/tests/codim_one/grid_in_out_03.cc index 43b21b05f0..1ad1b0df50 100644 --- a/tests/codim_one/grid_in_out_03.cc +++ b/tests/codim_one/grid_in_out_03.cc @@ -16,7 +16,7 @@ -// like grid_in_out but test persistent triangulation +// like grid_in_out but test persistent triangulation #include "../tests.h" #include @@ -32,27 +32,28 @@ std::ofstream logfile("grid_in_out_03/output"); template -void test(std::string filename) { +void test(std::string filename) +{ logfile << " Tria<" << dim << "," << spacedim << ">: " - << filename << std::endl; + << filename << std::endl; Triangulation tria; GridIn gi; gi.attach_triangulation (tria); std::ifstream in (filename.c_str()); gi.read_ucd (in); - + PersistentTriangulation ptria(tria); typename Triangulation::active_cell_iterator cell; ptria.restore(); - for(unsigned int i=0; i<2; ++i) + for (unsigned int i=0; i<2; ++i) { - for(cell=ptria.begin_active(); cell != ptria.end(); ++cell) - if(cell->center()[0]<.5) - cell->set_refine_flag(); + for (cell=ptria.begin_active(); cell != ptria.end(); ++cell) + if (cell->center()[0]<.5) + cell->set_refine_flag(); ptria.execute_coarsening_and_refinement(); } - + ptria.write_flags(logfile); } diff --git a/tests/codim_one/grid_refinement.cc b/tests/codim_one/grid_refinement.cc index 75ac1caa62..98040bd278 100644 --- a/tests/codim_one/grid_refinement.cc +++ b/tests/codim_one/grid_refinement.cc @@ -35,7 +35,8 @@ std::ofstream logfile("grid_refinement/output"); template -void test(std::string filename) { +void test(std::string filename) +{ HyperBallBoundary boundary; Triangulation tria; tria.set_boundary(1, boundary); @@ -46,10 +47,11 @@ void test(std::string filename) { GridOut grid_out; grid_out.set_flags (GridOutFlags::Ucd(true)); - for(unsigned int cycle=0; cycle<3; ++cycle) { - tria.refine_global(1); - grid_out.write_msh (tria, logfile); - } + for (unsigned int cycle=0; cycle<3; ++cycle) + { + tria.refine_global(1); + grid_out.write_msh (tria, logfile); + } } int main () diff --git a/tests/codim_one/hanging_nodes_01.cc b/tests/codim_one/hanging_nodes_01.cc index 5d64784640..760ba462af 100644 --- a/tests/codim_one/hanging_nodes_01.cc +++ b/tests/codim_one/hanging_nodes_01.cc @@ -45,13 +45,13 @@ int main () Triangulation boundary_mesh; - /*****************************************************************/ - // Create Surface Mesh: Boundary of hypercube without one face + /*****************************************************************/ + // Create Surface Mesh: Boundary of hypercube without one face { Triangulation volume_mesh; GridGenerator::hyper_cube(volume_mesh); Triangulation::active_cell_iterator - cell = volume_mesh.begin_active(); + cell = volume_mesh.begin_active(); cell->face(0)->set_all_boundary_indicators (1); std::set boundary_ids; @@ -61,7 +61,7 @@ int main () boundary_mesh.begin_active()->set_refine_flag (); boundary_mesh.execute_coarsening_and_refinement (); - /*****************************************************************/ + /*****************************************************************/ FE_Q fe(1); DoFHandler dh (boundary_mesh); ConstraintMatrix hanging_node_constraints; diff --git a/tests/codim_one/hanging_nodes_02.cc b/tests/codim_one/hanging_nodes_02.cc index 85a9ff2421..43f970b961 100644 --- a/tests/codim_one/hanging_nodes_02.cc +++ b/tests/codim_one/hanging_nodes_02.cc @@ -45,13 +45,13 @@ int main () Triangulation boundary_mesh; - /*****************************************************************/ - // Create Surface Mesh: Boundary of hypercube without one face + /*****************************************************************/ + // Create Surface Mesh: Boundary of hypercube without one face { Triangulation volume_mesh; GridGenerator::hyper_cube(volume_mesh); Triangulation::active_cell_iterator - cell = volume_mesh.begin_active(); + cell = volume_mesh.begin_active(); cell->face(0)->set_all_boundary_indicators (1); std::set boundary_ids; @@ -62,27 +62,27 @@ int main () boundary_mesh.execute_coarsening_and_refinement (); Triangulation::active_cell_iterator - cell = boundary_mesh.begin_active(); + cell = boundary_mesh.begin_active(); for (; cell!=boundary_mesh.end(); ++cell) { deallog << "Cell = " << cell << std::endl; deallog << " direction_flag = " << cell->direction_flag() << std::endl; for (unsigned int face=0; face::faces_per_cell; ++face) - { - deallog << " face = " << face - << " (neighbor = " << cell->neighbor(face) << ")" - << std::endl; + { + deallog << " face = " << face + << " (neighbor = " << cell->neighbor(face) << ")" + << std::endl; - if (cell->face(face)->has_children()) - for (unsigned int c=0; cface(face)->n_children(); ++c) - { - deallog << " subface = " << c << std::endl; - deallog << " " - << cell->neighbor_child_on_subface(face, c) - << std::endl; - } - } + if (cell->face(face)->has_children()) + for (unsigned int c=0; cface(face)->n_children(); ++c) + { + deallog << " subface = " << c << std::endl; + deallog << " " + << cell->neighbor_child_on_subface(face, c) + << std::endl; + } + } } return 0; diff --git a/tests/codim_one/hanging_nodes_03.cc b/tests/codim_one/hanging_nodes_03.cc index b16aee6151..6d43395194 100644 --- a/tests/codim_one/hanging_nodes_03.cc +++ b/tests/codim_one/hanging_nodes_03.cc @@ -39,13 +39,13 @@ int main () Triangulation boundary_mesh; - /*****************************************************************/ - // Create Surface Mesh: Boundary of hypercube without one face + /*****************************************************************/ + // Create Surface Mesh: Boundary of hypercube without one face { Triangulation volume_mesh; GridGenerator::hyper_cube(volume_mesh); Triangulation::active_cell_iterator - cell = volume_mesh.begin_active(); + cell = volume_mesh.begin_active(); cell->face(0)->set_all_boundary_indicators (1); std::set boundary_ids; @@ -54,24 +54,24 @@ int main () } Triangulation::active_cell_iterator - cell = boundary_mesh.begin_active(); + cell = boundary_mesh.begin_active(); for (; cell!=boundary_mesh.end(); ++cell) { deallog << "Cell = " << cell << std::endl; deallog << " direction_flag = " << cell->direction_flag() << std::endl; for (unsigned int face=0; face::faces_per_cell; ++face) - { - deallog << " face = " << face - << " (neighbor = " << cell->neighbor(face) << ")" - << std::endl; + { + deallog << " face = " << face + << " (neighbor = " << cell->neighbor(face) << ")" + << std::endl; - if (cell->face(face)->has_children()) - for (unsigned int c=0; cface(face)->n_children(); ++c) - { - deallog << " subface = " << c << std::endl; - } - } + if (cell->face(face)->has_children()) + for (unsigned int c=0; cface(face)->n_children(); ++c) + { + deallog << " subface = " << c << std::endl; + } + } } return 0; diff --git a/tests/codim_one/integrate_log.cc b/tests/codim_one/integrate_log.cc index 5d1204750d..30efcc0055 100644 --- a/tests/codim_one/integrate_log.cc +++ b/tests/codim_one/integrate_log.cc @@ -16,7 +16,7 @@ -// integrates the function ln(x-a)*f(x), where f(x) is a power of x on the interval [a,b]. +// integrates the function ln(x-a)*f(x), where f(x) is a power of x on the interval [a,b]. // dim=1 only. #include "../tests.h" @@ -48,9 +48,9 @@ std::ofstream logfile("integrate_log/output"); double test(const unsigned int n, - const unsigned int exponent, - const double a, - const double b) + const unsigned int exponent, + const double a, + const double b) { const QGaussLog<1> qlog(n); @@ -62,14 +62,14 @@ double test(const unsigned int n, Triangulation<1> tria; GridGenerator::hyper_cube(tria,a,b); - + FE_Q<1> feq(1); DoFHandler<1> dh(tria); FEValues<1> fe_values(feq, qlog, update_JxW_values | update_quadrature_points), - fev_help(feq, qgauss, update_JxW_values | update_quadrature_points); - + fev_help(feq, qgauss, update_JxW_values | update_quadrature_points); + dh.distribute_dofs(feq); @@ -78,18 +78,18 @@ double test(const unsigned int n, DoFHandler<1>::active_cell_iterator cell=dh.begin_active(), endc=dh.end(); - for(; cell!=endc; ++cell) + for (; cell!=endc; ++cell) { fe_values.reinit(cell); fev_help.reinit(cell); - for(unsigned int i=0; i= b) - c = factorial(a) - / factorial(b) - / factorial(a-b); - else - deallog<<"Error: in Newton binomial the first integer must be greater or equal to the second."; - - return c; + double c; + if (a >= b) + c = factorial(a) + / factorial(b) + / factorial(a-b); + else + deallog<<"Error: in Newton binomial the first integer must be greater or equal to the second."; + + return c; } int main() @@ -147,30 +147,30 @@ int main() deallog.depth_console(0); deallog<(j-k)) - *( - pow(b-a,static_cast(k)+1) / (k+1) * log(b-a) - - - pow(b-a,static_cast(k)+1) / pow(static_cast(k+1), 2) - ); - deallog << "f(x) = x^" << j << std::endl; - for (unsigned int i=1; i<13; ++i) - deallog << " No. of points = " << i << " " - << "Error: "<< test(i,j,a,b)-exact_integral - << std::endl; - deallog<(j-k)) + *( + pow(b-a,static_cast(k)+1) / (k+1) * log(b-a) + - + pow(b-a,static_cast(k)+1) / pow(static_cast(k+1), 2) + ); + deallog << "f(x) = x^" << j << std::endl; + for (unsigned int i=1; i<13; ++i) + deallog << " No. of points = " << i << " " + << "Error: "<< test(i,j,a,b)-exact_integral + << std::endl; + deallog< quad(m, index); - QGaussOneOverR<2> quad_de(m, index, true); - 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; - - for (unsigned int q=0; q< quad.size(); ++q) { - double x = quad.point(q)[0]; - double y = quad.point(q)[1]; - approx_integral += ( pow(x, (double)i) * - pow(y, (double)j) * - quad.weight(q) ); - approx_integral_2 += ( pow(x, (double)i) * - pow(y, (double)j) * - quad_de.weight(q) / - (quad_de.point(q)-GeometryInfo<2>::unit_cell_vertex(index)).norm()); - } + double eps = 1e-10; - deallog << "f(x,y) = x^" << i - << " y^" << j - << ", Error = " - << approx_integral - exact_integral; - if (std::abs(approx_integral-approx_integral_2) < eps) - deallog << endl; - else - deallog << ", desing: " - << approx_integral_2 - exact_integral << endl; - } - } - } + for (unsigned int m=1; m<7; ++m) + { + deallog << " =========Quadrature Order: " << m + << " =============================== " << endl; + deallog << " ============================================================ " << endl; + for (unsigned int index=0; index<4; ++index) + { + deallog << " ===============Vertex Index: " << index + << " ============================= " << endl; + QGaussOneOverR<2> quad(m, index); + QGaussOneOverR<2> quad_de(m, index, true); + 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; + + for (unsigned int q=0; q< quad.size(); ++q) + { + double x = quad.point(q)[0]; + double y = quad.point(q)[1]; + approx_integral += ( pow(x, (double)i) * + pow(y, (double)j) * + quad.weight(q) ); + approx_integral_2 += ( pow(x, (double)i) * + pow(y, (double)j) * + quad_de.weight(q) / + (quad_de.point(q)-GeometryInfo<2>::unit_cell_vertex(index)).norm()); + } + + deallog << "f(x,y) = x^" << i + << " y^" << j + << ", Error = " + << approx_integral - exact_integral; + if (std::abs(approx_integral-approx_integral_2) < eps) + deallog << endl; + else + deallog << ", desing: " + << approx_integral_2 - exact_integral << 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()); - - // The integrals are computed using the following maple snippet of - // code: - // - // sing_int := proc(index, N, M) - // if index = 0 then - // return int(int(x^N *y^M/sqrt(x^2+y^2), x=0.0..1.0), y=0.0..1.0); - // elif index = 1 then - // return int(int(x^N *y^M/sqrt((x-1)^2+y^2), x=0.0..1.0), y=0.0..1.0); - // elif index = 2 then - // return int(int(x^N *y^M/sqrt(x^2+(y-1)^2), x=0.0..1.0), y=0.0..1.0); - // elif index = 3 then - // return int(int((1-x)^N *(1-y)^M/sqrt(x^2+y^2), x=0.0..1.0), y=0.0..1.0); - // end if; - // end proc; - // Digits := 20; - // for i from 3 to 3 do - // for n from 0 to 5 do - // for m from 0 to 5 do - // C( v[i+1][n+1][m+1] = sing_int(i, n, m), resultname="a"); - // end do; - // end do; - // end do; + 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: + // + // sing_int := proc(index, N, M) + // if index = 0 then + // return int(int(x^N *y^M/sqrt(x^2+y^2), x=0.0..1.0), y=0.0..1.0); + // elif index = 1 then + // return int(int(x^N *y^M/sqrt((x-1)^2+y^2), x=0.0..1.0), y=0.0..1.0); + // elif index = 2 then + // return int(int(x^N *y^M/sqrt(x^2+(y-1)^2), x=0.0..1.0), y=0.0..1.0); + // elif index = 3 then + // return int(int((1-x)^N *(1-y)^M/sqrt(x^2+y^2), x=0.0..1.0), y=0.0..1.0); + // end if; + // end proc; + // Digits := 20; + // for i from 3 to 3 do + // for n from 0 to 5 do + // for m from 0 to 5 do + // C( v[i+1][n+1][m+1] = sing_int(i, n, m), resultname="a"); + // end do; + // end do; + // end do; - 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; + 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]; + return v[vertex_index][i][j]; } diff --git a/tests/codim_one/interpolate_boundary_values_01.cc b/tests/codim_one/interpolate_boundary_values_01.cc index 7c9a59cef5..b690cdc703 100644 --- a/tests/codim_one/interpolate_boundary_values_01.cc +++ b/tests/codim_one/interpolate_boundary_values_01.cc @@ -33,48 +33,49 @@ std::ofstream logfile("interpolate_boundary_values_01/output"); template -void test(std::string filename) { - Triangulation tria; - GridIn gi; - gi.attach_triangulation (tria); - std::ifstream in (filename.c_str()); - gi.read_ucd (in); - - deallog << tria.n_active_cells() << " active cells" << std::endl; - - FE_Q fe(2); - DoFHandler dof_handler (tria); - dof_handler.distribute_dofs (fe); - - deallog << dof_handler.n_dofs() << " degrees of freedom" << std::endl; - - std::map bv; - VectorTools::interpolate_boundary_values (dof_handler, - 0, - Functions::SquareFunction(), - bv); - deallog << bv.size() << " boundary degrees of freedom" << std::endl; - - for (std::map::const_iterator i = bv.begin(); - i != bv.end(); ++i) - deallog << i->first << ' ' << i->second << std::endl; - - for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - if (cell->at_boundary(f)) - for (unsigned int v=0; v::vertices_per_face; ++v) - for (unsigned int i=0; iface(f)->vertex_dof_index(v,i)) - != bv.end(), - ExcInternalError()); - Assert (bv[cell->face(f)->vertex_dof_index(v,i)] - == - Functions::SquareFunction() - .value(cell->face(f)->vertex(v),i), - ExcInternalError()); - } +void test(std::string filename) +{ + Triangulation tria; + GridIn gi; + gi.attach_triangulation (tria); + std::ifstream in (filename.c_str()); + gi.read_ucd (in); + + deallog << tria.n_active_cells() << " active cells" << std::endl; + + FE_Q fe(2); + DoFHandler dof_handler (tria); + dof_handler.distribute_dofs (fe); + + deallog << dof_handler.n_dofs() << " degrees of freedom" << std::endl; + + std::map bv; + VectorTools::interpolate_boundary_values (dof_handler, + 0, + Functions::SquareFunction(), + bv); + deallog << bv.size() << " boundary degrees of freedom" << std::endl; + + for (std::map::const_iterator i = bv.begin(); + i != bv.end(); ++i) + deallog << i->first << ' ' << i->second << std::endl; + + for (typename DoFHandler::active_cell_iterator + cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + if (cell->at_boundary(f)) + for (unsigned int v=0; v::vertices_per_face; ++v) + for (unsigned int i=0; iface(f)->vertex_dof_index(v,i)) + != bv.end(), + ExcInternalError()); + Assert (bv[cell->face(f)->vertex_dof_index(v,i)] + == + Functions::SquareFunction() + .value(cell->face(f)->vertex(v),i), + ExcInternalError()); + } } diff --git a/tests/codim_one/interpolate_boundary_values_01_vector_valued.cc b/tests/codim_one/interpolate_boundary_values_01_vector_valued.cc index 393fb8d47f..c19723bb79 100644 --- a/tests/codim_one/interpolate_boundary_values_01_vector_valued.cc +++ b/tests/codim_one/interpolate_boundary_values_01_vector_valued.cc @@ -37,60 +37,61 @@ std::ofstream logfile("interpolate_boundary_values_01_vector_valued/output"); template class X : public Function { - public: - X() : Function(dim) {} - - double value (const Point &p, - const unsigned int component) const - { - return p[component]; - } +public: + X() : Function(dim) {} + + double value (const Point &p, + const unsigned int component) const + { + return p[component]; + } }; template -void test(std::string filename) { - Triangulation tria; - GridIn gi; - gi.attach_triangulation (tria); - std::ifstream in (filename.c_str()); - gi.read_ucd (in); - - deallog << tria.n_active_cells() << " active cells" << std::endl; - - FESystem fe(FE_Q (2), spacedim); - DoFHandler dof_handler (tria); - dof_handler.distribute_dofs (fe); - - deallog << dof_handler.n_dofs() << " degrees of freedom" << std::endl; - - std::map bv; - VectorTools::interpolate_boundary_values (dof_handler, - 0, - X(), - bv); - deallog << bv.size() << " boundary degrees of freedom" << std::endl; - - for (std::map::const_iterator i = bv.begin(); - i != bv.end(); ++i) - deallog << i->first << ' ' << i->second << std::endl; - - for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - if (cell->at_boundary(f)) - for (unsigned int v=0; v::vertices_per_face; ++v) - for (unsigned int i=0; iface(f)->vertex_dof_index(v,i)) - != bv.end(), - ExcInternalError()); - Assert (bv[cell->face(f)->vertex_dof_index(v,i)] - == - X() - .value(cell->face(f)->vertex(v),i), - ExcInternalError()); - } +void test(std::string filename) +{ + Triangulation tria; + GridIn gi; + gi.attach_triangulation (tria); + std::ifstream in (filename.c_str()); + gi.read_ucd (in); + + deallog << tria.n_active_cells() << " active cells" << std::endl; + + FESystem fe(FE_Q (2), spacedim); + DoFHandler dof_handler (tria); + dof_handler.distribute_dofs (fe); + + deallog << dof_handler.n_dofs() << " degrees of freedom" << std::endl; + + std::map bv; + VectorTools::interpolate_boundary_values (dof_handler, + 0, + X(), + bv); + deallog << bv.size() << " boundary degrees of freedom" << std::endl; + + for (std::map::const_iterator i = bv.begin(); + i != bv.end(); ++i) + deallog << i->first << ' ' << i->second << std::endl; + + for (typename DoFHandler::active_cell_iterator + cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + if (cell->at_boundary(f)) + for (unsigned int v=0; v::vertices_per_face; ++v) + for (unsigned int i=0; iface(f)->vertex_dof_index(v,i)) + != bv.end(), + ExcInternalError()); + Assert (bv[cell->face(f)->vertex_dof_index(v,i)] + == + X() + .value(cell->face(f)->vertex(v),i), + ExcInternalError()); + } } diff --git a/tests/codim_one/interpolate_boundary_values_02.cc b/tests/codim_one/interpolate_boundary_values_02.cc index 0cc617a5ee..bb4e12b701 100644 --- a/tests/codim_one/interpolate_boundary_values_02.cc +++ b/tests/codim_one/interpolate_boundary_values_02.cc @@ -33,53 +33,54 @@ std::ofstream logfile("interpolate_boundary_values_02/output"); -void test() { +void test() +{ const int dim = 1; const int spacedim = 2; - Triangulation tria; - GridGenerator::hyper_cube (tria); - deallog << tria.n_active_cells() << " active cells" << std::endl; - - FE_Q fe(2); - DoFHandler dof_handler (tria); - dof_handler.distribute_dofs (fe); - - deallog << dof_handler.n_dofs() << " degrees of freedom" << std::endl; - - // test left and right boundary - // separatel - for (unsigned int boundary_id=0; boundary_id<2; ++boundary_id) - { - std::map bv; - VectorTools::interpolate_boundary_values (dof_handler, - boundary_id, - Functions::SquareFunction(), - bv); - deallog << bv.size() << " boundary degrees of freedom" << std::endl; - - for (std::map::const_iterator i = bv.begin(); - i != bv.end(); ++i) - deallog << i->first << ' ' << i->second << std::endl; - - for (DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - if (cell->at_boundary(f) && - (cell->face(f)->boundary_indicator() == boundary_id)) - for (unsigned int v=0; v::vertices_per_face; ++v) - for (unsigned int i=0; iface(f)->vertex_dof_index(v,i)) - != bv.end(), - ExcInternalError()); - Assert (bv[cell->face(f)->vertex_dof_index(v,i)] - == - Functions::SquareFunction() - .value(cell->face(f)->vertex(v),i), - ExcInternalError()); - } - } + Triangulation tria; + GridGenerator::hyper_cube (tria); + deallog << tria.n_active_cells() << " active cells" << std::endl; + + FE_Q fe(2); + DoFHandler dof_handler (tria); + dof_handler.distribute_dofs (fe); + + deallog << dof_handler.n_dofs() << " degrees of freedom" << std::endl; + + // test left and right boundary + // separatel + for (unsigned int boundary_id=0; boundary_id<2; ++boundary_id) + { + std::map bv; + VectorTools::interpolate_boundary_values (dof_handler, + boundary_id, + Functions::SquareFunction(), + bv); + deallog << bv.size() << " boundary degrees of freedom" << std::endl; + + for (std::map::const_iterator i = bv.begin(); + i != bv.end(); ++i) + deallog << i->first << ' ' << i->second << std::endl; + + for (DoFHandler::active_cell_iterator + cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + if (cell->at_boundary(f) && + (cell->face(f)->boundary_indicator() == boundary_id)) + for (unsigned int v=0; v::vertices_per_face; ++v) + for (unsigned int i=0; iface(f)->vertex_dof_index(v,i)) + != bv.end(), + ExcInternalError()); + Assert (bv[cell->face(f)->vertex_dof_index(v,i)] + == + Functions::SquareFunction() + .value(cell->face(f)->vertex(v),i), + ExcInternalError()); + } + } } diff --git a/tests/codim_one/interpolate_boundary_values_02_vector_valued.cc b/tests/codim_one/interpolate_boundary_values_02_vector_valued.cc index cdb9f76b19..62db68b2b3 100644 --- a/tests/codim_one/interpolate_boundary_values_02_vector_valued.cc +++ b/tests/codim_one/interpolate_boundary_values_02_vector_valued.cc @@ -37,63 +37,64 @@ std::ofstream logfile("interpolate_boundary_values_02_vector_valued/output"); template class X : public Function { - public: - X() : Function(dim) {} - - double value (const Point &p, - const unsigned int component) const - { - return p[component]; - } +public: + X() : Function(dim) {} + + double value (const Point &p, + const unsigned int component) const + { + return p[component]; + } }; -void test() { +void test() +{ const int dim = 1; const int spacedim = 2; - Triangulation tria; - GridGenerator::hyper_cube (tria); - deallog << tria.n_active_cells() << " active cells" << std::endl; - - FESystem fe(FE_Q(2), spacedim); - DoFHandler dof_handler (tria); - dof_handler.distribute_dofs (fe); - - deallog << dof_handler.n_dofs() << " degrees of freedom" << std::endl; - - // test left and right boundary - // separatel - for (unsigned int boundary_id=0; boundary_id<2; ++boundary_id) - { - std::map bv; - VectorTools::interpolate_boundary_values (dof_handler, - boundary_id, - X(), - bv); - deallog << bv.size() << " boundary degrees of freedom" << std::endl; - - for (std::map::const_iterator i = bv.begin(); - i != bv.end(); ++i) - deallog << i->first << ' ' << i->second << std::endl; - - for (DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - if (cell->at_boundary(f) && - (cell->face(f)->boundary_indicator() == boundary_id)) - for (unsigned int v=0; v::vertices_per_face; ++v) - for (unsigned int i=0; iface(f)->vertex_dof_index(v,i)) - != bv.end(), - ExcInternalError()); - Assert (bv[cell->face(f)->vertex_dof_index(v,i)] - == - X() - .value(cell->face(f)->vertex(v),i), - ExcInternalError()); - } - } + Triangulation tria; + GridGenerator::hyper_cube (tria); + deallog << tria.n_active_cells() << " active cells" << std::endl; + + FESystem fe(FE_Q(2), spacedim); + DoFHandler dof_handler (tria); + dof_handler.distribute_dofs (fe); + + deallog << dof_handler.n_dofs() << " degrees of freedom" << std::endl; + + // test left and right boundary + // separatel + for (unsigned int boundary_id=0; boundary_id<2; ++boundary_id) + { + std::map bv; + VectorTools::interpolate_boundary_values (dof_handler, + boundary_id, + X(), + bv); + deallog << bv.size() << " boundary degrees of freedom" << std::endl; + + for (std::map::const_iterator i = bv.begin(); + i != bv.end(); ++i) + deallog << i->first << ' ' << i->second << std::endl; + + for (DoFHandler::active_cell_iterator + cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + if (cell->at_boundary(f) && + (cell->face(f)->boundary_indicator() == boundary_id)) + for (unsigned int v=0; v::vertices_per_face; ++v) + for (unsigned int i=0; iface(f)->vertex_dof_index(v,i)) + != bv.end(), + ExcInternalError()); + Assert (bv[cell->face(f)->vertex_dof_index(v,i)] + == + X() + .value(cell->face(f)->vertex(v),i), + ExcInternalError()); + } + } } diff --git a/tests/codim_one/interpolate_boundary_values_03.cc b/tests/codim_one/interpolate_boundary_values_03.cc index 2a9656f19e..a396de8c9d 100644 --- a/tests/codim_one/interpolate_boundary_values_03.cc +++ b/tests/codim_one/interpolate_boundary_values_03.cc @@ -34,18 +34,19 @@ std::ofstream logfile("interpolate_boundary_values_03/output"); -void test() { +void test() +{ const int dim = 1; const int spacedim = 2; - + Triangulation tria; Triangulation volume_mesh; GridGenerator::half_hyper_ball(volume_mesh); std::set boundary_ids; boundary_ids.insert(0); - + GridTools::extract_boundary_mesh (volume_mesh, tria,boundary_ids); - + deallog << tria.n_active_cells() << " active cells" << std::endl; FE_Q fe(1); @@ -53,39 +54,39 @@ void test() { dof_handler.distribute_dofs (fe); deallog << dof_handler.n_dofs() << " degrees of freedom" << std::endl; - - // test left and right boundary - // separately + + // test left and right boundary + // separately for (unsigned int boundary_id=0; boundary_id<2; ++boundary_id) { std::map bv; VectorTools::interpolate_boundary_values (dof_handler, - boundary_id, - Functions::SquareFunction(), - bv); + boundary_id, + Functions::SquareFunction(), + bv); deallog << bv.size() << " boundary degrees of freedom" << std::endl; - + for (std::map::const_iterator i = bv.begin(); - i != bv.end(); ++i) - deallog << i->first << ' ' << i->second << std::endl; - + i != bv.end(); ++i) + deallog << i->first << ' ' << i->second << std::endl; + for (DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - if (cell->at_boundary(f) && - (cell->face(f)->boundary_indicator() == boundary_id)) - for (unsigned int v=0; v::vertices_per_face; ++v) - for (unsigned int i=0; iface(f)->vertex_dof_index(v,i)) - != bv.end(), - ExcInternalError()); - Assert (bv[cell->face(f)->vertex_dof_index(v,i)] - == - Functions::SquareFunction() - .value(cell->face(f)->vertex(v),i), - ExcInternalError()); - } + cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + if (cell->at_boundary(f) && + (cell->face(f)->boundary_indicator() == boundary_id)) + for (unsigned int v=0; v::vertices_per_face; ++v) + for (unsigned int i=0; iface(f)->vertex_dof_index(v,i)) + != bv.end(), + ExcInternalError()); + Assert (bv[cell->face(f)->vertex_dof_index(v,i)] + == + Functions::SquareFunction() + .value(cell->face(f)->vertex(v),i), + ExcInternalError()); + } } } @@ -95,9 +96,9 @@ int main () { deallog.attach(logfile); deallog.depth_console(0); - + test(); - + return 0; } diff --git a/tests/codim_one/interpolate_boundary_values_1d_closed_ring.cc b/tests/codim_one/interpolate_boundary_values_1d_closed_ring.cc index 56dfa00559..303cacb9fe 100644 --- a/tests/codim_one/interpolate_boundary_values_1d_closed_ring.cc +++ b/tests/codim_one/interpolate_boundary_values_1d_closed_ring.cc @@ -43,58 +43,59 @@ using namespace dealii; std::ofstream logfile("interpolate_boundary_values_1d_closed_ring/output"); -void test() { +void test() +{ const unsigned int dim = 1; const unsigned int spacedim=2; Triangulation tria; std::map::cell_iterator,Triangulation::face_iterator > - surface_to_volume_mapping; + surface_to_volume_mapping; Triangulation volume_mesh; GridGenerator::hyper_cube(volume_mesh); surface_to_volume_mapping = GridTools::extract_boundary_mesh (volume_mesh, tria); - FE_Q fe(2); - DoFHandler dof_handler (tria); - dof_handler.distribute_dofs (fe); - - deallog << dof_handler.n_dofs() << " degrees of freedom" << std::endl; - - // test left and right boundary - // separatel - for (unsigned int boundary_id=0; boundary_id<2; ++boundary_id) - { - std::map bv; - VectorTools::interpolate_boundary_values (dof_handler, - boundary_id, - Functions::SquareFunction(), - bv); - deallog << bv.size() << " boundary degrees of freedom" << std::endl; - - for (std::map::const_iterator i = bv.begin(); - i != bv.end(); ++i) - deallog << i->first << ' ' << i->second << std::endl; - - for (DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - if (cell->at_boundary(f) && - (cell->face(f)->boundary_indicator() == boundary_id)) - for (unsigned int v=0; v::vertices_per_face; ++v) - for (unsigned int i=0; iface(f)->vertex_dof_index(v,i)) - != bv.end(), - ExcInternalError()); - Assert (bv[cell->face(f)->vertex_dof_index(v,i)] - == - Functions::SquareFunction() - .value(cell->face(f)->vertex(v),i), - ExcInternalError()); - } - } + FE_Q fe(2); + DoFHandler dof_handler (tria); + dof_handler.distribute_dofs (fe); + + deallog << dof_handler.n_dofs() << " degrees of freedom" << std::endl; + + // test left and right boundary + // separatel + for (unsigned int boundary_id=0; boundary_id<2; ++boundary_id) + { + std::map bv; + VectorTools::interpolate_boundary_values (dof_handler, + boundary_id, + Functions::SquareFunction(), + bv); + deallog << bv.size() << " boundary degrees of freedom" << std::endl; + + for (std::map::const_iterator i = bv.begin(); + i != bv.end(); ++i) + deallog << i->first << ' ' << i->second << std::endl; + + for (DoFHandler::active_cell_iterator + cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + if (cell->at_boundary(f) && + (cell->face(f)->boundary_indicator() == boundary_id)) + for (unsigned int v=0; v::vertices_per_face; ++v) + for (unsigned int i=0; iface(f)->vertex_dof_index(v,i)) + != bv.end(), + ExcInternalError()); + Assert (bv[cell->face(f)->vertex_dof_index(v,i)] + == + Functions::SquareFunction() + .value(cell->face(f)->vertex(v),i), + ExcInternalError()); + } + } } diff --git a/tests/codim_one/interpolation.cc b/tests/codim_one/interpolation.cc index 94d2599273..294b7bbb28 100644 --- a/tests/codim_one/interpolation.cc +++ b/tests/codim_one/interpolation.cc @@ -46,7 +46,8 @@ std::ofstream logfile("interpolation/output"); template -void test(std::string filename, unsigned int n) { +void test(std::string filename, unsigned int n) +{ Triangulation triangulation; GridIn gi; @@ -59,37 +60,37 @@ void test(std::string filename, unsigned int n) { DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); - + // Now we interpolate the constant function on the mesh, and check // that this is consistent with what we expect. Vector real_one(dof_handler.n_dofs()); Vector interpolated_one(dof_handler.n_dofs()); - for(unsigned int i=0; i constant(1.); VectorTools::interpolate(dof_handler, constant, interpolated_one); - + real_one.add(-1, interpolated_one); - - deallog << "L2 Norm of difference: " - << real_one.l2_norm() << std::endl - << "Linfty Norm of difference: " - << real_one.linfty_norm() << std::endl; + + deallog << "L2 Norm of difference: " + << real_one.l2_norm() << std::endl + << "Linfty Norm of difference: " + << real_one.linfty_norm() << std::endl; } -int main () +int main () { deallog.attach(logfile); deallog.depth_console(0); - - for(unsigned int n=1; n<8; ++n) + + for (unsigned int n=1; n<8; ++n) { deallog << "Test<1,2>, finite element q_" << n << std::endl; test<1,2>("grids/circle_2.inp",n); - + deallog << "Test<1,2>, finite element q_" << n << std::endl; test<2,3>("grids/sphere_2.inp",n); } diff --git a/tests/codim_one/interpolation_2.cc b/tests/codim_one/interpolation_2.cc index 832e1ecbee..0196eee1b1 100644 --- a/tests/codim_one/interpolation_2.cc +++ b/tests/codim_one/interpolation_2.cc @@ -47,7 +47,8 @@ std::ofstream logfile("interpolation_2/output"); template -void test(std::string filename) { +void test(std::string filename) +{ Triangulation triangulation; GridIn gi; @@ -60,14 +61,14 @@ void test(std::string filename) { DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); - + // Now we interpolate the constant function on the mesh, and check // that this is consistent with what we expect. Vector interpolated_one(dof_handler.n_dofs()); - + Functions::CosineFunction cosine; VectorTools::interpolate(dof_handler, cosine, interpolated_one); - + DataOut > dataout; dataout.attach_dof_handler(dof_handler); dataout.add_data_vector(interpolated_one, "numbering"); @@ -77,11 +78,11 @@ void test(std::string filename) { -int main () +int main () { deallog.attach(logfile); deallog.depth_console(0); - + deallog << "Test<1,2>" << std::endl; test<1,2>("grids/circle_2.inp"); diff --git a/tests/codim_one/interpolation_3.cc b/tests/codim_one/interpolation_3.cc index 069c5dc5cc..fbf6d8541f 100644 --- a/tests/codim_one/interpolation_3.cc +++ b/tests/codim_one/interpolation_3.cc @@ -46,10 +46,11 @@ std::ofstream logfile("interpolation_3/output"); -// Test interpolation on system of finite elements. +// Test interpolation on system of finite elements. template -void test(std::string filename) { +void test(std::string filename) +{ Triangulation triangulation; GridIn gi; @@ -63,20 +64,20 @@ void test(std::string filename) { DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); - + // Now we interpolate the constant function on the mesh, and check // that this is consistent with what we expect. Vector interpolated_one(dof_handler.n_dofs()); - + FunctionParser func(spacedim); std::map maps; - if(spacedim == 2) - func.initialize("x,y", "x^2; y^2", maps); + if (spacedim == 2) + func.initialize("x,y", "x^2; y^2", maps); else - func.initialize("x,y,z", "x^2; y^2; z^2", maps); - + func.initialize("x,y,z", "x^2; y^2; z^2", maps); + VectorTools::interpolate(dof_handler, func, interpolated_one); - + DataOut > dataout; dataout.attach_dof_handler(dof_handler); dataout.add_data_vector(interpolated_one, "test"); @@ -86,11 +87,11 @@ void test(std::string filename) { -int main () +int main () { deallog.attach(logfile); deallog.depth_console(0); - + deallog << "Test<1,2>" << std::endl; test<1,2>("grids/circle_2.inp"); diff --git a/tests/codim_one/mapping_01.cc b/tests/codim_one/mapping_01.cc index 7caf2c9602..b6b285a43c 100644 --- a/tests/codim_one/mapping_01.cc +++ b/tests/codim_one/mapping_01.cc @@ -53,26 +53,26 @@ void test () QGauss quadrature(2); MappingQ1 mapping; FE_Q fe (1); - + FEValues fe_values (mapping, fe, quadrature, update_cell_normal_vectors); - + for (typename Triangulation::active_cell_iterator - cell = boundary_mesh.begin_active(); cell != boundary_mesh.end(); + cell = boundary_mesh.begin_active(); cell != boundary_mesh.end(); ++cell) { deallog << "Cell = " << cell - << ", with center at " << cell->center() - << std::endl; + << ", with center at " << cell->center() + << std::endl; fe_values.reinit (cell); for (unsigned int q=0; qcenter() - << std::endl; + << ", with center at " << cell->center() + << std::endl; fe_values.reinit (cell); for (unsigned int q=0; q -void test(std::string filename) { +void test(std::string filename) +{ Triangulation tria; GridIn gi; gi.attach_triangulation (tria); @@ -50,37 +51,37 @@ void test(std::string filename) { QTrapez quad; MappingQ1 mapping; - typename Triangulation::active_cell_iterator cell=tria.begin_active(), - endc=tria.end() ; + typename Triangulation::active_cell_iterator cell=tria.begin_active(), + endc=tria.end() ; Point real; Point unit; double eps = 1e-10; - for(;cell!=endc;++cell) + for (; cell!=endc; ++cell) { - deallog< " << real << std::endl; - if( (unit-quad.point(q)).norm()>eps) - deallog<< "Error: " - << quad.point(q)<< " != " - << unit << std::endl; - } - } - + deallog< " << real << std::endl; + if ( (unit-quad.point(q)).norm()>eps) + deallog<< "Error: " + << quad.point(q)<< " != " + << unit << std::endl; + } + } + } -int main () +int main () { deallog.attach(logfile); deallog.depth_console(0); - + test<1,2>("grids/circle_1.inp"); test<2,3>("grids/square.inp"); test<2,3>("grids/sphere_1.inp"); return 0; } - + diff --git a/tests/codim_one/mapping_q1_eulerian.cc b/tests/codim_one/mapping_q1_eulerian.cc index 81c0d7428d..4885107dec 100644 --- a/tests/codim_one/mapping_q1_eulerian.cc +++ b/tests/codim_one/mapping_q1_eulerian.cc @@ -40,20 +40,21 @@ std::ofstream logfile("mapping_q1_eulerian/output"); template -void test(std::string filename) { +void test(std::string filename) +{ Triangulation tria; FE_Q base_fe(1); FESystem fe(base_fe, spacedim); DoFHandler shift_dh(tria); - + GridIn gi; gi.attach_triangulation (tria); std::ifstream in (filename.c_str()); gi.read_ucd (in); shift_dh.distribute_dofs(fe); - + Vector shift(shift_dh.n_dofs()); shift.add(+1); @@ -64,36 +65,36 @@ void test(std::string filename) { QTrapez quad; MappingQ1Eulerian,spacedim> mapping(shift, shift_dh); - - typename Triangulation::active_cell_iterator cell=tria.begin_active(), - endc=tria.end() ; + + typename Triangulation::active_cell_iterator cell=tria.begin_active(), + endc=tria.end() ; Point real; Point unit; double eps = 1e-10; - for(;cell!=endc;++cell) + for (; cell!=endc; ++cell) { - deallog< " << real << std::endl; - if( (unit-quad.point(q)).norm()>eps) - deallog<-> " << unit << std::endl; - } - } - + deallog< " << real << std::endl; + if ( (unit-quad.point(q)).norm()>eps) + deallog<-> " << unit << std::endl; + } + } + } -int main () +int main () { deallog.attach(logfile); deallog.depth_console(0); - + test<1,2>("grids/circle_1.inp"); test<2,3>("grids/square.inp"); test<2,3>("grids/sphere_1.inp"); return 0; } - + diff --git a/tests/codim_one/mapping_q_eulerian.cc b/tests/codim_one/mapping_q_eulerian.cc index 08038c2082..7ba13b321f 100644 --- a/tests/codim_one/mapping_q_eulerian.cc +++ b/tests/codim_one/mapping_q_eulerian.cc @@ -40,20 +40,21 @@ std::ofstream logfile("mapping_q_eulerian/output"); template -void test(std::string filename, unsigned int degree) { +void test(std::string filename, unsigned int degree) +{ Triangulation tria; FE_Q base_fe(degree); FESystem fe(base_fe, spacedim); DoFHandler shift_dh(tria); - + GridIn gi; gi.attach_triangulation (tria); std::ifstream in (filename.c_str()); gi.read_ucd (in); shift_dh.distribute_dofs(fe); - + Vector shift(shift_dh.n_dofs()); shift.add(+1); @@ -64,41 +65,41 @@ void test(std::string filename, unsigned int degree) { QTrapez quad; MappingQEulerian,spacedim> mapping(degree, shift, shift_dh); - - typename Triangulation::active_cell_iterator cell=tria.begin_active(), - endc=tria.end() ; + + typename Triangulation::active_cell_iterator cell=tria.begin_active(), + endc=tria.end() ; Point real; Point unit; double eps = 1e-10; - for(;cell!=endc;++cell) + for (; cell!=endc; ++cell) { - deallog< " << real << std::endl; - if( (unit-quad.point(q)).norm()>eps) - deallog<<"Error: "<< quad.point(q) - << " != " << unit << std::endl; - } - } - + deallog< " << real << std::endl; + if ( (unit-quad.point(q)).norm()>eps) + deallog<<"Error: "<< quad.point(q) + << " != " << unit << std::endl; + } + } + } -int main () +int main () { deallog.attach(logfile); deallog.depth_console(0); - - test<1,2>("grids/circle_1.inp",1); - test<1,2>("grids/circle_1.inp",2); - test<2,3>("grids/square.inp",1); - test<2,3>("grids/square.inp",2); - test<2,3>("grids/sphere_1.inp",1); + + test<1,2>("grids/circle_1.inp",1); + test<1,2>("grids/circle_1.inp",2); + test<2,3>("grids/square.inp",1); + test<2,3>("grids/square.inp",2); + test<2,3>("grids/sphere_1.inp",1); // test<2,3>("grids/problem.inp",1); test<2,3>("grids/sphere_1.inp",2); return 0; } - + diff --git a/tests/codim_one/mean_value.cc b/tests/codim_one/mean_value.cc index e364be878d..e4e4d4fda2 100644 --- a/tests/codim_one/mean_value.cc +++ b/tests/codim_one/mean_value.cc @@ -60,8 +60,8 @@ void test() VectorTools::interpolate(dof_handler, cosine, x); const double mean = VectorTools::compute_mean_value (dof_handler, - QGauss(2), - x, 0); + QGauss(2), + x, 0); // we have a symmetric domain and a symmetric function. the result // should be close to zero Assert (std::fabs(mean) < 1e-15, ExcInternalError()); @@ -70,11 +70,11 @@ void test() -int main () +int main () { deallog.attach(logfile); deallog.depth_console(0); - + test<1,2>(); test<2,3>(); } diff --git a/tests/codim_one/mesh_bug.cc b/tests/codim_one/mesh_bug.cc index 352706ee14..bae554ba33 100644 --- a/tests/codim_one/mesh_bug.cc +++ b/tests/codim_one/mesh_bug.cc @@ -34,7 +34,7 @@ #include -int main () +int main () { std::ofstream logfile("mesh_bug/output"); @@ -46,14 +46,14 @@ int main () const std::vector > &vertices = tria.get_vertices(); - for(unsigned int i=0; i1e-7) + for (unsigned int i=0; i1e-7) std::cout << "Error!" << std::endl; - - + + GridOut go; go.write_ucd(tria, logfile); return 0; } - + diff --git a/tests/codim_one/normal_vectors_01.cc b/tests/codim_one/normal_vectors_01.cc index d9c7c41a8a..84c825f708 100644 --- a/tests/codim_one/normal_vectors_01.cc +++ b/tests/codim_one/normal_vectors_01.cc @@ -39,36 +39,36 @@ void test () { Triangulation volume_mesh; GridGenerator::hyper_cube(volume_mesh); - + Triangulation tria; GridTools::extract_boundary_mesh (volume_mesh, tria); - + FE_Q fe (1); DoFHandler dh(tria); MappingQ mapping(1,true); - + dh.distribute_dofs (fe); - + FEFaceValues fe_face_values (mapping, fe, QTrapez(), - update_normal_vectors); + update_normal_vectors); for (typename DoFHandler::active_cell_iterator - cell = dh.begin_active(); + cell = dh.begin_active(); cell != dh.end(); ++cell) { deallog << "Face centered at " << cell->center() - << std::endl; + << std::endl; for (unsigned int f=0; f::faces_per_cell; ++f) - { - deallog << " Edge centered at " << cell->face(f)->center() - << std::endl; - - fe_face_values.reinit (cell,f); - for (unsigned int q=0; qface(f)->center() + << std::endl; + + fe_face_values.reinit (cell,f); + for (unsigned int q=0; q -void test(std::string filename, unsigned int n) { +void test(std::string filename, unsigned int n) +{ Triangulation triangulation; GridIn gi; @@ -63,7 +64,7 @@ void test(std::string filename, unsigned int n) { DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); - + // Now we project the constant function on the mesh, and check // that this is consistent with what we expect. Vector projected_one(dof_handler.n_dofs()); @@ -74,7 +75,7 @@ void test(std::string filename, unsigned int n) { ConstraintMatrix constraints; constraints.close(); VectorTools::project(dof_handler, constraints, quad, cosine, projected_one); - + DataOut > dataout; dataout.attach_dof_handler(dof_handler); dataout.add_data_vector(projected_one, "projection"); @@ -84,16 +85,16 @@ void test(std::string filename, unsigned int n) { -int main () +int main () { deallog.attach(logfile); deallog.depth_console(0); - + for (unsigned int n=1; n<5; n++) { deallog << "Test<1,2>, continous finite element q_" << n << std::endl; test<1,2>("grids/circle_2.inp",n); - + deallog << "Test<2,3>, continous finite element q_" << n << std::endl; test<2,3>("grids/sphere_2.inp",n); } diff --git a/tests/codim_one/projection_dgp.cc b/tests/codim_one/projection_dgp.cc index 73ff9760f4..1335827792 100644 --- a/tests/codim_one/projection_dgp.cc +++ b/tests/codim_one/projection_dgp.cc @@ -51,7 +51,8 @@ std::ofstream logfile("projection_dgp/output"); template -void test(std::string filename, unsigned int n) { +void test(std::string filename, unsigned int n) +{ Triangulation triangulation; GridIn gi; @@ -64,7 +65,7 @@ void test(std::string filename, unsigned int n) { DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); - + // Now we interpolate the constant function on the mesh, and check // that this is consistent with what we expect. Vector interpolated_one(dof_handler.n_dofs()); @@ -75,7 +76,7 @@ void test(std::string filename, unsigned int n) { ConstraintMatrix constraints; constraints.close(); VectorTools::project(dof_handler, constraints, quad, cosine, interpolated_one); - + DataOut > dataout; dataout.attach_dof_handler(dof_handler); dataout.add_data_vector(interpolated_one, "numbering"); @@ -85,18 +86,18 @@ void test(std::string filename, unsigned int n) { -int main () +int main () { deallog.attach(logfile); deallog.depth_console(0); - + for (unsigned int n=1; n<5; n++) { deallog << "Test<1,2>, continous finite element q_" << n << std::endl; test<1,2>("grids/circle_2.inp",n); - - deallog << "Test<2,3>, continous finite element q_" << n << std::endl; - test<2,3>("grids/sphere_2.inp",n); + + deallog << "Test<2,3>, continous finite element q_" << n << std::endl; + test<2,3>("grids/sphere_2.inp",n); } return 0; } diff --git a/tests/codim_one/renumber_component_wise_01.cc b/tests/codim_one/renumber_component_wise_01.cc index d3a001c095..33fd91d69f 100644 --- a/tests/codim_one/renumber_component_wise_01.cc +++ b/tests/codim_one/renumber_component_wise_01.cc @@ -53,14 +53,14 @@ void test(std::string filename) DoFRenumbering::component_wise (dof_handler); for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); cell!=dof_handler.end(); ++cell) + cell = dof_handler.begin_active(); cell!=dof_handler.end(); ++cell) { std::vector x (cell->get_fe().dofs_per_cell); cell->get_dof_indices (x); deallog << cell << std::endl; for (unsigned int i=0; i boundary_mesh; - // create a line in 2d + // create a line in 2d GridGenerator::hyper_cube (boundary_mesh); - // attach a piecewise constant - // element to this one cell + // attach a piecewise constant + // element to this one cell FE_DGQ fe(0); DoFHandler dh (boundary_mesh); dh.distribute_dofs(fe); @@ -77,11 +77,11 @@ int main () deallog << solution(i) << std::endl; - // Do some refinement + // Do some refinement boundary_mesh.begin_active()->set_refine_flag (); SolutionTransfer, DoFHandler > - soltrans(dh); + soltrans(dh); boundary_mesh.prepare_coarsening_and_refinement(); @@ -90,8 +90,8 @@ int main () dh.distribute_dofs(fe); - // get the interpolated solution - // back + // get the interpolated solution + // back Vector tmp(dh.n_dofs()); tmp = 2; soltrans.interpolate(solution, tmp); diff --git a/tests/codim_one/surface.cc b/tests/codim_one/surface.cc index 0650351b94..4e9cf1937b 100644 --- a/tests/codim_one/surface.cc +++ b/tests/codim_one/surface.cc @@ -44,76 +44,77 @@ std::ofstream logfile("surface/output"); // which are more and more refined, and prints the error on the // output. template -void test(std::string filename) { +void test(std::string filename) +{ + + Triangulation triangulation; + GridIn gi; - Triangulation triangulation; - GridIn gi; + gi.attach_triangulation (triangulation); + std::ifstream in (filename.c_str()); + gi.read_ucd (in); - gi.attach_triangulation (triangulation); - std::ifstream in (filename.c_str()); - gi.read_ucd (in); + const QGauss quadrature(2); + const FE_Q dummy_fe (1); + DoFHandler dof_handler (triangulation); - const QGauss quadrature(2); - const FE_Q dummy_fe (1); - DoFHandler dof_handler (triangulation); + FEValues fe_values (dummy_fe, quadrature, + update_JxW_values | + update_cell_normal_vectors | + update_quadrature_points); - FEValues fe_values (dummy_fe, quadrature, - update_JxW_values | - update_cell_normal_vectors | - update_quadrature_points); - - dof_handler.distribute_dofs (dummy_fe); + dof_handler.distribute_dofs (dummy_fe); - double area = 0; - double normals = 0; + double area = 0; + double normals = 0; - typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(), - endc = dof_handler.end(); + typename DoFHandler::active_cell_iterator + cell = dof_handler.begin_active(), + endc = dof_handler.end(); - std::vector > expectedcellnormals(fe_values.n_quadrature_points); + std::vector > expectedcellnormals(fe_values.n_quadrature_points); - for (; cell!=endc; ++cell) + for (; cell!=endc; ++cell) { - fe_values.reinit (cell); - const std::vector > & cellnormals = fe_values.get_cell_normal_vectors(); - const std::vector > & quad_points = fe_values.get_quadrature_points(); - - for (unsigned int i=0; i > &cellnormals = fe_values.get_cell_normal_vectors(); + const std::vector > &quad_points = fe_values.get_quadrature_points(); + + for (unsigned int i=0; i"<("grids/circle_1.inp"); - test<1,2>("grids/circle_2.inp"); - test<1,2>("grids/circle_3.inp"); - test<1,2>("grids/circle_4.inp"); - - deallog<<"Test <2,3>"<("grids/sphere_1.inp"); - test<2,3>("grids/sphere_2.inp"); - test<2,3>("grids/sphere_3.inp"); - test<2,3>("grids/sphere_4.inp"); - - return 0; + deallog.attach(logfile); + deallog.depth_console(0); + + deallog<<"Test <1,2>"<("grids/circle_1.inp"); + test<1,2>("grids/circle_2.inp"); + test<1,2>("grids/circle_3.inp"); + test<1,2>("grids/circle_4.inp"); + + deallog<<"Test <2,3>"<("grids/sphere_1.inp"); + test<2,3>("grids/sphere_2.inp"); + test<2,3>("grids/sphere_3.inp"); + test<2,3>("grids/sphere_4.inp"); + + return 0; } diff --git a/tests/codim_one/tensor_matrix_conversion.cc b/tests/codim_one/tensor_matrix_conversion.cc index 06a4c76fc3..ab0139188c 100644 --- a/tests/codim_one/tensor_matrix_conversion.cc +++ b/tests/codim_one/tensor_matrix_conversion.cc @@ -31,52 +31,52 @@ std::ofstream logfile("tensor_matrix_conversion/output"); template -void +void fill_matrix(FullMatrix &A) { - for (unsigned int i=0; i -void +void display_matrix(FullMatrix M) { deallog< -void +void fill_tensor_2(Tensor<2,b> &T) { - for (unsigned int i=0; i -void +void display_tensor_2(Tensor<2,b> &T) { deallog< A2(3,3); fill_matrix(A2); @@ -101,14 +101,14 @@ int main () for (unsigned int n=0; n<3; n++) for (unsigned int i=0; i<3-n; i++) for (unsigned int j=0; j<3-n; j++) - { - A2.copy_to(T2,0,n,0,n,i,j); - display_tensor_2(T2); - T2 = 0; - } + { + A2.copy_to(T2,0,n,0,n,i,j); + display_tensor_2(T2); + T2 = 0; + } return 0; } - + diff --git a/tests/codim_one/transform_01.cc b/tests/codim_one/transform_01.cc index 4f679a9aa1..8e35edfed5 100644 --- a/tests/codim_one/transform_01.cc +++ b/tests/codim_one/transform_01.cc @@ -45,7 +45,7 @@ Point warp (const Point &p) template -void save_mesh(const Triangulation& tria) +void save_mesh(const Triangulation &tria) { GridOut grid_out; grid_out.write_gnuplot (tria, deallog.get_file_stream()); @@ -59,32 +59,32 @@ int main () deallog.depth_console(0); Triangulation<2,3> triangulation; - + HyperBallBoundary<3> boundary_description; Triangulation<3> volume_mesh; GridGenerator::half_hyper_ball(volume_mesh); - + volume_mesh.set_boundary (1, boundary_description); volume_mesh.set_boundary (0, boundary_description); volume_mesh.refine_global (3); - + static HyperBallBoundary<3-1,3> surface_description; triangulation.set_boundary (1, surface_description); triangulation.set_boundary (0, surface_description); - + std::set boundary_ids; boundary_ids.insert(0); - + GridTools::extract_boundary_mesh (volume_mesh, triangulation, - boundary_ids); + boundary_ids); triangulation.set_boundary (1); triangulation.set_boundary (0); GridTools::transform (&warp<3>, triangulation); deallog << "Surface mesh has " << triangulation.n_active_cells() - << " cells." - << std::endl; + << " cells." + << std::endl; save_mesh (triangulation); - + return 0; } diff --git a/tests/deal.II/accessor_01.cc b/tests/deal.II/accessor_01.cc index c58c8d62d1..fe4fa138ca 100644 --- a/tests/deal.II/accessor_01.cc +++ b/tests/deal.II/accessor_01.cc @@ -30,8 +30,8 @@ template -LogStream& -operator << (LogStream& log, const TriaIterator& i) +LogStream & +operator << (LogStream &log, const TriaIterator &i) { log << ACCESSOR::dimension << ' ' << ACCESSOR::structure_dimension << ' ' @@ -42,18 +42,18 @@ operator << (LogStream& log, const TriaIterator& i) template -void test_in_dim(const DH& d1, const DH& d2) +void test_in_dim(const DH &d1, const DH &d2) { typename DH::active_cell_iterator a = d1.begin_active(); typename DH::cell_iterator l = d1.begin(d1.get_tria().n_levels()-1); deallog << "a " << a << std::endl - << "l " << l << std::endl; + << "l " << l << std::endl; } template -void init_tria (Triangulation& tr) +void init_tria (Triangulation &tr) { GridGenerator::hyper_cube(tr); tr.refine_global(4-dim); @@ -61,9 +61,9 @@ void init_tria (Triangulation& tr) template -void init_dofs (DoFHandler& dof, - const Triangulation& tr, - const FiniteElement& fe) +void init_dofs (DoFHandler &dof, + const Triangulation &tr, + const FiniteElement &fe) { dof.initialize(tr, fe); } diff --git a/tests/deal.II/accessor_02.cc b/tests/deal.II/accessor_02.cc index c58c8d62d1..fe4fa138ca 100644 --- a/tests/deal.II/accessor_02.cc +++ b/tests/deal.II/accessor_02.cc @@ -30,8 +30,8 @@ template -LogStream& -operator << (LogStream& log, const TriaIterator& i) +LogStream & +operator << (LogStream &log, const TriaIterator &i) { log << ACCESSOR::dimension << ' ' << ACCESSOR::structure_dimension << ' ' @@ -42,18 +42,18 @@ operator << (LogStream& log, const TriaIterator& i) template -void test_in_dim(const DH& d1, const DH& d2) +void test_in_dim(const DH &d1, const DH &d2) { typename DH::active_cell_iterator a = d1.begin_active(); typename DH::cell_iterator l = d1.begin(d1.get_tria().n_levels()-1); deallog << "a " << a << std::endl - << "l " << l << std::endl; + << "l " << l << std::endl; } template -void init_tria (Triangulation& tr) +void init_tria (Triangulation &tr) { GridGenerator::hyper_cube(tr); tr.refine_global(4-dim); @@ -61,9 +61,9 @@ void init_tria (Triangulation& tr) template -void init_dofs (DoFHandler& dof, - const Triangulation& tr, - const FiniteElement& fe) +void init_dofs (DoFHandler &dof, + const Triangulation &tr, + const FiniteElement &fe) { dof.initialize(tr, fe); } diff --git a/tests/deal.II/block_info.cc b/tests/deal.II/block_info.cc index badc4867fc..1fbc6b3214 100644 --- a/tests/deal.II/block_info.cc +++ b/tests/deal.II/block_info.cc @@ -26,8 +26,8 @@ template -void test_grid(const Triangulation& tr, - const FiniteElement& fe) +void test_grid(const Triangulation &tr, + const FiniteElement &fe) { MGDoFHandler mgdof(tr); mgdof.distribute_dofs(fe); @@ -37,43 +37,43 @@ void test_grid(const Triangulation& tr, deallog << "Global dofs " << mgdof.n_dofs() << std::endl; deallog << "Global blocks "; - for (unsigned int i=0;i renumbered(fe.dofs_per_cell); - + deallog << "Renumbering "; - for (unsigned int i=0;i -void test_fe (const FiniteElement& fe) +void test_fe (const FiniteElement &fe) { Triangulation tr; GridGenerator::hyper_cube(tr); @@ -82,22 +82,22 @@ void test_fe (const FiniteElement& fe) } -int main () +int main () { initlog(__FILE__); - + FE_Q<2> q21(1); FE_Q<2> q22(2); FESystem<2> s2(q21, 3, q22, 2); - + test_fe(q21); test_fe(q22); test_fe(s2); - + FE_Q<3> q31(1); FE_Q<3> q32(2); FESystem<3> s3(q31, 3, q32, 2); - + test_fe(q31); test_fe(q32); test_fe(s3); diff --git a/tests/deal.II/block_info_02.cc b/tests/deal.II/block_info_02.cc index aa86dc4be0..a166d4e277 100644 --- a/tests/deal.II/block_info_02.cc +++ b/tests/deal.II/block_info_02.cc @@ -30,8 +30,8 @@ template -void test_grid(const Triangulation& tr, - const FiniteElement& fe) +void test_grid(const Triangulation &tr, + const FiniteElement &fe) { DoFHandler mgdof(tr); mgdof.distribute_dofs(fe); @@ -39,46 +39,46 @@ void test_grid(const Triangulation& tr, BlockInfo bi; bi.initialize(mgdof, false, false); bi.initialize_local(mgdof); - + deallog << "Global dofs " << mgdof.n_dofs() << std::endl; deallog << "Global blocks "; - for (unsigned int i=0;i renumbered(fe.dofs_per_cell); - + deallog << "Renumbering "; - for (unsigned int i=0;i -void test_fe (const FiniteElement& fe) +void test_fe (const FiniteElement &fe) { Triangulation tr; GridGenerator::hyper_cube(tr); @@ -87,22 +87,22 @@ void test_fe (const FiniteElement& fe) } -int main () +int main () { initlog(__FILE__); - + FE_Q<2> q21(1); FE_Q<2> q22(2); FESystem<2> s2(q21, 3, q22, 2); - + test_fe(q21); test_fe(q22); test_fe(s2); - + FE_Q<3> q31(1); FE_Q<3> q32(2); FESystem<3> s3(q31, 3, q32, 2); - + test_fe(q31); test_fe(q32); test_fe(s3); diff --git a/tests/deal.II/block_list.h b/tests/deal.II/block_list.h index 5e6446222e..29663aaee7 100644 --- a/tests/deal.II/block_list.h +++ b/tests/deal.II/block_list.h @@ -1,6 +1,6 @@ //---------------------------------------------------------------------- // $Id$ -// Version: $Name$ +// Version: $Name$ // // Copyright (C) 2011 by the deal.II authors // @@ -29,19 +29,19 @@ using namespace dealii; void -print_patches (const SparsityPattern& bl) +print_patches (const SparsityPattern &bl) { - for (unsigned int i=0;i entries; - for (SparsityPattern::row_iterator b = bl.row_begin(i);b != bl.row_end(i);++b) - entries.push_back(*b); - + for (SparsityPattern::row_iterator b = bl.row_begin(i); b != bl.row_end(i); ++b) + entries.push_back(*b); + std::sort(entries.begin(), entries.end()); - - for (unsigned int i=0;i void test_global_refinement( - void (*test_block_list)(const Triangulation& tr, const FiniteElement& fe)) + void (*test_block_list)(const Triangulation &tr, const FiniteElement &fe)) { Triangulation trc, trl; GridGenerator::hyper_cube(trc); trc.refine_global(2); GridGenerator::hyper_L(trl); trl.refine_global(1); - + FE_DGQ fe1(0); FE_DGQ fe2(1); // FE_Q fe3(1); @@ -64,7 +64,7 @@ void test_global_refinement( FE_RaviartThomas fe5(1); FE_Nedelec fe6(0); FE_Nedelec fe7(1); - + deallog.push("Square"); test_block_list(trc, fe1); test_block_list(trc, fe2); diff --git a/tests/deal.II/block_list_01.cc b/tests/deal.II/block_list_01.cc index c786b44ad3..3011295ad2 100644 --- a/tests/deal.II/block_list_01.cc +++ b/tests/deal.II/block_list_01.cc @@ -19,31 +19,31 @@ template void -test_block_list(const Triangulation& tr, const FiniteElement& fe) +test_block_list(const Triangulation &tr, const FiniteElement &fe) { deallog << fe.get_name() << std::endl; - + MGDoFHandler dof; dof.initialize(tr, fe); - - + + const unsigned int level = tr.n_levels()-1; - + SparsityPattern bl(tr.n_cells(level), dof.n_dofs(level), fe.dofs_per_cell); DoFTools::make_cell_patches(bl, dof, level); bl.compress(); - - for (unsigned int i=0;i entries; - for (SparsityPattern::row_iterator b = bl.row_begin(i);b != bl.row_end(i);++b) - entries.push_back(*b); + for (SparsityPattern::row_iterator b = bl.row_begin(i); b != bl.row_end(i); ++b) + entries.push_back(*b); std::sort(entries.begin(), entries.end()); - for (unsigned int i=0;i void -test_block_list(const Triangulation& tr, const FiniteElement& fe) +test_block_list(const Triangulation &tr, const FiniteElement &fe) { deallog << fe.get_name() << std::endl; diff --git a/tests/deal.II/block_list_03.cc b/tests/deal.II/block_list_03.cc index f79b577dd4..8742c3feb4 100644 --- a/tests/deal.II/block_list_03.cc +++ b/tests/deal.II/block_list_03.cc @@ -19,13 +19,13 @@ template void -test_block_list(const Triangulation& tr, const FiniteElement& fe) +test_block_list(const Triangulation &tr, const FiniteElement &fe) { deallog << fe.get_name() << std::endl; - + MGDoFHandler dof; - dof.initialize(tr, fe); - + dof.initialize(tr, fe); + const unsigned int level = tr.n_levels()-1; { diff --git a/tests/deal.II/block_list_04.cc b/tests/deal.II/block_list_04.cc index 498ee48067..f9ce442f6e 100644 --- a/tests/deal.II/block_list_04.cc +++ b/tests/deal.II/block_list_04.cc @@ -19,13 +19,13 @@ template void -test_block_list(const Triangulation& tr, const FiniteElement& fe) +test_block_list(const Triangulation &tr, const FiniteElement &fe) { deallog << fe.get_name() << std::endl; - + MGDoFHandler dof; - dof.initialize(tr, fe); - + dof.initialize(tr, fe); + const unsigned int level = tr.n_levels()-1; { diff --git a/tests/deal.II/block_matrices.cc b/tests/deal.II/block_matrices.cc index 6b7d4dc546..c4120c02d4 100644 --- a/tests/deal.II/block_matrices.cc +++ b/tests/deal.II/block_matrices.cc @@ -15,7 +15,7 @@ // --------------------------------------------------------------------- /* Author: Wolfgang Bangerth, University of Heidelberg, 2000 */ -/* Program is based on /examples/step-3 +/* Program is based on /examples/step-3 Purpose: compare the results when using a normal matrix and a block matrix */ @@ -56,40 +56,40 @@ template -class LaplaceProblem +class LaplaceProblem { - public: - LaplaceProblem (const unsigned int n_blocks); +public: + LaplaceProblem (const unsigned int n_blocks); - void run (); - void reinit_sparsity (); - void reinit_vectors (); - - Vector solution; + void run (); + void reinit_sparsity (); + void reinit_vectors (); - private: - void make_grid_and_dofs (); - void assemble_system (); - void solve (); + Vector solution; - const unsigned int n_blocks; +private: + void make_grid_and_dofs (); + void assemble_system (); + void solve (); - Triangulation<2> triangulation; - FE_Q<2> fe; - DoFHandler<2> dof_handler; + const unsigned int n_blocks; - Sparsity sparsity_pattern; - Matrix system_matrix; + Triangulation<2> triangulation; + FE_Q<2> fe; + DoFHandler<2> dof_handler; - Vector system_rhs; + Sparsity sparsity_pattern; + Matrix system_matrix; + + Vector system_rhs; }; template LaplaceProblem::LaplaceProblem (const unsigned int n_blocks) : - n_blocks (n_blocks), - fe(1), - dof_handler (triangulation) + n_blocks (n_blocks), + fe(1), + dof_handler (triangulation) { sparsity_pattern.reinit (n_blocks, n_blocks); } @@ -98,18 +98,18 @@ LaplaceProblem::LaplaceProblem (const unsigned int n_blo template <> LaplaceProblem,SparseMatrix,SparsityPattern>::LaplaceProblem (const unsigned int n_blocks) : - n_blocks (n_blocks), - fe(1), - dof_handler (triangulation) + n_blocks (n_blocks), + fe(1), + dof_handler (triangulation) {} template <> LaplaceProblem,SparseMatrix,SparsityPattern>::LaplaceProblem (const unsigned int n_blocks) : - n_blocks (n_blocks), - fe(1), - dof_handler (triangulation) + n_blocks (n_blocks), + fe(1), + dof_handler (triangulation) {} @@ -120,17 +120,17 @@ void LaplaceProblem::make_grid_and_dofs () GridGenerator::hyper_cube (triangulation, -1, 1); triangulation.refine_global (3); deallog << "Number of active cells: " - << triangulation.n_active_cells() - << std::endl; + << triangulation.n_active_cells() + << std::endl; deallog << "Total number of cells: " - << triangulation.n_cells() - << std::endl; - + << triangulation.n_cells() + << std::endl; + dof_handler.distribute_dofs (fe); deallog << "Number of degrees of freedom: " - << dof_handler.n_dofs() - << std::endl; + << dof_handler.n_dofs() + << std::endl; reinit_sparsity (); DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern); @@ -142,17 +142,17 @@ void LaplaceProblem::make_grid_and_dofs () template <> -void LaplaceProblem,SparseMatrix,SparsityPattern>::reinit_sparsity () +void LaplaceProblem,SparseMatrix,SparsityPattern>::reinit_sparsity () { sparsity_pattern.reinit (dof_handler.n_dofs(), - dof_handler.n_dofs(), - dof_handler.max_couplings_between_dofs()); + dof_handler.n_dofs(), + dof_handler.max_couplings_between_dofs()); } template <> -void LaplaceProblem,SparseMatrix,SparsityPattern>::reinit_vectors () +void LaplaceProblem,SparseMatrix,SparsityPattern>::reinit_vectors () { solution.reinit (dof_handler.n_dofs()); system_rhs.reinit (dof_handler.n_dofs()); @@ -161,17 +161,17 @@ void LaplaceProblem,SparseMatrix,SparsityPattern>::reinit template <> -void LaplaceProblem,SparseMatrix,SparsityPattern>::reinit_sparsity () +void LaplaceProblem,SparseMatrix,SparsityPattern>::reinit_sparsity () { sparsity_pattern.reinit (dof_handler.n_dofs(), - dof_handler.n_dofs(), - dof_handler.max_couplings_between_dofs()); + dof_handler.n_dofs(), + dof_handler.max_couplings_between_dofs()); } template <> -void LaplaceProblem,SparseMatrix,SparsityPattern>::reinit_vectors () +void LaplaceProblem,SparseMatrix,SparsityPattern>::reinit_vectors () { solution.reinit (dof_handler.n_dofs()); system_rhs.reinit (dof_handler.n_dofs()); @@ -180,91 +180,91 @@ void LaplaceProblem,SparseMatrix,SparsityPattern>::reinit_v template <> -void LaplaceProblem,BlockSparseMatrix,BlockSparsityPattern>::reinit_sparsity () +void LaplaceProblem,BlockSparseMatrix,BlockSparsityPattern>::reinit_sparsity () { switch (n_blocks) { - case 2: - { - const types::global_dof_index n_dofs = dof_handler.n_dofs(); - const types::global_dof_index block_size[2] = { n_dofs/3, n_dofs - n_dofs/3 }; - - for (unsigned int i=0; i<2; ++i) - for (unsigned int j=0; j<2; ++j) - sparsity_pattern.block(i,j).reinit (block_size[i], block_size[j], - dof_handler.max_couplings_between_dofs()); - sparsity_pattern.collect_sizes (); - - break; - }; - - case 3: - { - const types::global_dof_index n_dofs = dof_handler.n_dofs(); - const types::global_dof_index block_size[3] = { n_dofs/5, n_dofs/7, n_dofs - n_dofs/5 - n_dofs/7 }; - - for (unsigned int i=0; i<3; ++i) - for (unsigned int j=0; j<3; ++j) - sparsity_pattern.block(i,j).reinit (block_size[i], block_size[j], - dof_handler.max_couplings_between_dofs()); - sparsity_pattern.collect_sizes (); - - break; - }; - - default: - AssertThrow (false, ExcNotImplemented()); - }; + case 2: + { + const types::global_dof_index n_dofs = dof_handler.n_dofs(); + const types::global_dof_index block_size[2] = { n_dofs/3, n_dofs - n_dofs/3 }; + + for (unsigned int i=0; i<2; ++i) + for (unsigned int j=0; j<2; ++j) + sparsity_pattern.block(i,j).reinit (block_size[i], block_size[j], + dof_handler.max_couplings_between_dofs()); + sparsity_pattern.collect_sizes (); + + break; + }; + + case 3: + { + const types::global_dof_index n_dofs = dof_handler.n_dofs(); + const types::global_dof_index block_size[3] = { n_dofs/5, n_dofs/7, n_dofs - n_dofs/5 - n_dofs/7 }; + + for (unsigned int i=0; i<3; ++i) + for (unsigned int j=0; j<3; ++j) + sparsity_pattern.block(i,j).reinit (block_size[i], block_size[j], + dof_handler.max_couplings_between_dofs()); + sparsity_pattern.collect_sizes (); + + break; + }; + + default: + AssertThrow (false, ExcNotImplemented()); + }; } template <> -void LaplaceProblem,BlockSparseMatrix,BlockSparsityPattern>::reinit_vectors () +void LaplaceProblem,BlockSparseMatrix,BlockSparsityPattern>::reinit_vectors () { switch (n_blocks) { - case 2: - { - const types::global_dof_index n_dofs = dof_handler.n_dofs(); - const types::global_dof_index block_size_[2] = { n_dofs/3, n_dofs - n_dofs/3 }; - const std::vector block_size (&block_size_[0], - &block_size_[2]); - - solution.reinit (block_size); - system_rhs.reinit (block_size); - - break; - }; - - case 3: - { - const types::global_dof_index n_dofs = dof_handler.n_dofs(); - const types::global_dof_index block_size_[3] = { n_dofs/5, n_dofs/7, n_dofs - n_dofs/5 - n_dofs/7 }; - const std::vector block_size (&block_size_[0], - &block_size_[3]); - - solution.reinit (block_size); - system_rhs.reinit (block_size); - - break; - }; - - default: - AssertThrow (false, ExcNotImplemented()); + case 2: + { + const types::global_dof_index n_dofs = dof_handler.n_dofs(); + const types::global_dof_index block_size_[2] = { n_dofs/3, n_dofs - n_dofs/3 }; + const std::vector block_size (&block_size_[0], + &block_size_[2]); + + solution.reinit (block_size); + system_rhs.reinit (block_size); + + break; + }; + + case 3: + { + const types::global_dof_index n_dofs = dof_handler.n_dofs(); + const types::global_dof_index block_size_[3] = { n_dofs/5, n_dofs/7, n_dofs - n_dofs/5 - n_dofs/7 }; + const std::vector block_size (&block_size_[0], + &block_size_[3]); + + solution.reinit (block_size); + system_rhs.reinit (block_size); + + break; + }; + + default: + AssertThrow (false, ExcNotImplemented()); }; } template -void LaplaceProblem::assemble_system () +void LaplaceProblem::assemble_system () { QGauss<2> quadrature_formula(2); - FEValues<2> fe_values (fe, quadrature_formula, - UpdateFlags(update_values | - update_gradients | - update_JxW_values)); + FEValues<2> fe_values (fe, quadrature_formula, + UpdateFlags(update_values | + update_gradients | + update_JxW_values)); const unsigned int dofs_per_cell = fe.dofs_per_cell; const unsigned int n_q_points = quadrature_formula.size(); @@ -275,7 +275,7 @@ void LaplaceProblem::assemble_system () std::vector local_dof_indices (dofs_per_cell); DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active(), - endc = dof_handler.end(); + endc = dof_handler.end(); for (; cell!=endc; ++cell) { fe_values.reinit (cell); @@ -284,45 +284,45 @@ void LaplaceProblem::assemble_system () cell_rhs = 0; for (unsigned int i=0; iget_dof_indices (local_dof_indices); for (unsigned int i=0; i boundary_values; VectorTools::interpolate_boundary_values (dof_handler, - 0, - ZeroFunction<2>(), - boundary_values); + 0, + ZeroFunction<2>(), + boundary_values); MatrixTools::apply_boundary_values (boundary_values, - system_matrix, - solution, - system_rhs); + system_matrix, + solution, + system_rhs); } template -void LaplaceProblem::solve () +void LaplaceProblem::solve () { SolverControl solver_control (1000, 1e-12, false, false); PrimitiveVectorMemory vector_memory; @@ -330,14 +330,14 @@ void LaplaceProblem::solve () PreconditionJacobi preconditioner; preconditioner.initialize (system_matrix, 0.8); - + cg.solve (system_matrix, solution, system_rhs, - preconditioner); + preconditioner); } template -void LaplaceProblem::run () +void LaplaceProblem::run () { make_grid_and_dofs (); assemble_system (); @@ -345,105 +345,105 @@ void LaplaceProblem::run () for (unsigned int i=0; i > solutions; if (true) { LaplaceProblem,SparseMatrix,SparsityPattern> - laplace_problem (2); + laplace_problem (2); laplace_problem.run (); - + solutions.push_back (std::vector()); solutions.back().resize (laplace_problem.solution.size()); for (unsigned int i=0; i,SparseMatrix,SparsityPattern> - laplace_problem (3); + laplace_problem (3); laplace_problem.run (); - + solutions.push_back (std::vector()); solutions.back().resize (laplace_problem.solution.size()); for (unsigned int i=0; i,BlockSparseMatrix,BlockSparsityPattern> - laplace_problem (2); + laplace_problem (2); laplace_problem.run (); - + solutions.push_back (std::vector()); solutions.back().resize (laplace_problem.solution.size()); for (unsigned int i=0; i,BlockSparseMatrix,BlockSparsityPattern> - laplace_problem (3); + laplace_problem (3); laplace_problem.run (); - + solutions.push_back (std::vector()); solutions.back().resize (laplace_problem.solution.size()); for (unsigned int i=0; i - accuracy*std::fabs(solutions[i][j] + solutions[0][j])) - { - deallog << "Discrepancy: i=" << i << ", j=" << j - << ", sol[i][j]=" << solutions[i][j] - << ", sol[0][j]=" << solutions[0][j] - << std::endl; - deallog << std::flush; - Assert (false, ExcInternalError()); - }; + if ( std::fabs(solutions[i][j] - solutions[0][j]) > + accuracy*std::fabs(solutions[i][j] + solutions[0][j])) + { + deallog << "Discrepancy: i=" << i << ", j=" << j + << ", sol[i][j]=" << solutions[i][j] + << ", sol[0][j]=" << solutions[0][j] + << std::endl; + deallog << std::flush; + Assert (false, ExcInternalError()); + }; }; - - + + return 0; } diff --git a/tests/deal.II/boundaries.cc b/tests/deal.II/boundaries.cc index 6ae3a56e03..3bd448f554 100644 --- a/tests/deal.II/boundaries.cc +++ b/tests/deal.II/boundaries.cc @@ -44,16 +44,20 @@ template class MySquareFunction : public Function { - public: - MySquareFunction () : Function(2) {} - - virtual double value (const Point &p, - const unsigned int component) const - { return 100*(component+1)*p.square()*std::sin(p.square()); } - - virtual void vector_value (const Point &p, - Vector &values) const - { for (unsigned int d=0; dn_components; ++d) values(d) = value(p,d); } +public: + MySquareFunction () : Function(2) {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return 100*(component+1)*p.square()*std::sin(p.square()); + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + for (unsigned int d=0; dn_components; ++d) values(d) = value(p,d); + } }; @@ -77,18 +81,18 @@ boundary_q (const DoFHandler<1> &) void write_map (const std::map &bv) { for (std::map::const_iterator - i=bv.begin(); i!=bv.end(); ++i) + i=bv.begin(); i!=bv.end(); ++i) deallog << i->first << ' ' << i->second < void check () { - Triangulation tr; + Triangulation tr; if (dim==2) { GridGenerator::hyper_ball(tr, Point(), 1); @@ -106,61 +110,61 @@ check () if (dim==1) tr.refine_global(2); - // use a cubic mapping to make - // things a little more complicated + // use a cubic mapping to make + // things a little more complicated MappingQ mapping(3); - - // list of finite elements for - // which we want check, and - // associated list of boundary - // value functions + + // list of finite elements for + // which we want check, and + // associated list of boundary + // value functions std::vector*> fe_list; std::vector*> function_list; - // FE1: a system of a quadratic and - // a linear element + // 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()); - // FE2: a linear element, to make - // things simple + // FE2: a linear element, to make + // things simple fe_list.push_back (new FE_Q (1)); function_list.push_back (new Functions::SquareFunction()); - - // check all of them + + // check all of them for (unsigned int i=0; i &fe = *fe_list[i]; - + DoFHandler dof(tr); dof.distribute_dofs(fe); typename FunctionMap::type function_map; function_map[0] = function_list[i]; - // interpolate boundary values + // interpolate boundary values deallog << "Interpolated boundary values" << std::endl; std::map interpolated_bv; VectorTools::interpolate_boundary_values (mapping, dof, function_map, - interpolated_bv, std::vector()); + interpolated_bv, std::vector()); write_map (interpolated_bv); - // project boundary values - // presently this is not - // implemented for 3d + // project boundary values + // presently this is not + // implemented for 3d if (dim != 3) - { - deallog << "Projected boundary values" << std::endl; - std::map projected_bv; - VectorTools::project_boundary_values (mapping, dof, function_map, - boundary_q(dof), projected_bv); - write_map (projected_bv); - }; + { + deallog << "Projected boundary values" << std::endl; + std::map projected_bv; + VectorTools::project_boundary_values (mapping, dof, function_map, + boundary_q(dof), projected_bv); + write_map (projected_bv); + }; }; - - - // delete objects now no more needed + + + // delete objects now no more needed for (unsigned int i=0; i (); diff --git a/tests/deal.II/cell_similarity_crash_01.cc b/tests/deal.II/cell_similarity_crash_01.cc index 5d60ada188..ef28f0040b 100644 --- a/tests/deal.II/cell_similarity_crash_01.cc +++ b/tests/deal.II/cell_similarity_crash_01.cc @@ -50,19 +50,19 @@ void test() const QGauss quadrature(2); FEValues fe_values (fe, quadrature, update_values); - // initialize FEValues with the first cell + // initialize FEValues with the first cell fe_values.reinit (dof.begin_active()); - // then make this first cell invalid by - // coarsening it away + // then make this first cell invalid by + // coarsening it away for (unsigned int c=0; c::max_children_per_cell; ++c) tr.begin(1)->child(c)->set_coarsen_flag(); tr.execute_coarsening_and_refinement (); dof.distribute_dofs(fe); - // initialize FEValues with what is now the - // first cell. this used to fail (see the - // reason given at the top) + // initialize FEValues with what is now the + // first cell. this used to fail (see the + // reason given at the top) fe_values.reinit (dof.begin_active()); deallog << "OK" << std::endl; @@ -75,7 +75,7 @@ int main() deallog << std::setprecision (4); deallog.threshold_double(1.e-7); - test<1>(); + test<1>(); test<2>(); test<3>(); } diff --git a/tests/deal.II/cell_similarity_crash_02.cc b/tests/deal.II/cell_similarity_crash_02.cc index e9b97f933a..1ca5a5343c 100644 --- a/tests/deal.II/cell_similarity_crash_02.cc +++ b/tests/deal.II/cell_similarity_crash_02.cc @@ -45,13 +45,13 @@ void test() const QGauss quadrature(2); FEValues fe_values (fe, quadrature, update_values); - // initialize FEValues with the first cell + // initialize FEValues with the first cell fe_values.reinit (tr.begin_active()); - // then invalidate the cell iterator + // then invalidate the cell iterator tr.refine_global (1); - // and invalidate it again. this - // shouldn't do any further harm + // and invalidate it again. this + // shouldn't do any further harm tr.refine_global (1); deallog << "OK" << std::endl; diff --git a/tests/deal.II/coarsening_02.cc b/tests/deal.II/coarsening_02.cc index 9eabd900a1..27d00dba5d 100644 --- a/tests/deal.II/coarsening_02.cc +++ b/tests/deal.II/coarsening_02.cc @@ -44,29 +44,29 @@ bool satisfies_level1_at_vertex_rule (const Triangulation &tr) { std::vector min_adjacent_cell_level (tr.n_vertices(), - tr.n_levels()); + tr.n_levels()); std::vector max_adjacent_cell_level (tr.n_vertices(), - 0); - + 0); + for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); + cell = tr.begin_active(); cell != tr.end(); ++cell) for (unsigned int v=0; v::vertices_per_cell; ++v) { - min_adjacent_cell_level[cell->vertex_index(v)] - = std::min - (min_adjacent_cell_level[cell->vertex_index(v)], - cell->level()); - max_adjacent_cell_level[cell->vertex_index(v)] - = std::max (min_adjacent_cell_level[cell->vertex_index(v)], - cell->level()); + min_adjacent_cell_level[cell->vertex_index(v)] + = std::min + (min_adjacent_cell_level[cell->vertex_index(v)], + cell->level()); + max_adjacent_cell_level[cell->vertex_index(v)] + = std::max (min_adjacent_cell_level[cell->vertex_index(v)], + cell->level()); } for (unsigned int k=0; k 1) - return false; + min_adjacent_cell_level[k] > 1) + return false; return true; } @@ -82,42 +82,42 @@ void test() const unsigned int n_refinements[] = { 0, 13, 11, 6 }; for (unsigned int i=0; i flags (triangulation.n_active_cells(), false); for (unsigned int k=0; k::active_cell_iterator - cell = triangulation.begin_active(); - cell != triangulation.end(); ++cell, ++index) - if (flags[index]) - cell->set_refine_flag(); + cell = triangulation.begin_active(); + cell != triangulation.end(); ++cell, ++index) + if (flags[index]) + cell->set_refine_flag(); Assert (index == triangulation.n_active_cells(), ExcInternalError()); - // flag all other cells for coarsening - // (this should ensure that at least - // some of them will actually be - // coarsened) + // flag all other cells for coarsening + // (this should ensure that at least + // some of them will actually be + // coarsened) index=0; for (typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - cell != triangulation.end(); ++cell, ++index) - if (!flags[index]) - cell->set_coarsen_flag(); - + cell = triangulation.begin_active(); + cell != triangulation.end(); ++cell, ++index) + if (!flags[index]) + cell->set_coarsen_flag(); + triangulation.execute_coarsening_and_refinement (); - // verify that none of the cells - // violates the level-1-at-vertex rule + // verify that none of the cells + // violates the level-1-at-vertex rule Assert (satisfies_level1_at_vertex_rule (triangulation), - ExcInternalError()); + ExcInternalError()); } - + deallog << "OK" << std::endl; } @@ -126,7 +126,7 @@ int main() { initlog(__FILE__); deallog.threshold_double(1.e-10); - + deallog.push("2d"); test<2>(); deallog.pop(); diff --git a/tests/deal.II/coarsening_02_1d.cc b/tests/deal.II/coarsening_02_1d.cc index 586ef6a203..f86a6cf1c8 100644 --- a/tests/deal.II/coarsening_02_1d.cc +++ b/tests/deal.II/coarsening_02_1d.cc @@ -45,29 +45,29 @@ bool satisfies_level1_at_vertex_rule (const Triangulation &tr) { std::vector min_adjacent_cell_level (tr.n_vertices(), - tr.n_levels()); + tr.n_levels()); std::vector max_adjacent_cell_level (tr.n_vertices(), - 0); - + 0); + for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); + cell = tr.begin_active(); cell != tr.end(); ++cell) for (unsigned int v=0; v::vertices_per_cell; ++v) { - min_adjacent_cell_level[cell->vertex_index(v)] - = std::min - (min_adjacent_cell_level[cell->vertex_index(v)], - cell->level()); - max_adjacent_cell_level[cell->vertex_index(v)] - = std::max (min_adjacent_cell_level[cell->vertex_index(v)], - cell->level()); + min_adjacent_cell_level[cell->vertex_index(v)] + = std::min + (min_adjacent_cell_level[cell->vertex_index(v)], + cell->level()); + max_adjacent_cell_level[cell->vertex_index(v)] + = std::max (min_adjacent_cell_level[cell->vertex_index(v)], + cell->level()); } for (unsigned int k=0; k 1) - return false; + min_adjacent_cell_level[k] > 1) + return false; return true; } @@ -82,62 +82,62 @@ void test() for (unsigned int i=0; i<20; ++i) { - // refine one-fifth of cells randomly + // refine one-fifth of cells randomly std::vector flags (triangulation.n_active_cells(), false); for (unsigned int k=0; k::active_cell_iterator - cell = triangulation.begin_active(); - cell != triangulation.end(); ++cell, ++index) - if (flags[index]) - cell->set_refine_flag(); + cell = triangulation.begin_active(); + cell != triangulation.end(); ++cell, ++index) + if (flags[index]) + cell->set_refine_flag(); Assert (index == triangulation.n_active_cells(), ExcInternalError()); - // flag all other cells for coarsening - // (this should ensure that at least - // some of them will actually be - // coarsened) + // flag all other cells for coarsening + // (this should ensure that at least + // some of them will actually be + // coarsened) index=0; for (typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - cell != triangulation.end(); ++cell, ++index) - if (!flags[index]) - cell->set_coarsen_flag(); + cell = triangulation.begin_active(); + cell != triangulation.end(); ++cell, ++index) + if (!flags[index]) + cell->set_coarsen_flag(); GridOut go; go.write_gnuplot (triangulation, deallog.get_file_stream()); for (typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - cell != triangulation.end(); ++cell) - if (cell->refine_flag_set()) - { - deallog << cell->center() << ' ' << cell->level() << std::endl; - deallog << cell->center() << ' ' << 0 << std::endl; - deallog << std::endl; - } - - - + cell = triangulation.begin_active(); + cell != triangulation.end(); ++cell) + if (cell->refine_flag_set()) + { + deallog << cell->center() << ' ' << cell->level() << std::endl; + deallog << cell->center() << ' ' << 0 << std::endl; + deallog << std::endl; + } + + + triangulation.execute_coarsening_and_refinement (); - // verify that none of the cells - // violates the level-1-at-vertex rule + // verify that none of the cells + // violates the level-1-at-vertex rule Assert (satisfies_level1_at_vertex_rule (triangulation), - ExcInternalError()); + ExcInternalError()); deallog << "Iteration " << i - << ": cells=" << triangulation.n_active_cells() - << std::endl; + << ": cells=" << triangulation.n_active_cells() + << std::endl; } - + deallog << "OK" << std::endl; } @@ -146,7 +146,7 @@ int main() { initlog(__FILE__); deallog.threshold_double(1.e-10); - + deallog.push("1d"); test<1>(); deallog.pop(); diff --git a/tests/deal.II/coarsening_03.cc b/tests/deal.II/coarsening_03.cc index a822713a4e..a2d2bc2d31 100644 --- a/tests/deal.II/coarsening_03.cc +++ b/tests/deal.II/coarsening_03.cc @@ -41,29 +41,29 @@ bool satisfies_level1_at_vertex_rule (const Triangulation &tr) { std::vector min_adjacent_cell_level (tr.n_vertices(), - tr.n_levels()); + tr.n_levels()); std::vector max_adjacent_cell_level (tr.n_vertices(), - 0); - + 0); + for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); + cell = tr.begin_active(); cell != tr.end(); ++cell) for (unsigned int v=0; v::vertices_per_cell; ++v) { - min_adjacent_cell_level[cell->vertex_index(v)] - = std::min - (min_adjacent_cell_level[cell->vertex_index(v)], - cell->level()); - max_adjacent_cell_level[cell->vertex_index(v)] - = std::max (min_adjacent_cell_level[cell->vertex_index(v)], - cell->level()); + min_adjacent_cell_level[cell->vertex_index(v)] + = std::min + (min_adjacent_cell_level[cell->vertex_index(v)], + cell->level()); + max_adjacent_cell_level[cell->vertex_index(v)] + = std::max (min_adjacent_cell_level[cell->vertex_index(v)], + cell->level()); } for (unsigned int k=0; k 1) - return false; + min_adjacent_cell_level[k] > 1) + return false; return true; } @@ -80,26 +80,26 @@ void test() triangulation.begin(1)->child(c)->set_refine_flag(); for (unsigned int c=0; c::max_children_per_cell; ++c) triangulation.last(1)->child(c)->set_coarsen_flag(); - + triangulation.prepare_coarsening_and_refinement (); for (typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + cell = triangulation.begin_active(); cell != triangulation.end(); ++cell) deallog << cell << ' ' - << (cell->refine_flag_set() ? - "to be refined" : - (cell->coarsen_flag_set() ? - "to be coarsened" : - "")) - << std::endl; - + << (cell->refine_flag_set() ? + "to be refined" : + (cell->coarsen_flag_set() ? + "to be coarsened" : + "")) + << std::endl; + triangulation.execute_coarsening_and_refinement (); - - // verify that none of the cells - // violates the level-1-at-vertex rule + + // verify that none of the cells + // violates the level-1-at-vertex rule Assert (satisfies_level1_at_vertex_rule (triangulation), - ExcInternalError()); + ExcInternalError()); } @@ -107,7 +107,7 @@ int main() { initlog(__FILE__); deallog.threshold_double(1.e-10); - + deallog.push("1d"); test<1>(); deallog.pop(); diff --git a/tests/deal.II/constraint_graph.cc b/tests/deal.II/constraint_graph.cc index 3c959347f3..f861fc275c 100644 --- a/tests/deal.II/constraint_graph.cc +++ b/tests/deal.II/constraint_graph.cc @@ -43,7 +43,7 @@ void test () tria.refine_global (1); tria.begin_active()->set_refine_flag (); tria.execute_coarsening_and_refinement (); - tria.refine_global (1); + tria.refine_global (1); hp::FECollection fe_collection; fe_collection.push_back(FE_Q (1)); @@ -54,10 +54,10 @@ void test () hp::DoFHandler dof_handler(tria); for (typename hp::DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) cell->set_active_fe_index (rand() % fe_collection.size()); - + dof_handler.distribute_dofs(fe_collection); ConstraintMatrix cm; @@ -70,9 +70,9 @@ int main () { initlog(__FILE__); deallogfile << std::setprecision(2); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); test<3> (); - + deallog << "OK" << std::endl; } diff --git a/tests/deal.II/constraints.cc b/tests/deal.II/constraints.cc index 482038a8ad..60a7719b7c 100644 --- a/tests/deal.II/constraints.cc +++ b/tests/deal.II/constraints.cc @@ -42,204 +42,209 @@ std::ofstream logfile("constraints/output"); -void make_tria (Triangulation<3> &tria, int step) +void make_tria (Triangulation<3> &tria, int step) { switch (step) { - case 0: - case 1: - { - // two cells packed behind each - // other. if step==0, refine back one, - // otherwise the one in front - const Point<3> vertices[12] = { Point<3>(0,0,0), - Point<3>(1,0,0), - Point<3>(1,0,1), - Point<3>(0,0,1), - - Point<3>(0,1,0), - Point<3>(1,1,0), - Point<3>(1,1,1), - Point<3>(0,1,1), - - Point<3>(0,2,0), - Point<3>(1,2,0), - Point<3>(1,2,1), - Point<3>(0,2,1) }; - const int cell_vertices[2][8] = { { 0,1,2,3,4,5,6,7 }, { 4,5,6,7,8,9,10,11 } }; - std::vector > cells (2, CellData<3>()); - for (unsigned int cell=0; cell<2; ++cell) - for (unsigned int j=0; j<8; ++j) - cells[cell].vertices[j] = cell_vertices[cell][j]; - cells[0].material_id = 0; - cells[1].material_id = 0; - - tria.create_triangulation_compatibility ( - std::vector >(&vertices[0], &vertices[12]), - cells, - SubCellData()); // no boundary information - - if (step==0) - tria.last_active()->set_refine_flag(); - else - tria.begin_active()->set_refine_flag(); - tria.execute_coarsening_and_refinement (); - - break; - }; + case 0: + case 1: + { + // two cells packed behind each + // other. if step==0, refine back one, + // otherwise the one in front + const Point<3> vertices[12] = { Point<3>(0,0,0), + Point<3>(1,0,0), + Point<3>(1,0,1), + Point<3>(0,0,1), - case 2: - case 3: - { - // two cells packed next to each - // other. if step==2, refine right one, - // otherwise the left one - const Point<3> vertices[12] = { Point<3>(0,0,0), - Point<3>(1,0,0), - Point<3>(1,0,1), - Point<3>(0,0,1), - - Point<3>(0,1,0), - Point<3>(1,1,0), - Point<3>(1,1,1), - Point<3>(0,1,1), - - Point<3>(2,0,0), - Point<3>(2,0,1), - Point<3>(2,1,0), - Point<3>(2,1,1) }; - const int cell_vertices[2][8] = { { 0,1,2,3,4,5,6,7 }, { 1,8,9,2,5,10,11,6 } }; - std::vector > cells (2, CellData<3>()); - for (unsigned int cell=0; cell<2; ++cell) - for (unsigned int j=0; j<8; ++j) - cells[cell].vertices[j] = cell_vertices[cell][j]; - cells[0].material_id = 0; - cells[1].material_id = 0; - - tria.create_triangulation_compatibility ( - std::vector >(&vertices[0], &vertices[12]), - cells, - SubCellData()); // no boundary information - - if (step==2) - tria.last_active()->set_refine_flag(); - else - tria.begin_active()->set_refine_flag(); - tria.execute_coarsening_and_refinement (); - - break; - }; + Point<3>(0,1,0), + Point<3>(1,1,0), + Point<3>(1,1,1), + Point<3>(0,1,1), - case 4: - case 5: - { - // two cells packed on top of each - // other. if step==4, refine top one, - // otherwise the bottom one - const Point<3> vertices[12] = { Point<3>(0,0,0), - Point<3>(1,0,0), - Point<3>(1,0,1), - Point<3>(0,0,1), - - Point<3>(0,1,0), - Point<3>(1,1,0), - Point<3>(1,1,1), - Point<3>(0,1,1), - - Point<3>(1,0,2), - Point<3>(0,0,2), - Point<3>(1,1,2), - Point<3>(0,1,2) }; - const int cell_vertices[2][8] = { { 0,1,2,3,4,5,6,7 }, { 3, 2, 8, 9 , 7, 6, 10, 11} }; - std::vector > cells (2, CellData<3>()); - for (unsigned int cell=0; cell<2; ++cell) - for (unsigned int j=0; j<8; ++j) - cells[cell].vertices[j] = cell_vertices[cell][j]; - cells[0].material_id = 0; - cells[1].material_id = 0; - - tria.create_triangulation_compatibility ( - std::vector >(&vertices[0], &vertices[12]), - cells, - SubCellData()); // no boundary information - - if (step==4) - tria.last_active()->set_refine_flag(); - else - tria.begin_active()->set_refine_flag(); - tria.execute_coarsening_and_refinement (); - - break; - }; + Point<3>(0,2,0), + Point<3>(1,2,0), + Point<3>(1,2,1), + Point<3>(0,2,1) + }; + const int cell_vertices[2][8] = { { 0,1,2,3,4,5,6,7 }, { 4,5,6,7,8,9,10,11 } }; + std::vector > cells (2, CellData<3>()); + for (unsigned int cell=0; cell<2; ++cell) + for (unsigned int j=0; j<8; ++j) + cells[cell].vertices[j] = cell_vertices[cell][j]; + cells[0].material_id = 0; + cells[1].material_id = 0; + + tria.create_triangulation_compatibility ( + std::vector >(&vertices[0], &vertices[12]), + cells, + SubCellData()); // no boundary information + + if (step==0) + tria.last_active()->set_refine_flag(); + else + tria.begin_active()->set_refine_flag(); + tria.execute_coarsening_and_refinement (); + + break; + }; + + case 2: + case 3: + { + // two cells packed next to each + // other. if step==2, refine right one, + // otherwise the left one + const Point<3> vertices[12] = { Point<3>(0,0,0), + Point<3>(1,0,0), + Point<3>(1,0,1), + Point<3>(0,0,1), + + Point<3>(0,1,0), + Point<3>(1,1,0), + Point<3>(1,1,1), + Point<3>(0,1,1), + + Point<3>(2,0,0), + Point<3>(2,0,1), + Point<3>(2,1,0), + Point<3>(2,1,1) + }; + const int cell_vertices[2][8] = { { 0,1,2,3,4,5,6,7 }, { 1,8,9,2,5,10,11,6 } }; + std::vector > cells (2, CellData<3>()); + for (unsigned int cell=0; cell<2; ++cell) + for (unsigned int j=0; j<8; ++j) + cells[cell].vertices[j] = cell_vertices[cell][j]; + cells[0].material_id = 0; + cells[1].material_id = 0; + + tria.create_triangulation_compatibility ( + std::vector >(&vertices[0], &vertices[12]), + cells, + SubCellData()); // no boundary information + + if (step==2) + tria.last_active()->set_refine_flag(); + else + tria.begin_active()->set_refine_flag(); + tria.execute_coarsening_and_refinement (); + + break; + }; + + case 4: + case 5: + { + // two cells packed on top of each + // other. if step==4, refine top one, + // otherwise the bottom one + const Point<3> vertices[12] = { Point<3>(0,0,0), + Point<3>(1,0,0), + Point<3>(1,0,1), + Point<3>(0,0,1), + + Point<3>(0,1,0), + Point<3>(1,1,0), + Point<3>(1,1,1), + Point<3>(0,1,1), + + Point<3>(1,0,2), + Point<3>(0,0,2), + Point<3>(1,1,2), + Point<3>(0,1,2) + }; + const int cell_vertices[2][8] = { { 0,1,2,3,4,5,6,7 }, { 3, 2, 8, 9 , 7, 6, 10, 11} }; + std::vector > cells (2, CellData<3>()); + for (unsigned int cell=0; cell<2; ++cell) + for (unsigned int j=0; j<8; ++j) + cells[cell].vertices[j] = cell_vertices[cell][j]; + cells[0].material_id = 0; + cells[1].material_id = 0; + + tria.create_triangulation_compatibility ( + std::vector >(&vertices[0], &vertices[12]), + cells, + SubCellData()); // no boundary information + + if (step==4) + tria.last_active()->set_refine_flag(); + else + tria.begin_active()->set_refine_flag(); + tria.execute_coarsening_and_refinement (); + break; + }; + + + case 6: + case 7: + case 8: + { + // four cells, with several refined + // (see below) + const Point<3> vertices[18] = { Point<3>(0,0,0), + Point<3>(1,0,0), + Point<3>(1,0,1), + Point<3>(0,0,1), + + Point<3>(0,1,0), + Point<3>(1,1,0), + Point<3>(1,1,1), + Point<3>(0,1,1), + + Point<3>(2,0,0), + Point<3>(2,0,1), + Point<3>(2,1,0), + Point<3>(2,1,1), - case 6: - case 7: - case 8: - { - // four cells, with several refined - // (see below) - const Point<3> vertices[18] = { Point<3>(0,0,0), - Point<3>(1,0,0), - Point<3>(1,0,1), - Point<3>(0,0,1), - - Point<3>(0,1,0), - Point<3>(1,1,0), - Point<3>(1,1,1), - Point<3>(0,1,1), - - Point<3>(2,0,0), - Point<3>(2,0,1), - Point<3>(2,1,0), - Point<3>(2,1,1), - - Point<3>(0,2,0), - Point<3>(1,2,0), - Point<3>(1,2,1), - Point<3>(0,2,1), - - Point<3>(2,2,0), - Point<3>(2,2,1) }; - - const int cell_vertices[4][8] = { { 0,1,2,3,4,5,6,7 }, - { 1,8,9,2,5,10,11,6 }, - { 4,5,6,7,12,13,14,15}, - { 5,10,11,6,13,16,17,14} }; - std::vector > cells (4, CellData<3>()); - for (unsigned int cell=0; cell<4; ++cell) - for (unsigned int j=0; j<8; ++j) - cells[cell].vertices[j] = cell_vertices[cell][j]; - cells[0].material_id = 0; - cells[1].material_id = 0; - cells[2].material_id = 0; - cells[3].material_id = 0; - - tria.create_triangulation_compatibility ( - std::vector >(&vertices[0], &vertices[18]), - cells, - SubCellData()); // no boundary information - - switch (step) - { - case 6: - tria.begin_active()->set_refine_flag (); - break; - - case 7: - tria.begin_active()->set_refine_flag (); - (++tria.begin_active())->set_refine_flag (); - break; - case 8: - tria.begin_active()->set_refine_flag (); - (++(++(++tria.begin_active())))->set_refine_flag (); - break; - }; - - tria.execute_coarsening_and_refinement (); - - break; + Point<3>(0,2,0), + Point<3>(1,2,0), + Point<3>(1,2,1), + Point<3>(0,2,1), + + Point<3>(2,2,0), + Point<3>(2,2,1) + }; + + const int cell_vertices[4][8] = { { 0,1,2,3,4,5,6,7 }, + { 1,8,9,2,5,10,11,6 }, + { 4,5,6,7,12,13,14,15}, + { 5,10,11,6,13,16,17,14} }; + std::vector > cells (4, CellData<3>()); + for (unsigned int cell=0; cell<4; ++cell) + for (unsigned int j=0; j<8; ++j) + cells[cell].vertices[j] = cell_vertices[cell][j]; + cells[0].material_id = 0; + cells[1].material_id = 0; + cells[2].material_id = 0; + cells[3].material_id = 0; + + tria.create_triangulation_compatibility ( + std::vector >(&vertices[0], &vertices[18]), + cells, + SubCellData()); // no boundary information + + switch (step) + { + case 6: + tria.begin_active()->set_refine_flag (); + break; + + case 7: + tria.begin_active()->set_refine_flag (); + (++tria.begin_active())->set_refine_flag (); + break; + case 8: + tria.begin_active()->set_refine_flag (); + (++(++(++tria.begin_active())))->set_refine_flag (); + break; + }; + + tria.execute_coarsening_and_refinement (); + + break; + }; }; } @@ -255,41 +260,41 @@ int main () deallog.threshold_double(1.e-10); FiniteElement<3> *fe = 0; - + for (unsigned int element=0; element<2; ++element) { switch (element) - { - case 0: - fe = new FE_Q<3>(1); - break; - case 1: - fe = new FE_Q<3>(2); - break; - }; - + { + case 0: + fe = new FE_Q<3>(1); + break; + case 1: + fe = new FE_Q<3>(2); + break; + }; + for (int step=0; step<9; ++step) - { - deallog << "Element=" << element << ", Step=" << step << std::endl; - - Triangulation<3> tria; - make_tria (tria, step); - GridOut().write_gnuplot (tria, logfile); - - DoFHandler<3> dof (tria); - dof.distribute_dofs (*fe); - - ConstraintMatrix constraints; - DoFTools::make_hanging_node_constraints (dof, constraints); - constraints.close (); - - constraints.print (logfile); - - // release fe - dof.clear (); - - deallog << std::endl; - }; + { + deallog << "Element=" << element << ", Step=" << step << std::endl; + + Triangulation<3> tria; + make_tria (tria, step); + GridOut().write_gnuplot (tria, logfile); + + DoFHandler<3> dof (tria); + dof.distribute_dofs (*fe); + + ConstraintMatrix constraints; + DoFTools::make_hanging_node_constraints (dof, constraints); + constraints.close (); + + constraints.print (logfile); + + // release fe + dof.clear (); + + deallog << std::endl; + }; delete fe; }; diff --git a/tests/deal.II/constraints_block_01.cc b/tests/deal.II/constraints_block_01.cc index e2ff56231a..0ae8365d7c 100644 --- a/tests/deal.II/constraints_block_01.cc +++ b/tests/deal.II/constraints_block_01.cc @@ -78,14 +78,14 @@ int main () deallog.depth_console(0); deallog.threshold_double(1.e-10); - // setting up some constants + // setting up some constants const unsigned int dim = 2; const unsigned int solid_dim = 2*dim; const unsigned int fluid_dim = dim+1; const unsigned int mesh_dim = dim; const unsigned int total_dim = solid_dim + fluid_dim + mesh_dim; - // make the tria and domain + // make the tria and domain Triangulation tria; GridGenerator::hyper_cube (tria); @@ -93,31 +93,31 @@ int main () Point real_cell_center; - // create a solid domain (0) in the - // lower left hand corner of a 2x2 grid - // the rest is fluid/mesh (1) + // create a solid domain (0) in the + // lower left hand corner of a 2x2 grid + // the rest is fluid/mesh (1) for (Triangulation::active_cell_iterator - cell = tria.begin_active(); + cell = tria.begin_active(); cell != tria.end(); ++cell) { real_cell_center = cell->center(); if (real_cell_center(0) < 0.5 - && real_cell_center(1) < 0.5 ) - cell->set_material_id (0); // solid + && real_cell_center(1) < 0.5 ) + cell->set_material_id (0); // solid else - cell->set_material_id (1); //fluid + cell->set_material_id (1); //fluid }//cell - //create the FE spaces for the solid and the fluid/mesh - //each are padded with FE_Nothing to be equal length + //create the FE spaces for the solid and the fluid/mesh + //each are padded with FE_Nothing to be equal length std::string solid_fe_name = "FESystem[FE_Q(2)^2-FE_Q(2)^2-FE_Nothing()^2-FE_Nothing()-FE_Nothing()^2]"; std::string fluid_fe_name = "FESystem[FE_Nothing()^2-FE_Nothing()^2-FE_Q(2)^2-FE_Q(1)-FE_Q(2)^2]"; hp::FECollection fe_collection; - FiniteElement * solid_fe = FETools::get_fe_from_name(solid_fe_name); - FiniteElement * fluid_fe = FETools::get_fe_from_name(fluid_fe_name); + FiniteElement *solid_fe = FETools::get_fe_from_name(solid_fe_name); + FiniteElement *fluid_fe = FETools::get_fe_from_name(fluid_fe_name); deallog << "Solid FE Space: " << solid_fe->get_name() << std::endl; deallog << "Fluid/Mesh FE Space: " << fluid_fe->get_name() << std::endl; @@ -128,13 +128,13 @@ int main () hp::DoFHandler dh(tria); for (hp::DoFHandler::active_cell_iterator - cell = dh.begin_active(); + cell = dh.begin_active(); cell != dh.end(); ++cell) { if (int(cell->material_id()) == 0) - cell->set_active_fe_index (0); + cell->set_active_fe_index (0); else - cell->set_active_fe_index (1); + cell->set_active_fe_index (1); }//cell dh.distribute_dofs(fe_collection); @@ -143,11 +143,11 @@ int main () for (unsigned int comp=0; comp < total_dim; comp++) { if ( comp < solid_dim ) - block_component[comp] = 0; + block_component[comp] = 0; else if ( comp < solid_dim+fluid_dim ) - block_component[comp] = 1; + block_component[comp] = 1; else - block_component[comp] = 2; + block_component[comp] = 2; }//comp std::vector dofs_per_block(3,0);//3 blocks, count dofs: @@ -155,7 +155,7 @@ int main () DoFRenumbering::component_wise(dh, block_component); - //build the sparsitypattern + //build the sparsitypattern BlockSparsityPattern block_sparsity_pattern; { @@ -174,50 +174,50 @@ int main () csp.collect_sizes(); - //enforce coupling across cells and interface + //enforce coupling across cells and interface Table<2,DoFTools::Coupling> cell_coupling (fe_collection.n_components(), fe_collection.n_components()); Table<2,DoFTools::Coupling> face_coupling (fe_collection.n_components(), fe_collection.n_components()); for (unsigned int c=0; c=solid_dim) && (d>=solid_dim)) //couples fluid dims and mesh dims - && !((c==solid_dim+dim) && (d==solid_dim+dim)))) //fluid pressure does not couple with itself - { - cell_coupling[c][d] = DoFTools::always; - cell_coupling[d][c] = DoFTools::always; - }//cell_coupling - - if ((c=solid_dim)) //couples solid dims with fluid and mesh dims on the interface - { - face_coupling[c][d] = DoFTools::always; - face_coupling[d][c] = DoFTools::always; - }//face_coupling - }//d + for (unsigned int d=0; d=solid_dim) && (d>=solid_dim)) //couples fluid dims and mesh dims + && !((c==solid_dim+dim) && (d==solid_dim+dim)))) //fluid pressure does not couple with itself + { + cell_coupling[c][d] = DoFTools::always; + cell_coupling[d][c] = DoFTools::always; + }//cell_coupling + + if ((c=solid_dim)) //couples solid dims with fluid and mesh dims on the interface + { + face_coupling[c][d] = DoFTools::always; + face_coupling[d][c] = DoFTools::always; + }//face_coupling + }//d }//c DoFTools::make_flux_sparsity_pattern (dh, csp, cell_coupling, face_coupling); block_sparsity_pattern.copy_from (csp); } - // build matrices and vectors + // build matrices and vectors BlockSparseMatrix system_matrix(block_sparsity_pattern); BlockVector system_rhs(dofs_per_block); - // set up constraints for solution and solution update - /** - * These constraints enforce that the solid displacement - * and mesh displacement are the same on the interface. - * - * They also constrain that the solid velocity - * and fluid velocity are the same on the interface - * - * The interface check is simplified for this 2x2 case - */ + // set up constraints for solution and solution update + /** + * These constraints enforce that the solid displacement + * and mesh displacement are the same on the interface. + * + * They also constrain that the solid velocity + * and fluid velocity are the same on the interface + * + * The interface check is simplified for this 2x2 case + */ ConstraintMatrix constraints; @@ -230,88 +230,91 @@ int main () std::vector > solid_mesh_pairs; for (hp::DoFHandler::active_cell_iterator - cell = dh.begin_active(); cell!=dh.end(); ++cell) //loops over the cells + cell = dh.begin_active(); cell!=dh.end(); ++cell) //loops over the cells { if (int(cell->material_id()) == 1) - {//Only loop over cells in the fluid region - for (unsigned int f=0; f::faces_per_cell; ++f) - { - if (!cell->at_boundary(f)) - { - bool face_is_on_interface = false; - //checks to see if cell face neighbor is in the solid domain - if (int(cell->neighbor(f)->material_id()) == 0 ) - face_is_on_interface = true; - - if (face_is_on_interface) - { - std::vector solid_disp_dof, solid_vel_dof, fluid_vel_dof, mesh_disp_dof; - - cell->face(f)->get_dof_indices (solid_face_dof_indices, 0); - cell->face(f)->get_dof_indices (fl_msh_face_dof_indices, 1); - - for (unsigned int i=0; iface_system_to_component_index(i).first; - if (comp = dim && comp < solid_dim) - solid_vel_dof.push_back(i); - }//i - for (unsigned int i=0; iface_system_to_component_index(i).first; - if (comp >= solid_dim && comp < solid_dim+dim) - fluid_vel_dof.push_back(i); - if (comp>=solid_dim+fluid_dim) - mesh_disp_dof.push_back(i); - }//i - - for (unsigned int i=0; i - (solid_face_dof_indices[solid_vel_dof[i]], - fl_msh_face_dof_indices[fluid_vel_dof[i]])); - }//i - for (unsigned int i=0; i - (solid_face_dof_indices[solid_disp_dof[i]], - fl_msh_face_dof_indices[mesh_disp_dof[i]])); - } - }//at interface check - }//not at boundary check - }//face - }//is this in the fluid material region? + { + //Only loop over cells in the fluid region + for (unsigned int f=0; f::faces_per_cell; ++f) + { + if (!cell->at_boundary(f)) + { + bool face_is_on_interface = false; + //checks to see if cell face neighbor is in the solid domain + if (int(cell->neighbor(f)->material_id()) == 0 ) + face_is_on_interface = true; + + if (face_is_on_interface) + { + std::vector solid_disp_dof, solid_vel_dof, fluid_vel_dof, mesh_disp_dof; + + cell->face(f)->get_dof_indices (solid_face_dof_indices, 0); + cell->face(f)->get_dof_indices (fl_msh_face_dof_indices, 1); + + for (unsigned int i=0; iface_system_to_component_index(i).first; + if (comp = dim && comp < solid_dim) + solid_vel_dof.push_back(i); + }//i + for (unsigned int i=0; iface_system_to_component_index(i).first; + if (comp >= solid_dim && comp < solid_dim+dim) + fluid_vel_dof.push_back(i); + if (comp>=solid_dim+fluid_dim) + mesh_disp_dof.push_back(i); + }//i + + for (unsigned int i=0; i + (solid_face_dof_indices[solid_vel_dof[i]], + fl_msh_face_dof_indices[fluid_vel_dof[i]])); + }//i + for (unsigned int i=0; i + (solid_face_dof_indices[solid_disp_dof[i]], + fl_msh_face_dof_indices[mesh_disp_dof[i]])); + } + }//at interface check + }//not at boundary check + }//face + }//is this in the fluid material region? }//cell constraints.close(); - // prints out which dofs are coupled + // prints out which dofs are coupled deallog<<"---------------Coupled dofs---------------"<dofs_per_cell; FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); @@ -320,33 +323,33 @@ int main () std::vector local_dof_indices (dofs_per_cell); for (hp::DoFHandler::active_cell_iterator - cell = dh.begin_active(); - cell!=dh.end(); - ++cell) //loops over the cells + cell = dh.begin_active(); + cell!=dh.end(); + ++cell) //loops over the cells { - if (int(cell->material_id()) == 1)//are we in the fluid region? - { - cell->get_dof_indices (local_dof_indices); + if (int(cell->material_id()) == 1)//are we in the fluid region? + { + cell->get_dof_indices (local_dof_indices); - // normally the governing equations would be added - // to the cell matrix and right hand side here + // normally the governing equations would be added + // to the cell matrix and right hand side here - deallog<<"I am about to distribute cell: "<center()<center()<::active_cell_iterator - cell = tria.begin_active(), - endc = tria.end(); + cell = tria.begin_active(), + endc = tria.end(); for (unsigned int counter = 0; cell!=endc; ++cell, ++counter) if (counter % 5 == 0) cell->set_refine_flag(); @@ -80,56 +80,56 @@ void test () { std::map boundary_values; VectorTools::interpolate_boundary_values (dof, - 0, - ConstantFunction(1.), - boundary_values); - std::map::const_iterator boundary_value = + 0, + ConstantFunction(1.), + boundary_values); + std::map::const_iterator boundary_value = boundary_values.begin(); for ( ; boundary_value !=boundary_values.end(); ++boundary_value) { - if (!correct_constraints.is_constrained(boundary_value->first)) - { - correct_constraints.add_line(boundary_value->first); - correct_constraints.set_inhomogeneity (boundary_value->first, - boundary_value->second); - } + if (!correct_constraints.is_constrained(boundary_value->first)) + { + correct_constraints.add_line(boundary_value->first); + correct_constraints.set_inhomogeneity (boundary_value->first, + boundary_value->second); + } } } correct_constraints.close(); deallog << "Number of DoFs: " << dof.n_dofs() << std::endl - << "Number of hanging nodes: " - << library_constraints.n_constraints() << std::endl - << "Total number of constraints: " - << correct_constraints.n_constraints() << std::endl; + << "Number of hanging nodes: " + << library_constraints.n_constraints() << std::endl + << "Total number of constraints: " + << correct_constraints.n_constraints() << std::endl; VectorTools::interpolate_boundary_values (dof, 0, ConstantFunction(1.), - library_constraints); + library_constraints); library_constraints.close(); - // the two constraint matrices should look the - // same, so go through them and check + // the two constraint matrices should look the + // same, so go through them and check deallog << "Check that both constraint matrices are identical... "; for (unsigned int i=0; i >& constraint_format; + library_constraints.is_constrained(i), ExcInternalError()); + typedef const std::vector > &constraint_format; if (correct_constraints.is_constrained(i)) - { - constraint_format correct = *correct_constraints.get_constraint_entries(i); - constraint_format library = *library_constraints.get_constraint_entries(i); - Assert (correct.size() == library.size(), ExcInternalError()); - for (unsigned int q=0; q(), - constraints); + constraints); constraints.close(); SparsityPattern sparsity; @@ -76,41 +76,41 @@ void test () FullMatrix local_mat (fe.dofs_per_cell, fe.dofs_per_cell); std::vector local_dof_indices (fe.dofs_per_cell); - // loop over cells, fill local matrix with - // random values, insert both into sparse and - // full matrix. Make some random entries equal - // to zero + // loop over cells, fill local matrix with + // random values, insert both into sparse and + // full matrix. Make some random entries equal + // to zero typename DoFHandler::active_cell_iterator - cell = dof.begin_active(), endc = dof.end(); + cell = dof.begin_active(), endc = dof.end(); unsigned int counter = 0; for ( ; cell != endc; ++cell) { for (unsigned int i=0; iget_dof_indices (local_dof_indices); constraints.distribute_local_to_global (local_mat, local_dof_indices, - sparse); + sparse); constraints.distribute_local_to_global (local_mat, local_dof_indices, - full); + full); } - // now check that the entries are indeed the - // same by copying the sparse matrix into a - // full matrix and checking the Frobenius norm - // of the difference matrix + // now check that the entries are indeed the + // same by copying the sparse matrix into a + // full matrix and checking the Frobenius norm + // of the difference matrix FullMatrix ref; ref.copy_from (sparse); full.add (-1., ref); deallog << "Difference between full and sparse matrix: " - << full.frobenius_norm() << std::endl; + << full.frobenius_norm() << std::endl; } -int main () +int main () { deallog << std::setprecision (2); logfile << std::setprecision (2); diff --git a/tests/deal.II/constraints_local_to_global_chunk.cc b/tests/deal.II/constraints_local_to_global_chunk.cc index 7d7a5e01f1..4326c3d393 100644 --- a/tests/deal.II/constraints_local_to_global_chunk.cc +++ b/tests/deal.II/constraints_local_to_global_chunk.cc @@ -63,7 +63,7 @@ void test (unsigned int chunk_size) ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof, constraints); VectorTools::interpolate_boundary_values (dof, 1, ZeroFunction(), - constraints); + constraints); constraints.close(); SparsityPattern sparsity; @@ -80,41 +80,41 @@ void test (unsigned int chunk_size) FullMatrix local_mat (fe.dofs_per_cell, fe.dofs_per_cell); std::vector local_dof_indices (fe.dofs_per_cell); - // loop over cells, fill local matrix with - // random values, insert both into sparse and - // full matrix. Make some random entries equal - // to zero + // loop over cells, fill local matrix with + // random values, insert both into sparse and + // full matrix. Make some random entries equal + // to zero typename DoFHandler::active_cell_iterator - cell = dof.begin_active(), endc = dof.end(); + cell = dof.begin_active(), endc = dof.end(); unsigned int counter = 0; for ( ; cell != endc; ++cell) { for (unsigned int i=0; iget_dof_indices (local_dof_indices); constraints.distribute_local_to_global (local_mat, local_dof_indices, - sparse); + sparse); constraints.distribute_local_to_global (local_mat, local_dof_indices, - chunk_sparse); + chunk_sparse); } - // now check that the entries are indeed the - // same + // now check that the entries are indeed the + // same double frobenius = 0.; for (unsigned int i=0; i::abs_square(sparse.el(i,j) - chunk_sparse.el(i,j)); deallog << "Difference between chunk and sparse matrix: " - << std::sqrt(frobenius) << std::endl; + << std::sqrt(frobenius) << std::endl; } -int main () +int main () { deallog << std::setprecision (2); logfile << std::setprecision (2); diff --git a/tests/deal.II/constraints_merge.cc b/tests/deal.II/constraints_merge.cc index 76bd4903b7..00dcc5fbcd 100644 --- a/tests/deal.II/constraints_merge.cc +++ b/tests/deal.II/constraints_merge.cc @@ -33,46 +33,46 @@ void merge_check () { deallog << "Checking ConstraintMatrix::merge" << std::endl; - // check twice, once with closed - // objects, once with open ones + // check twice, once with closed + // objects, once with open ones for (unsigned int run=0; run<2; ++run) { deallog << "Checking with " << (run == 0 ? "open" : "closed") - << " objects" << std::endl; - - // check that the `merge' function - // works correctly + << " objects" << std::endl; + + // check that the `merge' function + // works correctly ConstraintMatrix c1, c2; - // enter simple line + // enter simple line c1.add_line (0); c1.add_entry (0, 11, 1.); - // add more complex line + // add more complex line c1.add_line (1); c1.add_entry (1, 3, 0.5); c1.add_entry (1, 4, 0.5); - - // fill second constraints - // object with one trivial line - // and one which further - // constrains one of the - // entries in the first object + + // fill second constraints + // object with one trivial line + // and one which further + // constrains one of the + // entries in the first object c2.add_line (10); c2.add_entry (10, 11, 1.); c2.add_line (3); c2.add_entry (3, 12, 0.25); c2.add_entry (3, 13, 0.75); - // in one of the two runs, - // close the objects + // in one of the two runs, + // close the objects if (run == 1) - { - c1.close (); - c2.close (); - }; + { + c1.close (); + c2.close (); + }; - // now merge the two and print the - // results + // now merge the two and print the + // results c1.merge (c2); c1.print (logfile); }; diff --git a/tests/deal.II/constraints_merge_02.cc b/tests/deal.II/constraints_merge_02.cc index 8e7d75483b..e302be9040 100644 --- a/tests/deal.II/constraints_merge_02.cc +++ b/tests/deal.II/constraints_merge_02.cc @@ -34,52 +34,52 @@ void merge_check () { deallog << "Checking ConstraintMatrix::merge" << std::endl; - // check twice, once with closed - // objects, once with open ones + // check twice, once with closed + // objects, once with open ones for (unsigned int run=0; run<2; ++run) { deallog << "Checking with " << (run == 0 ? "open" : "closed") - << " objects" << std::endl; - - // check that the `merge' function - // works correctly + << " objects" << std::endl; + + // check that the `merge' function + // works correctly ConstraintMatrix c1, c2; - // enter simple line + // enter simple line c1.add_line (0); c1.add_entry (0, 11, 1.); c1.set_inhomogeneity (0, 42); - - // add more complex line + + // add more complex line c1.add_line (1); c1.add_entry (1, 3, 0.5); c1.add_entry (1, 4, 0.5); c1.set_inhomogeneity (1, 100); - - // fill second constraints - // object with one trivial line - // and one which further - // constrains one of the - // entries in the first object + + // fill second constraints + // object with one trivial line + // and one which further + // constrains one of the + // entries in the first object c2.add_line (10); c2.add_entry (10, 11, 1.); c2.set_inhomogeneity (10, 142); - + c2.add_line (3); c2.add_entry (3, 12, 0.25); c2.add_entry (3, 13, 0.75); c2.set_inhomogeneity (3, 242); - // in one of the two runs, - // close the objects + // in one of the two runs, + // close the objects if (run == 1) - { - c1.close (); - c2.close (); - }; + { + c1.close (); + c2.close (); + }; - // now merge the two and print the - // results + // now merge the two and print the + // results c1.merge (c2); c1.print (logfile); }; diff --git a/tests/deal.II/constraints_merge_03.cc b/tests/deal.II/constraints_merge_03.cc index 68ee5ec87d..764c390195 100644 --- a/tests/deal.II/constraints_merge_03.cc +++ b/tests/deal.II/constraints_merge_03.cc @@ -34,46 +34,46 @@ void merge_check () { deallog << "Checking ConstraintMatrix::merge" << std::endl; - // check twice, once with closed - // objects, once with open ones + // check twice, once with closed + // objects, once with open ones for (unsigned int run=0; run<2; ++run) { deallog << "Checking with " << (run == 0 ? "open" : "closed") - << " objects" << std::endl; - - // check that the `merge' function - // works correctly + << " objects" << std::endl; + + // check that the `merge' function + // works correctly ConstraintMatrix c1, c2; - // enter simple line + // enter simple line c1.add_line (0); c1.add_entry (0, 11, 1.); c1.set_inhomogeneity (0, 42); - - // fill second constraints - // object that has a conflict + + // fill second constraints + // object that has a conflict c2.add_line (0); c2.add_entry (0, 13, 2.); c2.set_inhomogeneity (0, 142); - // in one of the two runs, - // close the objects + // in one of the two runs, + // close the objects if (run == 1) - { - c1.close (); - c2.close (); - }; + { + c1.close (); + c2.close (); + }; - // now merge the two and print the - // results + // now merge the two and print the + // results try - { - c1.merge (c2, ConstraintMatrix::no_conflicts_allowed); - } + { + c1.merge (c2, ConstraintMatrix::no_conflicts_allowed); + } catch (...) - { - deallog << "OK" << std::endl; - } - + { + deallog << "OK" << std::endl; + } + c1.print (logfile); } } diff --git a/tests/deal.II/constraints_merge_04.cc b/tests/deal.II/constraints_merge_04.cc index 0ce5cf3f07..4a219b6d88 100644 --- a/tests/deal.II/constraints_merge_04.cc +++ b/tests/deal.II/constraints_merge_04.cc @@ -34,46 +34,46 @@ void merge_check () { deallog << "Checking ConstraintMatrix::merge" << std::endl; - // check twice, once with closed - // objects, once with open ones + // check twice, once with closed + // objects, once with open ones for (unsigned int run=0; run<2; ++run) { deallog << "Checking with " << (run == 0 ? "open" : "closed") - << " objects" << std::endl; - - // check that the `merge' function - // works correctly + << " objects" << std::endl; + + // check that the `merge' function + // works correctly ConstraintMatrix c1, c2; - // enter simple line + // enter simple line c1.add_line (0); c1.add_entry (0, 11, 1.); c1.set_inhomogeneity (0, 42); - - // fill second constraints - // object that has a conflict + + // fill second constraints + // object that has a conflict c2.add_line (0); c2.add_entry (0, 13, 2.); c2.set_inhomogeneity (0, 142); - // in one of the two runs, - // close the objects + // in one of the two runs, + // close the objects if (run == 1) - { - c1.close (); - c2.close (); - }; + { + c1.close (); + c2.close (); + }; - // now merge the two and print the - // results + // now merge the two and print the + // results try - { - c1.merge (c2, ConstraintMatrix::left_object_wins); - } + { + c1.merge (c2, ConstraintMatrix::left_object_wins); + } catch (...) - { - Assert (false, ExcInternalError()); - } - + { + Assert (false, ExcInternalError()); + } + c1.print (logfile); } } diff --git a/tests/deal.II/constraints_merge_05.cc b/tests/deal.II/constraints_merge_05.cc index 12d423d998..393e785fd1 100644 --- a/tests/deal.II/constraints_merge_05.cc +++ b/tests/deal.II/constraints_merge_05.cc @@ -34,46 +34,46 @@ void merge_check () { deallog << "Checking ConstraintMatrix::merge" << std::endl; - // check twice, once with closed - // objects, once with open ones + // check twice, once with closed + // objects, once with open ones for (unsigned int run=0; run<2; ++run) { deallog << "Checking with " << (run == 0 ? "open" : "closed") - << " objects" << std::endl; - - // check that the `merge' function - // works correctly + << " objects" << std::endl; + + // check that the `merge' function + // works correctly ConstraintMatrix c1, c2; - // enter simple line + // enter simple line c1.add_line (0); c1.add_entry (0, 11, 1.); c1.set_inhomogeneity (0, 42); - - // fill second constraints - // object that has a conflict + + // fill second constraints + // object that has a conflict c2.add_line (0); c2.add_entry (0, 13, 2.); c2.set_inhomogeneity (0, 142); - // in one of the two runs, - // close the objects + // in one of the two runs, + // close the objects if (run == 1) - { - c1.close (); - c2.close (); - }; + { + c1.close (); + c2.close (); + }; - // now merge the two and print the - // results + // now merge the two and print the + // results try - { - c1.merge (c2, ConstraintMatrix::right_object_wins); - } + { + c1.merge (c2, ConstraintMatrix::right_object_wins); + } catch (...) - { - Assert (false, ExcInternalError()); - } - + { + Assert (false, ExcInternalError()); + } + c1.print (logfile); } } diff --git a/tests/deal.II/constraints_merge_06.cc b/tests/deal.II/constraints_merge_06.cc index 5cb1d8902f..bfd014192b 100644 --- a/tests/deal.II/constraints_merge_06.cc +++ b/tests/deal.II/constraints_merge_06.cc @@ -36,18 +36,18 @@ void merge_check () { deallog << "Checking ConstraintMatrix::merge" << std::endl; - // check twice, once with closed - // objects, once with open ones + // check twice, once with closed + // objects, once with open ones for (unsigned int run=0; run<2; ++run) { deallog << "Checking with " << (run == 0 ? "open" : "closed") - << " objects" << std::endl; - - // check that the `merge' function - // works correctly + << " objects" << std::endl; + + // check that the `merge' function + // works correctly ConstraintMatrix c1, c2; - // enter simple line + // enter simple line c1.add_line (0); c1.add_entry (0, 11, 1.); c1.set_inhomogeneity (0, 42); @@ -55,31 +55,31 @@ void merge_check () c1.add_line (13); c1.add_entry (13, 2, 0.5); c1.set_inhomogeneity (13, 2); - - // fill second constraints - // object that has a conflict + + // fill second constraints + // object that has a conflict c2.add_line (0); c2.add_entry (0, 13, 2.); c2.set_inhomogeneity (0, 142); - // in one of the two runs, - // close the objects + // in one of the two runs, + // close the objects if (run == 1) - { - c1.close (); - c2.close (); - }; + { + c1.close (); + c2.close (); + }; - // now merge the two and print the - // results + // now merge the two and print the + // results try - { - c1.merge (c2, ConstraintMatrix::right_object_wins); - } + { + c1.merge (c2, ConstraintMatrix::right_object_wins); + } catch (...) - { - Assert (false, ExcInternalError()); - } - + { + Assert (false, ExcInternalError()); + } + c1.print (logfile); } } diff --git a/tests/deal.II/constraints_merge_07.cc b/tests/deal.II/constraints_merge_07.cc index f82530e51c..4d228f745c 100644 --- a/tests/deal.II/constraints_merge_07.cc +++ b/tests/deal.II/constraints_merge_07.cc @@ -37,18 +37,18 @@ void merge_check () { deallog << "Checking ConstraintMatrix::merge" << std::endl; - // check twice, once with closed - // objects, once with open ones + // check twice, once with closed + // objects, once with open ones for (unsigned int run=0; run<2; ++run) { deallog << "Checking with " << (run == 0 ? "open" : "closed") - << " objects" << std::endl; - - // check that the `merge' function - // works correctly + << " objects" << std::endl; + + // check that the `merge' function + // works correctly ConstraintMatrix c1, c2; - // enter simple line + // enter simple line c1.add_line (0); c1.add_entry (0, 11, 1.); c1.set_inhomogeneity (0, 42); @@ -60,31 +60,31 @@ void merge_check () c1.add_line (2); c1.add_entry (2, 0, 0.25); c1.set_inhomogeneity (2, 22); - - // fill second constraints - // object that has a conflict + + // fill second constraints + // object that has a conflict c2.add_line (0); c2.add_entry (0, 13, 2.); c2.set_inhomogeneity (0, 142); - // in one of the two runs, - // close the objects + // in one of the two runs, + // close the objects if (run == 1) - { - c1.close (); - c2.close (); - }; + { + c1.close (); + c2.close (); + }; - // now merge the two and print the - // results + // now merge the two and print the + // results try - { - c1.merge (c2, ConstraintMatrix::right_object_wins); - } + { + c1.merge (c2, ConstraintMatrix::right_object_wins); + } catch (...) - { - Assert (false, ExcInternalError()); - } - + { + Assert (false, ExcInternalError()); + } + c1.print (logfile); } } diff --git a/tests/deal.II/constraints_merge_08.cc b/tests/deal.II/constraints_merge_08.cc index 7befc081fd..9489efcf71 100644 --- a/tests/deal.II/constraints_merge_08.cc +++ b/tests/deal.II/constraints_merge_08.cc @@ -35,17 +35,17 @@ void merge_check () { deallog << "Checking ConstraintMatrix::merge with localized lines" << std::endl; - // set local lines to a very large range that - // surely triggers an error if the - // implementation is wrong + // set local lines to a very large range that + // surely triggers an error if the + // implementation is wrong IndexSet local_lines (100000000); local_lines.add_range (99999890, 99999900); local_lines.add_range (99999990,100000000); local_lines.compress(); - // the test is the same as - // constraints_merge_02, but we add very large - // indices here + // the test is the same as + // constraints_merge_02, but we add very large + // indices here const unsigned int index_0 = local_lines.nth_index_in_set(0); const unsigned int index_1 = local_lines.nth_index_in_set(1); const unsigned int index_3 = local_lines.nth_index_in_set(3); @@ -56,35 +56,35 @@ void merge_check () const unsigned int index_13 = local_lines.nth_index_in_set(13); deallog << "Number of local lines: " - << local_lines.n_elements() << std::endl; + << local_lines.n_elements() << std::endl; - // check twice, once with closed - // objects, once with open ones + // check twice, once with closed + // objects, once with open ones for (unsigned int run=0; run<2; ++run) { deallog << "Checking with " << (run == 0 ? "open" : "closed") - << " objects" << std::endl; + << " objects" << std::endl; - // check that the `merge' function - // works correctly + // check that the `merge' function + // works correctly ConstraintMatrix c1 (local_lines), c2 (local_lines); - // enter simple line + // enter simple line c1.add_line (index_0); c1.add_entry (index_0, index_11, 1.); c1.set_inhomogeneity (index_0, 42); - // add more complex line + // add more complex line c1.add_line (index_1); c1.add_entry (index_1, index_3, 0.5); c1.add_entry (index_1, index_4, 0.5); c1.set_inhomogeneity (index_1, 100); - // fill second constraints - // object with one trivial line - // and one which further - // constrains one of the - // entries in the first object + // fill second constraints + // object with one trivial line + // and one which further + // constrains one of the + // entries in the first object c2.add_line (index_10); c2.add_entry (index_10, index_11, 1.); c2.set_inhomogeneity (index_10, 142); @@ -94,16 +94,16 @@ void merge_check () c2.add_entry (index_3, index_13, 0.75); c2.set_inhomogeneity (index_3, 242); - // in one of the two runs, - // close the objects + // in one of the two runs, + // close the objects if (run == 1) - { - c1.close (); - c2.close (); - }; + { + c1.close (); + c2.close (); + }; - // now merge the two and print the - // results + // now merge the two and print the + // results c1.merge (c2); c1.print (logfile); }; diff --git a/tests/deal.II/constraints_merge_09.cc b/tests/deal.II/constraints_merge_09.cc index f656ec6e2f..1b61bd7b37 100644 --- a/tests/deal.II/constraints_merge_09.cc +++ b/tests/deal.II/constraints_merge_09.cc @@ -37,37 +37,37 @@ void merge_check () { deallog << "Checking ConstraintMatrix::merge with localized lines" << std::endl; - // set local lines to a very large range that - // surely triggers an error if the - // implementation is wrong + // set local lines to a very large range that + // surely triggers an error if the + // implementation is wrong IndexSet local_lines (100000000); local_lines.add_range (99999890, 99999900); local_lines.add_range (99999990,100000000); local_lines.compress(); - // the test is the same as - // constraints_merge_02, but we add very large - // indices here + // the test is the same as + // constraints_merge_02, but we add very large + // indices here const unsigned int index_0 = local_lines.nth_index_in_set(0); const unsigned int index_2 = local_lines.nth_index_in_set(2); const unsigned int index_11 = local_lines.nth_index_in_set(11); const unsigned int index_13 = local_lines.nth_index_in_set(13); deallog << "Number of local lines: " - << local_lines.n_elements() << std::endl; + << local_lines.n_elements() << std::endl; - // check twice, once with closed - // objects, once with open ones + // check twice, once with closed + // objects, once with open ones for (unsigned int run=0; run<2; ++run) { deallog << "Checking with " << (run == 0 ? "open" : "closed") - << " objects" << std::endl; + << " objects" << std::endl; - // check that the `merge' function - // works correctly + // check that the `merge' function + // works correctly ConstraintMatrix c1 (local_lines), c2 (local_lines); - // enter simple line + // enter simple line c1.add_line (index_0); c1.add_entry (index_0, index_11, 1.); c1.set_inhomogeneity (index_0, 42); @@ -76,29 +76,29 @@ void merge_check () c1.add_entry (index_13, index_2, 0.5); c1.set_inhomogeneity (index_13, 2); - // fill second constraints - // object that has a conflict + // fill second constraints + // object that has a conflict c2.add_line (index_0); c2.add_entry (index_0, index_13, 2.); c2.set_inhomogeneity (index_0, 142); - // in one of the two runs, - // close the objects + // in one of the two runs, + // close the objects if (run == 1) - { - c1.close (); - c2.close (); - }; + { + c1.close (); + c2.close (); + }; - // now merge the two and print the - // results + // now merge the two and print the + // results try - { - c1.merge (c2, ConstraintMatrix::right_object_wins); - } + { + c1.merge (c2, ConstraintMatrix::right_object_wins); + } catch (...) - { - Assert (false, ExcInternalError()); - } + { + Assert (false, ExcInternalError()); + } c1.print (logfile); } diff --git a/tests/deal.II/create_laplace_matrix_01.cc b/tests/deal.II/create_laplace_matrix_01.cc index 1a0e8a3b7f..3e9da66b3a 100644 --- a/tests/deal.II/create_laplace_matrix_01.cc +++ b/tests/deal.II/create_laplace_matrix_01.cc @@ -56,7 +56,7 @@ template void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -67,22 +67,22 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FE_Q element(2); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); DoFTools::make_sparsity_pattern (dof, sparsity); ConstraintMatrix constraints; @@ -90,30 +90,30 @@ check () constraints.close (); constraints.condense (sparsity); sparsity.compress (); - + SparseMatrix matrix; matrix.reinit (sparsity); Functions::ExpFunction rhs_function; - + Vector rhs (dof.n_dofs()); - + MatrixTools:: - create_laplace_matrix (mapping, dof, - quadrature, matrix, - rhs_function, rhs); - - // since we only generate - // output with two digits after - // the dot, and since matrix - // entries are usually in the - // range of 1 or below, - // multiply matrix by 100 to - // make test more sensitive + create_laplace_matrix (mapping, dof, + quadrature, matrix, + rhs_function, rhs); + + // since we only generate + // output with two digits after + // the dot, and since matrix + // entries are usually in the + // range of 1 or below, + // multiply matrix by 100 to + // make test more sensitive deallog << "Matrix: " << std::endl; for (unsigned int i=0; i void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -68,22 +68,22 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FE_Q element(2); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); DoFTools::make_sparsity_pattern (dof, sparsity); ConstraintMatrix constraints; @@ -91,25 +91,25 @@ check () constraints.close (); constraints.condense (sparsity); sparsity.compress (); - + SparseMatrix matrix; matrix.reinit (sparsity); - + MatrixTools:: - create_laplace_matrix (mapping, dof, - quadrature, matrix); - - // since we only generate - // output with two digits after - // the dot, and since matrix - // entries are usually in the - // range of 1 or below, - // multiply matrix by 100 to - // make test more sensitive + create_laplace_matrix (mapping, dof, + quadrature, matrix); + + // since we only generate + // output with two digits after + // the dot, and since matrix + // entries are usually in the + // range of 1 or below, + // multiply matrix by 100 to + // make test more sensitive deallog << "Matrix: " << std::endl; for (unsigned int i=0; i void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -66,23 +66,23 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); std::vector > mask (2, std::vector(2, false)); mask[0][0] = mask[1][1] = true; @@ -92,30 +92,30 @@ check () constraints.close (); constraints.condense (sparsity); sparsity.compress (); - + SparseMatrix matrix; matrix.reinit (sparsity); Functions::ExpFunction rhs_function; - + Vector rhs (dof.n_dofs()); - + MatrixTools:: - create_laplace_matrix (mapping, dof, - quadrature, matrix, - rhs_function, rhs); - - // since we only generate - // output with two digits after - // the dot, and since matrix - // entries are usually in the - // range of 1 or below, - // multiply matrix by 100 to - // make test more sensitive + create_laplace_matrix (mapping, dof, + quadrature, matrix, + rhs_function, rhs); + + // since we only generate + // output with two digits after + // the dot, and since matrix + // entries are usually in the + // range of 1 or below, + // multiply matrix by 100 to + // make test more sensitive deallog << "Matrix: " << std::endl; for (unsigned int i=0; i void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -67,23 +67,23 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); std::vector > mask (2, std::vector(2, false)); mask[0][0] = mask[1][1] = true; @@ -93,25 +93,25 @@ check () constraints.close (); constraints.condense (sparsity); sparsity.compress (); - + SparseMatrix matrix; matrix.reinit (sparsity); MatrixTools:: - create_laplace_matrix (mapping, dof, - quadrature, matrix); - - // since we only generate - // output with two digits after - // the dot, and since matrix - // entries are usually in the - // range of 1 or below, - // multiply matrix by 100 to - // make test more sensitive + create_laplace_matrix (mapping, dof, + quadrature, matrix); + + // since we only generate + // output with two digits after + // the dot, and since matrix + // entries are usually in the + // range of 1 or below, + // multiply matrix by 100 to + // make test more sensitive deallog << "Matrix: " << std::endl; for (unsigned int i=0; i void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -66,22 +66,22 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FE_Q element(2); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); DoFTools::make_sparsity_pattern (dof, sparsity); ConstraintMatrix constraints; @@ -89,31 +89,31 @@ check () constraints.close (); constraints.condense (sparsity); sparsity.compress (); - + SparseMatrix matrix; matrix.reinit (sparsity); Functions::ExpFunction rhs_function; - + Vector rhs (dof.n_dofs()); - + MatrixTools:: - create_laplace_matrix (mapping, dof, - quadrature, matrix, - rhs_function, rhs, - &rhs_function); - - // since we only generate - // output with two digits after - // the dot, and since matrix - // entries are usually in the - // range of 1 or below, - // multiply matrix by 100 to - // make test more sensitive + create_laplace_matrix (mapping, dof, + quadrature, matrix, + rhs_function, rhs, + &rhs_function); + + // since we only generate + // output with two digits after + // the dot, and since matrix + // entries are usually in the + // range of 1 or below, + // multiply matrix by 100 to + // make test more sensitive deallog << "Matrix: " << std::endl; for (unsigned int i=0; i void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -67,22 +67,22 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FE_Q element(2); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); DoFTools::make_sparsity_pattern (dof, sparsity); ConstraintMatrix constraints; @@ -90,28 +90,28 @@ check () constraints.close (); constraints.condense (sparsity); sparsity.compress (); - + SparseMatrix matrix; matrix.reinit (sparsity); Functions::ExpFunction coefficient; - + MatrixTools:: - create_laplace_matrix (mapping, dof, - quadrature, matrix, - &coefficient); - - // since we only generate - // output with two digits after - // the dot, and since matrix - // entries are usually in the - // range of 1 or below, - // multiply matrix by 100 to - // make test more sensitive + create_laplace_matrix (mapping, dof, + quadrature, matrix, + &coefficient); + + // since we only generate + // output with two digits after + // the dot, and since matrix + // entries are usually in the + // range of 1 or below, + // multiply matrix by 100 to + // make test more sensitive deallog << "Matrix: " << std::endl; for (unsigned int i=0; i void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -65,23 +65,23 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); std::vector > mask (2, std::vector(2, false)); mask[0][0] = mask[1][1] = true; @@ -91,31 +91,31 @@ check () constraints.close (); constraints.condense (sparsity); sparsity.compress (); - + SparseMatrix matrix; matrix.reinit (sparsity); Functions::ExpFunction rhs_function; - + Vector rhs (dof.n_dofs()); - + MatrixTools:: - create_laplace_matrix (mapping, dof, - quadrature, matrix, - rhs_function, rhs, - &rhs_function); - - // since we only generate - // output with two digits after - // the dot, and since matrix - // entries are usually in the - // range of 1 or below, - // multiply matrix by 100 to - // make test more sensitive + create_laplace_matrix (mapping, dof, + quadrature, matrix, + rhs_function, rhs, + &rhs_function); + + // since we only generate + // output with two digits after + // the dot, and since matrix + // entries are usually in the + // range of 1 or below, + // multiply matrix by 100 to + // make test more sensitive deallog << "Matrix: " << std::endl; for (unsigned int i=0; i void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -66,23 +66,23 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); std::vector > mask (2, std::vector(2, false)); mask[0][0] = mask[1][1] = true; @@ -92,28 +92,28 @@ check () constraints.close (); constraints.condense (sparsity); sparsity.compress (); - + SparseMatrix matrix; matrix.reinit (sparsity); Functions::ExpFunction coefficient; - + MatrixTools:: - create_laplace_matrix (mapping, dof, - quadrature, matrix, - &coefficient); - - // since we only generate - // output with two digits after - // the dot, and since matrix - // entries are usually in the - // range of 1 or below, - // multiply matrix by 100 to - // make test more sensitive + create_laplace_matrix (mapping, dof, + quadrature, matrix, + &coefficient); + + // since we only generate + // output with two digits after + // the dot, and since matrix + // entries are usually in the + // range of 1 or below, + // multiply matrix by 100 to + // make test more sensitive deallog << "Matrix: " << std::endl; for (unsigned int i=0; i element(2); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); @@ -81,9 +81,9 @@ check () constraints); constraints.close (); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity; { CompressedSparsityPattern csp(dof.n_dofs(), dof.n_dofs()); @@ -100,9 +100,9 @@ check () Vector rhs (dof.n_dofs()), rhs_ref(dof.n_dofs()); MatrixTools:: - create_laplace_matrix (mapping, dof, - quadrature, matrix_ref, - rhs_function, rhs_ref); + create_laplace_matrix (mapping, dof, + quadrature, matrix_ref, + rhs_function, rhs_ref); constraints.condense(matrix_ref, rhs_ref); const Function *const dummy = 0; diff --git a/tests/deal.II/create_laplace_matrix_constraints_02.cc b/tests/deal.II/create_laplace_matrix_constraints_02.cc index ac508ac558..a3e19328ad 100644 --- a/tests/deal.II/create_laplace_matrix_constraints_02.cc +++ b/tests/deal.II/create_laplace_matrix_constraints_02.cc @@ -61,17 +61,17 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); @@ -82,9 +82,9 @@ check () constraints); constraints.close (); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity; { Table<2,DoFTools::Coupling> mask (2, 2); @@ -104,9 +104,9 @@ check () Vector rhs (dof.n_dofs()), rhs_ref(dof.n_dofs()); MatrixTools:: - create_laplace_matrix (mapping, dof, - quadrature, matrix_ref, - rhs_function, rhs_ref); + create_laplace_matrix (mapping, dof, + quadrature, matrix_ref, + rhs_function, rhs_ref); constraints.condense(matrix_ref, rhs_ref); const Function *const dummy = 0; diff --git a/tests/deal.II/create_laplace_matrix_constraints_02b.cc b/tests/deal.II/create_laplace_matrix_constraints_02b.cc index 6029b27277..a32375f41e 100644 --- a/tests/deal.II/create_laplace_matrix_constraints_02b.cc +++ b/tests/deal.II/create_laplace_matrix_constraints_02b.cc @@ -62,17 +62,17 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); @@ -83,9 +83,9 @@ check () constraints); constraints.close (); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity; { Table<2,DoFTools::Coupling> mask (2, 2); @@ -101,8 +101,8 @@ check () matrix_ref.reinit (sparsity); MatrixTools:: - create_laplace_matrix (mapping, dof, - quadrature, matrix_ref); + create_laplace_matrix (mapping, dof, + quadrature, matrix_ref); constraints.condense(matrix_ref); const Function *const dummy = 0; diff --git a/tests/deal.II/create_laplace_matrix_constraints_03.cc b/tests/deal.II/create_laplace_matrix_constraints_03.cc index 9a062d9509..8d1de5787d 100644 --- a/tests/deal.II/create_laplace_matrix_constraints_03.cc +++ b/tests/deal.II/create_laplace_matrix_constraints_03.cc @@ -61,16 +61,16 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FE_Q element(2); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); @@ -81,9 +81,9 @@ check () constraints); constraints.close (); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity; { CompressedSparsityPattern csp(dof.n_dofs(), dof.n_dofs()); @@ -100,10 +100,10 @@ check () Vector rhs (dof.n_dofs()), rhs_ref(dof.n_dofs()); MatrixTools:: - create_laplace_matrix (mapping, dof, - quadrature, matrix_ref, - rhs_function, rhs_ref, - &rhs_function); + create_laplace_matrix (mapping, dof, + quadrature, matrix_ref, + rhs_function, rhs_ref, + &rhs_function); constraints.condense(matrix_ref, rhs_ref); MatrixTools::create_laplace_matrix (mapping, dof, quadrature, matrix, diff --git a/tests/deal.II/create_laplace_matrix_constraints_04.cc b/tests/deal.II/create_laplace_matrix_constraints_04.cc index 75373a0680..7126a1ea32 100644 --- a/tests/deal.II/create_laplace_matrix_constraints_04.cc +++ b/tests/deal.II/create_laplace_matrix_constraints_04.cc @@ -61,17 +61,17 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); @@ -82,9 +82,9 @@ check () constraints); constraints.close (); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity; { Table<2,DoFTools::Coupling> mask (2, 2); @@ -104,10 +104,10 @@ check () Vector rhs (dof.n_dofs()), rhs_ref(dof.n_dofs()); MatrixTools:: - create_laplace_matrix (mapping, dof, - quadrature, matrix_ref, - rhs_function, rhs_ref, - &rhs_function); + create_laplace_matrix (mapping, dof, + quadrature, matrix_ref, + rhs_function, rhs_ref, + &rhs_function); constraints.condense(matrix_ref, rhs_ref); MatrixTools::create_laplace_matrix (mapping, dof, quadrature, matrix, diff --git a/tests/deal.II/create_mass_matrix_01.cc b/tests/deal.II/create_mass_matrix_01.cc index 0861101ec1..006d25241c 100644 --- a/tests/deal.II/create_mass_matrix_01.cc +++ b/tests/deal.II/create_mass_matrix_01.cc @@ -67,22 +67,22 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FE_Q element(2); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); DoFTools::make_sparsity_pattern (dof, sparsity); ConstraintMatrix constraints; @@ -99,21 +99,21 @@ check () Vector rhs (dof.n_dofs()); MatrixTools:: - create_mass_matrix (mapping, dof, - quadrature, matrix, - rhs_function, rhs); - - // since we only generate - // output with two digits after - // the dot, and since matrix - // entries are usually in the - // range of 1 or below, - // multiply matrix by 100 to - // make test more sensitive + create_mass_matrix (mapping, dof, + quadrature, matrix, + rhs_function, rhs); + + // since we only generate + // output with two digits after + // the dot, and since matrix + // entries are usually in the + // range of 1 or below, + // multiply matrix by 100 to + // make test more sensitive deallog << "Matrix: " << std::endl; for (unsigned int i=0; i void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -68,22 +68,22 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FE_Q element(2); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); DoFTools::make_sparsity_pattern (dof, sparsity); ConstraintMatrix constraints; @@ -91,25 +91,25 @@ check () constraints.close (); constraints.condense (sparsity); sparsity.compress (); - + SparseMatrix matrix; matrix.reinit (sparsity); - + MatrixTools:: - create_mass_matrix (mapping, dof, - quadrature, matrix); - - // since we only generate - // output with two digits after - // the dot, and since matrix - // entries are usually in the - // range of 1 or below, - // multiply matrix by 100 to - // make test more sensitive + create_mass_matrix (mapping, dof, + quadrature, matrix); + + // since we only generate + // output with two digits after + // the dot, and since matrix + // entries are usually in the + // range of 1 or below, + // multiply matrix by 100 to + // make test more sensitive deallog << "Matrix: " << std::endl; for (unsigned int i=0; i void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -66,23 +66,23 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); std::vector > mask (2, std::vector(2, false)); mask[0][0] = mask[1][1] = true; @@ -92,30 +92,30 @@ check () constraints.close (); constraints.condense (sparsity); sparsity.compress (); - + SparseMatrix matrix; matrix.reinit (sparsity); Functions::ExpFunction rhs_function; - + Vector rhs (dof.n_dofs()); - + MatrixTools:: - create_mass_matrix (mapping, dof, - quadrature, matrix, - rhs_function, rhs); - - // since we only generate - // output with two digits after - // the dot, and since matrix - // entries are usually in the - // range of 1 or below, - // multiply matrix by 100 to - // make test more sensitive + create_mass_matrix (mapping, dof, + quadrature, matrix, + rhs_function, rhs); + + // since we only generate + // output with two digits after + // the dot, and since matrix + // entries are usually in the + // range of 1 or below, + // multiply matrix by 100 to + // make test more sensitive deallog << "Matrix: " << std::endl; for (unsigned int i=0; i void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -67,23 +67,23 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); std::vector > mask (2, std::vector(2, false)); mask[0][0] = mask[1][1] = true; @@ -93,25 +93,25 @@ check () constraints.close (); constraints.condense (sparsity); sparsity.compress (); - + SparseMatrix matrix; matrix.reinit (sparsity); MatrixTools:: - create_mass_matrix (mapping, dof, - quadrature, matrix); - - // since we only generate - // output with two digits after - // the dot, and since matrix - // entries are usually in the - // range of 1 or below, - // multiply matrix by 100 to - // make test more sensitive + create_mass_matrix (mapping, dof, + quadrature, matrix); + + // since we only generate + // output with two digits after + // the dot, and since matrix + // entries are usually in the + // range of 1 or below, + // multiply matrix by 100 to + // make test more sensitive deallog << "Matrix: " << std::endl; for (unsigned int i=0; i void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -66,22 +66,22 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FE_Q element(2); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); DoFTools::make_sparsity_pattern (dof, sparsity); ConstraintMatrix constraints; @@ -89,31 +89,31 @@ check () constraints.close (); constraints.condense (sparsity); sparsity.compress (); - + SparseMatrix matrix; matrix.reinit (sparsity); Functions::ExpFunction rhs_function; - + Vector rhs (dof.n_dofs()); - + MatrixTools:: - create_mass_matrix (mapping, dof, - quadrature, matrix, - rhs_function, rhs, - &rhs_function); - - // since we only generate - // output with two digits after - // the dot, and since matrix - // entries are usually in the - // range of 1 or below, - // multiply matrix by 100 to - // make test more sensitive + create_mass_matrix (mapping, dof, + quadrature, matrix, + rhs_function, rhs, + &rhs_function); + + // since we only generate + // output with two digits after + // the dot, and since matrix + // entries are usually in the + // range of 1 or below, + // multiply matrix by 100 to + // make test more sensitive deallog << "Matrix: " << std::endl; for (unsigned int i=0; i void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -67,22 +67,22 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FE_Q element(2); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); DoFTools::make_sparsity_pattern (dof, sparsity); ConstraintMatrix constraints; @@ -90,28 +90,28 @@ check () constraints.close (); constraints.condense (sparsity); sparsity.compress (); - + SparseMatrix matrix; matrix.reinit (sparsity); Functions::ExpFunction coefficient; - + MatrixTools:: - create_mass_matrix (mapping, dof, - quadrature, matrix, - &coefficient); - - // since we only generate - // output with two digits after - // the dot, and since matrix - // entries are usually in the - // range of 1 or below, - // multiply matrix by 100 to - // make test more sensitive + create_mass_matrix (mapping, dof, + quadrature, matrix, + &coefficient); + + // since we only generate + // output with two digits after + // the dot, and since matrix + // entries are usually in the + // range of 1 or below, + // multiply matrix by 100 to + // make test more sensitive deallog << "Matrix: " << std::endl; for (unsigned int i=0; i void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -65,23 +65,23 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); std::vector > mask (2, std::vector(2, false)); mask[0][0] = mask[1][1] = true; @@ -91,31 +91,31 @@ check () constraints.close (); constraints.condense (sparsity); sparsity.compress (); - + SparseMatrix matrix; matrix.reinit (sparsity); Functions::ExpFunction rhs_function; - + Vector rhs (dof.n_dofs()); - + MatrixTools:: - create_mass_matrix (mapping, dof, - quadrature, matrix, - rhs_function, rhs, - &rhs_function); - - // since we only generate - // output with two digits after - // the dot, and since matrix - // entries are usually in the - // range of 1 or below, - // multiply matrix by 100 to - // make test more sensitive + create_mass_matrix (mapping, dof, + quadrature, matrix, + rhs_function, rhs, + &rhs_function); + + // since we only generate + // output with two digits after + // the dot, and since matrix + // entries are usually in the + // range of 1 or below, + // multiply matrix by 100 to + // make test more sensitive deallog << "Matrix: " << std::endl; for (unsigned int i=0; i void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -66,23 +66,23 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); std::vector > mask (2, std::vector(2, false)); mask[0][0] = mask[1][1] = true; @@ -92,28 +92,28 @@ check () constraints.close (); constraints.condense (sparsity); sparsity.compress (); - + SparseMatrix matrix; matrix.reinit (sparsity); Functions::ExpFunction coefficient; - + MatrixTools:: - create_mass_matrix (mapping, dof, - quadrature, matrix, - &coefficient); - - // since we only generate - // output with two digits after - // the dot, and since matrix - // entries are usually in the - // range of 1 or below, - // multiply matrix by 100 to - // make test more sensitive + create_mass_matrix (mapping, dof, + quadrature, matrix, + &coefficient); + + // since we only generate + // output with two digits after + // the dot, and since matrix + // entries are usually in the + // range of 1 or below, + // multiply matrix by 100 to + // make test more sensitive deallog << "Matrix: " << std::endl; for (unsigned int i=0; i void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -58,25 +58,25 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of non-primitive elements + // create a system element composed + // of non-primitive elements FESystem element(FE_RaviartThomas(1), 2); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); - // create sparsity pattern. note - // that different blocks should - // not couple, so use pattern + // create sparsity pattern. note + // that different blocks should + // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); std::vector > mask (dim*2, - std::vector(dim*2, false)); + std::vector(dim*2, false)); for (unsigned int i=0; i matrix; matrix.reinit (sparsity); MatrixTools:: - create_mass_matrix (mapping, dof, - quadrature, matrix); - - // since we only generate - // output with two digits after - // the dot, and since matrix - // entries are usually in the - // range of 1 or below, - // multiply matrix by 100 to - // make test more sensitive + create_mass_matrix (mapping, dof, + quadrature, matrix); + + // since we only generate + // output with two digits after + // the dot, and since matrix + // entries are usually in the + // range of 1 or below, + // multiply matrix by 100 to + // make test more sensitive deallog << "Matrix: " << std::endl; for (unsigned int i=0; i element(2); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); @@ -81,9 +81,9 @@ check () constraints); constraints.close (); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity; { CompressedSparsityPattern csp(dof.n_dofs(), dof.n_dofs()); @@ -100,9 +100,9 @@ check () Vector rhs (dof.n_dofs()), rhs_ref(dof.n_dofs()); MatrixTools:: - create_mass_matrix (mapping, dof, - quadrature, matrix_ref, - rhs_function, rhs_ref); + create_mass_matrix (mapping, dof, + quadrature, matrix_ref, + rhs_function, rhs_ref); constraints.condense(matrix_ref, rhs_ref); const Function *const dummy = 0; diff --git a/tests/deal.II/create_mass_matrix_constraints_02.cc b/tests/deal.II/create_mass_matrix_constraints_02.cc index 37570247e9..f2790eb80e 100644 --- a/tests/deal.II/create_mass_matrix_constraints_02.cc +++ b/tests/deal.II/create_mass_matrix_constraints_02.cc @@ -61,17 +61,17 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); @@ -82,9 +82,9 @@ check () constraints); constraints.close (); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity; { Table<2,DoFTools::Coupling> mask (2, 2); @@ -104,9 +104,9 @@ check () Vector rhs (dof.n_dofs()), rhs_ref(dof.n_dofs()); MatrixTools:: - create_mass_matrix (mapping, dof, - quadrature, matrix_ref, - rhs_function, rhs_ref); + create_mass_matrix (mapping, dof, + quadrature, matrix_ref, + rhs_function, rhs_ref); constraints.condense(matrix_ref, rhs_ref); const Function *const dummy = 0; diff --git a/tests/deal.II/create_mass_matrix_constraints_02b.cc b/tests/deal.II/create_mass_matrix_constraints_02b.cc index 19d2e0ebc5..59d2fa19bc 100644 --- a/tests/deal.II/create_mass_matrix_constraints_02b.cc +++ b/tests/deal.II/create_mass_matrix_constraints_02b.cc @@ -62,17 +62,17 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); @@ -83,9 +83,9 @@ check () constraints); constraints.close (); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity; { Table<2,DoFTools::Coupling> mask (2, 2); @@ -101,8 +101,8 @@ check () matrix_ref.reinit (sparsity); MatrixTools:: - create_mass_matrix (mapping, dof, - quadrature, matrix_ref); + create_mass_matrix (mapping, dof, + quadrature, matrix_ref); constraints.condense(matrix_ref); const Function *const dummy = 0; diff --git a/tests/deal.II/create_mass_matrix_constraints_03.cc b/tests/deal.II/create_mass_matrix_constraints_03.cc index 018e422ff4..2ff87c0489 100644 --- a/tests/deal.II/create_mass_matrix_constraints_03.cc +++ b/tests/deal.II/create_mass_matrix_constraints_03.cc @@ -61,16 +61,16 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FE_Q element(2); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); @@ -81,9 +81,9 @@ check () constraints); constraints.close (); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity; { CompressedSparsityPattern csp(dof.n_dofs(), dof.n_dofs()); @@ -100,10 +100,10 @@ check () Vector rhs (dof.n_dofs()), rhs_ref(dof.n_dofs()); MatrixTools:: - create_mass_matrix (mapping, dof, - quadrature, matrix_ref, - rhs_function, rhs_ref, - &rhs_function); + create_mass_matrix (mapping, dof, + quadrature, matrix_ref, + rhs_function, rhs_ref, + &rhs_function); constraints.condense(matrix_ref, rhs_ref); MatrixTools::create_mass_matrix (mapping, dof, quadrature, matrix, diff --git a/tests/deal.II/create_mass_matrix_constraints_04.cc b/tests/deal.II/create_mass_matrix_constraints_04.cc index fb82707335..25e0f6796d 100644 --- a/tests/deal.II/create_mass_matrix_constraints_04.cc +++ b/tests/deal.II/create_mass_matrix_constraints_04.cc @@ -61,17 +61,17 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); @@ -82,9 +82,9 @@ check () constraints); constraints.close (); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity; { Table<2,DoFTools::Coupling> mask (2, 2); @@ -104,10 +104,10 @@ check () Vector rhs (dof.n_dofs()), rhs_ref(dof.n_dofs()); MatrixTools:: - create_mass_matrix (mapping, dof, - quadrature, matrix_ref, - rhs_function, rhs_ref, - &rhs_function); + create_mass_matrix (mapping, dof, + quadrature, matrix_ref, + rhs_function, rhs_ref, + &rhs_function); constraints.condense(matrix_ref, rhs_ref); MatrixTools::create_mass_matrix (mapping, dof, quadrature, matrix, diff --git a/tests/deal.II/create_point_source.cc b/tests/deal.II/create_point_source.cc index 13a30f0154..b718ebe6aa 100644 --- a/tests/deal.II/create_point_source.cc +++ b/tests/deal.II/create_point_source.cc @@ -44,12 +44,12 @@ check () dof.distribute_dofs (fe); Point orientation; Point p (tria.begin_active ()->center ()); - + for (unsigned int i = 0; i < dim; ++i) orientation (i) = i; - + Vector vector (dof.n_dofs ()); - + VectorTools::create_point_source_vector (dof, p, orientation, vector); for (unsigned int i = 0; i < dof.n_dofs(); ++i) @@ -62,7 +62,7 @@ int main () { std::ofstream logfile ("create_point_source/output"); deallog << std::setprecision (2); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console (0); diff --git a/tests/deal.II/create_point_source_hp.cc b/tests/deal.II/create_point_source_hp.cc index c3d2953c41..56cdeb3007 100644 --- a/tests/deal.II/create_point_source_hp.cc +++ b/tests/deal.II/create_point_source_hp.cc @@ -41,7 +41,7 @@ check () Triangulation tria; GridGenerator::hyper_cube (tria); hp::FECollection fe_collection; - + for (unsigned int i = 1; i <= tria.n_active_cells (); ++i) fe_collection.push_back (FESystem (FE_Q (i), dim)); @@ -49,12 +49,12 @@ check () dof.distribute_dofs (fe_collection); Point orientation; Point p (tria.begin_active ()->center ()); - + for (unsigned int i = 0; i < dim; ++i) orientation (i) = i; - + Vector vector (dof.n_dofs ()); - + VectorTools::create_point_source_vector (dof, p, orientation, vector); for (unsigned int i = 0; i < dof.n_dofs(); ++i) @@ -67,7 +67,7 @@ int main () { std::ofstream logfile ("create_point_source_hp/output"); deallog << std::setprecision (2); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console (0); diff --git a/tests/deal.II/data_out.cc b/tests/deal.II/data_out.cc index ea5b98dc94..6cd61496c5 100644 --- a/tests/deal.II/data_out.cc +++ b/tests/deal.II/data_out.cc @@ -49,20 +49,20 @@ std::ofstream logfile("data_out/output"); template class LaplaceProblem { - public: - LaplaceProblem (); - void run (); +public: + LaplaceProblem (); + void run (); - private: - void make_grid_and_dofs (); - void solve (); - void output_results () const; +private: + void make_grid_and_dofs (); + void solve (); + void output_results () const; - Triangulation triangulation; - FE_Q fe; - DoFHandler dof_handler; + Triangulation triangulation; + FE_Q fe; + DoFHandler dof_handler; - Vector solution; + Vector solution; }; @@ -86,17 +86,17 @@ void LaplaceProblem::make_grid_and_dofs () deallog << " Number of active cells: " - << triangulation.n_active_cells() - << std::endl - << " Total number of cells: " - << triangulation.n_cells() - << std::endl; + << triangulation.n_active_cells() + << std::endl + << " Total number of cells: " + << triangulation.n_cells() + << std::endl; dof_handler.distribute_dofs (fe); deallog << " Number of degrees of freedom: " - << dof_handler.n_dofs() - << std::endl; + << dof_handler.n_dofs() + << std::endl; solution.reinit (dof_handler.n_dofs()); } @@ -107,8 +107,8 @@ void LaplaceProblem::make_grid_and_dofs () template void LaplaceProblem::solve () { - // dummy solve. just insert some - // arbitrary values + // dummy solve. just insert some + // arbitrary values for (unsigned int i=0; i::output_results () const { const unsigned int dim = 2; - // test regular output in 2d + // test regular output in 2d if (true) { DataOut data_out; @@ -136,7 +136,7 @@ void LaplaceProblem<2>::output_results () const data_out.write_eps (logfile); }; - // test DataOutRotation in 2d + // test DataOutRotation in 2d if (true) { DataOutRotation data_out; @@ -158,7 +158,7 @@ void LaplaceProblem<3>::output_results () const { const unsigned int dim = 3; - // test regular output in 3d + // test regular output in 3d if (true) { DataOut data_out; @@ -172,9 +172,9 @@ void LaplaceProblem<3>::output_results () const data_out.write_ucd (logfile); }; - // test DataOutFaces in 3d. note: - // not all output formats support - // this + // test DataOutFaces in 3d. note: + // not all output formats support + // this if (true) { DataOutFaces data_out; diff --git a/tests/deal.II/data_out_postprocessor_01.cc b/tests/deal.II/data_out_postprocessor_01.cc index 21f77a6ac1..27fb3e308a 100644 --- a/tests/deal.II/data_out_postprocessor_01.cc +++ b/tests/deal.II/data_out_postprocessor_01.cc @@ -47,28 +47,28 @@ std::ofstream logfile("data_out_postprocessor_01/output"); template class LaplaceProblem { - public: - LaplaceProblem (); - void run (); +public: + LaplaceProblem (); + void run (); - private: - void make_grid_and_dofs (); - void solve (); - void output_results () const; +private: + void make_grid_and_dofs (); + void solve (); + void output_results () const; - Triangulation triangulation; - FESystem fe; - DoFHandler dof_handler; + Triangulation triangulation; + FESystem fe; + DoFHandler dof_handler; - Vector solution; + Vector solution; }; template LaplaceProblem::LaplaceProblem () - : - fe (FE_Q(1),2), - dof_handler (triangulation) + : + fe (FE_Q(1),2), + dof_handler (triangulation) {} @@ -90,26 +90,26 @@ void LaplaceProblem::make_grid_and_dofs () template class SinesAndCosines : public Function { - public: - SinesAndCosines () - : - Function (2) - {} - - double value (const Point &p, - const unsigned int component) const +public: + SinesAndCosines () + : + Function (2) + {} + + double value (const Point &p, + const unsigned int component) const + { + switch (component) { - switch (component) - { - case 0: - return std::sin (p.norm()); - case 1: - return std::cos (p.norm()); - default: - Assert (false, ExcNotImplemented()); - return 0; - } + case 0: + return std::sin (p.norm()); + case 1: + return std::cos (p.norm()); + default: + Assert (false, ExcNotImplemented()); + return 0; } + } }; @@ -117,57 +117,57 @@ class SinesAndCosines : public Function template void LaplaceProblem::solve () { - // dummy solve. just insert some - // values as mentioned at the top - // of the file + // dummy solve. just insert some + // values as mentioned at the top + // of the file VectorTools::interpolate (dof_handler, - SinesAndCosines(), - solution); + SinesAndCosines(), + solution); } template class MyPostprocessor : public DataPostprocessor { - public: - virtual std::vector get_names () const +public: + virtual std::vector get_names () const + { + return std::vector(1,"magnitude"); + } + + virtual + std::vector + get_data_component_interpretation () const + { + return + std::vector + (1,DataComponentInterpretation::component_is_scalar); + } + + virtual UpdateFlags get_needed_update_flags () const + { + return update_values; + } + + virtual + void + compute_derived_quantities_vector (const std::vector > &uh, + const std::vector > > &, + const std::vector > > &, + const std::vector > &, + const std::vector > &, + std::vector > &computed_quantities) const + { + for (unsigned int q=0; q(1,"magnitude"); - } - - virtual - std::vector - get_data_component_interpretation () const - { - return - std::vector - (1,DataComponentInterpretation::component_is_scalar); - } + Assert (computed_quantities[q].size() == 1, + ExcInternalError()); - virtual UpdateFlags get_needed_update_flags () const - { - return update_values; - } - - virtual - void - compute_derived_quantities_vector (const std::vector > &uh, - const std::vector > > &, - const std::vector > > &, - const std::vector > &, - const std::vector > &, - std::vector > &computed_quantities) const - { - for (unsigned int q=0; q class LaplaceProblem { - public: - LaplaceProblem (); - void run (); +public: + LaplaceProblem (); + void run (); - private: - void make_grid_and_dofs (); - void solve (); - void output_results () const; +private: + void make_grid_and_dofs (); + void solve (); + void output_results () const; - Triangulation triangulation; - FESystem fe; - DoFHandler dof_handler; + Triangulation triangulation; + FESystem fe; + DoFHandler dof_handler; - Vector solution; + Vector solution; }; template LaplaceProblem::LaplaceProblem () - : - fe (FE_Q(1),2), - dof_handler (triangulation) + : + fe (FE_Q(1),2), + dof_handler (triangulation) {} @@ -93,26 +93,26 @@ void LaplaceProblem::make_grid_and_dofs () template class SinesAndCosines : public Function { - public: - SinesAndCosines () - : - Function (2) - {} - - double value (const Point &p, - const unsigned int component) const +public: + SinesAndCosines () + : + Function (2) + {} + + double value (const Point &p, + const unsigned int component) const + { + switch (component) { - switch (component) - { - case 0: - return std::sin (p.norm()); - case 1: - return std::cos (p.norm()); - default: - Assert (false, ExcNotImplemented()); - return 0; - } + case 0: + return std::sin (p.norm()); + case 1: + return std::cos (p.norm()); + default: + Assert (false, ExcNotImplemented()); + return 0; } + } }; @@ -120,43 +120,43 @@ class SinesAndCosines : public Function template void LaplaceProblem::solve () { - // dummy solve. just insert some - // values as mentioned at the top - // of the file + // dummy solve. just insert some + // values as mentioned at the top + // of the file VectorTools::interpolate (dof_handler, - SinesAndCosines(), - solution); + SinesAndCosines(), + solution); } template class MyPostprocessor : public DataPostprocessorScalar { - public: - MyPostprocessor () - : - DataPostprocessorScalar ("magnitude", update_values) - {} - - virtual - void - compute_derived_quantities_vector (const std::vector > &uh, - const std::vector > > &, - const std::vector > > &, - const std::vector > &, - const std::vector > &, - std::vector > &computed_quantities) const +public: + MyPostprocessor () + : + DataPostprocessorScalar ("magnitude", update_values) + {} + + virtual + void + compute_derived_quantities_vector (const std::vector > &uh, + const std::vector > > &, + const std::vector > > &, + const std::vector > &, + const std::vector > &, + std::vector > &computed_quantities) const + { + for (unsigned int q=0; q class LaplaceProblem { - public: - LaplaceProblem (); - void run (); +public: + LaplaceProblem (); + void run (); - private: - void make_grid_and_dofs (); - void solve (); - void output_results () const; +private: + void make_grid_and_dofs (); + void solve (); + void output_results () const; - Triangulation triangulation; - FESystem fe; - DoFHandler dof_handler; + Triangulation triangulation; + FESystem fe; + DoFHandler dof_handler; - Vector solution; + Vector solution; }; template LaplaceProblem::LaplaceProblem () - : - fe (FE_Q(1),2), - dof_handler (triangulation) + : + fe (FE_Q(1),2), + dof_handler (triangulation) {} @@ -93,26 +93,26 @@ void LaplaceProblem::make_grid_and_dofs () template class SinesAndCosines : public Function { - public: - SinesAndCosines () - : - Function (2) - {} - - double value (const Point &p, - const unsigned int component) const +public: + SinesAndCosines () + : + Function (2) + {} + + double value (const Point &p, + const unsigned int component) const + { + switch (component) { - switch (component) - { - case 0: - return std::sin (p.norm()); - case 1: - return std::cos (p.norm()); - default: - Assert (false, ExcNotImplemented()); - return 0; - } + case 0: + return std::sin (p.norm()); + case 1: + return std::cos (p.norm()); + default: + Assert (false, ExcNotImplemented()); + return 0; } + } }; @@ -120,44 +120,44 @@ class SinesAndCosines : public Function template void LaplaceProblem::solve () { - // dummy solve. just insert some - // values as mentioned at the top - // of the file + // dummy solve. just insert some + // values as mentioned at the top + // of the file VectorTools::interpolate (dof_handler, - SinesAndCosines(), - solution); + SinesAndCosines(), + solution); } template class MyPostprocessor : public DataPostprocessorVector { - public: - MyPostprocessor () - : - DataPostprocessorVector ("magnitude_times_d", update_values) - {} - - virtual - void - compute_derived_quantities_vector (const std::vector > &uh, - const std::vector > > &, - const std::vector > > &, - const std::vector > &, - const std::vector > &, - std::vector > &computed_quantities) const +public: + MyPostprocessor () + : + DataPostprocessorVector ("magnitude_times_d", update_values) + {} + + virtual + void + compute_derived_quantities_vector (const std::vector > &uh, + const std::vector > > &, + const std::vector > > &, + const std::vector > &, + const std::vector > &, + std::vector > &computed_quantities) const + { + for (unsigned int q=0; q cosine; - - Triangulation tr; + + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -53,7 +53,7 @@ check () tr.execute_coarsening_and_refinement (); if (dim==1) tr.refine_global(2); - + FE_Q element(3); DoFHandler dof(tr); dof.distribute_dofs(element); @@ -65,14 +65,14 @@ check () Vector second (tr.n_active_cells()); DerivativeApproximation:: - approximate_gradient (dof, v, gradient); + approximate_gradient (dof, v, gradient); DerivativeApproximation:: - approximate_second_derivative (dof, v, second); - + approximate_second_derivative (dof, v, second); + deallog << "Approximated gradient:" << std::endl; for (unsigned int i=0; i class MyFunction : public Function { - public: - MyFunction () : Function() {} - - virtual double value (const Point &p, - const unsigned int) const - { return sin(p[0]*a)*cos(p[1]*b); } +public: + MyFunction () : Function() {} + + virtual double value (const Point &p, + const unsigned int) const + { + return sin(p[0]*a)*cos(p[1]*b); + } }; template void exact_gradient(Point &p, Tensor<1,dim> &grad) { double x=p[0],y=p[1]; - + grad[0]=a*cos(a*x)*cos(b*y); grad[1]=-b*sin(a*x)*sin(b*y); } @@ -67,7 +69,7 @@ template void exact_second(Point &p, Tensor<2,dim> &sec) { double x=p[0],y=p[1]; - + sec[0][0]=-a*a*sin(a*x)*cos(b*y); // sec[0][1]=-a*b*cos(a*x)*sin(b*y); sec[1][0]=sec[0][1]=-a*b*cos(a*x)*sin(b*y); @@ -78,43 +80,65 @@ template void exact_third(Point &p, Tensor<3,dim> &third) { double x=p[0],y=p[1]; - // array of function and its derivatives + // array of function and its derivatives double dx[4]= - {sin(a*x), - a*cos(a*x), - -a*a*sin(a*x), - -a*a*a*cos(a*x)}; + { + sin(a*x), + a*cos(a*x), + -a *a*sin(a*x), + -a *a *a*cos(a*x) + }; double dy[4]= - {cos(b*y), - -b*sin(b*y), - -b*b*cos(b*y), - b*b*b*sin(b*y)}; + { + cos(b*y), + -b*sin(b*y), + -b *b*cos(b*y), + b *b *b*sin(b*y) + }; for (int i=0; i mapping; QMidpoint q_midpoint; FEValues fe_values(mapping, fe, q_midpoint, update_q_points); - + dof_handler.distribute_dofs (fe); solution.reinit(dof_handler.n_dofs()); VectorTools::interpolate (mapping, dof_handler, function, solution); 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) { - // get derivative approximations + // get derivative approximations Tensor<1,dim> grad, ex_grad; Tensor<2,dim> second, ex_second; Tensor<3,dim> third, ex_third; DerivativeApproximation::approximate_derivative_tensor - (mapping, - dof_handler, - solution, - cell, - grad, - 0); + (mapping, + dof_handler, + solution, + cell, + grad, + 0); double normgrad=DerivativeApproximation::derivative_norm(grad); - + DerivativeApproximation::approximate_derivative_tensor - (mapping, - dof_handler, - solution, - cell, - second, - 0); + (mapping, + dof_handler, + solution, + cell, + second, + 0); double normsecond=DerivativeApproximation::derivative_norm(second); - + DerivativeApproximation::approximate_derivative_tensor - (mapping, - dof_handler, - solution, - cell, - third, - 0); + (mapping, + dof_handler, + solution, + cell, + third, + 0); double normthird=DerivativeApproximation::derivative_norm(third); - // symmetry of second derivative + // symmetry of second derivative Assert(second==transpose(second), - ExcMessage("Second derivative is not symmetric")); + ExcMessage("Second derivative is not symmetric")); - // symmetry of third derivative note, - // that this is only part of the truth, - // we would have to test more here to be - // really sure, but this should be enough + // symmetry of third derivative note, + // that this is only part of the truth, + // we would have to test more here to be + // really sure, but this should be enough for (unsigned int i=0; i > q_point; q_point=fe_values.get_quadrature_points(); - + exact_gradient(q_point[0],ex_grad); exact_second (q_point[0],ex_second); exact_third (q_point[0],ex_third); - + double ex_normgrad =DerivativeApproximation::derivative_norm(ex_grad); double ex_normsecond=DerivativeApproximation::derivative_norm(ex_second); double ex_normthird =DerivativeApproximation::derivative_norm(ex_third); - - // output of all values for comparison + + // output of all values for comparison deallog<<"cell "< void check (const unsigned int level, - const Mapping& mapping, - const FiniteElement& element, - const Quadrature& quadrature) + const Mapping &mapping, + const FiniteElement &element, + const Quadrature &quadrature) { Triangulation tr; Functions::CosineFunction cosine; - + DoFHandler dof(tr); if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else GridGenerator::hyper_cube(tr, -1,1); - + tr.refine_global (level); - + dof.distribute_dofs(element); FEValues fe (mapping, element, quadrature, - update_values - | update_q_points | update_JxW_values); + update_values + | update_q_points | update_JxW_values); std::vector global_dofs (element.dofs_per_cell); std::vector function (quadrature.size()); @@ -75,52 +75,52 @@ check (const unsigned int level, Vector f (dof.n_dofs ()); SparsityPattern A_pattern (dof.n_dofs (), dof.n_dofs (), - dof.max_couplings_between_dofs()); + dof.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern(dof, A_pattern); A_pattern.compress (); - + SparseMatrix A(A_pattern); - + typename DoFHandler::active_cell_iterator cell = dof.begin_active(); const typename DoFHandler::cell_iterator end = dof.end(); - for (; cell != end;++cell) + for (; cell != end; ++cell) { fe.reinit(cell); cell->get_dof_indices (global_dofs); cosine.value_list (fe.get_quadrature_points(), function); - for (unsigned int k=0;k > mem; SolverCG > solver (control, mem); PreconditionIdentity prec; - + solver.solve (A, u, f, prec); FEValues fe2 (mapping, element, quadrature, - update_values | update_gradients - | update_second_derivatives - | update_q_points | update_JxW_values); + update_values | update_gradients + | update_second_derivatives + | update_q_points | update_JxW_values); double l2 = 0.; double h1 = 0.; @@ -131,41 +131,41 @@ check (const unsigned int level, std::vector > Df (quadrature.size()); std::vector > DDu (quadrature.size()); std::vector > DDf (quadrature.size()); - - for (cell = dof.begin_active(); cell != end;++cell) + + for (cell = dof.begin_active(); cell != end; ++cell) { fe2.reinit (cell); - + cosine.value_list (fe2.get_quadrature_points(), function); cosine.gradient_list (fe2.get_quadrature_points(), Df); cosine.hessian_list (fe2.get_quadrature_points(), DDf); fe2.get_function_values (u, u_local); fe2.get_function_grads (u, Du); fe2.get_function_2nd_derivatives (u,DDu); - - for (unsigned int k=0;k @@ -186,7 +186,7 @@ void loop () elements.push_back (new FE_Q (3)); elements.push_back (new FE_Q (4)); } - + elements.push_back (new FE_DGQ (1)); elements.push_back (new FE_DGQ (2)); if (dim<3) @@ -194,13 +194,13 @@ void loop () elements.push_back (new FE_DGQ (3)); elements.push_back (new FE_DGQ (4)); } - - for (unsigned int m=0;m::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); ++cell; typename DoFHandler::face_iterator - face = dof_handler.begin_active()->face(0); + face = dof_handler.begin_active()->face(0); face = cell->face(0); deallog << cell->face(0) << ' ' << face << std::endl; Assert (cell->face(0) == face, ExcInternalError()); diff --git a/tests/deal.II/dof_handler_number_cache.cc b/tests/deal.II/dof_handler_number_cache.cc index f3048a98c9..2179b16b55 100644 --- a/tests/deal.II/dof_handler_number_cache.cc +++ b/tests/deal.II/dof_handler_number_cache.cc @@ -44,7 +44,7 @@ void test() Triangulation triangulation (Triangulation::limit_level_difference_at_vertices); FESystem fe (FE_Q(3),2, - FE_DGQ(1),1); + FE_DGQ(1),1); DoFHandler dof_handler (triangulation); @@ -54,33 +54,33 @@ void test() const unsigned int n_refinements[] = { 0, 4, 3, 2 }; for (unsigned int i=0; i flags (triangulation.n_active_cells(), false); for (unsigned int k=0; k::active_cell_iterator - cell = triangulation.begin_active(); - cell != triangulation.end(); ++cell, ++index) - if (flags[index]) - cell->set_refine_flag(); + cell = triangulation.begin_active(); + cell != triangulation.end(); ++cell, ++index) + if (flags[index]) + cell->set_refine_flag(); Assert (index == triangulation.n_active_cells(), ExcInternalError()); - // flag all other cells for coarsening - // (this should ensure that at least - // some of them will actually be - // coarsened) + // flag all other cells for coarsening + // (this should ensure that at least + // some of them will actually be + // coarsened) index=0; for (typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - cell != triangulation.end(); ++cell, ++index) - if (!flags[index]) - cell->set_coarsen_flag(); + cell = triangulation.begin_active(); + cell != triangulation.end(); ++cell, ++index) + if (!flags[index]) + cell->set_coarsen_flag(); triangulation.execute_coarsening_and_refinement (); dof_handler.distribute_dofs (fe); @@ -92,15 +92,15 @@ void test() all.add_range (0, N); Assert (dof_handler.n_locally_owned_dofs() == N, - ExcInternalError()); + ExcInternalError()); Assert (dof_handler.locally_owned_dofs() == all, - ExcInternalError()); + ExcInternalError()); Assert (dof_handler.n_locally_owned_dofs_per_processor() == - std::vector (1,N), - ExcInternalError()); + std::vector (1,N), + ExcInternalError()); Assert (dof_handler.locally_owned_dofs_per_processor() == - std::vector(1,all), - ExcInternalError()); + std::vector(1,all), + ExcInternalError()); } } diff --git a/tests/deal.II/dof_handler_number_cache_02.cc b/tests/deal.II/dof_handler_number_cache_02.cc index 89a8dc0af4..3559fa7c05 100644 --- a/tests/deal.II/dof_handler_number_cache_02.cc +++ b/tests/deal.II/dof_handler_number_cache_02.cc @@ -42,7 +42,7 @@ void test() Triangulation triangulation (Triangulation::limit_level_difference_at_vertices); FESystem fe (FE_Q(3),2, - FE_DGQ(1),1); + FE_DGQ(1),1); DoFHandler dof_handler (triangulation); @@ -52,33 +52,33 @@ void test() const unsigned int n_refinements[] = { 0, 4, 3, 2 }; for (unsigned int i=0; i flags (triangulation.n_active_cells(), false); for (unsigned int k=0; k::active_cell_iterator - cell = triangulation.begin_active(); - cell != triangulation.end(); ++cell, ++index) - if (flags[index]) - cell->set_refine_flag(); + cell = triangulation.begin_active(); + cell != triangulation.end(); ++cell, ++index) + if (flags[index]) + cell->set_refine_flag(); Assert (index == triangulation.n_active_cells(), ExcInternalError()); - // flag all other cells for coarsening - // (this should ensure that at least - // some of them will actually be - // coarsened) + // flag all other cells for coarsening + // (this should ensure that at least + // some of them will actually be + // coarsened) index=0; for (typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - cell != triangulation.end(); ++cell, ++index) - if (!flags[index]) - cell->set_coarsen_flag(); + cell = triangulation.begin_active(); + cell != triangulation.end(); ++cell, ++index) + if (!flags[index]) + cell->set_coarsen_flag(); triangulation.execute_coarsening_and_refinement (); dof_handler.distribute_dofs (fe); @@ -90,22 +90,22 @@ void test() all.add_range (0, N); Assert (dof_handler.n_locally_owned_dofs() == N, - ExcInternalError()); + ExcInternalError()); Assert (dof_handler.locally_owned_dofs() == all, - ExcInternalError()); + ExcInternalError()); Assert (dof_handler.n_locally_owned_dofs_per_processor() == - std::vector (1,N), - ExcInternalError()); + std::vector (1,N), + ExcInternalError()); Assert (dof_handler.locally_owned_dofs_per_processor() == - std::vector(1,all), - ExcInternalError()); + std::vector(1,all), + ExcInternalError()); dof_handler.clear(); deallog << "those should be zero: " - << dof_handler.n_locally_owned_dofs() - << " " << dof_handler.n_locally_owned_dofs_per_processor().size() - << " " << dof_handler.n_dofs() - << std::endl; + << dof_handler.n_locally_owned_dofs() + << " " << dof_handler.n_locally_owned_dofs_per_processor().size() + << " " << dof_handler.n_dofs() + << std::endl; } } diff --git a/tests/deal.II/dof_renumbering.cc b/tests/deal.II/dof_renumbering.cc index e50e48c060..14b5907adc 100644 --- a/tests/deal.II/dof_renumbering.cc +++ b/tests/deal.II/dof_renumbering.cc @@ -51,7 +51,7 @@ print_dofs (const DoFHandler &dof) deallog << "Cell " << cell << " -- "; cell->get_dof_indices (v); for (unsigned int i=0; i &dof, unsigned int level) deallog << "Cell " << cell << " -- "; cell->get_mg_dof_indices (v); for (unsigned int i=0; i &dof, unsigned int level) template void -check_renumbering(MGDoFHandler& mgdof, bool discontinuous) +check_renumbering(MGDoFHandler &mgdof, bool discontinuous) { - const FiniteElement& element = mgdof.get_fe(); - DoFHandler& dof = mgdof; + const FiniteElement &element = mgdof.get_fe(); + DoFHandler &dof = mgdof; - // Prepare a reordering of - // components for later use + // Prepare a reordering of + // components for later use std::vector order(element.n_components()); for (unsigned int i=0; i direction; - for (unsigned int i=0;i(i)); - // Check global ordering + // Check global ordering print_dofs (dof); if (discontinuous) @@ -117,8 +117,8 @@ check_renumbering(MGDoFHandler& mgdof, bool discontinuous) DoFRenumbering::sort_selected_dofs_back (dof, selected_dofs); print_dofs (dof); - // Check level ordering - for (unsigned int level=0;level& mgdof, bool discontinuous) // print_dofs (mgdof, level); if (discontinuous) - { - DoFRenumbering::downstream(mgdof, level, direction); - } - - // renumber the non-MG part of the - // DoFHandler again. this is probably - // not what was meant in the first - // place, but is compatible with the - // behavior of the - // DoFRenumbering::component_wise set - // of functions before December 2005 + { + DoFRenumbering::downstream(mgdof, level, direction); + } + + // renumber the non-MG part of the + // DoFHandler again. this is probably + // not what was meant in the first + // place, but is compatible with the + // behavior of the + // DoFRenumbering::component_wise set + // of functions before December 2005 DoFRenumbering::component_wise (static_cast&>(mgdof), order); print_dofs (mgdof, level); diff --git a/tests/deal.II/dof_renumbering_02.cc b/tests/deal.II/dof_renumbering_02.cc index 867554a175..bf43c42837 100644 --- a/tests/deal.II/dof_renumbering_02.cc +++ b/tests/deal.II/dof_renumbering_02.cc @@ -43,7 +43,7 @@ template void print_dofs (const DoFHandler &dof) { - const FiniteElement& fe = dof.get_fe(); + const FiniteElement &fe = dof.get_fe(); std::vector v (fe.dofs_per_cell); std_cxx1x::shared_ptr > fevalues; @@ -58,14 +58,14 @@ print_dofs (const DoFHandler &dof) { Point p = cell->center(); if (fevalues.get() != 0) - fevalues->reinit(cell); + fevalues->reinit(cell); cell->get_dof_indices (v); for (unsigned int i=0; iquadrature_point(i) << '\t' << v[i] << std::endl; - else - deallog << p << '\t' << v[i] << std::endl; + if (fevalues.get() != 0) + deallog << fevalues->quadrature_point(i) << '\t' << v[i] << std::endl; + else + deallog << p << '\t' << v[i] << std::endl; deallog << std::endl; } } @@ -76,7 +76,7 @@ template void print_dofs (const MGDoFHandler &dof, unsigned int level) { - const FiniteElement& fe = dof.get_fe(); + const FiniteElement &fe = dof.get_fe(); std::vector v (fe.dofs_per_cell); std_cxx1x::shared_ptr > fevalues; @@ -91,14 +91,14 @@ print_dofs (const MGDoFHandler &dof, unsigned int level) { Point p = cell->center(); if (fevalues.get() != 0) - fevalues->reinit(cell); + fevalues->reinit(cell); cell->get_mg_dof_indices (v); for (unsigned int i=0; iquadrature_point(i) << '\t' << v[i] << std::endl; - else - deallog << p << '\t' << v[i] << std::endl; + if (fevalues.get() != 0) + deallog << fevalues->quadrature_point(i) << '\t' << v[i] << std::endl; + else + deallog << p << '\t' << v[i] << std::endl; deallog << std::endl; } } @@ -106,26 +106,26 @@ print_dofs (const MGDoFHandler &dof, unsigned int level) template void -check_renumbering(MGDoFHandler& mgdof) +check_renumbering(MGDoFHandler &mgdof) { - const FiniteElement& element = mgdof.get_fe(); - DoFHandler& dof = mgdof; + const FiniteElement &element = mgdof.get_fe(); + DoFHandler &dof = mgdof; deallog << element.get_name() << std::endl; - // Prepare a reordering of - // components for later use + // Prepare a reordering of + // components for later use std::vector order(element.n_components()); for (unsigned int i=0; i direction; - for (unsigned int i=0;i& mgdof) deallog << std::endl << "Downstream numbering dof-wise" << std::endl; DoFRenumbering::downstream(dof, direction, true); print_dofs (dof); - // Check level ordering - for (unsigned int level=0;level void print_dofs (const DoFHandler &dof) { - const FiniteElement& fe = dof.get_fe(); + const FiniteElement &fe = dof.get_fe(); std::vector v (fe.dofs_per_cell); std_cxx1x::shared_ptr > fevalues; @@ -58,14 +58,14 @@ print_dofs (const DoFHandler &dof) { Point p = cell->center(); if (fevalues.get() != 0) - fevalues->reinit(cell); + fevalues->reinit(cell); cell->get_dof_indices (v); for (unsigned int i=0; iquadrature_point(i) << '\t' << v[i] << std::endl; - else - deallog << p << '\t' << v[i] << std::endl; + if (fevalues.get() != 0) + deallog << fevalues->quadrature_point(i) << '\t' << v[i] << std::endl; + else + deallog << p << '\t' << v[i] << std::endl; deallog << std::endl; } } @@ -74,9 +74,9 @@ print_dofs (const DoFHandler &dof) template void -check_renumbering(DoFHandler& dof) +check_renumbering(DoFHandler &dof) { - const FiniteElement& element = dof.get_fe(); + const FiniteElement &element = dof.get_fe(); deallog << element.get_name() << std::endl; DoFRenumbering::Cuthill_McKee(dof); @@ -105,7 +105,7 @@ check () { FESystem fe(FE_DGQ(1),1, - FE_Q(2),dim); + FE_Q(2),dim); DoFHandler dof(tr); dof.distribute_dofs(fe); diff --git a/tests/deal.II/dof_renumbering_04.cc b/tests/deal.II/dof_renumbering_04.cc index bea23fc33a..aada85a6f1 100644 --- a/tests/deal.II/dof_renumbering_04.cc +++ b/tests/deal.II/dof_renumbering_04.cc @@ -43,7 +43,7 @@ template void print_dofs (const DoFHandler &dof) { - const FiniteElement& fe = dof.get_fe(); + const FiniteElement &fe = dof.get_fe(); std::vector v (fe.dofs_per_cell); std_cxx1x::shared_ptr > fevalues; @@ -58,14 +58,14 @@ print_dofs (const DoFHandler &dof) { Point p = cell->center(); if (fevalues.get() != 0) - fevalues->reinit(cell); + fevalues->reinit(cell); cell->get_dof_indices (v); for (unsigned int i=0; iquadrature_point(i) << '\t' << v[i] << std::endl; - else - deallog << p << '\t' << v[i] << std::endl; + if (fevalues.get() != 0) + deallog << fevalues->quadrature_point(i) << '\t' << v[i] << std::endl; + else + deallog << p << '\t' << v[i] << std::endl; deallog << std::endl; } } @@ -74,9 +74,9 @@ print_dofs (const DoFHandler &dof) template void -check_renumbering(DoFHandler& dof) +check_renumbering(DoFHandler &dof) { - const FiniteElement& element = dof.get_fe(); + const FiniteElement &element = dof.get_fe(); deallog << element.get_name() << std::endl; DoFRenumbering::boost::Cuthill_McKee(dof); @@ -105,7 +105,7 @@ check () { FESystem fe(FE_DGQ(1),1, - FE_Q(2),dim); + FE_Q(2),dim); DoFHandler dof(tr); dof.distribute_dofs(fe); diff --git a/tests/deal.II/dof_renumbering_04a.cc b/tests/deal.II/dof_renumbering_04a.cc index f29e32a488..fa01980a5f 100644 --- a/tests/deal.II/dof_renumbering_04a.cc +++ b/tests/deal.II/dof_renumbering_04a.cc @@ -52,7 +52,7 @@ print_dofs (const DoFHandler &dof) cell->get_dof_indices (v); deallog << "cell=" << cell << std::endl; for (unsigned int i=0; i fe(FE_Q(2),2); DoFHandler dof(tr); - + dof.distribute_dofs(fe); std::vector new_dofs (dof.n_dofs()); DoFRenumbering::boost::compute_Cuthill_McKee(new_dofs, dof); diff --git a/tests/deal.II/dof_renumbering_05.cc b/tests/deal.II/dof_renumbering_05.cc index 0dc0fb7a54..cf452e88e2 100644 --- a/tests/deal.II/dof_renumbering_05.cc +++ b/tests/deal.II/dof_renumbering_05.cc @@ -43,7 +43,7 @@ template void print_dofs (const DoFHandler &dof) { - const FiniteElement& fe = dof.get_fe(); + const FiniteElement &fe = dof.get_fe(); std::vector v (fe.dofs_per_cell); std_cxx1x::shared_ptr > fevalues; @@ -58,14 +58,14 @@ print_dofs (const DoFHandler &dof) { Point p = cell->center(); if (fevalues.get() != 0) - fevalues->reinit(cell); + fevalues->reinit(cell); cell->get_dof_indices (v); for (unsigned int i=0; iquadrature_point(i) << '\t' << v[i] << std::endl; - else - deallog << p << '\t' << v[i] << std::endl; + if (fevalues.get() != 0) + deallog << fevalues->quadrature_point(i) << '\t' << v[i] << std::endl; + else + deallog << p << '\t' << v[i] << std::endl; deallog << std::endl; } } @@ -74,9 +74,9 @@ print_dofs (const DoFHandler &dof) template void -check_renumbering(DoFHandler& dof) +check_renumbering(DoFHandler &dof) { - const FiniteElement& element = dof.get_fe(); + const FiniteElement &element = dof.get_fe(); deallog << element.get_name() << std::endl; DoFRenumbering::boost::king_ordering(dof); @@ -105,7 +105,7 @@ check () { FESystem fe(FE_DGQ(1),1, - FE_Q(2),dim); + FE_Q(2),dim); DoFHandler dof(tr); dof.distribute_dofs(fe); diff --git a/tests/deal.II/dof_renumbering_06.cc b/tests/deal.II/dof_renumbering_06.cc index c54c8188d8..8ef4708abe 100644 --- a/tests/deal.II/dof_renumbering_06.cc +++ b/tests/deal.II/dof_renumbering_06.cc @@ -43,7 +43,7 @@ template void print_dofs (const DoFHandler &dof) { - const FiniteElement& fe = dof.get_fe(); + const FiniteElement &fe = dof.get_fe(); std::vector v (fe.dofs_per_cell); std_cxx1x::shared_ptr > fevalues; @@ -58,14 +58,14 @@ print_dofs (const DoFHandler &dof) { Point p = cell->center(); if (fevalues.get() != 0) - fevalues->reinit(cell); + fevalues->reinit(cell); cell->get_dof_indices (v); for (unsigned int i=0; iquadrature_point(i) << '\t' << v[i] << std::endl; - else - deallog << p << '\t' << v[i] << std::endl; + if (fevalues.get() != 0) + deallog << fevalues->quadrature_point(i) << '\t' << v[i] << std::endl; + else + deallog << p << '\t' << v[i] << std::endl; deallog << std::endl; } } @@ -74,9 +74,9 @@ print_dofs (const DoFHandler &dof) template void -check_renumbering(DoFHandler& dof) +check_renumbering(DoFHandler &dof) { - const FiniteElement& element = dof.get_fe(); + const FiniteElement &element = dof.get_fe(); deallog << element.get_name() << std::endl; DoFRenumbering::boost::minimum_degree(dof); @@ -105,7 +105,7 @@ check () { FESystem fe(FE_DGQ(1),1, - FE_Q(2),dim); + FE_Q(2),dim); DoFHandler dof(tr); dof.distribute_dofs(fe); diff --git a/tests/deal.II/dof_renumbering_07.cc b/tests/deal.II/dof_renumbering_07.cc index 70498ea737..8640b03a7e 100644 --- a/tests/deal.II/dof_renumbering_07.cc +++ b/tests/deal.II/dof_renumbering_07.cc @@ -42,7 +42,7 @@ template void print_dofs (const DoFHandler &dof) { - const FiniteElement& fe = dof.get_fe(); + const FiniteElement &fe = dof.get_fe(); std::vector v (fe.dofs_per_cell); std_cxx1x::shared_ptr > fevalues; @@ -57,14 +57,14 @@ print_dofs (const DoFHandler &dof) { Point p = cell->center(); if (fevalues.get() != 0) - fevalues->reinit(cell); + fevalues->reinit(cell); cell->get_dof_indices (v); for (unsigned int i=0; iquadrature_point(i) << '\t' << v[i] << std::endl; - else - deallog << p << '\t' << v[i] << std::endl; + if (fevalues.get() != 0) + deallog << fevalues->quadrature_point(i) << '\t' << v[i] << std::endl; + else + deallog << p << '\t' << v[i] << std::endl; deallog << std::endl; } } @@ -73,13 +73,13 @@ print_dofs (const DoFHandler &dof) template void -check_renumbering(DoFHandler& dof) +check_renumbering(DoFHandler &dof) { - const FiniteElement& element = dof.get_fe(); + const FiniteElement &element = dof.get_fe(); deallog << element.get_name() << std::endl; DoFRenumbering::boost::Cuthill_McKee(dof); - for (unsigned int level=0;level fe(FE_DGQ(1),1, - FE_Q(2),dim); + FE_Q(2),dim); DoFHandler dof(tr); dof.distribute_dofs(fe); diff --git a/tests/deal.II/dof_renumbering_zorder_01.cc b/tests/deal.II/dof_renumbering_zorder_01.cc index bc450673e8..f91737a821 100644 --- a/tests/deal.II/dof_renumbering_zorder_01.cc +++ b/tests/deal.II/dof_renumbering_zorder_01.cc @@ -39,9 +39,9 @@ template void -print_dofs (const DoFHandler &dof, stream & out) +print_dofs (const DoFHandler &dof, stream &out) { - const FiniteElement& fe = dof.get_fe(); + const FiniteElement &fe = dof.get_fe(); std::vector v (fe.dofs_per_cell); std_cxx1x::shared_ptr > fevalues; @@ -56,14 +56,14 @@ print_dofs (const DoFHandler &dof, stream & out) { Point p = cell->center(); if (fevalues.get() != 0) - fevalues->reinit(cell); + fevalues->reinit(cell); cell->get_dof_indices (v); for (unsigned int i=0; iquadrature_point(i) << '\t' << v[i] << std::endl; - else - out << p << '\t' << v[i] << std::endl; + if (fevalues.get() != 0) + out << fevalues->quadrature_point(i) << '\t' << v[i] << std::endl; + else + out << p << '\t' << v[i] << std::endl; out << std::endl; } } @@ -93,7 +93,7 @@ check () print_dofs(dof, o2); if (o1.str()==o2.str()) - deallog << "OK" << std::endl; + deallog << "OK" << std::endl; } diff --git a/tests/deal.II/dof_renumbering_zorder_02.cc b/tests/deal.II/dof_renumbering_zorder_02.cc index e2477cd1cc..0209a06725 100644 --- a/tests/deal.II/dof_renumbering_zorder_02.cc +++ b/tests/deal.II/dof_renumbering_zorder_02.cc @@ -40,11 +40,11 @@ template void -print_dofs (const DoFHandler &dof, stream & out) +print_dofs (const DoFHandler &dof, stream &out) { out << std::setprecision (2); out << std::fixed; - const FiniteElement& fe = dof.get_fe(); + const FiniteElement &fe = dof.get_fe(); std::vector v (fe.dofs_per_cell); std_cxx1x::shared_ptr > fevalues; @@ -59,14 +59,14 @@ print_dofs (const DoFHandler &dof, stream & out) { Point p = cell->center(); if (fevalues.get() != 0) - fevalues->reinit(cell); + fevalues->reinit(cell); cell->get_dof_indices (v); for (unsigned int i=0; iquadrature_point(i) << '\t' << v[i] << std::endl; - else - out << p << '\t' << v[i] << std::endl; + if (fevalues.get() != 0) + out << fevalues->quadrature_point(i) << '\t' << v[i] << std::endl; + else + out << p << '\t' << v[i] << std::endl; } } @@ -99,9 +99,9 @@ check () deallog << o2.str(); if (o1.str()!=o2.str()) - deallog << "OK" << std::endl; + deallog << "OK" << std::endl; else - Assert(false, ExcInternalError()); + Assert(false, ExcInternalError()); DoFRenumbering::hierarchical(dof); print_dofs(dof, o3); @@ -109,9 +109,9 @@ check () // doing renumbering twice does not change the result?! if (o2.str()==o3.str()) - deallog << "OK" << std::endl; + deallog << "OK" << std::endl; else - Assert(false, ExcInternalError()); + Assert(false, ExcInternalError()); } diff --git a/tests/deal.II/dof_test.cc b/tests/deal.II/dof_test.cc index 388855afbd..c6769d4d0c 100644 --- a/tests/deal.II/dof_test.cc +++ b/tests/deal.II/dof_test.cc @@ -48,35 +48,35 @@ class Ball : public StraightBoundary { - public: - virtual Point - get_new_point_on_line (const typename Triangulation::line_iterator &line) const - { - Point middle = StraightBoundary::get_new_point_on_line(line); - - for (int i=0; i(dim)) / (std::sqrt(middle.square())*2); - for (int i=0; i - get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const - { - Point middle = StraightBoundary::get_new_point_on_quad(quad); - - for (int i=0; i(dim)) / (std::sqrt(middle.square())*2); - for (int i=0; i + get_new_point_on_line (const typename Triangulation::line_iterator &line) const + { + Point middle = StraightBoundary::get_new_point_on_line(line); + + for (int i=0; i(dim)) / (std::sqrt(middle.square())*2); + for (int i=0; i + get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const + { + Point middle = StraightBoundary::get_new_point_on_quad(quad); + + for (int i=0; i(dim)) / (std::sqrt(middle.square())*2); + for (int i=0; i { - public: - virtual Point - get_new_point_on_line (const typename Triangulation::line_iterator &line) const; +public: + virtual Point + get_new_point_on_line (const typename Triangulation::line_iterator &line) const; - virtual Point - get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const; + virtual Point + get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const; }; @@ -100,45 +100,44 @@ CurvedLine::get_new_point_on_line (const typename Triangulation::line_ { Point middle = StraightBoundary::get_new_point_on_line (line); - // if the line is at the top of bottom - // face: do a special treatment on - // this line. Note that if the - // z-value of the midpoint is either - // 0 or 1, then the z-values of all - // vertices of the line is like that + // if the line is at the top of bottom + // face: do a special treatment on + // this line. Note that if the + // z-value of the midpoint is either + // 0 or 1, then the z-values of all + // vertices of the line is like that if (dim>=3) if (((middle(2) == 0) || (middle(2) == 1)) - // find out, if the line is in the - // interior of the top or bottom face - // of the domain, or at the edge. - // lines at the edge need to undergo - // the usual treatment, while for - // interior lines taking the midpoint - // is sufficient - // - // note: the trick with the boundary - // id was invented after the above was - // written, so we are not very strict - // here with using these flags - && (line->boundary_indicator() == 1)) + // find out, if the line is in the + // interior of the top or bottom face + // of the domain, or at the edge. + // lines at the edge need to undergo + // the usual treatment, while for + // interior lines taking the midpoint + // is sufficient + // + // note: the trick with the boundary + // id was invented after the above was + // written, so we are not very strict + // here with using these flags + && (line->boundary_indicator() == 1)) return middle; double x=middle(0), - y=middle(1); - + y=middle(1); + if (y::get_new_point_on_quad (const typename Triangulation::quad_ { Point middle = StraightBoundary::get_new_point_on_quad (quad); - // if the face is at the top of bottom - // face: do not move the midpoint in - // x/y direction. Note that if the - // z-value of the midpoint is either - // 0 or 1, then the z-values of all - // vertices of the quad is like that + // if the face is at the top of bottom + // face: do not move the midpoint in + // x/y direction. Note that if the + // z-value of the midpoint is either + // 0 or 1, then the z-values of all + // vertices of the quad is like that if ((middle(2) == 0) || (middle(2) == 1)) return middle; - + double x=middle(0), - y=middle(1); - + y=middle(1); + if (y::get_new_point_on_quad (const typename Triangulation::quad_ template class TestCases { - public: - TestCases (); - virtual ~TestCases (); - - virtual void create_new (); - virtual void run (const unsigned int testcase); - - private: - Triangulation *tria; - DoFHandler *dof; - CurvedLine curved_line; - Ball ball; +public: + TestCases (); + virtual ~TestCases (); + + virtual void create_new (); + virtual void run (const unsigned int testcase); + +private: + Triangulation *tria; + DoFHandler *dof; + CurvedLine curved_line; + Ball ball; }; template TestCases::TestCases () : - tria(0), dof(0) {} + tria(0), dof(0) {} template -TestCases::~TestCases () +TestCases::~TestCases () { if (dof) delete dof; if (tria) delete tria; @@ -231,72 +229,72 @@ template void TestCases::run (const unsigned int test_case) { deallog << "Dimension = " << dim - << ", Test case = " << test_case << std::endl - << std::endl; - - deallog << " Making grid..." << std::endl; - - switch (test_case) + << ", Test case = " << test_case << std::endl + << std::endl; + + deallog << " Making grid..." << std::endl; + + switch (test_case) + { + case 1: + { + // refine first cell + tria->begin_active()->set_refine_flag(); + tria->execute_coarsening_and_refinement (); + // refine first active cell + // on coarsest level + tria->begin_active()->set_refine_flag (); + tria->execute_coarsening_and_refinement (); + + typename Triangulation::active_cell_iterator cell; + for (int i=0; i<(dim==2 ? 3 : 2); ++i) + { + // refine the presently + // second last cell 17 + // times + cell = tria->last_active(tria->n_levels()-1); + --cell; + cell->set_refine_flag (); + tria->execute_coarsening_and_refinement (); + }; + + break; + } + + case 2: + case 3: { - case 1: - { - // refine first cell - tria->begin_active()->set_refine_flag(); - tria->execute_coarsening_and_refinement (); - // refine first active cell - // on coarsest level - tria->begin_active()->set_refine_flag (); - tria->execute_coarsening_and_refinement (); - - typename Triangulation::active_cell_iterator cell; - for (int i=0; i<(dim==2 ? 3 : 2); ++i) - { - // refine the presently - // second last cell 17 - // times - cell = tria->last_active(tria->n_levels()-1); - --cell; - cell->set_refine_flag (); - tria->execute_coarsening_and_refinement (); - }; - - break; - } - - case 2: - case 3: - { - if (dim==3) - { - tria->begin_active()->face(4)->set_boundary_indicator(1); - tria->begin_active()->face(5)->set_boundary_indicator(1); - }; - - // set the boundary function - tria->set_boundary(1, (test_case==2) - ? ((Boundary&)ball) : ((Boundary&)curved_line)); - - // refine once - tria->begin_active()->set_refine_flag(); - tria->execute_coarsening_and_refinement (); - - typename Triangulation::active_cell_iterator cell, endc; - for (int i=0; i<4-dim; ++i) - { - cell = tria->begin_active(); - endc = tria->end(); - - // refine all - // boundary cells - for (; cell!=endc; ++cell) - if (cell->at_boundary()) - cell->set_refine_flag(); - - tria->execute_coarsening_and_refinement(); - }; - - break; - } + if (dim==3) + { + tria->begin_active()->face(4)->set_boundary_indicator(1); + tria->begin_active()->face(5)->set_boundary_indicator(1); + }; + + // set the boundary function + tria->set_boundary(1, (test_case==2) + ? ((Boundary &)ball) : ((Boundary &)curved_line)); + + // refine once + tria->begin_active()->set_refine_flag(); + tria->execute_coarsening_and_refinement (); + + typename Triangulation::active_cell_iterator cell, endc; + for (int i=0; i<4-dim; ++i) + { + cell = tria->begin_active(); + endc = tria->end(); + + // refine all + // boundary cells + for (; cell!=endc; ++cell) + if (cell->at_boundary()) + cell->set_refine_flag(); + + tria->execute_coarsening_and_refinement(); + }; + + break; + } }; @@ -306,9 +304,9 @@ void TestCases::run (const unsigned int test_case) deallog << " Renumbering degrees of freedom..." << std::endl; DoFRenumbering::Cuthill_McKee (*dof); - + SparsityPattern sparsity (dof->n_dofs(), - dof->max_couplings_between_dofs()); + dof->max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (*dof, sparsity); @@ -318,28 +316,28 @@ void TestCases::run (const unsigned int test_case) sparsity.print_gnuplot (logfile); - // computing constraints + // computing constraints deallog << " Computing constraints..." << std::endl; ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (*dof, constraints); constraints.close (); constraints.condense (sparsity); - + deallog << " Writing condensed sparsity pattern..." << std::endl; sparsity.print_gnuplot (logfile); deallog << std::endl - << " Total number of cells = " << tria->n_cells() << std::endl - << " Total number of active cells = " << tria->n_active_cells() << std::endl - << " Number of DoFs = " << dof->n_dofs() << std::endl - << " Number of constraints = " << constraints.n_constraints() << std::endl - << " Unconstrained matrix bandwidth= " << unconstrained_bandwidth << std::endl - << " Constrained matrix bandwidth = " << sparsity.bandwidth() - << std::endl << std::endl; - - // release the lock that dof has to the - // finite element object + << " Total number of cells = " << tria->n_cells() << std::endl + << " Total number of active cells = " << tria->n_active_cells() << std::endl + << " Number of DoFs = " << dof->n_dofs() << std::endl + << " Number of constraints = " << constraints.n_constraints() << std::endl + << " Unconstrained matrix bandwidth= " << unconstrained_bandwidth << std::endl + << " Constrained matrix bandwidth = " << sparsity.bandwidth() + << std::endl << std::endl; + + // release the lock that dof has to the + // finite element object dof->clear (); } @@ -364,7 +362,7 @@ int main () tests.create_new (); tests.run (test_case); }; - + return 0; } diff --git a/tests/deal.II/error_estimator.cc b/tests/deal.II/error_estimator.cc index 67b234a8d3..4d5db1474c 100644 --- a/tests/deal.II/error_estimator.cc +++ b/tests/deal.II/error_estimator.cc @@ -41,24 +41,28 @@ template class MySquareFunction : public Function { - public: - MySquareFunction () : Function(2) {} - - virtual double value (const Point &p, - const unsigned int component) const - { return (component+1)*p.square(); } - - virtual void vector_value (const Point &p, - Vector &values) const - { values(0) = value(p,0); - values(1) = value(p,1); } +public: + MySquareFunction () : Function(2) {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return (component+1)*p.square(); + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + values(0) = value(p,0); + values(1) = value(p,1); + } }; template Quadrature & -get_q_face (Function&) +get_q_face (Function &) { static QGauss q(4); return q; @@ -66,7 +70,7 @@ get_q_face (Function&) Quadrature<0> & -get_q_face (Function<1>&) +get_q_face (Function<1> &) { Quadrature<0> *q = 0; return *q; @@ -80,8 +84,8 @@ void check () { Functions::CosineFunction function; - - Triangulation tr; + + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -91,7 +95,7 @@ check () tr.execute_coarsening_and_refinement (); if (dim==1) tr.refine_global(2); - + FE_Q element(3); DoFHandler dof(tr); dof.distribute_dofs(element); @@ -101,14 +105,14 @@ check () std::map*> neumann_bc; neumann_bc[0] = &function; - + Vector v (dof.n_dofs()); VectorTools::interpolate (mapping, dof, function, v); Vector error (tr.n_active_cells()); KellyErrorEstimator::estimate (mapping, dof, q_face, neumann_bc, - v, error); + v, error); deallog << "Estimated error:" << std::endl; for (unsigned int i=0; i function; Triangulation tr; - + GridGenerator::hyper_cube(tr, -1,1); tr.refine_global (1); tr.begin_active()->set_refine_flag (); tr.execute_coarsening_and_refinement (); - - + + FE_Q element(3); DoFHandler dof(tr); dof.distribute_dofs(element); @@ -61,14 +61,14 @@ check () std::map*> neumann_bc; neumann_bc[0] = &function; - + Vector v (dof.n_dofs()); VectorTools::interpolate (mapping, dof, function, v); Vector error (tr.n_active_cells()); KellyErrorEstimator::estimate (mapping, dof, q_face, neumann_bc, - v, error); + v, error); deallog << "Estimated error:" << std::endl; for (unsigned int i=0; i (); deallog.pop (); diff --git a/tests/deal.II/extent_in_direction.cc b/tests/deal.II/extent_in_direction.cc index d6e3c39373..ac84d06d9d 100644 --- a/tests/deal.II/extent_in_direction.cc +++ b/tests/deal.II/extent_in_direction.cc @@ -29,63 +29,63 @@ void create_triangulation(const unsigned int case_no, - Triangulation<1> &tria) + Triangulation<1> &tria) { switch (case_no) { - case 0: - GridGenerator::hyper_cube(tria, 1., 3.); - break; - case 1: - GridGenerator::hyper_cube(tria, 1., 4.); - break; - default: - Assert(false, ExcNotImplemented()); + case 0: + GridGenerator::hyper_cube(tria, 1., 3.); + break; + case 1: + GridGenerator::hyper_cube(tria, 1., 4.); + break; + default: + Assert(false, ExcNotImplemented()); }; } void create_triangulation(const unsigned int case_no, - Triangulation<2> &tria) + Triangulation<2> &tria) { switch (case_no) { - case 0: - GridGenerator::hyper_cube(tria, 1., 3.); - break; - case 1: - { - GridGenerator::hyper_cube(tria, 1., 3.); - Point<2> &v0=tria.begin_active()->vertex(0); - v0(0) = 0.; - Point<2> &v2=tria.begin_active()->vertex(3); - v2(0) = 5.; - v2(1) = 4.; - break; - } - default: - Assert(false, ExcNotImplemented()); + case 0: + GridGenerator::hyper_cube(tria, 1., 3.); + break; + case 1: + { + GridGenerator::hyper_cube(tria, 1., 3.); + Point<2> &v0=tria.begin_active()->vertex(0); + v0(0) = 0.; + Point<2> &v2=tria.begin_active()->vertex(3); + v2(0) = 5.; + v2(1) = 4.; + break; + } + default: + Assert(false, ExcNotImplemented()); }; } void create_triangulation(const unsigned int case_no, - Triangulation<3> &tria) + Triangulation<3> &tria) { switch (case_no) { - case 0: - GridGenerator::hyper_cube(tria, 1., 3.); - break; - case 1: - { - GridGenerator::hyper_cube(tria, 1., 3.); - Point<3> &v0=tria.begin_active()->vertex(0); - v0(0) = 0.; - break; - } - default: - Assert(false, ExcNotImplemented()); + case 0: + GridGenerator::hyper_cube(tria, 1., 3.); + break; + case 1: + { + GridGenerator::hyper_cube(tria, 1., 3.); + Point<3> &v0=tria.begin_active()->vertex(0); + v0(0) = 0.; + break; + } + default: + Assert(false, ExcNotImplemented()); }; } @@ -99,7 +99,7 @@ void test() create_triangulation(case_no, tria); deallog << "dim " << dim << ", case " << case_no << ": "; for (unsigned int i=0; iextent_in_direction(i) << ' '; + deallog << tria.begin_active()->extent_in_direction(i) << ' '; deallog << std::endl; tria.clear(); } diff --git a/tests/deal.II/extract_dofs_by_component_01.cc b/tests/deal.II/extract_dofs_by_component_01.cc index 810a9e744a..08232d9678 100644 --- a/tests/deal.II/extract_dofs_by_component_01.cc +++ b/tests/deal.II/extract_dofs_by_component_01.cc @@ -51,28 +51,28 @@ check () tr.refine_global (1); FESystem element (FE_Q(1), 1, - FE_RaviartThomas(0), 1, - FE_Q(1), 1, - FE_Nedelec(0), 1); + FE_RaviartThomas(0), 1, + FE_Q(1), 1, + FE_Nedelec(0), 1); DoFHandler dof(tr); dof.distribute_dofs(element); - // try all possible component - // masks, which we encode as bit - // strings + // try all possible component + // masks, which we encode as bit + // strings for (unsigned int int_mask=0; int_mask<(1U< component_mask (element.n_components()); - for (unsigned int c=0; c dofs (dof.n_dofs()); - DoFTools::extract_dofs (dof, ComponentMask(component_mask), dofs); - - for (unsigned int d=0; d component_mask (element.n_components()); + for (unsigned int c=0; c dofs (dof.n_dofs()); + DoFTools::extract_dofs (dof, ComponentMask(component_mask), dofs); + + for (unsigned int d=0; d element; for (unsigned int i=0; i<2; ++i) element.push_back (FESystem (FE_Q(1+i), 1, - FE_Nedelec(0), 1)); + FE_Nedelec(0), 1)); hp::DoFHandler dof(tr); dof.begin_active()->set_active_fe_index(1); dof.distribute_dofs(element); - // try all possible component - // masks, which we encode as bit - // strings + // try all possible component + // masks, which we encode as bit + // strings for (unsigned int int_mask=0; int_mask<(1U< component_mask (element.n_components()); - for (unsigned int c=0; c dofs (dof.n_dofs()); - DoFTools::extract_dofs (dof, ComponentMask(component_mask), dofs); - - for (unsigned int d=0; d component_mask (element.n_components()); + for (unsigned int c=0; c dofs (dof.n_dofs()); + DoFTools::extract_dofs (dof, ComponentMask(component_mask), dofs); + + for (unsigned int d=0; d element (FE_Q(2), 1, - FE_Nedelec(0), 1); + FE_Nedelec(0), 1); DoFHandler dof(tr); dof.distribute_dofs(element); dof.distribute_mg_dofs(element); - // try all possible component - // masks, which we encode as bit - // strings + // try all possible component + // masks, which we encode as bit + // strings for (unsigned int int_mask=0; int_mask<(1U< component_mask (element.n_components()); - for (unsigned int c=0; c component_mask (element.n_components()); + for (unsigned int c=0; c > constant_modes; + DoFTools::extract_constant_modes (dof, component_mask, constant_modes); + + for (unsigned int d=0; d element (FE_Q(1), 1, - FE_RaviartThomas(0), 1, - FE_Q(1), 1, - FE_Nedelec(0), 1); + FE_RaviartThomas(0), 1, + FE_Q(1), 1, + FE_Nedelec(0), 1); DoFHandler dof(tr); dof.distribute_dofs(element); diff --git a/tests/deal.II/extract_dofs_by_component_05_hp.cc b/tests/deal.II/extract_dofs_by_component_05_hp.cc index a4c2e72d01..c25e3ab14d 100644 --- a/tests/deal.II/extract_dofs_by_component_05_hp.cc +++ b/tests/deal.II/extract_dofs_by_component_05_hp.cc @@ -50,13 +50,13 @@ check () GridGenerator::hyper_cube(tr, -1,1); tr.refine_global (1); - // create an FECollection and set - // one cell to use the second - // element of this collection + // create an FECollection and set + // one cell to use the second + // element of this collection hp::FECollection element; for (unsigned int i=0; i<2; ++i) element.push_back (FESystem (FE_Q(1+i), 1, - FE_Nedelec(0), 1)); + FE_Nedelec(0), 1)); hp::DoFHandler dof(tr); dof.begin_active()->set_active_fe_index(1); dof.distribute_dofs(element); diff --git a/tests/deal.II/extract_dofs_by_component_06.cc b/tests/deal.II/extract_dofs_by_component_06.cc index cd7d9a5731..38d6df17a8 100644 --- a/tests/deal.II/extract_dofs_by_component_06.cc +++ b/tests/deal.II/extract_dofs_by_component_06.cc @@ -51,9 +51,9 @@ check () tr.refine_global (1); FESystem element (FE_Q(1), 1, - FE_RaviartThomas(0), 1, - FE_Q(1), 1, - FE_Nedelec(0), 1); + FE_RaviartThomas(0), 1, + FE_Q(1), 1, + FE_Nedelec(0), 1); DoFHandler dof(tr); dof.distribute_dofs(element); diff --git a/tests/deal.II/extract_dofs_by_component_06_hp.cc b/tests/deal.II/extract_dofs_by_component_06_hp.cc index 5dc27e938e..4dac12fddc 100644 --- a/tests/deal.II/extract_dofs_by_component_06_hp.cc +++ b/tests/deal.II/extract_dofs_by_component_06_hp.cc @@ -50,13 +50,13 @@ check () GridGenerator::hyper_cube(tr, -1,1); tr.refine_global (1); - // create an FECollection and set - // one cell to use the second - // element of this collection + // create an FECollection and set + // one cell to use the second + // element of this collection hp::FECollection element; for (unsigned int i=0; i<2; ++i) element.push_back (FESystem (FE_Q(1+i), 1, - FE_Nedelec(0), 1)); + FE_Nedelec(0), 1)); hp::DoFHandler dof(tr); dof.begin_active()->set_active_fe_index(1); dof.distribute_dofs(element); diff --git a/tests/deal.II/face_orientations_3d.cc b/tests/deal.II/face_orientations_3d.cc index 2b093c40d0..88a290d13d 100644 --- a/tests/deal.II/face_orientations_3d.cc +++ b/tests/deal.II/face_orientations_3d.cc @@ -41,7 +41,7 @@ std::ofstream logfile("face_orientations_3d/output"); void test (const char *filename) { deallog << "Reading " << filename << std::endl; - + Triangulation<3> tria; GridIn<3> gi; gi.attach_triangulation (tria); @@ -59,13 +59,13 @@ void test (const char *filename) { ++misoriented_faces; - // check that the face is - // correctly oriented from - // the other side at - // least. note that if this - // face is misoriented, - // then there must be a - // neighbor over there + // check that the face is + // correctly oriented from + // the other side at + // least. note that if this + // face is misoriented, + // then there must be a + // neighbor over there Assert (cell->neighbor(f) ->face_orientation(cell->neighbor_of_neighbor(f)) == true, diff --git a/tests/deal.II/fe_field.cc b/tests/deal.II/fe_field.cc index a4d55b6f11..c8dea5c452 100644 --- a/tests/deal.II/fe_field.cc +++ b/tests/deal.II/fe_field.cc @@ -41,41 +41,41 @@ void check () { Triangulation triangulation; - + GridGenerator::subdivided_hyper_cube (triangulation, 2); hp::FECollection fe_collection; - + for (unsigned int i = 1; i <= triangulation.n_active_cells (); ++i) fe_collection.push_back (FE_Q (i)); - + hp::DoFHandler dof_handler (triangulation); - + dof_handler.distribute_dofs (fe_collection); - + Vector vector (dof_handler.n_dofs ()); - + for (unsigned int i = 0; i < dof_handler.n_dofs (); ++i) vector (i) = i; - + Functions::FEFieldFunction > - fe_field (dof_handler, vector); + fe_field (dof_handler, vector); QGauss quadrature (5); - + deallog << "values:" < values (quadrature.size ()); - + fe_field.value_list (quadrature.get_points (), values); - + for (unsigned int q_point = 0; q_point < quadrature.size (); ++q_point) deallog << values[q_point] << std::endl; - + deallog << "gradients:" < > gradients (quadrature.size ()); - + fe_field.gradient_list (quadrature.get_points (), gradients); - + for (unsigned int q_point = 0; q_point < quadrature.size (); ++q_point) deallog << gradients[q_point] << std::endl; } @@ -83,9 +83,9 @@ check () int main () { - initlog(__FILE__); + initlog(__FILE__); deallog << std::setprecision (2); - deallog << std::fixed; + deallog << std::fixed; deallog.push ("1d"); check<1> (); diff --git a/tests/deal.II/fe_values_view_01.cc b/tests/deal.II/fe_values_view_01.cc index e010a0831e..508eb69c83 100644 --- a/tests/deal.II/fe_values_view_01.cc +++ b/tests/deal.II/fe_values_view_01.cc @@ -38,52 +38,52 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { DoFHandler dof(tr); dof.distribute_dofs(fe); deallog << "FE=" << fe.get_name() - << std::endl; + << std::endl; const QGauss quadrature(2); FEValues fe_values (fe, quadrature, - update_values | update_gradients | update_hessians); + update_values | update_gradients | update_hessians); fe_values.reinit (dof.begin_active()); - + for (unsigned int c=0; c fe (FE_Q(1), 1, - FE_Q(2), 2, - FE_DGQ(3), dim); + FE_Q(2), 2, + FE_DGQ(3), dim); test(tr, fe); } diff --git a/tests/deal.II/fe_values_view_02.cc b/tests/deal.II/fe_values_view_02.cc index a00c5dab71..bb552f0946 100644 --- a/tests/deal.II/fe_values_view_02.cc +++ b/tests/deal.II/fe_values_view_02.cc @@ -38,77 +38,77 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { DoFHandler dof(tr); dof.distribute_dofs(fe); deallog << "FE=" << fe.get_name() - << std::endl; + << std::endl; const QGauss quadrature(2); FEValues fe_values (fe, quadrature, - update_values | update_gradients | update_hessians); + update_values | update_gradients | update_hessians); fe_values.reinit (dof.begin_active()); - + for (unsigned int c=0; c fe (FE_Q(1), 1, - FE_Q(2), 2, - FE_DGQ(3), dim); + FE_Q(2), 2, + FE_DGQ(3), dim); test(tr, fe); } diff --git a/tests/deal.II/fe_values_view_03.cc b/tests/deal.II/fe_values_view_03.cc index b528567d74..9bddf6a531 100644 --- a/tests/deal.II/fe_values_view_03.cc +++ b/tests/deal.II/fe_values_view_03.cc @@ -40,56 +40,56 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { DoFHandler dof(tr); dof.distribute_dofs(fe); deallog << "FE=" << fe.get_name() - << std::endl; + << std::endl; const QGauss quadrature(2); FEValues fe_values (fe, quadrature, - update_values | update_gradients | update_hessians); + update_values | update_gradients | update_hessians); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); cell != dof.end(); ++cell) + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); - + for (unsigned int c=0; c fe (FE_Q(1), 1, - FE_RaviartThomas(1), 1, - FE_Nedelec(0), 1); + FE_RaviartThomas(1), 1, + FE_Nedelec(0), 1); test(tr, fe); } diff --git a/tests/deal.II/fe_values_view_04.cc b/tests/deal.II/fe_values_view_04.cc index 4e9ee52b8f..929a4ec56c 100644 --- a/tests/deal.II/fe_values_view_04.cc +++ b/tests/deal.II/fe_values_view_04.cc @@ -40,76 +40,76 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { DoFHandler dof(tr); dof.distribute_dofs(fe); deallog << "FE=" << fe.get_name() - << std::endl; + << std::endl; const QGauss quadrature(2); FEValues fe_values (fe, quadrature, - update_values | update_gradients | update_hessians); + update_values | update_gradients | update_hessians); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); cell != dof.end(); ++cell) + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int c=0; c fe (FE_Q(1), 1, - FE_RaviartThomas(1), 1, - FE_Nedelec(0), 1); + FE_RaviartThomas(1), 1, + FE_Nedelec(0), 1); test(tr, fe); } diff --git a/tests/deal.II/fe_values_view_05.cc b/tests/deal.II/fe_values_view_05.cc index b6be16b576..54e06df4a2 100644 --- a/tests/deal.II/fe_values_view_05.cc +++ b/tests/deal.II/fe_values_view_05.cc @@ -38,11 +38,11 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { deallog << "FE=" << fe.get_name() - << std::endl; + << std::endl; DoFHandler dof(tr); dof.distribute_dofs(fe); @@ -50,32 +50,32 @@ void test (const Triangulation& tr, Vector fe_function(dof.n_dofs()); for (unsigned int i=0; i quadrature(2); FEValues fe_values (fe, quadrature, - update_values | update_gradients | update_hessians); + update_values | update_gradients | update_hessians); fe_values.reinit (dof.begin_active()); std::vector scalar_values (quadrature.size()); std::vector > vector_values (quadrature.size(), - Vector(fe.n_components())); + Vector(fe.n_components())); fe_values.get_function_values (fe_function, vector_values); - + for (unsigned int c=0; c fe (FE_Q(1), 1, - FE_RaviartThomas(1), 1, - FE_Nedelec(0), 1); + FE_RaviartThomas(1), 1, + FE_Nedelec(0), 1); test(tr, fe); } diff --git a/tests/deal.II/fe_values_view_10.cc b/tests/deal.II/fe_values_view_10.cc index ff3a8a06d6..a39b14aa20 100644 --- a/tests/deal.II/fe_values_view_10.cc +++ b/tests/deal.II/fe_values_view_10.cc @@ -40,11 +40,11 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { deallog << "FE=" << fe.get_name() - << std::endl; + << std::endl; DoFHandler dof(tr); dof.distribute_dofs(fe); @@ -55,13 +55,13 @@ void test (const Triangulation& tr, const QGauss quadrature(2); FEValues fe_values (fe, quadrature, - update_values | update_gradients | update_hessians); + update_values | update_gradients | update_hessians); fe_values.reinit (dof.begin_active()); std::vector > scalar_values (quadrature.size()); std::vector > > - vector_values (quadrature.size(), - std::vector >(fe.n_components())); + vector_values (quadrature.size(), + std::vector >(fe.n_components())); fe_values.get_function_hessians (fe_function, vector_values); @@ -69,19 +69,19 @@ void test (const Triangulation& tr, { FEValuesExtractors::Scalar single_component (c); fe_values[single_component].get_function_hessians (fe_function, - scalar_values); + scalar_values); deallog << "component=" << c << std::endl; for (unsigned int q=0; q fe (FE_Q(1), 1, - FE_RaviartThomas(1), 1, - FE_Nedelec(0), 1); + FE_RaviartThomas(1), 1, + FE_Nedelec(0), 1); test(tr, fe); } diff --git a/tests/deal.II/fe_values_view_10_single_01.cc b/tests/deal.II/fe_values_view_10_single_01.cc index 5eebe55ddb..199476af3f 100644 --- a/tests/deal.II/fe_values_view_10_single_01.cc +++ b/tests/deal.II/fe_values_view_10_single_01.cc @@ -43,11 +43,11 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { deallog << "FE=" << fe.get_name() - << std::endl; + << std::endl; DoFHandler dof(tr); dof.distribute_dofs(fe); @@ -58,13 +58,13 @@ void test (const Triangulation& tr, const QGauss quadrature(2); FEValues fe_values (fe, quadrature, - update_values | update_gradients | update_hessians); + update_values | update_gradients | update_hessians); fe_values.reinit (dof.begin_active()); std::vector > scalar_values (quadrature.size()); std::vector > > - vector_values (quadrature.size(), - std::vector >(fe.n_components())); + vector_values (quadrature.size(), + std::vector >(fe.n_components())); fe_values.get_function_hessians (fe_function, vector_values); @@ -72,20 +72,20 @@ void test (const Triangulation& tr, { FEValuesExtractors::Scalar single_component (c); fe_values[single_component].get_function_hessians (fe_function, - scalar_values); + scalar_values); deallog << "component=" << c << std::endl; for (unsigned int q=0; q -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { deallog << "FE=" << fe.get_name() - << std::endl; + << std::endl; DoFHandler dof(tr); dof.distribute_dofs(fe); @@ -58,13 +58,13 @@ void test (const Triangulation& tr, const QGauss quadrature(2); FEValues fe_values (fe, quadrature, - update_values | update_gradients | update_hessians); + update_values | update_gradients | update_hessians); fe_values.reinit (dof.begin_active()); std::vector > scalar_values (quadrature.size()); std::vector > > - vector_values (quadrature.size(), - std::vector >(fe.n_components())); + vector_values (quadrature.size(), + std::vector >(fe.n_components())); fe_values.get_function_hessians (fe_function, vector_values); @@ -72,20 +72,20 @@ void test (const Triangulation& tr, { FEValuesExtractors::Scalar single_component (c); fe_values[single_component].get_function_hessians (fe_function, - scalar_values); + scalar_values); deallog << "component=" << c << std::endl; for (unsigned int q=0; q -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { deallog << "FE=" << fe.get_name() - << std::endl; + << std::endl; DoFHandler dof(tr); dof.distribute_dofs(fe); @@ -58,13 +58,13 @@ void test (const Triangulation& tr, const QGauss quadrature(2); FEValues fe_values (fe, quadrature, - update_values | update_gradients | update_hessians); + update_values | update_gradients | update_hessians); fe_values.reinit (dof.begin_active()); std::vector > scalar_values (quadrature.size()); std::vector > > - vector_values (quadrature.size(), - std::vector >(fe.n_components())); + vector_values (quadrature.size(), + std::vector >(fe.n_components())); fe_values.get_function_hessians (fe_function, vector_values); @@ -72,20 +72,20 @@ void test (const Triangulation& tr, { FEValuesExtractors::Scalar single_component (c); fe_values[single_component].get_function_hessians (fe_function, - scalar_values); + scalar_values); deallog << "component=" << c << std::endl; for (unsigned int q=0; q -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { deallog << "FE=" << fe.get_name() - << std::endl; + << std::endl; DoFHandler dof(tr); dof.distribute_dofs(fe); @@ -57,33 +57,33 @@ void test (const Triangulation& tr, Vector fe_function(dof.n_dofs()); for (unsigned int i=0; i quadrature(2); FEValues fe_values (fe, quadrature, - update_values | update_gradients | update_hessians); + update_values | update_gradients | update_hessians); fe_values.reinit (dof.begin_active()); std::vector scalar_values (quadrature.size()); std::vector > - vector_values (quadrature.size(), - Vector(fe.n_components())); + vector_values (quadrature.size(), + Vector(fe.n_components())); fe_values.get_function_values (fe_function, vector_values); - + for (unsigned int c=0; c fe (FE_Q(1), 1, - FE_RaviartThomas(1), 1, - FE_Nedelec(0), 1); + FE_RaviartThomas(1), 1, + FE_Nedelec(0), 1); test(tr, fe); } diff --git a/tests/deal.II/fe_values_view_16.cc b/tests/deal.II/fe_values_view_16.cc index de5625f8ac..a6334795e5 100644 --- a/tests/deal.II/fe_values_view_16.cc +++ b/tests/deal.II/fe_values_view_16.cc @@ -40,11 +40,11 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { deallog << "FE=" << fe.get_name() - << std::endl; + << std::endl; DoFHandler dof(tr); dof.distribute_dofs(fe); @@ -55,39 +55,39 @@ void test (const Triangulation& tr, const QGauss quadrature(2); FEValues fe_values (fe, quadrature, - update_values | update_gradients | update_hessians); + update_values | update_gradients | update_hessians); fe_values.reinit (dof.begin_active()); std::vector > selected_vector_values (quadrature.size()); std::vector > > - vector_values (quadrature.size(), - std::vector >(fe.n_components())); + vector_values (quadrature.size(), + std::vector >(fe.n_components())); fe_values.get_function_hessians (fe_function, vector_values); for (unsigned int c=0; c fe (FE_Q(1), 1, - FE_RaviartThomas(1), 1, - FE_Nedelec(0), 1); + FE_RaviartThomas(1), 1, + FE_Nedelec(0), 1); test(tr, fe); } diff --git a/tests/deal.II/fe_values_view_17.cc b/tests/deal.II/fe_values_view_17.cc index cb2d5f4d2d..660a502147 100644 --- a/tests/deal.II/fe_values_view_17.cc +++ b/tests/deal.II/fe_values_view_17.cc @@ -38,11 +38,11 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { deallog << "FE=" << fe.get_name() - << std::endl; + << std::endl; DoFHandler dof(tr); dof.distribute_dofs(fe); @@ -50,43 +50,43 @@ void test (const Triangulation& tr, Vector fe_function(dof.n_dofs()); for (unsigned int i=0; i quadrature(2); FEValues fe_values (fe, quadrature, - update_values | update_gradients | update_hessians); + update_values | update_gradients | update_hessians); fe_values.reinit (dof.begin_active()); std::vector > selected_vector_values (quadrature.size()); std::vector > > - vector_values (quadrature.size(), - std::vector >(fe.n_components())); + vector_values (quadrature.size(), + std::vector >(fe.n_components())); fe_values.get_function_gradients (fe_function, vector_values); - + for (unsigned int c=0; c grad; - for (unsigned int d=0; d grad; + for (unsigned int d=0; d fe (FE_Q(1), 1, - FE_RaviartThomas(1), 1, - FE_Nedelec(0), 1); + FE_RaviartThomas(1), 1, + FE_Nedelec(0), 1); test(tr, fe); } diff --git a/tests/deal.II/fe_values_view_19.cc b/tests/deal.II/fe_values_view_19.cc index 2205a9bad2..fcd60889c2 100644 --- a/tests/deal.II/fe_values_view_19.cc +++ b/tests/deal.II/fe_values_view_19.cc @@ -38,11 +38,11 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { deallog << "FE=" << fe.get_name() - << std::endl; + << std::endl; DoFHandler dof(tr); dof.distribute_dofs(fe); @@ -50,43 +50,43 @@ void test (const Triangulation& tr, Vector fe_function(dof.n_dofs()); for (unsigned int i=0; i quadrature(2); FEValues fe_values (fe, quadrature, - update_values | update_gradients | update_hessians); + update_values | update_gradients | update_hessians); fe_values.reinit (dof.begin_active()); std::vector selected_vector_values (quadrature.size()); std::vector > > - vector_values (quadrature.size(), - std::vector >(fe.n_components())); + vector_values (quadrature.size(), + std::vector >(fe.n_components())); fe_values.get_function_gradients (fe_function, vector_values); - + for (unsigned int c=0; c 0 gamma -> 1 + // stress -> 0 gamma -> 1 std::vector block_component(n_stress_components + n_gamma_components, 1); for (unsigned int ii = 0; ii < n_stress_components; ii++) block_component[ii] = 0; DoFRenumbering::component_wise(dof_handler); - // total number of dof per block component + // total number of dof per block component std::vector dofs_per_block(2); DoFTools::count_dofs_per_block(dof_handler, dofs_per_block, block_component); @@ -115,20 +115,20 @@ void MixedElastoPlasticity::make_grid_and_dofs() const unsigned int n_gamma_dof = dofs_per_block[1]; deallog << "Number of active cells: " - << triangulation.n_active_cells() - << std::endl - << "Total number of cells: " - << triangulation.n_cells() - << std::endl - << "Number of degrees of freedom: " - << dof_handler.n_dofs() - << " = (" << n_stress_dof << " + " - << n_gamma_dof << ")" - << std::endl; - - // following step-22 use of simple - // compressed block sparsity - // pattern for efficiency + << triangulation.n_active_cells() + << std::endl + << "Total number of cells: " + << triangulation.n_cells() + << std::endl + << "Number of degrees of freedom: " + << dof_handler.n_dofs() + << " = (" << n_stress_dof << " + " + << n_gamma_dof << ")" + << std::endl; + + // following step-22 use of simple + // compressed block sparsity + // pattern for efficiency { BlockCompressedSimpleSparsityPattern csp(2, 2); @@ -164,12 +164,12 @@ void MixedElastoPlasticity::assemble_system() QGauss quadrature_formula(1); FEValues 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; deallog << "dofs_per_cell: " << fe.dofs_per_cell << std::endl; - + FullMatrix local_matrix(dofs_per_cell, dofs_per_cell); Vector local_rhs(dofs_per_cell); @@ -180,8 +180,8 @@ void MixedElastoPlasticity::assemble_system() const FEValuesExtractors::Scalar gamma(n_stress_components); deallog << "fe.dofs_per_cell: " << fe.dofs_per_cell - << "\tquadrature_formula.size(): " << quadrature_formula.size() - << std::endl; + << "\tquadrature_formula.size(): " << quadrature_formula.size() + << std::endl; std::vector > local_divergences (quadrature_formula.size()); std::vector > local_values (quadrature_formula.size()); @@ -193,9 +193,9 @@ void MixedElastoPlasticity::assemble_system() for (unsigned int q=0; q diff --git a/tests/deal.II/fe_values_view_21_nonsymmetric.cc b/tests/deal.II/fe_values_view_21_nonsymmetric.cc index bcd271657b..43caefe349 100644 --- a/tests/deal.II/fe_values_view_21_nonsymmetric.cc +++ b/tests/deal.II/fe_values_view_21_nonsymmetric.cc @@ -52,38 +52,38 @@ using namespace dealii; template class MixedElastoPlasticity { - public: - MixedElastoPlasticity(const unsigned int degree); - void run(); - private: - void make_grid_and_dofs(); - void assemble_system(); +public: + MixedElastoPlasticity(const unsigned int degree); + void run(); +private: + void make_grid_and_dofs(); + void assemble_system(); - const unsigned int degree; - const unsigned int n_stress_components; // components of stress - const unsigned int n_gamma_components; // scalar plastic multiplier + const unsigned int degree; + const unsigned int n_stress_components; // components of stress + const unsigned int n_gamma_components; // scalar plastic multiplier - Triangulation triangulation; - FESystem fe; - DoFHandler dof_handler; + Triangulation triangulation; + FESystem fe; + DoFHandler dof_handler; - BlockSparsityPattern sparsity_pattern; - BlockSparseMatrix system_matrix; + BlockSparsityPattern sparsity_pattern; + BlockSparseMatrix system_matrix; - BlockVector solution; - BlockVector system_rhs; + BlockVector solution; + BlockVector system_rhs; }; template MixedElastoPlasticity::MixedElastoPlasticity(const unsigned int degree): - degree(degree), - n_stress_components(dim*dim), - n_gamma_components(1), - fe( FE_Q(degree), n_stress_components, - FE_Q(degree), n_gamma_components), - dof_handler(triangulation) + degree(degree), + n_stress_components(dim *dim), + n_gamma_components(1), + fe( FE_Q(degree), n_stress_components, + FE_Q(degree), n_gamma_components), + dof_handler(triangulation) { } @@ -96,18 +96,18 @@ void MixedElastoPlasticity::make_grid_and_dofs() dof_handler.distribute_dofs(fe); deallog << "Number of stress components: " - << n_stress_components - << "\tNumber of gamma components: " - << n_gamma_components << std::endl; + << n_stress_components + << "\tNumber of gamma components: " + << n_gamma_components << std::endl; - // stress -> 0 gamma -> 1 + // stress -> 0 gamma -> 1 std::vector block_component(n_stress_components + n_gamma_components, 1); for (unsigned int ii = 0; ii < n_stress_components; ii++) block_component[ii] = 0; DoFRenumbering::component_wise(dof_handler); - // total number of dof per block component + // total number of dof per block component std::vector dofs_per_block(2); DoFTools::count_dofs_per_block(dof_handler, dofs_per_block, block_component); @@ -115,20 +115,20 @@ void MixedElastoPlasticity::make_grid_and_dofs() const unsigned int n_gamma_dof = dofs_per_block[1]; deallog << "Number of active cells: " - << triangulation.n_active_cells() - << std::endl - << "Total number of cells: " - << triangulation.n_cells() - << std::endl - << "Number of degrees of freedom: " - << dof_handler.n_dofs() - << " = (" << n_stress_dof << " + " - << n_gamma_dof << ")" - << std::endl; - - // following step-22 use of simple - // compressed block sparsity - // pattern for efficiency + << triangulation.n_active_cells() + << std::endl + << "Total number of cells: " + << triangulation.n_cells() + << std::endl + << "Number of degrees of freedom: " + << dof_handler.n_dofs() + << " = (" << n_stress_dof << " + " + << n_gamma_dof << ")" + << std::endl; + + // following step-22 use of simple + // compressed block sparsity + // pattern for efficiency { BlockCompressedSimpleSparsityPattern csp(2, 2); @@ -164,12 +164,12 @@ void MixedElastoPlasticity::assemble_system() QGauss quadrature_formula(1); FEValues 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; deallog << "dofs_per_cell: " << fe.dofs_per_cell << std::endl; - + FullMatrix local_matrix(dofs_per_cell, dofs_per_cell); Vector local_rhs(dofs_per_cell); @@ -180,8 +180,8 @@ void MixedElastoPlasticity::assemble_system() const FEValuesExtractors::Scalar gamma(n_stress_components); deallog << "fe.dofs_per_cell: " << fe.dofs_per_cell - << "\tquadrature_formula.size(): " << quadrature_formula.size() - << std::endl; + << "\tquadrature_formula.size(): " << quadrature_formula.size() + << std::endl; std::vector > local_divergences (quadrature_formula.size()); std::vector > local_values (quadrature_formula.size()); @@ -193,9 +193,9 @@ void MixedElastoPlasticity::assemble_system() for (unsigned int q=0; q diff --git a/tests/deal.II/fe_values_view_22.cc b/tests/deal.II/fe_values_view_22.cc index ddfd51e0e5..477513b693 100644 --- a/tests/deal.II/fe_values_view_22.cc +++ b/tests/deal.II/fe_values_view_22.cc @@ -44,37 +44,37 @@ using namespace dealii; template class MixedElastoPlasticity - { - public: - MixedElastoPlasticity(const unsigned int degree); - void run(); - private: - void make_grid_and_dofs(); - void assemble_system(); +{ +public: + MixedElastoPlasticity(const unsigned int degree); + void run(); +private: + void make_grid_and_dofs(); + void assemble_system(); - const unsigned int degree; - const unsigned int n_stress_components; // components of stress - const unsigned int n_gamma_components; // scalar plastic multiplier + const unsigned int degree; + const unsigned int n_stress_components; // components of stress + const unsigned int n_gamma_components; // scalar plastic multiplier - Triangulation triangulation; - FESystem fe; - DoFHandler dof_handler; + Triangulation triangulation; + FESystem fe; + DoFHandler dof_handler; - BlockSparsityPattern sparsity_pattern; - BlockSparseMatrix system_matrix; - BlockVector solution; - }; + BlockSparsityPattern sparsity_pattern; + BlockSparseMatrix system_matrix; + BlockVector solution; +}; template MixedElastoPlasticity::MixedElastoPlasticity(const unsigned int degree): -degree(degree), -n_stress_components((dim*(dim + 1)) / 2), -n_gamma_components(1), -fe( FE_Q(degree), n_stress_components, - FE_Q(degree), n_gamma_components), -dof_handler(triangulation) + degree(degree), + n_stress_components((dim*(dim + 1)) / 2), + n_gamma_components(1), + fe( FE_Q(degree), n_stress_components, + FE_Q(degree), n_gamma_components), + dof_handler(triangulation) { } @@ -83,60 +83,60 @@ dof_handler(triangulation) template void MixedElastoPlasticity::make_grid_and_dofs() { - GridGenerator::hyper_cube(triangulation, 0, 1); - triangulation.refine_global(0); - - dof_handler.distribute_dofs(fe); - - deallog << "Number of stress components: " - << n_stress_components - << "\tNumber of gamma components: " - << n_gamma_components << std::endl; - - // stress -> 0 gamma -> 1 - std::vector block_component(n_stress_components + n_gamma_components, 1); - for (unsigned int ii = 0; ii < n_stress_components; ii++) - block_component[ii] = 0; - - DoFRenumbering::component_wise(dof_handler); - - std::vector dofs_per_block(2); - DoFTools::count_dofs_per_block(dof_handler, dofs_per_block, block_component); - - const unsigned int n_stress_dof = dofs_per_block[0]; - const unsigned int n_gamma_dof = dofs_per_block[1]; - - deallog << "Number of active cells: " - << triangulation.n_active_cells() - << std::endl - << "Total number of cells: " - << triangulation.n_cells() - << std::endl - << "Number of degrees of freedom: " - << dof_handler.n_dofs() - << " = (" << n_stress_dof << " + " - << n_gamma_dof << ")" - << std::endl; - - { - BlockCompressedSimpleSparsityPattern csp(2, 2); - - csp.block(0, 0).reinit(n_stress_dof, n_stress_dof); - csp.block(1, 0).reinit(n_gamma_dof, n_stress_dof); - csp.block(0, 1).reinit(n_stress_dof, n_gamma_dof); - csp.block(1, 1).reinit(n_gamma_dof, n_gamma_dof); - csp.collect_sizes(); - - DoFTools::make_sparsity_pattern(dof_handler, csp); - sparsity_pattern.copy_from(csp); - } - - system_matrix.reinit(sparsity_pattern); - - solution.reinit(2); - solution.block(0).reinit(n_stress_dof); - solution.block(1).reinit(n_gamma_dof); - solution.collect_sizes(); + GridGenerator::hyper_cube(triangulation, 0, 1); + triangulation.refine_global(0); + + dof_handler.distribute_dofs(fe); + + deallog << "Number of stress components: " + << n_stress_components + << "\tNumber of gamma components: " + << n_gamma_components << std::endl; + + // stress -> 0 gamma -> 1 + std::vector block_component(n_stress_components + n_gamma_components, 1); + for (unsigned int ii = 0; ii < n_stress_components; ii++) + block_component[ii] = 0; + + DoFRenumbering::component_wise(dof_handler); + + std::vector dofs_per_block(2); + DoFTools::count_dofs_per_block(dof_handler, dofs_per_block, block_component); + + const unsigned int n_stress_dof = dofs_per_block[0]; + const unsigned int n_gamma_dof = dofs_per_block[1]; + + deallog << "Number of active cells: " + << triangulation.n_active_cells() + << std::endl + << "Total number of cells: " + << triangulation.n_cells() + << std::endl + << "Number of degrees of freedom: " + << dof_handler.n_dofs() + << " = (" << n_stress_dof << " + " + << n_gamma_dof << ")" + << std::endl; + + { + BlockCompressedSimpleSparsityPattern csp(2, 2); + + csp.block(0, 0).reinit(n_stress_dof, n_stress_dof); + csp.block(1, 0).reinit(n_gamma_dof, n_stress_dof); + csp.block(0, 1).reinit(n_stress_dof, n_gamma_dof); + csp.block(1, 1).reinit(n_gamma_dof, n_gamma_dof); + csp.collect_sizes(); + + DoFTools::make_sparsity_pattern(dof_handler, csp); + sparsity_pattern.copy_from(csp); + } + + system_matrix.reinit(sparsity_pattern); + + solution.reinit(2); + solution.block(0).reinit(n_stress_dof); + solution.block(1).reinit(n_gamma_dof); + solution.collect_sizes(); } @@ -144,84 +144,85 @@ void MixedElastoPlasticity::make_grid_and_dofs() template void MixedElastoPlasticity::assemble_system() { - QGauss quadrature_formula(1); - - 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; - deallog << "dofs_per_cell: " << fe.dofs_per_cell << std::endl; - - std::vector local_dof_indices(dofs_per_cell); - - const FEValuesExtractors::SymmetricTensor<2> stress(0); - const FEValuesExtractors::Scalar gamma(n_stress_components); - - deallog << "fe.dofs_per_cell: " << fe.dofs_per_cell - << "\tquadrature_formula.size(): " << quadrature_formula.size() - << std::endl; - - // constant stress and constant gamma distribution accross cell - const double stress_value = 125.0; - const double gamma_value = 1.0; - - typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(); - { - fe_values.reinit (cell); - cell->get_dof_indices (local_dof_indices); - for (unsigned int i = 0; i < dofs_per_cell; ++i) { - // 0 = stress (symmetric 2nd order tensor), 1 = Gamma (scalar) interpolation fields - const unsigned int i_group = fe.system_to_base_index(i).first.first; - // the index of the non-zero shape function - const unsigned int i_index = fe.system_to_base_index(i).first.second; - // the support point (node) id - const unsigned int i_node = fe.system_to_base_index(i).second; - - deallog << "\t" << i << "\t" << i_group << "\t" << i_index << "\t" << i_node; - - - if (i_group == 0) // if i corresponds to tensor stress - solution(local_dof_indices[i]) = stress_value; - else // i corresponds to scalar gamma - solution(local_dof_indices[i]) = gamma_value; - - deallog << "\t" << solution(local_dof_indices[i]) << std::endl; - } - - - std::vector > local_divergences (quadrature_formula.size()); - std::vector > local_values (quadrature_formula.size()); - std::vector local_scalar_values (quadrature_formula.size()); - - fe_values.reinit (dof_handler.begin_active()); - fe_values[stress].get_function_values (solution, local_values); - fe_values[stress].get_function_divergences (solution, local_divergences); - fe_values[gamma].get_function_values (solution, local_scalar_values); - - // expect the nodal stress value at the quadrature point - // constant stress field, therefore expect zero divergence - // constant gamma field, therefore nodal value should equal value at quadrature point - for (unsigned int q=0; q quadrature_formula(1); + + 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; + deallog << "dofs_per_cell: " << fe.dofs_per_cell << std::endl; + + std::vector local_dof_indices(dofs_per_cell); + + const FEValuesExtractors::SymmetricTensor<2> stress(0); + const FEValuesExtractors::Scalar gamma(n_stress_components); + + deallog << "fe.dofs_per_cell: " << fe.dofs_per_cell + << "\tquadrature_formula.size(): " << quadrature_formula.size() + << std::endl; + + // constant stress and constant gamma distribution accross cell + const double stress_value = 125.0; + const double gamma_value = 1.0; + + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(); + { + fe_values.reinit (cell); + cell->get_dof_indices (local_dof_indices); + for (unsigned int i = 0; i < dofs_per_cell; ++i) + { + // 0 = stress (symmetric 2nd order tensor), 1 = Gamma (scalar) interpolation fields + const unsigned int i_group = fe.system_to_base_index(i).first.first; + // the index of the non-zero shape function + const unsigned int i_index = fe.system_to_base_index(i).first.second; + // the support point (node) id + const unsigned int i_node = fe.system_to_base_index(i).second; + + deallog << "\t" << i << "\t" << i_group << "\t" << i_index << "\t" << i_node; + + + if (i_group == 0) // if i corresponds to tensor stress + solution(local_dof_indices[i]) = stress_value; + else // i corresponds to scalar gamma + solution(local_dof_indices[i]) = gamma_value; + + deallog << "\t" << solution(local_dof_indices[i]) << std::endl; + } + + + std::vector > local_divergences (quadrature_formula.size()); + std::vector > local_values (quadrature_formula.size()); + std::vector local_scalar_values (quadrature_formula.size()); + + fe_values.reinit (dof_handler.begin_active()); + fe_values[stress].get_function_values (solution, local_values); + fe_values[stress].get_function_divergences (solution, local_divergences); + fe_values[gamma].get_function_values (solution, local_scalar_values); + + // expect the nodal stress value at the quadrature point + // constant stress field, therefore expect zero divergence + // constant gamma field, therefore nodal value should equal value at quadrature point + for (unsigned int q=0; q::assemble_system() template void MixedElastoPlasticity::run() { - make_grid_and_dofs(); - assemble_system(); + make_grid_and_dofs(); + assemble_system(); } int main() { - std::ofstream logfile ("fe_values_view_22/output"); - deallog << std::setprecision (3); + std::ofstream logfile ("fe_values_view_22/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); - MixedElastoPlasticity < 3 > elasto_plasticity(1); - elasto_plasticity.run(); + MixedElastoPlasticity < 3 > elasto_plasticity(1); + elasto_plasticity.run(); - return 0; + return 0; } diff --git a/tests/deal.II/fe_values_view_23.cc b/tests/deal.II/fe_values_view_23.cc index 8d8fa6cf22..9b5a5b6ca7 100644 --- a/tests/deal.II/fe_values_view_23.cc +++ b/tests/deal.II/fe_values_view_23.cc @@ -38,11 +38,11 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { deallog << "FE=" << fe.get_name() - << std::endl; + << std::endl; DoFHandler dof(tr); dof.distribute_dofs(fe); @@ -50,36 +50,36 @@ void test (const Triangulation& tr, Vector fe_function(dof.n_dofs()); for (unsigned int i=0; i quadrature(2); FEValues fe_values (fe, quadrature, - update_values | update_gradients); + update_values | update_gradients); fe_values.reinit (dof.begin_active()); - // let the FEValues object compute the - // divergences at quadrature points + // let the FEValues object compute the + // divergences at quadrature points std::vector > divergences (quadrature.size()); FEValuesExtractors::SymmetricTensor<2> extractor(0); fe_values[extractor] - .get_function_divergences (fe_function, divergences); + .get_function_divergences (fe_function, divergences); - // now do the same "by hand" + // now do the same "by hand" std::vector local_dof_indices (fe.dofs_per_cell); dof.begin_active()->get_dof_indices (local_dof_indices); - + for (unsigned int q=0; q div_alt; for (unsigned int i=0; i fe (FE_Q(1), - SymmetricTensor<2,dim>::n_independent_components); + SymmetricTensor<2,dim>::n_independent_components); test(tr, fe); } diff --git a/tests/deal.II/fe_values_view_23_nonsymmetric.cc b/tests/deal.II/fe_values_view_23_nonsymmetric.cc index 24e686bc8d..ed976789ed 100644 --- a/tests/deal.II/fe_values_view_23_nonsymmetric.cc +++ b/tests/deal.II/fe_values_view_23_nonsymmetric.cc @@ -38,11 +38,11 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { deallog << "FE=" << fe.get_name() - << std::endl; + << std::endl; DoFHandler dof(tr); dof.distribute_dofs(fe); @@ -50,36 +50,36 @@ void test (const Triangulation& tr, Vector fe_function(dof.n_dofs()); for (unsigned int i=0; i quadrature(2); FEValues fe_values (fe, quadrature, - update_values | update_gradients); + update_values | update_gradients); fe_values.reinit (dof.begin_active()); - // let the FEValues object compute the - // divergences at quadrature points + // let the FEValues object compute the + // divergences at quadrature points std::vector > divergences (quadrature.size()); FEValuesExtractors::Tensor<2> extractor(0); fe_values[extractor] - .get_function_divergences (fe_function, divergences); + .get_function_divergences (fe_function, divergences); - // now do the same "by hand" + // now do the same "by hand" std::vector local_dof_indices (fe.dofs_per_cell); dof.begin_active()->get_dof_indices (local_dof_indices); - + for (unsigned int q=0; q div_alt; for (unsigned int i=0; i fe (FE_Q(1), - Tensor<2,dim>::n_independent_components); + Tensor<2,dim>::n_independent_components); test(tr, fe); } diff --git a/tests/deal.II/fe_values_view_24.cc b/tests/deal.II/fe_values_view_24.cc index 8670bad8da..d625efe5fd 100644 --- a/tests/deal.II/fe_values_view_24.cc +++ b/tests/deal.II/fe_values_view_24.cc @@ -38,11 +38,11 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { deallog << "FE=" << fe.get_name() - << std::endl; + << std::endl; DoFHandler dof(tr); dof.distribute_dofs(fe); @@ -50,30 +50,30 @@ void test (const Triangulation& tr, Vector fe_function(dof.n_dofs()); for (unsigned int i=0; i quadrature(2); FEValues fe_values (fe, quadrature, - update_values | update_gradients); + update_values | update_gradients); fe_values.reinit (dof.begin_active()); - // let the FEValues object compute the - // divergences at quadrature points + // let the FEValues object compute the + // divergences at quadrature points std::vector > divergences (quadrature.size()); FEValuesExtractors::SymmetricTensor<2> extractor(0); fe_values[extractor] - .get_function_divergences (fe_function, divergences); + .get_function_divergences (fe_function, divergences); - // now do the same "by hand" + // now do the same "by hand" std::vector local_dof_indices (fe.dofs_per_cell); dof.begin_active()->get_dof_indices (local_dof_indices); - + for (unsigned int i=0; i local_dof_indices (fe.dofs_per_cell); dof.begin_active()->get_dof_indices (local_dof_indices); - + for (unsigned int i=0; i local_dof_indices (fe.dofs_per_cell); dof.begin_active()->get_dof_indices (local_dof_indices); @@ -71,9 +71,9 @@ void test (const Triangulation& tr, deallog << "i=" << i << std::endl; for (unsigned int q=0; q local_dof_indices (fe.dofs_per_cell); dof.begin_active()->get_dof_indices (local_dof_indices); @@ -71,9 +71,9 @@ void test (const Triangulation& tr, deallog << "i=" << i << std::endl; for (unsigned int q=0; q -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (fe, quadrature, - update_values); + update_values); fe_values.reinit (dof.begin_active()); FEValuesExtractors::Vector extr; // invalid object @@ -57,7 +57,7 @@ void test (const Triangulation& tr, Assert (false, ExcMessage ("No exception!?")); - ok: +ok: ; } diff --git a/tests/deal.II/fe_values_view_invalid_03.cc b/tests/deal.II/fe_values_view_invalid_03.cc index 154c1b5054..b7ae2c3206 100644 --- a/tests/deal.II/fe_values_view_invalid_03.cc +++ b/tests/deal.II/fe_values_view_invalid_03.cc @@ -33,15 +33,15 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (fe, quadrature, - update_values); + update_values); fe_values.reinit (dof.begin_active()); FEValuesExtractors::SymmetricTensor<2> extr; // invalid object @@ -57,7 +57,7 @@ void test (const Triangulation& tr, Assert (false, ExcMessage ("No exception!?")); - ok: +ok: ; } diff --git a/tests/deal.II/fe_values_view_invalid_03_nonsymmetric.cc b/tests/deal.II/fe_values_view_invalid_03_nonsymmetric.cc index e475df4067..d7e828aadf 100644 --- a/tests/deal.II/fe_values_view_invalid_03_nonsymmetric.cc +++ b/tests/deal.II/fe_values_view_invalid_03_nonsymmetric.cc @@ -33,15 +33,15 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (fe, quadrature, - update_values); + update_values); fe_values.reinit (dof.begin_active()); FEValuesExtractors::Tensor<2> extr; // invalid object @@ -57,7 +57,7 @@ void test (const Triangulation& tr, Assert (false, ExcMessage ("No exception!?")); - ok: +ok: ; } diff --git a/tests/deal.II/fe_values_view_tensor_01.cc b/tests/deal.II/fe_values_view_tensor_01.cc index 2dc7ebb7cd..4255a3b121 100644 --- a/tests/deal.II/fe_values_view_tensor_01.cc +++ b/tests/deal.II/fe_values_view_tensor_01.cc @@ -59,7 +59,7 @@ private: const unsigned int degree; const unsigned int n_stress_components; // components of stress const unsigned int n_gamma_components; // scalar plastic multiplier - + Triangulation triangulation; FESystem fe; @@ -75,12 +75,12 @@ private: template MixedElastoPlasticity::MixedElastoPlasticity(const unsigned int degree): -degree(degree), -n_stress_components(dim*dim), -n_gamma_components(1), -fe( FE_Q(degree), n_stress_components, - FE_Q(degree), n_gamma_components), -dof_handler(triangulation) + degree(degree), + n_stress_components(dim *dim), + n_gamma_components(1), + fe( FE_Q(degree), n_stress_components, + FE_Q(degree), n_gamma_components), + dof_handler(triangulation) { } @@ -93,15 +93,15 @@ void MixedElastoPlasticity::make_grid_and_dofs() dof_handler.distribute_dofs(fe); deallog << "Number of stress components: " - << n_stress_components - << "\tNumber of gamma components: " - << n_gamma_components << std::endl; - + << n_stress_components + << "\tNumber of gamma components: " + << n_gamma_components << std::endl; + // stress -> 0 gamma -> 1 std::vector block_component(n_stress_components + n_gamma_components, 1); for (unsigned int ii = 0; ii < n_stress_components; ii++) block_component[ii] = 0; - + DoFRenumbering::component_wise(dof_handler); // total number of dof per block component @@ -112,16 +112,16 @@ void MixedElastoPlasticity::make_grid_and_dofs() const unsigned int n_gamma_dof = dofs_per_block[1]; deallog << "Number of active cells: " - << triangulation.n_active_cells() - << std::endl - << "Total number of cells: " - << triangulation.n_cells() - << std::endl - << "Number of degrees of freedom: " - << dof_handler.n_dofs() - << " = (" << n_stress_dof << " + " - << n_gamma_dof << ")" - << std::endl; + << triangulation.n_active_cells() + << std::endl + << "Total number of cells: " + << triangulation.n_cells() + << std::endl + << "Number of degrees of freedom: " + << dof_handler.n_dofs() + << " = (" << n_stress_dof << " + " + << n_gamma_dof << ")" + << std::endl; // following step-22 use of simple compressed block sparsity pattern for efficiency { @@ -167,21 +167,21 @@ void MixedElastoPlasticity::assemble_system() std::vector local_dof_indices(dofs_per_cell); - + const FEValuesExtractors::Tensor<2> stress_extr(0);//rank2 const FEValuesExtractors::Scalar gamma_extr(n_stress_components); deallog << "fe.dofs_per_cell: " << fe.dofs_per_cell - << "\tquadrature_formula.size(): " << quadrature_formula.size() - << std::endl; - + << "\tquadrature_formula.size(): " << quadrature_formula.size() + << std::endl; + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), - endc = dof_handler.end(); - + endc = dof_handler.end(); + std::vector > div_values(n_q_points); std::vector > stress_values(n_q_points); - + unsigned int cc = 0; for (; cell!=endc; ++cell) //loop over all cells { @@ -190,7 +190,7 @@ void MixedElastoPlasticity::assemble_system() cell_rhs = 0; fe_values.reinit (cell); //compute requested values for a given cell - + fe_values[stress_extr].get_function_values(solution,stress_values); fe_values[stress_extr].get_function_divergences(solution,div_values); } @@ -209,17 +209,19 @@ void check() { static const unsigned int dim = 3; { - for (unsigned int i = 0; i < dim; i++) { - for (unsigned int j = 0; j < dim; j++) { - TableIndices<2> indices(i,j); - unsigned int unrolled = Tensor<2,dim>::component_to_unrolled_index(indices); - deallog< "<::unrolled_to_component_indices(unrolled); - deallog< "< indices(i,j); + unsigned int unrolled = Tensor<2,dim>::component_to_unrolled_index(indices); + deallog< "<::unrolled_to_component_indices(unrolled); + deallog< "< elasto_plasticity(1); elasto_plasticity.run(); diff --git a/tests/deal.II/filtered_iterator.cc b/tests/deal.II/filtered_iterator.cc index 0146e63633..0eef1655ba 100644 --- a/tests/deal.II/filtered_iterator.cc +++ b/tests/deal.II/filtered_iterator.cc @@ -37,9 +37,9 @@ std::ofstream logfile("filtered_iterator/output"); DeclException2 (ExcNumberMismatch, - int, int, - << "The numbers " << arg1 << " and " << arg2 - << " should be equation, but are not."); + int, int, + << "The numbers " << arg1 << " and " << arg2 + << " should be equation, but are not."); @@ -55,7 +55,7 @@ bool level_equal_to_3 (const Iterator c) template bool level_equal_to (const Iterator c, - const unsigned int level) + const unsigned int level) { return (static_cast(c->level()) == level); } @@ -70,120 +70,120 @@ void test () tria.execute_coarsening_and_refinement (); tria.refine_global (2); - // we now have a number of cells, - // flag them with some subdomain - // ids based on their position, in - // particular we take the quadrant - // (octant) + // we now have a number of cells, + // flag them with some subdomain + // ids based on their position, in + // particular we take the quadrant + // (octant) active_cell_iterator cell = tria.begin_active (), - endc = tria.end (); + endc = tria.end (); for (; cell!=endc; ++cell) { unsigned int subdomain = 0; for (unsigned int d=0; d<2; ++d) - if (cell->center()(d) > 0) - subdomain |= (1<center()(d) > 0) + subdomain |= (1<set_subdomain_id (subdomain); }; - // check 1: count number of cells - // on some level + // check 1: count number of cells + // on some level if (true) { const IteratorFilters::LevelEqualTo predicate(3); FilteredIterator - begin (predicate), - end (predicate, tria.end()); + begin (predicate), + end (predicate, tria.end()); begin.set_to_next_positive (tria.begin_active ()); - + Assert (std::distance (begin, end) == - static_cast(tria.n_active_cells (3)), - ExcInternalError()); + static_cast(tria.n_active_cells (3)), + ExcInternalError()); logfile << "Check 1: " - << (std::distance (begin, end) == - static_cast(tria.n_active_cells (3)) - ? - "OK" : "Failed") - << std::endl; + << (std::distance (begin, end) == + static_cast(tria.n_active_cells (3)) + ? + "OK" : "Failed") + << std::endl; }; - // check 2: count number of cells - // on some level in a different way + // check 2: count number of cells + // on some level in a different way if (true) { bool (*predicate) (const active_cell_iterator) - = &level_equal_to_3; + = &level_equal_to_3; FilteredIterator - begin (predicate, tria.begin_active (3)), - end (predicate, tria.end()); - + begin (predicate, tria.begin_active (3)), + end (predicate, tria.end()); + Assert (std::distance (begin, end) == - static_cast(tria.n_active_cells (3)), - ExcInternalError()); + static_cast(tria.n_active_cells (3)), + ExcInternalError()); logfile << "Check 2: " - << (std::distance (begin, end) == - static_cast(tria.n_active_cells (3)) - ? - "OK" : "Failed") - << std::endl; + << (std::distance (begin, end) == + static_cast(tria.n_active_cells (3)) + ? + "OK" : "Failed") + << std::endl; }; - // check 3: count number of cells - // on some level in yet a different - // way + // check 3: count number of cells + // on some level in yet a different + // way if (true) { bool (*predicate) (const active_cell_iterator, const unsigned int) - = &level_equal_to; + = &level_equal_to; FilteredIterator - begin (std::bind2nd (std::ptr_fun(predicate), 3), - tria.begin_active (3)), - end (std::bind2nd (std::ptr_fun(predicate), 3), - tria.end()); - + begin (std::bind2nd (std::ptr_fun(predicate), 3), + tria.begin_active (3)), + end (std::bind2nd (std::ptr_fun(predicate), 3), + tria.end()); + Assert (std::distance (begin, end) == - static_cast(tria.n_active_cells (3)), - ExcInternalError()); + static_cast(tria.n_active_cells (3)), + ExcInternalError()); logfile << "Check 3: " - << (std::distance (begin, end) == - static_cast(tria.n_active_cells (3)) - ? - "OK" : "Failed") - << std::endl; + << (std::distance (begin, end) == + static_cast(tria.n_active_cells (3)) + ? + "OK" : "Failed") + << std::endl; }; - // check 4: and yet another possibility + // check 4: and yet another possibility if (true) { typedef FilteredIterator FI; - + bool (*predicate) (const active_cell_iterator, const unsigned int) - = &level_equal_to; + = &level_equal_to; Assert (std::distance (FI(std::bind2nd (std::ptr_fun(predicate), 3)) - .set_to_next_positive(tria.begin_active()), - FI(std::bind2nd (std::ptr_fun(predicate), 3), tria.end())) == - static_cast(tria.n_active_cells (3)), - ExcInternalError()); + .set_to_next_positive(tria.begin_active()), + FI(std::bind2nd (std::ptr_fun(predicate), 3), tria.end())) == + static_cast(tria.n_active_cells (3)), + ExcInternalError()); logfile << "Check 4: " - << (std::distance (FI(std::bind2nd (std::ptr_fun(predicate), 3)) - .set_to_next_positive(tria.begin_active()), - FI(std::bind2nd (std::ptr_fun(predicate), 3), tria.end())) == - static_cast(tria.n_active_cells (3)) - ? - "OK" : "Failed") - << std::endl; + << (std::distance (FI(std::bind2nd (std::ptr_fun(predicate), 3)) + .set_to_next_positive(tria.begin_active()), + FI(std::bind2nd (std::ptr_fun(predicate), 3), tria.end())) == + static_cast(tria.n_active_cells (3)) + ? + "OK" : "Failed") + << std::endl; }; - // check 5: check that we loop over - // all cells with a given subdomain - // id + // check 5: check that we loop over + // all cells with a given subdomain + // id if (true) { typedef FilteredIterator FI; @@ -192,30 +192,30 @@ void test () cell.set_to_next_positive (tria.begin_active()); active_cell_iterator endc (tria.end()); active_cell_iterator cell1 = tria.begin_active (); - + while (cell1->subdomain_id () != 1) - ++cell1; + ++cell1; while (true) - { - // move filtered iterator ahead - ++cell; - // move unfiltered iterator - // ahead - ++cell1; - while ((cell1 != endc) && - (cell1->subdomain_id () != 1)) - ++cell1; - - Assert (cell == cell1, ExcInternalError()); - Assert (cell1 == cell, ExcInternalError()); - - if (cell.state() != IteratorState::valid) - break; - }; + { + // move filtered iterator ahead + ++cell; + // move unfiltered iterator + // ahead + ++cell1; + while ((cell1 != endc) && + (cell1->subdomain_id () != 1)) + ++cell1; + + Assert (cell == cell1, ExcInternalError()); + Assert (cell1 == cell, ExcInternalError()); + + if (cell.state() != IteratorState::valid) + break; + }; Assert (cell == endc, ExcInternalError()); Assert (cell1 == endc, ExcInternalError()); - + logfile << "Check 5: OK" << std::endl; }; } @@ -229,7 +229,7 @@ int main () deallog.threshold_double(1.e-10); test (); - + return 0; } diff --git a/tests/deal.II/filtered_iterator_02.cc b/tests/deal.II/filtered_iterator_02.cc index ff13b8f7d9..da051cd77f 100644 --- a/tests/deal.II/filtered_iterator_02.cc +++ b/tests/deal.II/filtered_iterator_02.cc @@ -37,9 +37,9 @@ std::ofstream logfile("filtered_iterator_02/output"); DeclException2 (ExcNumberMismatch, - int, int, - << "The numbers " << arg1 << " and " << arg2 - << " should be equation, but are not."); + int, int, + << "The numbers " << arg1 << " and " << arg2 + << " should be equation, but are not."); @@ -55,7 +55,7 @@ bool level_equal_to_3 (const Iterator c) template bool level_equal_to (const Iterator c, - const unsigned int level) + const unsigned int level) { return (static_cast(c->level()) == level); } @@ -70,119 +70,119 @@ void test () tria.execute_coarsening_and_refinement (); tria.refine_global (2); - // we now have a number of cells, - // flag them with some subdomain - // ids based on their position, in - // particular we take the quadrant - // (octant) + // we now have a number of cells, + // flag them with some subdomain + // ids based on their position, in + // particular we take the quadrant + // (octant) active_cell_iterator cell = tria.begin_active (), - endc = tria.end (); + endc = tria.end (); for (; cell!=endc; ++cell) { unsigned int subdomain = 0; for (unsigned int d=0; d<2; ++d) - if (cell->center()(d) > 0) - subdomain |= (1<center()(d) > 0) + subdomain |= (1<set_subdomain_id (subdomain); }; - // check 1: count number of cells - // on some level + // check 1: count number of cells + // on some level if (true) { const IteratorFilters::LevelEqualTo predicate(3); FilteredIterator - begin = make_filtered_iterator(tria.begin_active(), predicate), - end = make_filtered_iterator (static_cast(tria.end()), predicate); - + begin = make_filtered_iterator(tria.begin_active(), predicate), + end = make_filtered_iterator (static_cast(tria.end()), predicate); + Assert (std::distance (begin, end) == - static_cast(tria.n_active_cells (3)), - ExcInternalError()); + static_cast(tria.n_active_cells (3)), + ExcInternalError()); logfile << "Check 1: " - << (std::distance (begin, end) == - static_cast(tria.n_active_cells (3)) - ? - "OK" : "Failed") - << std::endl; + << (std::distance (begin, end) == + static_cast(tria.n_active_cells (3)) + ? + "OK" : "Failed") + << std::endl; }; - // check 2: count number of cells - // on some level in a different way + // check 2: count number of cells + // on some level in a different way if (true) { bool (*predicate) (const active_cell_iterator) - = &level_equal_to_3; + = &level_equal_to_3; FilteredIterator - begin (predicate, tria.begin_active (3)), - end (predicate, tria.end()); - + begin (predicate, tria.begin_active (3)), + end (predicate, tria.end()); + Assert (std::distance (begin, end) == - static_cast(tria.n_active_cells (3)), - ExcInternalError()); + static_cast(tria.n_active_cells (3)), + ExcInternalError()); logfile << "Check 2: " - << (std::distance (begin, end) == - static_cast(tria.n_active_cells (3)) - ? - "OK" : "Failed") - << std::endl; + << (std::distance (begin, end) == + static_cast(tria.n_active_cells (3)) + ? + "OK" : "Failed") + << std::endl; }; - // check 3: count number of cells - // on some level in yet a different - // way + // check 3: count number of cells + // on some level in yet a different + // way if (true) { bool (*predicate) (const active_cell_iterator, const unsigned int) - = &level_equal_to; + = &level_equal_to; FilteredIterator - begin (std::bind2nd (std::ptr_fun(predicate), 3), - tria.begin_active (3)), - end (std::bind2nd (std::ptr_fun(predicate), 3), - tria.end()); - + begin (std::bind2nd (std::ptr_fun(predicate), 3), + tria.begin_active (3)), + end (std::bind2nd (std::ptr_fun(predicate), 3), + tria.end()); + Assert (std::distance (begin, end) == - static_cast(tria.n_active_cells (3)), - ExcInternalError()); + static_cast(tria.n_active_cells (3)), + ExcInternalError()); logfile << "Check 3: " - << (std::distance (begin, end) == - static_cast(tria.n_active_cells (3)) - ? - "OK" : "Failed") - << std::endl; + << (std::distance (begin, end) == + static_cast(tria.n_active_cells (3)) + ? + "OK" : "Failed") + << std::endl; }; - // check 4: and yet another possibility + // check 4: and yet another possibility if (true) { typedef FilteredIterator FI; - + bool (*predicate) (const active_cell_iterator, const unsigned int) - = &level_equal_to; + = &level_equal_to; Assert (std::distance (FI(std::bind2nd (std::ptr_fun(predicate), 3)) - .set_to_next_positive(tria.begin_active()), - FI(std::bind2nd (std::ptr_fun(predicate), 3), tria.end())) == - static_cast(tria.n_active_cells (3)), - ExcInternalError()); + .set_to_next_positive(tria.begin_active()), + FI(std::bind2nd (std::ptr_fun(predicate), 3), tria.end())) == + static_cast(tria.n_active_cells (3)), + ExcInternalError()); logfile << "Check 4: " - << (std::distance (FI(std::bind2nd (std::ptr_fun(predicate), 3)) - .set_to_next_positive(tria.begin_active()), - FI(std::bind2nd (std::ptr_fun(predicate), 3), tria.end())) == - static_cast(tria.n_active_cells (3)) - ? - "OK" : "Failed") - << std::endl; + << (std::distance (FI(std::bind2nd (std::ptr_fun(predicate), 3)) + .set_to_next_positive(tria.begin_active()), + FI(std::bind2nd (std::ptr_fun(predicate), 3), tria.end())) == + static_cast(tria.n_active_cells (3)) + ? + "OK" : "Failed") + << std::endl; }; - // check 5: check that we loop over - // all cells with a given subdomain - // id + // check 5: check that we loop over + // all cells with a given subdomain + // id if (true) { typedef FilteredIterator FI; @@ -191,30 +191,30 @@ void test () cell.set_to_next_positive (tria.begin_active()); active_cell_iterator endc (tria.end()); active_cell_iterator cell1 = tria.begin_active (); - + while (cell1->subdomain_id () != 1) - ++cell1; + ++cell1; while (true) - { - // move filtered iterator ahead - ++cell; - // move unfiltered iterator - // ahead - ++cell1; - while ((cell1 != endc) && - (cell1->subdomain_id () != 1)) - ++cell1; - - Assert (cell == cell1, ExcInternalError()); - Assert (cell1 == cell, ExcInternalError()); - - if (cell.state() != IteratorState::valid) - break; - }; + { + // move filtered iterator ahead + ++cell; + // move unfiltered iterator + // ahead + ++cell1; + while ((cell1 != endc) && + (cell1->subdomain_id () != 1)) + ++cell1; + + Assert (cell == cell1, ExcInternalError()); + Assert (cell1 == cell, ExcInternalError()); + + if (cell.state() != IteratorState::valid) + break; + }; Assert (cell == endc, ExcInternalError()); Assert (cell1 == endc, ExcInternalError()); - + logfile << "Check 5: OK" << std::endl; }; } @@ -228,7 +228,7 @@ int main () deallog.threshold_double(1.e-10); test (); - + return 0; } diff --git a/tests/deal.II/filtered_iterator_03.cc b/tests/deal.II/filtered_iterator_03.cc index 832c823a3b..5b8ad505d2 100644 --- a/tests/deal.II/filtered_iterator_03.cc +++ b/tests/deal.II/filtered_iterator_03.cc @@ -37,9 +37,9 @@ std::ofstream logfile("filtered_iterator_03/output"); DeclException2 (ExcNumberMismatch, - int, int, - << "The numbers " << arg1 << " and " << arg2 - << " should be equation, but are not."); + int, int, + << "The numbers " << arg1 << " and " << arg2 + << " should be equation, but are not."); @@ -64,44 +64,44 @@ void test () tria.execute_coarsening_and_refinement (); tria.refine_global (2); - // we now have a number of cells, - // flag them with some subdomain - // ids based on their position, in - // particular we take the quadrant - // (octant) + // we now have a number of cells, + // flag them with some subdomain + // ids based on their position, in + // particular we take the quadrant + // (octant) active_cell_iterator cell = tria.begin_active (), - endc = tria.end (); + endc = tria.end (); for (; cell!=endc; ++cell) { unsigned int subdomain = 0; for (unsigned int d=0; d<2; ++d) - if (cell->center()(d) > 0) - subdomain |= (1<center()(d) > 0) + subdomain |= (1<set_subdomain_id (subdomain); }; - // check 1: count number of cells - // on some level + // check 1: count number of cells + // on some level if (true) { FilteredIterator - begin = make_filtered_iterator(tria.begin_active(), &always_true), - end = make_filtered_iterator (static_cast(tria.end()), &always_true); - + begin = make_filtered_iterator(tria.begin_active(), &always_true), + end = make_filtered_iterator (static_cast(tria.end()), &always_true); + Assert (std::distance (begin, end) == - static_cast(tria.n_active_cells ()), - ExcInternalError()); + static_cast(tria.n_active_cells ()), + ExcInternalError()); deallog << std::distance(begin,end) << ' ' - << tria.n_active_cells() << std::endl; + << tria.n_active_cells() << std::endl; logfile << "Check 1: " - << (std::distance (begin, end) == - static_cast(tria.n_active_cells ()) - ? - "OK" : "Failed") - << std::endl; + << (std::distance (begin, end) == + static_cast(tria.n_active_cells ()) + ? + "OK" : "Failed") + << std::endl; }; } @@ -114,7 +114,7 @@ int main () deallog.threshold_double(1.e-10); test (); - + return 0; } diff --git a/tests/deal.II/filtered_matrix.cc b/tests/deal.II/filtered_matrix.cc index 0376cb4107..f8cffa5add 100644 --- a/tests/deal.II/filtered_matrix.cc +++ b/tests/deal.II/filtered_matrix.cc @@ -42,16 +42,16 @@ - + void solve_filtered (std::map &bv, - SparseMatrix &A, - Vector &u, - Vector &f) + SparseMatrix &A, + Vector &u, + Vector &f) { FilteredMatrix > A1 (A); A1.add_constraints (bv); - + SolverControl control (1000, 1.e-10, false, false); PrimitiveVectorMemory > mem; SolverCG > solver (control, mem); @@ -59,17 +59,17 @@ solve_filtered (std::map &bv, FilteredMatrix > fprec; prec.initialize (A, 1.2); fprec.initialize(prec); - + Vector f1 (f.size()); f1 = f; A1.apply_constraints (f1, true); - + solver.solve (A1, u, f1, fprec); for (std::map::const_iterator i=bv.begin(); i!=bv.end(); ++i) Assert (std::fabs(u(i->first) - i->second) < 1e-8, - ExcInternalError()); + ExcInternalError()); } @@ -77,18 +77,18 @@ solve_filtered (std::map &bv, template void solve_eliminated (std::map &bv, - SparseMatrix &A, - Vector &u, - Vector &f) + SparseMatrix &A, + Vector &u, + Vector &f) { MatrixTools::apply_boundary_values (bv, A, u, f); - + SolverControl control (1000, 1.e-10, false, false); PrimitiveVectorMemory > mem; SolverCG > solver (control, mem); PreconditionJacobi<> prec; prec.initialize (A, 1.2); - + solver.solve (A, u, f, prec); } @@ -101,24 +101,24 @@ check () Triangulation tr; Functions::CosineFunction cosine; - + if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else - GridGenerator::hyper_cube(tr, -1,1); - + GridGenerator::hyper_cube(tr, -1,1); + tr.refine_global (5-dim); - + MappingQ mapping(2); FE_Q element(1); QGauss quadrature(4); - + DoFHandler dof(tr); dof.distribute_dofs(element); - + FEValues fe (mapping, element, quadrature, - update_values | update_gradients - | update_q_points | update_JxW_values); + update_values | update_gradients + | update_q_points | update_JxW_values); std::vector global_dofs (element.dofs_per_cell); std::vector function (quadrature.size()); @@ -126,72 +126,72 @@ check () Vector f (dof.n_dofs ()); SparsityPattern A_pattern (dof.n_dofs (), dof.n_dofs (), - dof.max_couplings_between_dofs()); + dof.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern(dof, A_pattern); A_pattern.compress (); - + SparseMatrix A(A_pattern); - + typename DoFHandler::active_cell_iterator cell = dof.begin_active(); const typename DoFHandler::cell_iterator end = dof.end(); - for (; cell != end;++cell) + for (; cell != end; ++cell) { fe.reinit(cell); cell->get_dof_indices (global_dofs); cosine.value_list (fe.get_quadrature_points(), function); - for (unsigned int k=0;k grad_v = fe.shape_grad(i,k); - - double rhs = dx * v * (function[k]); - - f(global_dofs[i]) += rhs; - for (unsigned int j=0;j grad_u = fe.shape_grad (j,k); - double el = dx * (grad_u*grad_v); - A.add (global_dofs[i], global_dofs[j], el); - } - } - } + for (unsigned int k=0; k grad_v = fe.shape_grad(i,k); + + double rhs = dx * v * (function[k]); + + f(global_dofs[i]) += rhs; + for (unsigned int j=0; j grad_u = fe.shape_grad (j,k); + double el = dx * (grad_u*grad_v); + A.add (global_dofs[i], global_dofs[j], el); + } + } + } } - // interpolate boundary values + // interpolate boundary values std::map bv; VectorTools::interpolate_boundary_values (mapping, dof, 0, cosine, bv, std::vector()); - // the cosine has too many zero - // values on the boundary of the - // domain, so reset the elements to - // some other value + // the cosine has too many zero + // values on the boundary of the + // domain, so reset the elements to + // some other value for (typename std::map::iterator i=bv.begin(); i!=bv.end(); ++i) i->second = std::sin(i->second+0.5)+1.0; - // first solve filtered. this does - // not change the matrix + // first solve filtered. this does + // not change the matrix Vector u_filtered (dof.n_dofs ()); solve_filtered (bv, A, u_filtered, f); - - // then solve by eliminating in the - // matrix. since this changes the - // matrix, this call must come - // second + + // then solve by eliminating in the + // matrix. since this changes the + // matrix, this call must come + // second Vector u_eliminated (dof.n_dofs ()); solve_eliminated (bv, A, u_eliminated, f); - // output and check + // output and check for (unsigned int i=0; i void test() { - // create 2 triangulations with the - // same coarse grid, and refine - // them differently + // create 2 triangulations with the + // same coarse grid, and refine + // them differently Triangulation tria[2]; GridGenerator::hyper_cube (tria[0]); GridGenerator::hyper_cube (tria[1]); - + tria[0].refine_global (2); tria[1].refine_global (2); tria[0].begin_active()->set_refine_flag(); tria[0].execute_coarsening_and_refinement (); - + tria[1].last_active()->set_refine_flag(); tria[1].execute_coarsening_and_refinement (); @@ -52,9 +52,9 @@ void test() tria[1].execute_coarsening_and_refinement (); typedef - std::list::cell_iterator, - typename Triangulation::cell_iterator> > - CellList; + std::list::cell_iterator, + typename Triangulation::cell_iterator> > + CellList; const CellList cell_list = GridTools::get_finest_common_cells (tria[0], tria[1]); diff --git a/tests/deal.II/get_finest_common_cells_02.cc b/tests/deal.II/get_finest_common_cells_02.cc index fab794b1a0..efba757a5a 100644 --- a/tests/deal.II/get_finest_common_cells_02.cc +++ b/tests/deal.II/get_finest_common_cells_02.cc @@ -31,20 +31,20 @@ template void test() { - // create 2 triangulations with the - // same coarse grid, and refine - // them differently + // create 2 triangulations with the + // same coarse grid, and refine + // them differently Triangulation tria[2]; GridGenerator::hyper_cube (tria[0]); GridGenerator::hyper_cube (tria[1]); - + tria[0].refine_global (2); tria[1].refine_global (2); tria[0].begin_active()->set_refine_flag(); tria[0].execute_coarsening_and_refinement (); - + tria[1].last_active()->set_refine_flag(); tria[1].execute_coarsening_and_refinement (); @@ -53,11 +53,11 @@ void test() DoFHandler dh0 (tria[0]); DoFHandler dh1 (tria[1]); - + typedef - std::list::cell_iterator, - typename DoFHandler::cell_iterator> > - CellList; + std::list::cell_iterator, + typename DoFHandler::cell_iterator> > + CellList; const CellList cell_list = GridTools::get_finest_common_cells (dh0, dh1); diff --git a/tests/deal.II/get_finest_common_cells_03.cc b/tests/deal.II/get_finest_common_cells_03.cc index 825ce1ef52..3bb1fd2741 100644 --- a/tests/deal.II/get_finest_common_cells_03.cc +++ b/tests/deal.II/get_finest_common_cells_03.cc @@ -31,20 +31,20 @@ template void test() { - // create 2 triangulations with the - // same coarse grid, and refine - // them differently + // create 2 triangulations with the + // same coarse grid, and refine + // them differently Triangulation tria[2]; GridGenerator::hyper_cube (tria[0]); GridGenerator::hyper_cube (tria[1]); - + tria[0].refine_global (2); tria[1].refine_global (2); tria[0].begin_active()->set_refine_flag(); tria[0].execute_coarsening_and_refinement (); - + tria[1].last_active()->set_refine_flag(); tria[1].execute_coarsening_and_refinement (); @@ -53,11 +53,11 @@ void test() hp::DoFHandler dh0 (tria[0]); hp::DoFHandler dh1 (tria[1]); - + typedef - std::list::cell_iterator, - typename hp::DoFHandler::cell_iterator> > - CellList; + std::list::cell_iterator, + typename hp::DoFHandler::cell_iterator> > + CellList; const CellList cell_list = GridTools::get_finest_common_cells (dh0, dh1); diff --git a/tests/deal.II/get_finest_common_cells_04.cc b/tests/deal.II/get_finest_common_cells_04.cc index 89c5fca2aa..30625d86f1 100644 --- a/tests/deal.II/get_finest_common_cells_04.cc +++ b/tests/deal.II/get_finest_common_cells_04.cc @@ -31,20 +31,20 @@ template void test() { - // create 2 triangulations with the - // same coarse grid, and refine - // them differently + // create 2 triangulations with the + // same coarse grid, and refine + // them differently Triangulation tria[2]; GridGenerator::hyper_cube (tria[0]); GridGenerator::hyper_cube (tria[1]); - + tria[0].refine_global (2); tria[1].refine_global (2); tria[0].begin_active()->set_refine_flag(); tria[0].execute_coarsening_and_refinement (); - + tria[1].last_active()->set_refine_flag(); tria[1].execute_coarsening_and_refinement (); @@ -53,11 +53,11 @@ void test() MGDoFHandler dh0 (tria[0]); MGDoFHandler dh1 (tria[1]); - + typedef - std::list::cell_iterator, - typename MGDoFHandler::cell_iterator> > - CellList; + std::list::cell_iterator, + typename MGDoFHandler::cell_iterator> > + CellList; const CellList cell_list = GridTools::get_finest_common_cells (dh0, dh1); diff --git a/tests/deal.II/grid_generator_01.cc b/tests/deal.II/grid_generator_01.cc index d44d6c6751..b1180a1a14 100644 --- a/tests/deal.II/grid_generator_01.cc +++ b/tests/deal.II/grid_generator_01.cc @@ -39,8 +39,8 @@ void check_rect1 (unsigned int n, bool color, bool log) Point left; Point right; std::vector subdivisions(dim); - - for (unsigned int d=0;d tria; GridGenerator::subdivided_hyper_rectangle(tria, subdivisions, left, right, color); - + GridOut grid_out; if (dim == 2) { if (log) - grid_out.write_xfig (tria, logfile); + grid_out.write_xfig (tria, logfile); else - grid_out.write_xfig (tria, std::cout); + grid_out.write_xfig (tria, std::cout); } else { if (log) - grid_out.write_dx (tria, logfile); + grid_out.write_dx (tria, logfile); else - grid_out.write_dx (tria, std::cout); + grid_out.write_dx (tria, std::cout); } } diff --git a/tests/deal.II/grid_hyper_shell.cc b/tests/deal.II/grid_hyper_shell.cc index 2898985bfb..d3a1421e14 100644 --- a/tests/deal.II/grid_hyper_shell.cc +++ b/tests/deal.II/grid_hyper_shell.cc @@ -42,7 +42,7 @@ template void check (double r1, double r2, unsigned int n) { deallog << "dim=" << dim << std::endl; - + Point center; Triangulation tria (Triangulation::none, true); GridGenerator::hyper_shell (tria, center, r1, r2, n, true); @@ -52,20 +52,20 @@ void check (double r1, double r2, unsigned int n) for (unsigned int i=0; i<2; ++i) { try - { - tria.refine_global(1); - } + { + tria.refine_global(1); + } catch (typename Triangulation::DistortedCellList &dcv) - { - deallog << "Found " << dcv.distorted_cells.size() - << " distorted cells" << std::endl; + { + deallog << "Found " << dcv.distorted_cells.size() + << " distorted cells" << std::endl; - typename Triangulation::DistortedCellList - subset = GridTools::fix_up_distorted_child_cells (dcv, - tria); - deallog << subset.distorted_cells.size() - << " distorted cells remaining" << std::endl; - } + typename Triangulation::DistortedCellList + subset = GridTools::fix_up_distorted_child_cells (dcv, + tria); + deallog << subset.distorted_cells.size() + << " distorted cells remaining" << std::endl; + } } GridOut grid_out; @@ -82,7 +82,7 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + check<2> (4., 5., 10); check<3> (3., 5., 6); } diff --git a/tests/deal.II/grid_hyper_shell_02.cc b/tests/deal.II/grid_hyper_shell_02.cc index e95abdcf8a..0b9526e70a 100644 --- a/tests/deal.II/grid_hyper_shell_02.cc +++ b/tests/deal.II/grid_hyper_shell_02.cc @@ -58,6 +58,6 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + check<3> (.5, 1, 6); } diff --git a/tests/deal.II/grid_hyper_shell_03.cc b/tests/deal.II/grid_hyper_shell_03.cc index d16efd2e7a..6abf8cf79f 100644 --- a/tests/deal.II/grid_hyper_shell_03.cc +++ b/tests/deal.II/grid_hyper_shell_03.cc @@ -58,6 +58,6 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + check<3> (.5, 1, 12); } diff --git a/tests/deal.II/grid_hyper_shell_04.cc b/tests/deal.II/grid_hyper_shell_04.cc index ed973f8cea..5ba1eb456e 100644 --- a/tests/deal.II/grid_hyper_shell_04.cc +++ b/tests/deal.II/grid_hyper_shell_04.cc @@ -57,6 +57,6 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + check<3> (.5, 1, 96); } diff --git a/tests/deal.II/grid_hyper_shell_05.cc b/tests/deal.II/grid_hyper_shell_05.cc index c4869217e1..1469a4f893 100644 --- a/tests/deal.II/grid_hyper_shell_05.cc +++ b/tests/deal.II/grid_hyper_shell_05.cc @@ -52,24 +52,24 @@ void check (const unsigned int n) Triangulation tria (Triangulation::none); GridGenerator::hyper_shell (tria, center, 0.5, 1, n, true); - // this is the test that failed - // before + // this is the test that failed + // before for (typename Triangulation::active_cell_iterator - cell = tria.begin_active(); + cell = tria.begin_active(); cell != tria.end(); ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) Assert (cell->face(f)->at_boundary() == cell->at_boundary(f), - ExcInternalError()); + ExcInternalError()); - // also output something slightly - // more useful + // also output something slightly + // more useful for (typename Triangulation::active_cell_iterator - cell = tria.begin_active(); + cell = tria.begin_active(); cell != tria.end(); ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f)) - deallog << cell->face(f) << ' ' << (int)cell->face(f)->boundary_indicator() - << ' ' << cell->face(f)->center().norm() << std::endl; + deallog << cell->face(f) << ' ' << (int)cell->face(f)->boundary_indicator() + << ' ' << cell->face(f)->center().norm() << std::endl; } diff --git a/tests/deal.II/grid_in.cc b/tests/deal.II/grid_in.cc index 998bfd54a8..5107755df8 100644 --- a/tests/deal.II/grid_in.cc +++ b/tests/deal.II/grid_in.cc @@ -53,22 +53,22 @@ void test1 () template void test2 () { - // read a much larger grid (30k - // cells). with the old grid - // reordering scheme, this took >90 - // minutes (exact timing not - // available, program was killed - // before), with the new one it - // takes less than 8 seconds - // - // note that the input file is no good: it - // contains two pairs of two cells, where - // the two members of each pair share 3 - // vertices (in 2d) -- this can of course - // not work properly. it makes the - // grid_in_02 testcase fail when using this - // input file, but grid_in_02/2d.xda is a - // corrected input file. + // read a much larger grid (30k + // cells). with the old grid + // reordering scheme, this took >90 + // minutes (exact timing not + // available, program was killed + // before), with the new one it + // takes less than 8 seconds + // + // note that the input file is no good: it + // contains two pairs of two cells, where + // the two members of each pair share 3 + // vertices (in 2d) -- this can of course + // not work properly. it makes the + // grid_in_02 testcase fail when using this + // input file, but grid_in_02/2d.xda is a + // corrected input file. Triangulation tria (Triangulation::none, true); GridIn gi; gi.attach_triangulation (tria); @@ -79,11 +79,11 @@ void test2 () } catch (typename Triangulation::DistortedCellList &dcv) { - // ignore the exception that we - // get because the mesh has - // distorted cells + // ignore the exception that we + // get because the mesh has + // distorted cells deallog << dcv.distorted_cells.size() << " cells are distorted." - << std::endl; + << std::endl; } @@ -113,7 +113,7 @@ void test3 () template void check_file (const std::string name, - typename GridIn::Format format) + typename GridIn::Format format) { Triangulation tria (Triangulation::none, true); GridIn gi; @@ -124,15 +124,15 @@ void check_file (const std::string name, } catch (typename Triangulation::DistortedCellList &dcv) { - // ignore the exception + // ignore the exception deallog << dcv.distorted_cells.size() << " cells are distorted." - << std::endl; + << std::endl; } deallog << name - << '\t' << tria.n_vertices() - << '\t' << tria.n_cells() - << std::endl; + << '\t' << tria.n_vertices() + << '\t' << tria.n_cells() + << std::endl; } void filename_resolution() @@ -152,7 +152,7 @@ int main () test1<2> (); test2<2> (); - // test3 needs NetCDF + // test3 needs NetCDF // test3<2> (); filename_resolution(); diff --git a/tests/deal.II/grid_in_02.cc b/tests/deal.II/grid_in_02.cc index d73292a5cb..bf35c0c57a 100644 --- a/tests/deal.II/grid_in_02.cc +++ b/tests/deal.II/grid_in_02.cc @@ -46,13 +46,13 @@ std::ofstream logfile("grid_in_02/output"); template void test2 () { - // read a much larger grid (30k - // cells). with the old grid - // reordering scheme, this took >90 - // minutes (exact timing not - // available, program was killed - // before), with the new one it - // takes less than 8 seconds + // read a much larger grid (30k + // cells). with the old grid + // reordering scheme, this took >90 + // minutes (exact timing not + // available, program was killed + // before), with the new one it + // takes less than 8 seconds Triangulation tria (Triangulation::none, true); GridIn gi; gi.attach_triangulation (tria); @@ -63,24 +63,24 @@ void test2 () } catch (typename Triangulation::DistortedCellList &dcv) { - // ignore the exception that we - // get because the mesh has - // distorted cells + // ignore the exception that we + // get because the mesh has + // distorted cells deallog << dcv.distorted_cells.size() << " cells are distorted." - << std::endl; + << std::endl; } Triangulation<2>::active_cell_iterator - cell = tria.begin_active(), - endc = tria.end(); + cell = tria.begin_active(), + endc = tria.end(); for (; cell != endc; ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) for (unsigned int e=0; e::faces_per_cell; ++e) - if (f != e) - if (!cell->at_boundary(e) && !cell->at_boundary(f)) - Assert (cell->neighbor(e) != - cell->neighbor(f), - ExcInternalError()); + if (f != e) + if (!cell->at_boundary(e) && !cell->at_boundary(f)) + Assert (cell->neighbor(e) != + cell->neighbor(f), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/deal.II/grid_in_3d.cc b/tests/deal.II/grid_in_3d.cc index 1dd20cb60a..9ad9f9a9c2 100644 --- a/tests/deal.II/grid_in_3d.cc +++ b/tests/deal.II/grid_in_3d.cc @@ -43,7 +43,7 @@ void test (const char *filename) const unsigned int dim = 3; deallog << "Reading " << filename << std::endl; - + Triangulation<3> tria; GridIn<3> gi; gi.attach_triangulation (tria); @@ -56,8 +56,8 @@ void test (const char *filename) catch (std::exception &exc) { deallog << " caught exception:" << std::endl - << exc.what() - << std::endl; + << exc.what() + << std::endl; return; } @@ -78,7 +78,7 @@ void test1() GridIn<3> gi; gi.attach_triangulation (tria); gi.read ("grid_in_3d/1.nc"); - + GridOut grid_out; std::ofstream gnufile("square.gnuplot"); grid_out.write_gnuplot (tria, gnufile); @@ -104,8 +104,8 @@ int main () test ("grid_in_3d/evil_2.in"); test ("grid_in_3d/evil_3.in"); test ("grid_in_3d/evil_4.in"); - - // test1 needs NetCDF + + // test1 needs NetCDF // test1 (); } diff --git a/tests/deal.II/grid_in_3d_02.cc b/tests/deal.II/grid_in_3d_02.cc index 5566625650..1c3313391b 100644 --- a/tests/deal.II/grid_in_3d_02.cc +++ b/tests/deal.II/grid_in_3d_02.cc @@ -61,8 +61,8 @@ void test (const char *filename) catch (std::exception &exc) { deallog << " caught exception:" << std::endl - << exc.what() - << std::endl; + << exc.what() + << std::endl; return; } diff --git a/tests/deal.II/grid_in_msh.cc b/tests/deal.II/grid_in_msh.cc index c6e64eacb8..a70784187c 100644 --- a/tests/deal.II/grid_in_msh.cc +++ b/tests/deal.II/grid_in_msh.cc @@ -38,16 +38,16 @@ std::ofstream logfile("grid_in_msh/output"); template void check_file (const std::string name, - typename GridIn::Format format) + typename GridIn::Format format) { Triangulation tria; GridIn gi; gi.attach_triangulation (tria); gi.read(name, format); deallog << name - << '\t' << tria.n_vertices() - << '\t' << tria.n_cells() - << std::endl; + << '\t' << tria.n_vertices() + << '\t' << tria.n_cells() + << std::endl; GridOut grid_out; grid_out.write_gnuplot (tria, deallog.get_file_stream()); diff --git a/tests/deal.II/grid_in_msh_02.cc b/tests/deal.II/grid_in_msh_02.cc index 5e2b3bcc4c..5a070b128e 100644 --- a/tests/deal.II/grid_in_msh_02.cc +++ b/tests/deal.II/grid_in_msh_02.cc @@ -40,16 +40,16 @@ std::ofstream logfile("grid_in_msh_02/output"); template void check_file (const std::string name, - typename GridIn::Format format) + typename GridIn::Format format) { Triangulation tria; GridIn gi; gi.attach_triangulation (tria); gi.read(name, format); deallog << name - << '\t' << tria.n_vertices() - << '\t' << tria.n_cells() - << std::endl; + << '\t' << tria.n_vertices() + << '\t' << tria.n_cells() + << std::endl; GridOut grid_out; grid_out.write_gnuplot (tria, deallog.get_file_stream()); diff --git a/tests/deal.II/grid_in_msh_03.cc b/tests/deal.II/grid_in_msh_03.cc index ab899c5f72..a9b1c5f1de 100644 --- a/tests/deal.II/grid_in_msh_03.cc +++ b/tests/deal.II/grid_in_msh_03.cc @@ -40,16 +40,16 @@ std::ofstream logfile("grid_in_msh_03/output"); template void check_file (const std::string name, - typename GridIn::Format format) + typename GridIn::Format format) { Triangulation tria; GridIn gi; gi.attach_triangulation (tria); gi.read(name, format); deallog << name - << '\t' << tria.n_vertices() - << '\t' << tria.n_cells() - << std::endl; + << '\t' << tria.n_vertices() + << '\t' << tria.n_cells() + << std::endl; GridOut grid_out; grid_out.write_gnuplot (tria, deallog.get_file_stream()); diff --git a/tests/deal.II/grid_in_msh_version_1.cc b/tests/deal.II/grid_in_msh_version_1.cc index ef36aed5dc..a3d0006cbc 100644 --- a/tests/deal.II/grid_in_msh_version_1.cc +++ b/tests/deal.II/grid_in_msh_version_1.cc @@ -40,16 +40,16 @@ std::ofstream logfile("grid_in_msh_version_1/output"); template void check_file (const std::string name, - typename GridIn::Format format) + typename GridIn::Format format) { Triangulation tria; GridIn gi; gi.attach_triangulation (tria); gi.read(name, format); deallog << name - << '\t' << tria.n_vertices() - << '\t' << tria.n_cells() - << std::endl; + << '\t' << tria.n_vertices() + << '\t' << tria.n_cells() + << std::endl; GridOut grid_out; grid_out.write_gnuplot (tria, deallog.get_file_stream()); diff --git a/tests/deal.II/grid_in_msh_version_2.cc b/tests/deal.II/grid_in_msh_version_2.cc index 883915237b..f3ff3f0fe3 100644 --- a/tests/deal.II/grid_in_msh_version_2.cc +++ b/tests/deal.II/grid_in_msh_version_2.cc @@ -39,16 +39,16 @@ std::ofstream logfile("grid_in_msh_version_2/output"); template void check_file (const std::string name, - typename GridIn::Format format) + typename GridIn::Format format) { Triangulation tria; GridIn gi; gi.attach_triangulation (tria); gi.read(name, format); deallog << name - << '\t' << tria.n_vertices() - << '\t' << tria.n_cells() - << std::endl; + << '\t' << tria.n_vertices() + << '\t' << tria.n_cells() + << std::endl; GridOut grid_out; grid_out.write_gnuplot (tria, deallog.get_file_stream()); diff --git a/tests/deal.II/grid_in_tecplot.cc b/tests/deal.II/grid_in_tecplot.cc index 9fd62fee6a..dd755da38a 100644 --- a/tests/deal.II/grid_in_tecplot.cc +++ b/tests/deal.II/grid_in_tecplot.cc @@ -31,15 +31,15 @@ std::ofstream logfile("grid_in_tecplot/output"); template void test (const std::string &infilename) -{ +{ Triangulation tria; GridIn gi; gi.attach_triangulation (tria); gi.read (infilename); logfile<<"------------------------------------------"< void check_file (const std::string name, - typename GridIn::Format format) + typename GridIn::Format format) { Triangulation tria; GridIn gi; gi.attach_triangulation (tria); gi.read(name, format); deallog << name - << '\t' << tria.n_vertices() - << '\t' << tria.n_cells() - << std::endl; + << '\t' << tria.n_vertices() + << '\t' << tria.n_cells() + << std::endl; GridOut grid_out; grid_out.write_gnuplot (tria, deallog.get_file_stream()); diff --git a/tests/deal.II/grid_in_unv_3d.cc b/tests/deal.II/grid_in_unv_3d.cc index 27bfb5c7a2..04ddf3635e 100644 --- a/tests/deal.II/grid_in_unv_3d.cc +++ b/tests/deal.II/grid_in_unv_3d.cc @@ -41,16 +41,16 @@ std::ofstream logfile("grid_in_unv_3d/output"); template void check_file (const std::string name, - typename GridIn::Format format) + typename GridIn::Format format) { Triangulation tria; GridIn gi; gi.attach_triangulation (tria); gi.read(name, format); deallog << name - << '\t' << tria.n_vertices() - << '\t' << tria.n_cells() - << std::endl; + << '\t' << tria.n_vertices() + << '\t' << tria.n_cells() + << std::endl; GridOut grid_out; grid_out.write_gnuplot (tria, deallog.get_file_stream()); diff --git a/tests/deal.II/grid_invert.cc b/tests/deal.II/grid_invert.cc index 342257b813..dd96a8fb25 100644 --- a/tests/deal.II/grid_invert.cc +++ b/tests/deal.II/grid_invert.cc @@ -38,14 +38,14 @@ void test (bool second_case=false) if (dim==3) { for (unsigned int i=4; i::vertices_per_cell; ++i) - vertices[i](2)=-1; + vertices[i](2)=-1; vertices[5](1)=1; vertices[6](0)=1; vertices[6](1)=1; vertices[7](0)=1; } std::vector > cells(1); - for (unsigned int i=0;i::vertices_per_cell; ++i) + for (unsigned int i=0; i::vertices_per_cell; ++i) cells[0].vertices[i]=i; if (dim==3 && second_case) @@ -53,7 +53,7 @@ void test (bool second_case=false) std::swap(cells[0].vertices[1],cells[0].vertices[3]); std::swap(cells[0].vertices[5],cells[0].vertices[7]); for (unsigned int i=4; i::vertices_per_cell; ++i) - vertices[i](2)=1; + vertices[i](2)=1; } SubCellData subcelldata; @@ -63,9 +63,9 @@ void test (bool second_case=false) tria.create_triangulation_compatibility(vertices,cells,subcelldata); logfile<<"---------------------------------------------" - < void test () -{ +{ Triangulation tria; static const HyperBallBoundary x; if (dim == 2) @@ -45,10 +45,10 @@ void test () else GridGenerator::hyper_cube (tria); tria.refine_global(1); - + GridOut grid_out; GridOutFlags::Eps<2> eps2(GridOutFlags::EpsFlagsBase::width, - 300, .5, false, 5, true); + 300, .5, false, 5, true); grid_out.set_flags (eps2); if (dim != 1) diff --git a/tests/deal.II/grid_out_02.cc b/tests/deal.II/grid_out_02.cc index c789ffd132..b521d3d872 100644 --- a/tests/deal.II/grid_out_02.cc +++ b/tests/deal.II/grid_out_02.cc @@ -40,11 +40,11 @@ std::ofstream logfile("grid_out_02/output"); template void test () -{ +{ Triangulation tria; GridGenerator::hyper_cube (tria); tria.refine_global(2); - + GridOut grid_out; grid_out.write_dx (tria, logfile); diff --git a/tests/deal.II/grid_output_input.cc b/tests/deal.II/grid_output_input.cc index b3c9b867f5..8b001c6400 100644 --- a/tests/deal.II/grid_output_input.cc +++ b/tests/deal.II/grid_output_input.cc @@ -32,13 +32,13 @@ template -void test(std::ostream& out) +void test(std::ostream &out) { GridOut go; go.set_flags(GridOutFlags::Ucd(false, true, true)); go.set_flags(GridOutFlags::Msh(true, true)); Triangulation tr; - + GridGenerator::hyper_cube_with_cylindrical_hole(tr, .3, .4, 1, 1, false); CylinderBoundary boundary(.3, 2); tr.set_boundary(1, boundary); @@ -50,10 +50,10 @@ void test(std::ostream& out) tr.refine_global(1); deallog << "Writing refined from constructor" << std::endl; go.write_ucd(tr, out); - + tr.set_boundary(1); tr.clear(); - + GridIn gi; gi.attach_triangulation(tr); { @@ -67,13 +67,13 @@ void test(std::ostream& out) tr.refine_global(1); deallog << "Writing refined from file" << std::endl; go.write_ucd(tr, out); - + { std::ofstream grid_file("grid_output_input/grid.msh"); go.write_msh(tr, grid_file); grid_file.close(); } - + tr.set_boundary(1); tr.clear(); } @@ -84,7 +84,7 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + deallog.push("3d"); test<3>(logfile); deallog.pop(); diff --git a/tests/deal.II/grid_parallelepiped.cc b/tests/deal.II/grid_parallelepiped.cc index e67d63900b..1f3c2612a2 100644 --- a/tests/deal.II/grid_parallelepiped.cc +++ b/tests/deal.II/grid_parallelepiped.cc @@ -55,7 +55,7 @@ void check_parallelepiped (bool colorize, bool log) corners[0] = Point (0.0, 0.5); corners[1] = Point (0.5, 0.0); break; - + case 3: corners[0] = Point (0.0, 0.5, 0.5); corners[1] = Point (0.5, 0.0, 0.5); @@ -65,10 +65,10 @@ void check_parallelepiped (bool colorize, bool log) default: Assert (false, ExcInternalError ()); } - + Triangulation triangulation; GridGenerator::parallelepiped (triangulation, corners, colorize); - + GridOut grid_out; if (log) @@ -82,7 +82,7 @@ void check_parallelepiped (bool colorize, bool log) int main () { - // Check parallelepiped + // Check parallelepiped check_parallelepiped<1> (false, true); check_parallelepiped<2> (false, true); check_parallelepiped<3> (true, true); diff --git a/tests/deal.II/grid_parallelepiped_01.cc b/tests/deal.II/grid_parallelepiped_01.cc index 1dc8c7d0b8..620f509fd3 100644 --- a/tests/deal.II/grid_parallelepiped_01.cc +++ b/tests/deal.II/grid_parallelepiped_01.cc @@ -47,10 +47,10 @@ void check_1d_parallelepiped_by_comparison (bool log) // parallelepiped. Point<1> (corners) [1]; corners[0] = Point<1> (0.5); - + Triangulation<1> triangulation_parallelepiped; GridGenerator::parallelepiped (triangulation_parallelepiped, corners, false); - + Triangulation<1> triangulation_cube; GridGenerator::hyper_cube (triangulation_cube, 0., 0.5); @@ -58,10 +58,10 @@ void check_1d_parallelepiped_by_comparison (bool log) { logfile << "\ncheck 1d parallelepiped (hyper_cube): "; if (GridTools::have_same_coarse_mesh (triangulation_parallelepiped, - triangulation_cube)) - logfile << "OK"; + triangulation_cube)) + logfile << "OK"; else - logfile << "not OK... coarse grids are different but they should be the same"; + logfile << "not OK... coarse grids are different but they should be the same"; } } @@ -74,7 +74,7 @@ void check_2d_parallelepiped_by_comparison (bool log) Point<2> (corners) [2]; corners[0] = Point<2> (0.0, 0.5); corners[1] = Point<2> (0.5, 0.0); - + Triangulation<2> triangulation_parallelepiped; GridGenerator::parallelepiped (triangulation_parallelepiped, corners, false); @@ -85,17 +85,17 @@ void check_2d_parallelepiped_by_comparison (bool log) { logfile << "\ncheck 2d parallelepiped (parallelogram): "; if (GridTools::have_same_coarse_mesh (triangulation_parallelepiped, - triangulation_parallelogram)) - logfile << "OK"; + triangulation_parallelogram)) + logfile << "OK"; else - logfile << "not OK... coarse grids are different but they should be the same"; + logfile << "not OK... coarse grids are different but they should be the same"; } } int main () { - // Check parallelepiped + // Check parallelepiped check_1d_parallelepiped_by_comparison (true); check_2d_parallelepiped_by_comparison (true); logfile << "\n"; diff --git a/tests/deal.II/grid_parallelepiped_02.cc b/tests/deal.II/grid_parallelepiped_02.cc index 06987d30f4..e6afd18b3c 100644 --- a/tests/deal.II/grid_parallelepiped_02.cc +++ b/tests/deal.II/grid_parallelepiped_02.cc @@ -45,59 +45,59 @@ std::ofstream logfile ("grid_parallelepiped_02/output"); template void check_nd_parallelepiped_by_comparison (bool log) { - + // build corners for this particular dim that are known to give the // same output order as subdivided parallelepiped: Point (corners) [dim]; - + switch (dim) { case 1: - { - corners[0] = Point (0.50); - break; - } - + { + corners[0] = Point (0.50); + break; + } + case 2: - { - corners[0] = Point (0.25, 0.50); - corners[1] = Point (0.50, 0.25); - break; - } + { + corners[0] = Point (0.25, 0.50); + corners[1] = Point (0.50, 0.25); + break; + } case 3: - { - corners[0] = Point (0.25, 0.50, 0.50); - corners[1] = Point (0.50, 0.25, 0.50); - corners[2] = Point (0.50, 0.50, 0.25); - break; - } - + { + corners[0] = Point (0.25, 0.50, 0.50); + corners[1] = Point (0.50, 0.25, 0.50); + corners[2] = Point (0.50, 0.50, 0.25); + break; + } + default: Assert (false, ExcInternalError ()); }; - + Triangulation triangulation_parallelepiped; GridGenerator::parallelepiped (triangulation_parallelepiped, corners, false); - + Triangulation triangulation_subdivided_parallelepiped; GridGenerator::subdivided_parallelepiped (triangulation_subdivided_parallelepiped, 1, corners, false); - + if (log) { logfile << "\ncheck " << dim << "d parallelepiped (subdivided_parallelepiped): "; if (GridTools::have_same_coarse_mesh (triangulation_parallelepiped, - triangulation_subdivided_parallelepiped)) - logfile << "OK"; - + triangulation_subdivided_parallelepiped)) + logfile << "OK"; + else - logfile << "not OK... coarse grids are different but they should be the same"; + logfile << "not OK... coarse grids are different but they should be the same"; } } int main () { - // Check parallelepiped + // Check parallelepiped check_nd_parallelepiped_by_comparison<1> (true); check_nd_parallelepiped_by_comparison<2> (true); check_nd_parallelepiped_by_comparison<3> (true); diff --git a/tests/deal.II/grid_parallelepiped_03.cc b/tests/deal.II/grid_parallelepiped_03.cc index 74b75fddc6..9196c2eb8d 100644 --- a/tests/deal.II/grid_parallelepiped_03.cc +++ b/tests/deal.II/grid_parallelepiped_03.cc @@ -55,7 +55,7 @@ void check_subdivided_parallelepiped (bool colorize, bool log) corners[0] = Point (0.25, 0.50); corners[1] = Point (0.50, 0.25); break; - + case 3: corners[0] = Point (0.25, 0.50, 0.50); corners[1] = Point (0.50, 0.25, 0.50); @@ -66,12 +66,12 @@ void check_subdivided_parallelepiped (bool colorize, bool log) Assert (false, ExcInternalError ()); } - // The number of subdivisions can be anything reasonable: + // The number of subdivisions can be anything reasonable: const unsigned int n_subdivisions = (2*dim+1); Triangulation triangulation; GridGenerator::subdivided_parallelepiped (triangulation, n_subdivisions, corners, colorize); - + GridOut grid_out; if (log) @@ -85,7 +85,7 @@ void check_subdivided_parallelepiped (bool colorize, bool log) int main () { - // Check parallelepiped + // Check parallelepiped check_subdivided_parallelepiped<1> (false, true); check_subdivided_parallelepiped<2> (false, true); check_subdivided_parallelepiped<3> (true, true); diff --git a/tests/deal.II/grid_test.cc b/tests/deal.II/grid_test.cc index ffa083f861..c284132aeb 100644 --- a/tests/deal.II/grid_test.cc +++ b/tests/deal.II/grid_test.cc @@ -42,33 +42,35 @@ template class Ball : public StraightBoundary { - public: - virtual Point - get_new_point_on_line (const typename Triangulation::line_iterator &line) const { - Point middle = StraightBoundary::get_new_point_on_line(line); - - for (int i=0; i(dim)) / (std::sqrt(middle.square())*2); - for (int i=0; i + get_new_point_on_line (const typename Triangulation::line_iterator &line) const + { + Point middle = StraightBoundary::get_new_point_on_line(line); + + for (int i=0; i(dim)) / (std::sqrt(middle.square())*2); + for (int i=0; i - get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const { - Point middle = StraightBoundary::get_new_point_on_quad(quad); - - for (int i=0; i(dim)) / (std::sqrt(middle.square())*2); - for (int i=0; i + get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const + { + Point middle = StraightBoundary::get_new_point_on_quad(quad); + + for (int i=0; i(dim)) / (std::sqrt(middle.square())*2); + for (int i=0; i class CurvedLine : public StraightBoundary { - public: - virtual Point - get_new_point_on_line (const typename Triangulation::line_iterator &line) const; +public: + virtual Point + get_new_point_on_line (const typename Triangulation::line_iterator &line) const; - virtual Point - get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const; + virtual Point + get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const; }; @@ -91,45 +93,44 @@ CurvedLine::get_new_point_on_line (const typename Triangulation::line_ { Point middle = StraightBoundary::get_new_point_on_line (line); - // if the line is at the top of bottom - // face: do a special treatment on - // this line. Note that if the - // z-value of the midpoint is either - // 0 or 1, then the z-values of all - // vertices of the line is like that + // if the line is at the top of bottom + // face: do a special treatment on + // this line. Note that if the + // z-value of the midpoint is either + // 0 or 1, then the z-values of all + // vertices of the line is like that if (dim>=3) if (((middle(2) == 0) || (middle(2) == 1)) - // find out, if the line is in the - // interior of the top or bottom face - // of the domain, or at the edge. - // lines at the edge need to undergo - // the usual treatment, while for - // interior lines taking the midpoint - // is sufficient - // - // note: the trick with the boundary - // id was invented after the above was - // written, so we are not very strict - // here with using these flags - && (line->boundary_indicator() == 1)) + // find out, if the line is in the + // interior of the top or bottom face + // of the domain, or at the edge. + // lines at the edge need to undergo + // the usual treatment, while for + // interior lines taking the midpoint + // is sufficient + // + // note: the trick with the boundary + // id was invented after the above was + // written, so we are not very strict + // here with using these flags + && (line->boundary_indicator() == 1)) return middle; double x=middle(0), - y=middle(1); - + y=middle(1); + if (y::get_new_point_on_quad (const typename Triangulation::quad_ { Point middle = StraightBoundary::get_new_point_on_quad (quad); - // if the face is at the top of bottom - // face: do not move the midpoint in - // x/y direction. Note that if the - // z-value of the midpoint is either - // 0 or 1, then the z-values of all - // vertices of the quad is like that + // if the face is at the top of bottom + // face: do not move the midpoint in + // x/y direction. Note that if the + // z-value of the midpoint is either + // 0 or 1, then the z-values of all + // vertices of the quad is like that if ((middle(2) == 0) || (middle(2) == 1)) return middle; - + double x=middle(0), - y=middle(1); - + y=middle(1); + if (y tria; GridGenerator::hyper_cube(tria); tria.begin_active()->set_material_id(3); - + if ((dim==1) && ((test_case==2) || (test_case==3))) { deallog << "Impossible for this dimension." << std::endl; @@ -189,83 +189,83 @@ void test (const int test_case) }; - switch (test_case) + switch (test_case) + { + case 1: { - case 1: - { - - // refine first cell - tria.begin_active()->set_refine_flag(); - tria.execute_coarsening_and_refinement (); - - // refine first active cell - // on coarsest level - tria.begin_active()->set_refine_flag (); - tria.execute_coarsening_and_refinement (); - - typename Triangulation::active_cell_iterator cell; - for (int i=0; i<(dim==2 ? 3 : 2); ++i) - { - // refine the presently - // last cell several - // times - cell = tria.last_active(tria.n_levels()-1); - cell->set_refine_flag (); - tria.execute_coarsening_and_refinement (); - }; - - break; - } - - case 2: - case 3: - { - if (dim==3) - { - tria.begin_active()->face(4)->set_boundary_indicator(1); - tria.begin_active()->face(5)->set_boundary_indicator(1); - }; + + // refine first cell + tria.begin_active()->set_refine_flag(); + tria.execute_coarsening_and_refinement (); + + // refine first active cell + // on coarsest level + tria.begin_active()->set_refine_flag (); + tria.execute_coarsening_and_refinement (); + + typename Triangulation::active_cell_iterator cell; + for (int i=0; i<(dim==2 ? 3 : 2); ++i) + { + // refine the presently + // last cell several + // times + cell = tria.last_active(tria.n_levels()-1); + cell->set_refine_flag (); + tria.execute_coarsening_and_refinement (); + }; + + break; + } + + case 2: + case 3: + { + if (dim==3) + { + tria.begin_active()->face(4)->set_boundary_indicator(1); + tria.begin_active()->face(5)->set_boundary_indicator(1); + }; // set the boundary function - Ball ball; - CurvedLine curved_line; - if (test_case==2) - tria.set_boundary (1, ball); - else - tria.set_boundary (1, curved_line); - - // refine once - tria.begin_active()->set_refine_flag(); - tria.execute_coarsening_and_refinement (); - - typename Triangulation::active_cell_iterator cell, endc; - const unsigned int steps[4] = { 0, 2, 2, 2 }; - for (unsigned int i=0; iat_boundary()) - cell->set_refine_flag(); - - tria.execute_coarsening_and_refinement(); - }; - - tria.set_boundary (1); - break; - } + Ball ball; + CurvedLine curved_line; + if (test_case==2) + tria.set_boundary (1, ball); + else + tria.set_boundary (1, curved_line); + + // refine once + tria.begin_active()->set_refine_flag(); + tria.execute_coarsening_and_refinement (); + + typename Triangulation::active_cell_iterator cell, endc; + const unsigned int steps[4] = { 0, 2, 2, 2 }; + for (unsigned int i=0; iat_boundary()) + cell->set_refine_flag(); + + tria.execute_coarsening_and_refinement(); + }; + + tria.set_boundary (1); + break; + } } GridOut go; - go.set_flags (GridOutFlags::Ucd(true)); + go.set_flags (GridOutFlags::Ucd(true)); go.write_ucd (tria, logfile); deallog << " Total number of cells = " << tria.n_cells() << std::endl - << " Total number of active cells = " << tria.n_active_cells() << std::endl; + << " Total number of active cells = " << tria.n_active_cells() << std::endl; deallog.pop(); } @@ -278,11 +278,11 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + for (unsigned int i=1; i<=3; ++i) test<2> (i); for (unsigned int i=1; i<=3; ++i) test<3> (i); - + return 0; } diff --git a/tests/deal.II/grid_tools.cc b/tests/deal.II/grid_tools.cc index 8e17a87f55..b1ab157282 100644 --- a/tests/deal.II/grid_tools.cc +++ b/tests/deal.II/grid_tools.cc @@ -34,40 +34,40 @@ std::ofstream logfile("grid_tools/output"); template void test1 () { - // test 1: hypercube + // test 1: hypercube if (true) { Triangulation tria; GridGenerator::hyper_cube(tria); for (unsigned int i=0; i<2; ++i) - { - tria.refine_global(2); - deallog << dim << "d, " - << "hypercube diameter, " - << i*2 - << " refinements: " - << GridTools::diameter (tria) - << std::endl; - }; + { + tria.refine_global(2); + deallog << dim << "d, " + << "hypercube diameter, " + << i*2 + << " refinements: " + << GridTools::diameter (tria) + << std::endl; + }; }; - // test 2: hyperball + // test 2: hyperball if (dim == 2) { Triangulation tria; GridGenerator::hyper_ball(tria, Point(), 1); for (unsigned int i=0; i<2; ++i) - { - tria.refine_global(2); - deallog << dim << "d, " - << "hyperball diameter, " - << i*2 - << " refinements: " - << GridTools::diameter (tria) - << std::endl; - }; + { + tria.refine_global(2); + deallog << dim << "d, " + << "hyperball diameter, " + << i*2 + << " refinements: " + << GridTools::diameter (tria) + << std::endl; + }; }; } @@ -80,7 +80,7 @@ void test2 () logfile << "Unchanged grid:" << std::endl; GridOut().write_gnuplot (tria, logfile); - + logfile << "Shifted grid:" << std::endl; const Point<2> shift(1,2); GridTools::shift (shift, tria); @@ -105,7 +105,7 @@ int main () test1<3> (); test2 (); - + return 0; } diff --git a/tests/deal.II/grid_tools_02.cc b/tests/deal.II/grid_tools_02.cc index c684d5f9f8..fbe8b1aecf 100644 --- a/tests/deal.II/grid_tools_02.cc +++ b/tests/deal.II/grid_tools_02.cc @@ -36,22 +36,22 @@ std::ofstream logfile("grid_tools_02/output"); template void test1 () { - // test 1: hypercube + // test 1: hypercube if (true) { Triangulation tria; GridGenerator::hyper_cube(tria); for (unsigned int i=0; i<2; ++i) - { - tria.refine_global(2); - deallog << dim << "d, " - << "hypercube diameter, " - << i*2 - << " refinements: " - << GridTools::diameter (tria) - << std::endl; - } + { + tria.refine_global(2); + deallog << dim << "d, " + << "hypercube diameter, " + << i*2 + << " refinements: " + << GridTools::diameter (tria) + << std::endl; + } } } diff --git a/tests/deal.II/grid_tools_03.cc b/tests/deal.II/grid_tools_03.cc index c293193c5b..890a043448 100644 --- a/tests/deal.II/grid_tools_03.cc +++ b/tests/deal.II/grid_tools_03.cc @@ -36,25 +36,25 @@ std::ofstream logfile("grid_tools_03/output"); template void test1 () { - // test 1: hypercube + // test 1: hypercube if (true) { Triangulation tria; GridGenerator::hyper_cube(tria); for (unsigned int i=0; i<2; ++i) - { - tria.refine_global(2); - deallog << dim << "d, " - << "hypercube volume, " - << i*2 - << " refinements: " - << GridTools::volume (tria) - << std::endl; - }; + { + tria.refine_global(2); + deallog << dim << "d, " + << "hypercube volume, " + << i*2 + << " refinements: " + << GridTools::volume (tria) + << std::endl; + }; }; - // test 2: hyperball + // test 2: hyperball if (dim >= 2) { Triangulation tria; @@ -64,19 +64,19 @@ void test1 () tria.set_boundary (0, boundary); for (unsigned int i=0; i<4; ++i) - { - tria.refine_global(1); - deallog << dim << "d, " - << "hyperball volume, " - << i - << " refinements: " - << GridTools::volume (tria) - << std::endl; - } + { + tria.refine_global(1); + deallog << dim << "d, " + << "hyperball volume, " + << i + << " refinements: " + << GridTools::volume (tria) + << std::endl; + } deallog << "exact value=" - << (dim==2 ? numbers::PI : - 4./3.*numbers::PI) - << std::endl; + << (dim==2 ? numbers::PI : + 4./3.*numbers::PI) + << std::endl; } } diff --git a/tests/deal.II/grid_tools_04.cc b/tests/deal.II/grid_tools_04.cc index 68b4f2a16d..7a2e03e1c9 100644 --- a/tests/deal.II/grid_tools_04.cc +++ b/tests/deal.II/grid_tools_04.cc @@ -36,22 +36,22 @@ std::ofstream logfile("grid_tools_04/output"); template void test1 () { - // test 1: hypercube + // test 1: hypercube if (true) { Triangulation tria; GridGenerator::hyper_cube(tria); for (unsigned int i=0; i<2; ++i) - { - tria.refine_global(2); - deallog << dim << "d, " - << "hypercube volume, " - << i*2 - << " refinements: " - << GridTools::volume (tria) - << std::endl; - }; + { + tria.refine_global(2); + deallog << dim << "d, " + << "hypercube volume, " + << i*2 + << " refinements: " + << GridTools::volume (tria) + << std::endl; + }; }; } diff --git a/tests/deal.II/grid_tools_05.cc b/tests/deal.II/grid_tools_05.cc index acb6aed46e..e099e85470 100644 --- a/tests/deal.II/grid_tools_05.cc +++ b/tests/deal.II/grid_tools_05.cc @@ -45,127 +45,135 @@ using namespace dealii; /* The 2D case */ void generate_grid(Triangulation<2> &triangulation, int orientation) { - Point<2> vertices_1[] - = { - Point<2> (-1.,-3.), - Point<2> (+1.,-3.), - Point<2> (-1.,-1.), - Point<2> (+1.,-1.), - Point<2> (-1.,+1.), - Point<2> (+1.,+1.), - Point<2> (-1.,+3.), - Point<2> (+1.,+3.), - }; - std::vector > vertices (&vertices_1[0], &vertices_1[8]); - - std::vector > cells (2, CellData<2>()); - - /* cell 0 */ - int cell_vertices_0[GeometryInfo<2>::vertices_per_cell] = {0, 1, 2, 3}; - - /* cell 1 */ - int cell_vertices_1[2][GeometryInfo<2>::vertices_per_cell] - = { - {4,5,6,7}, - {7,6,5,4}, - }; - - for (unsigned int j=0;j::vertices_per_cell;++j) { + Point<2> vertices_1[] + = + { + Point<2> (-1.,-3.), + Point<2> (+1.,-3.), + Point<2> (-1.,-1.), + Point<2> (+1.,-1.), + Point<2> (-1.,+1.), + Point<2> (+1.,+1.), + Point<2> (-1.,+3.), + Point<2> (+1.,+3.), + }; + std::vector > vertices (&vertices_1[0], &vertices_1[8]); + + std::vector > cells (2, CellData<2>()); + + /* cell 0 */ + int cell_vertices_0[GeometryInfo<2>::vertices_per_cell] = {0, 1, 2, 3}; + + /* cell 1 */ + int cell_vertices_1[2][GeometryInfo<2>::vertices_per_cell] + = + { + {4,5,6,7}, + {7,6,5,4}, + }; + + for (unsigned int j=0; j::vertices_per_cell; ++j) + { cells[0].vertices[j] = cell_vertices_0[j]; cells[1].vertices[j] = cell_vertices_1[orientation][j]; } - cells[0].material_id = 0; - cells[1].material_id = 0; + cells[0].material_id = 0; + cells[1].material_id = 0; - triangulation.create_triangulation(vertices, cells, SubCellData()); + triangulation.create_triangulation(vertices, cells, SubCellData()); - Triangulation<2>::cell_iterator cell_1 = triangulation.begin(); - Triangulation<2>::cell_iterator cell_2 = cell_1++; - Triangulation<2>::face_iterator face_1; - Triangulation<2>::face_iterator face_2; + Triangulation<2>::cell_iterator cell_1 = triangulation.begin(); + Triangulation<2>::cell_iterator cell_2 = cell_1++; + Triangulation<2>::face_iterator face_1; + Triangulation<2>::face_iterator face_2; - // Look for the two outermost faces: - for (unsigned int j=0;j::faces_per_cell;++j) { + // Look for the two outermost faces: + for (unsigned int j=0; j::faces_per_cell; ++j) + { if (cell_1->face(j)->center()(1) > 2.9) face_1 = cell_1->face(j); if (cell_2->face(j)->center()(1) < -2.9) face_2 = cell_2->face(j); } - face_1->set_boundary_indicator(42); - face_2->set_boundary_indicator(43); + face_1->set_boundary_indicator(42); + face_2->set_boundary_indicator(43); - triangulation.refine_global(1); + triangulation.refine_global(1); } /* The 3D case */ void generate_grid(Triangulation<3> &triangulation, int orientation) { - Point<3> vertices_1[] - = { - Point<3> (-1.,-1.,-3.), - Point<3> (+1.,-1.,-3.), - Point<3> (-1.,+1.,-3.), - Point<3> (+1.,+1.,-3.), - Point<3> (-1.,-1.,-1.), - Point<3> (+1.,-1.,-1.), - Point<3> (-1.,+1.,-1.), - Point<3> (+1.,+1.,-1.), - Point<3> (-1.,-1.,+1.), - Point<3> (+1.,-1.,+1.), - Point<3> (-1.,+1.,+1.), - Point<3> (+1.,+1.,+1.), - Point<3> (-1.,-1.,+3.), - Point<3> (+1.,-1.,+3.), - Point<3> (-1.,+1.,+3.), - Point<3> (+1.,+1.,+3.) - }; - std::vector > vertices (&vertices_1[0], &vertices_1[16]); - - std::vector > cells (2, CellData<3>()); - - /* cell 0 */ - int cell_vertices_0[GeometryInfo<3>::vertices_per_cell] = {0, 1, 2, 3, 4, 5, 6, 7}; - - /* cell 1 */ - int cell_vertices_1[8][GeometryInfo<3>::vertices_per_cell] - = { - {8,9,10,11,12,13,14,15}, - {9,11,8,10,13,15,12,14}, - {11,10,9,8,15,14,13,12}, - {10,8,11,9,14,12,15,13}, - {13,12,15,14,9,8,11,10}, - {12,14,13,15,8,10,9,11}, - {14,15,12,13,10,11,8,9}, - {15,13,14,12,11,9,10,8}, - }; - - for (unsigned int j=0;j::vertices_per_cell;++j) { + Point<3> vertices_1[] + = + { + Point<3> (-1.,-1.,-3.), + Point<3> (+1.,-1.,-3.), + Point<3> (-1.,+1.,-3.), + Point<3> (+1.,+1.,-3.), + Point<3> (-1.,-1.,-1.), + Point<3> (+1.,-1.,-1.), + Point<3> (-1.,+1.,-1.), + Point<3> (+1.,+1.,-1.), + Point<3> (-1.,-1.,+1.), + Point<3> (+1.,-1.,+1.), + Point<3> (-1.,+1.,+1.), + Point<3> (+1.,+1.,+1.), + Point<3> (-1.,-1.,+3.), + Point<3> (+1.,-1.,+3.), + Point<3> (-1.,+1.,+3.), + Point<3> (+1.,+1.,+3.) + }; + std::vector > vertices (&vertices_1[0], &vertices_1[16]); + + std::vector > cells (2, CellData<3>()); + + /* cell 0 */ + int cell_vertices_0[GeometryInfo<3>::vertices_per_cell] = {0, 1, 2, 3, 4, 5, 6, 7}; + + /* cell 1 */ + int cell_vertices_1[8][GeometryInfo<3>::vertices_per_cell] + = + { + {8,9,10,11,12,13,14,15}, + {9,11,8,10,13,15,12,14}, + {11,10,9,8,15,14,13,12}, + {10,8,11,9,14,12,15,13}, + {13,12,15,14,9,8,11,10}, + {12,14,13,15,8,10,9,11}, + {14,15,12,13,10,11,8,9}, + {15,13,14,12,11,9,10,8}, + }; + + for (unsigned int j=0; j::vertices_per_cell; ++j) + { cells[0].vertices[j] = cell_vertices_0[j]; cells[1].vertices[j] = cell_vertices_1[orientation][j]; } - cells[0].material_id = 0; - cells[1].material_id = 0; + cells[0].material_id = 0; + cells[1].material_id = 0; - triangulation.create_triangulation(vertices, cells, SubCellData()); + triangulation.create_triangulation(vertices, cells, SubCellData()); - Triangulation<3>::cell_iterator cell_1 = triangulation.begin(); - Triangulation<3>::cell_iterator cell_2 = cell_1++; - Triangulation<3>::face_iterator face_1; - Triangulation<3>::face_iterator face_2; + Triangulation<3>::cell_iterator cell_1 = triangulation.begin(); + Triangulation<3>::cell_iterator cell_2 = cell_1++; + Triangulation<3>::face_iterator face_1; + Triangulation<3>::face_iterator face_2; - // Look for the two outermost faces: - for (unsigned int j=0;j::faces_per_cell;++j) { + // Look for the two outermost faces: + for (unsigned int j=0; j::faces_per_cell; ++j) + { if (cell_1->face(j)->center()(2) > 2.9) face_1 = cell_1->face(j); if (cell_2->face(j)->center()(2) < -2.9) face_2 = cell_2->face(j); } - face_1->set_boundary_indicator(42); - face_2->set_boundary_indicator(43); + face_1->set_boundary_indicator(42); + face_2->set_boundary_indicator(43); - triangulation.refine_global(1); + triangulation.refine_global(1); } @@ -181,20 +189,20 @@ void print_match(const FaceIterator &face_1, static const int dim = FaceIterator::AccessorType::dimension; deallog << "face 1"; - for (unsigned int j=0;j::vertices_per_face;++j) + for (unsigned int j=0; j::vertices_per_face; ++j) deallog << " :: " << face_1->vertex(j); deallog << std::endl; deallog << "face 2"; - for (unsigned int j=0;j::vertices_per_face;++j) + for (unsigned int j=0; j::vertices_per_face; ++j) deallog << " :: " << face_2->vertex(j); deallog << std::endl; deallog << "orientation: " << orientation[0] - << " flip: " << orientation[1] - << " rotation: " << orientation[2] - << std::endl - << std::endl; + << " flip: " << orientation[1] + << " rotation: " << orientation[2] + << std::endl + << std::endl; } int main() @@ -207,71 +215,73 @@ int main() deallog << "Test for 2D: Hypercube" << std::endl << std::endl; - for(int i = 0; i < 2; ++i) { - // Generate a triangulation and match: - Triangulation<2> triangulation; + for (int i = 0; i < 2; ++i) + { + // Generate a triangulation and match: + Triangulation<2> triangulation; - generate_grid(triangulation, i); + generate_grid(triangulation, i); - typedef Triangulation<2>::face_iterator FaceIterator; - typedef std::map > > FaceMap; - FaceMap test = GridTools::collect_periodic_face_pairs (triangulation, 42, 43, 1, - dealii::Tensor<1,2>()); + typedef Triangulation<2>::face_iterator FaceIterator; + typedef std::map > > FaceMap; + FaceMap test = GridTools::collect_periodic_face_pairs (triangulation, 42, 43, 1, + dealii::Tensor<1,2>()); - deallog << "Triangulation: " << i << std::endl; - deallog << "Coarse match: " << test.size() << std::endl; + deallog << "Triangulation: " << i << std::endl; + deallog << "Coarse match: " << test.size() << std::endl; - for (FaceMap::iterator facepair = test.begin(); facepair != test.end(); ++facepair) - print_match(facepair->first, facepair->second.first, facepair->second.second); + for (FaceMap::iterator facepair = test.begin(); facepair != test.end(); ++facepair) + print_match(facepair->first, facepair->second.first, facepair->second.second); - typedef Triangulation<2>::active_face_iterator FaceIterator2; - typedef std::map > > FaceMap2; - FaceMap2 test2 = GridTools::collect_periodic_face_pairs (triangulation.begin_active_face(), - triangulation.end_face(), - 42, 43, - 1, - dealii::Tensor<1,2>()); + typedef Triangulation<2>::active_face_iterator FaceIterator2; + typedef std::map > > FaceMap2; + FaceMap2 test2 = GridTools::collect_periodic_face_pairs (triangulation.begin_active_face(), + triangulation.end_face(), + 42, 43, + 1, + dealii::Tensor<1,2>()); - deallog << "Fine match: " << test2.size() << std::endl; + deallog << "Fine match: " << test2.size() << std::endl; - for (FaceMap2::iterator facepair = test2.begin(); facepair != test2.end(); ++facepair) - print_match(facepair->first, facepair->second.first, facepair->second.second); - } + for (FaceMap2::iterator facepair = test2.begin(); facepair != test2.end(); ++facepair) + print_match(facepair->first, facepair->second.first, facepair->second.second); + } deallog << "Test for 3D: Hypercube" << std::endl << std::endl; - for(int i = 0; i < 8; ++i) { - // Generate a triangulation and match: - Triangulation<3> triangulation; + for (int i = 0; i < 8; ++i) + { + // Generate a triangulation and match: + Triangulation<3> triangulation; - generate_grid(triangulation, i); + generate_grid(triangulation, i); - typedef Triangulation<3>::face_iterator FaceIterator; - typedef std::map > > FaceMap; - FaceMap test = GridTools::collect_periodic_face_pairs (triangulation, 42, 43, 2, - dealii::Tensor<1,3>()); + typedef Triangulation<3>::face_iterator FaceIterator; + typedef std::map > > FaceMap; + FaceMap test = GridTools::collect_periodic_face_pairs (triangulation, 42, 43, 2, + dealii::Tensor<1,3>()); - deallog << "Triangulation: " << i << std::endl; - deallog << "Coarse match: " << test.size() << std::endl; + deallog << "Triangulation: " << i << std::endl; + deallog << "Coarse match: " << test.size() << std::endl; - for (FaceMap::iterator facepair = test.begin(); facepair != test.end(); ++facepair) - print_match(facepair->first, facepair->second.first, facepair->second.second); + for (FaceMap::iterator facepair = test.begin(); facepair != test.end(); ++facepair) + print_match(facepair->first, facepair->second.first, facepair->second.second); - typedef Triangulation<3>::active_face_iterator FaceIterator2; - typedef std::map > > FaceMap2; - FaceMap2 test2 = GridTools::collect_periodic_face_pairs (triangulation.begin_active_face(), - triangulation.end_face(), - 42, 43, - 2, - dealii::Tensor<1,3>()); + typedef Triangulation<3>::active_face_iterator FaceIterator2; + typedef std::map > > FaceMap2; + FaceMap2 test2 = GridTools::collect_periodic_face_pairs (triangulation.begin_active_face(), + triangulation.end_face(), + 42, 43, + 2, + dealii::Tensor<1,3>()); - deallog << "Fine match: " << test2.size() << std::endl; + deallog << "Fine match: " << test2.size() << std::endl; - for (FaceMap2::iterator facepair = test2.begin(); facepair != test2.end(); ++facepair) - print_match(facepair->first, facepair->second.first, facepair->second.second); - } + for (FaceMap2::iterator facepair = test2.begin(); facepair != test2.end(); ++facepair) + print_match(facepair->first, facepair->second.first, facepair->second.second); + } return 0; } diff --git a/tests/deal.II/grid_transform.cc b/tests/deal.II/grid_transform.cc index c2f0f5d199..4b04d09603 100644 --- a/tests/deal.II/grid_transform.cc +++ b/tests/deal.II/grid_transform.cc @@ -42,58 +42,58 @@ int main () const double outer_radius=5.; GridGenerator::hyper_shell(tria, origin, inner_radius, outer_radius, 8); tria.refine_global(2); - - // build up a map of vertex indices - // of boundary vertices to the new - // boundary points + + // build up a map of vertex indices + // of boundary vertices to the new + // boundary points std::map > new_points; - - // new center and new radius - // of the inner circle. + + // new center and new radius + // of the inner circle. const Point n_center(0,-1); const double n_radius=0.5; Triangulation::cell_iterator cell=tria.begin_active(), - endc=tria.end(); + endc=tria.end(); Triangulation::face_iterator face; for (; cell!=endc; ++cell) { if (cell->at_boundary()) - for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no) - { - face=cell->face(face_no); - if (face->at_boundary()) - for (unsigned int vertex_no=0; - vertex_no::vertices_per_face; ++vertex_no) - { - const Point &v=face->vertex(vertex_no); - if (std::fabs(std::sqrt(v.square())-outer_radius)<1e-12) - { - // leave the - // point, where - // they are. - new_points.insert(std::pair > ( - face->vertex_index(vertex_no), v)); - } - else if (std::fabs(std::sqrt(v.square())-inner_radius)<1e-12) - { - // move the - // center of - // the inner - // circle to - // (-1,0) and - // take half - // the radius - // of the - // circle. - new_points.insert(std::pair > ( - face->vertex_index(vertex_no), n_radius/inner_radius*v+n_center)); - face->set_boundary_indicator(1); - } - else - Assert(false, ExcInternalError()); - } - } + for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no) + { + face=cell->face(face_no); + if (face->at_boundary()) + for (unsigned int vertex_no=0; + vertex_no::vertices_per_face; ++vertex_no) + { + const Point &v=face->vertex(vertex_no); + if (std::fabs(std::sqrt(v.square())-outer_radius)<1e-12) + { + // leave the + // point, where + // they are. + new_points.insert(std::pair > ( + face->vertex_index(vertex_no), v)); + } + else if (std::fabs(std::sqrt(v.square())-inner_radius)<1e-12) + { + // move the + // center of + // the inner + // circle to + // (-1,0) and + // take half + // the radius + // of the + // circle. + new_points.insert(std::pair > ( + face->vertex_index(vertex_no), n_radius/inner_radius*v+n_center)); + face->set_boundary_indicator(1); + } + else + Assert(false, ExcInternalError()); + } + } } GridGenerator::laplace_transformation (tria, new_points); @@ -105,6 +105,6 @@ int main () grid_out.write_eps(tria, eps_stream2, &mapping); tria.clear(); - + return 0; } diff --git a/tests/deal.II/grid_transform_3d.cc b/tests/deal.II/grid_transform_3d.cc index f38ca31b9c..e9880aa74c 100644 --- a/tests/deal.II/grid_transform_3d.cc +++ b/tests/deal.II/grid_transform_3d.cc @@ -40,14 +40,14 @@ int main () tria.set_boundary(0, boundary); GridGenerator::cylinder(tria, 1, .7); tria.refine_global(2); - - // build up a map of vertex indices - // of boundary vertices to the new - // boundary points + + // build up a map of vertex indices + // of boundary vertices to the new + // boundary points std::map > new_points; - + Triangulation::active_cell_iterator cell=tria.begin_active(), - endc=tria.end(); + endc=tria.end(); for (cell=tria.begin_active(); cell!=endc; ++cell) if ((cell->center()[0]-.2)*(cell->center()[0]-.2) + @@ -58,45 +58,45 @@ int main () for (cell=tria.begin_active(); cell!=endc; ++cell) if ((cell->center()[0]-.2)*(cell->center()[0]-.2) + - (cell->center()[2]-cell->center()[1]/4)*(cell->center()[2]-cell->center()[1]/4) - < cell->diameter() * cell->diameter()) + (cell->center()[2]-cell->center()[1]/4)*(cell->center()[2]-cell->center()[1]/4) + < cell->diameter() * cell->diameter()) cell->set_refine_flag (); else cell->set_coarsen_flag (); tria.execute_coarsening_and_refinement(); - + Triangulation::face_iterator face; for (cell=tria.begin_active(); cell!=endc; ++cell) for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no) { - face=cell->face(face_no); - if (face->at_boundary()) - for (unsigned int vertex_no=0; - vertex_no::vertices_per_face; ++vertex_no) - { - const Point &old_vertex=face->vertex(vertex_no); - - Point new_vertex (old_vertex[0], - old_vertex[1], - (old_vertex[0] <= 0 ? - old_vertex[2]/2 : - old_vertex[2]/(2+4*old_vertex[0]*old_vertex[0]))); - - new_points[face->vertex_index(vertex_no)] = new_vertex; - } + face=cell->face(face_no); + if (face->at_boundary()) + for (unsigned int vertex_no=0; + vertex_no::vertices_per_face; ++vertex_no) + { + const Point &old_vertex=face->vertex(vertex_no); + + Point new_vertex (old_vertex[0], + old_vertex[1], + (old_vertex[0] <= 0 ? + old_vertex[2]/2 : + old_vertex[2]/(2+4*old_vertex[0]*old_vertex[0]))); + + new_points[face->vertex_index(vertex_no)] = new_vertex; + } } GridGenerator::laplace_transformation (tria, new_points); - - + + GridOut grid_out; std::ofstream out("grid_transform_3d/output"); out.precision (5); out << std::fixed; grid_out.write_gnuplot(tria, out); - + tria.clear(); - + return 0; } diff --git a/tests/deal.II/have_same_coarse_mesh_01.cc b/tests/deal.II/have_same_coarse_mesh_01.cc index 97b34946da..e5470346fa 100644 --- a/tests/deal.II/have_same_coarse_mesh_01.cc +++ b/tests/deal.II/have_same_coarse_mesh_01.cc @@ -30,12 +30,12 @@ template void test() { - // create 3 triangulations + // create 3 triangulations Triangulation tria[3]; GridGenerator::hyper_cube (tria[0]); tria[0].refine_global (1); - + GridGenerator::hyper_cube (tria[1]); GridTools::scale (2, tria[1]); tria[1].refine_global (2); @@ -47,7 +47,7 @@ void test() GridGenerator::hyper_cube (tria[2]); GridTools::shift (Point(2.), tria[2]); } - + tria[2].refine_global (3); for (unsigned int i=0; i<3; ++i) @@ -57,7 +57,7 @@ void test() == (i == j), ExcInternalError()); - + deallog << "meshes " << i << " and " << j << ": " << (GridTools::have_same_coarse_mesh (tria[i], tria[j]) ? diff --git a/tests/deal.II/have_same_coarse_mesh_02.cc b/tests/deal.II/have_same_coarse_mesh_02.cc index 004b59b985..a0d5d28773 100644 --- a/tests/deal.II/have_same_coarse_mesh_02.cc +++ b/tests/deal.II/have_same_coarse_mesh_02.cc @@ -30,12 +30,12 @@ template void test() { - // create 3 triangulations + // create 3 triangulations Triangulation tria[3]; GridGenerator::hyper_cube (tria[0]); tria[0].refine_global (1); - + GridGenerator::hyper_cube (tria[1]); GridTools::scale (2, tria[1]); tria[1].refine_global (2); @@ -47,15 +47,15 @@ void test() GridGenerator::hyper_cube (tria[2]); GridTools::shift (Point(2.), tria[2]); } - + tria[2].refine_global (3); DoFHandler dh0 (tria[0]); DoFHandler dh1 (tria[1]); DoFHandler dh2 (tria[2]); - + DoFHandler *dof_handler[3] = { &dh0, &dh1, &dh2 }; - + for (unsigned int i=0; i<3; ++i) for (unsigned int j=0; j<3; ++j) { @@ -63,7 +63,7 @@ void test() == (i == j), ExcInternalError()); - + deallog << "meshes " << i << " and " << j << ": " << (GridTools::have_same_coarse_mesh (*dof_handler[i], *dof_handler[j]) ? diff --git a/tests/deal.II/have_same_coarse_mesh_03.cc b/tests/deal.II/have_same_coarse_mesh_03.cc index cd42132b8a..4eaa255a91 100644 --- a/tests/deal.II/have_same_coarse_mesh_03.cc +++ b/tests/deal.II/have_same_coarse_mesh_03.cc @@ -30,12 +30,12 @@ template void test() { - // create 3 triangulations + // create 3 triangulations Triangulation tria[3]; GridGenerator::hyper_cube (tria[0]); tria[0].refine_global (1); - + GridGenerator::hyper_cube (tria[1]); GridTools::scale (2, tria[1]); tria[1].refine_global (2); @@ -47,15 +47,15 @@ void test() GridGenerator::hyper_cube (tria[2]); GridTools::shift (Point(2.), tria[2]); } - + tria[2].refine_global (3); hp::DoFHandler dh0 (tria[0]); hp::DoFHandler dh1 (tria[1]); hp::DoFHandler dh2 (tria[2]); - + hp::DoFHandler *dof_handler[3] = { &dh0, &dh1, &dh2 }; - + for (unsigned int i=0; i<3; ++i) for (unsigned int j=0; j<3; ++j) { @@ -63,7 +63,7 @@ void test() == (i == j), ExcInternalError()); - + deallog << "meshes " << i << " and " << j << ": " << (GridTools::have_same_coarse_mesh (*dof_handler[i], *dof_handler[j]) ? diff --git a/tests/deal.II/have_same_coarse_mesh_04.cc b/tests/deal.II/have_same_coarse_mesh_04.cc index 35239d73b6..0811cbb6d0 100644 --- a/tests/deal.II/have_same_coarse_mesh_04.cc +++ b/tests/deal.II/have_same_coarse_mesh_04.cc @@ -30,12 +30,12 @@ template void test() { - // create 3 triangulations + // create 3 triangulations Triangulation tria[3]; GridGenerator::hyper_cube (tria[0]); tria[0].refine_global (1); - + GridGenerator::hyper_cube (tria[1]); GridTools::scale (2, tria[1]); tria[1].refine_global (2); @@ -47,15 +47,15 @@ void test() GridGenerator::hyper_cube (tria[2]); GridTools::shift (Point(2.), tria[2]); } - + tria[2].refine_global (3); MGDoFHandler dh0 (tria[0]); MGDoFHandler dh1 (tria[1]); MGDoFHandler dh2 (tria[2]); - + MGDoFHandler *dof_handler[3] = { &dh0, &dh1, &dh2 }; - + for (unsigned int i=0; i<3; ++i) for (unsigned int j=0; j<3; ++j) { @@ -63,7 +63,7 @@ void test() == (i == j), ExcInternalError()); - + deallog << "meshes " << i << " and " << j << ": " << (GridTools::have_same_coarse_mesh (*dof_handler[i], *dof_handler[j]) ? diff --git a/tests/deal.II/helmholtz.h b/tests/deal.II/helmholtz.h index 728fdd0ea5..f8904f1abc 100644 --- a/tests/deal.II/helmholtz.h +++ b/tests/deal.II/helmholtz.h @@ -8,18 +8,18 @@ */ class Helmholtz { - public: - template - void build_all(MATRIX& A, - VECTOR& f, - const DoFHandler& dof, - const Quadrature& quadrature, - const Function& rhs); +public: + template + void build_all(MATRIX &A, + VECTOR &f, + const DoFHandler &dof, + const Quadrature &quadrature, + const Function &rhs); - template - void build_mgmatrix(MGLevelObject& A, - const MGDoFHandler& dof, - const Quadrature& quadrature); + template + void build_mgmatrix(MGLevelObject &A, + const MGDoFHandler &dof, + const Quadrature &quadrature); }; #include "helmholtz1.th" diff --git a/tests/deal.II/inhomogeneous_constraints.cc b/tests/deal.II/inhomogeneous_constraints.cc index 1d31826e57..86809599b7 100644 --- a/tests/deal.II/inhomogeneous_constraints.cc +++ b/tests/deal.II/inhomogeneous_constraints.cc @@ -59,44 +59,44 @@ std::ofstream logfile("inhomogeneous_constraints/output"); using namespace dealii; template -class LaplaceProblem +class LaplaceProblem { - public: - LaplaceProblem (); - ~LaplaceProblem (); - - void run (); - - private: - void setup_system (); - void test_equality (); - void assemble_reference (); - void assemble_test_1 (); - void assemble_test_2 (); - void solve (); - void create_coarse_grid (); - void estimate_smoothness (Vector &smoothness_indicators) const; - void postprocess (); - - Triangulation triangulation; - - hp::DoFHandler dof_handler; - hp::FECollection fe_collection; - hp::QCollection quadrature_collection; - hp::QCollection face_quadrature_collection; - - ConstraintMatrix hanging_nodes_only; - ConstraintMatrix test_all_constraints; - - SparsityPattern sparsity_pattern; - SparseMatrix reference_matrix; - SparseMatrix test_matrix; - - Vector solution; - Vector reference_rhs; - Vector test_rhs; - - const unsigned int max_degree; +public: + LaplaceProblem (); + ~LaplaceProblem (); + + void run (); + +private: + void setup_system (); + void test_equality (); + void assemble_reference (); + void assemble_test_1 (); + void assemble_test_2 (); + void solve (); + void create_coarse_grid (); + void estimate_smoothness (Vector &smoothness_indicators) const; + void postprocess (); + + Triangulation triangulation; + + hp::DoFHandler dof_handler; + hp::FECollection fe_collection; + hp::QCollection quadrature_collection; + hp::QCollection face_quadrature_collection; + + ConstraintMatrix hanging_nodes_only; + ConstraintMatrix test_all_constraints; + + SparsityPattern sparsity_pattern; + SparseMatrix reference_matrix; + SparseMatrix test_matrix; + + Vector solution; + Vector reference_rhs; + Vector test_rhs; + + const unsigned int max_degree; }; @@ -104,18 +104,18 @@ class LaplaceProblem template class BoundaryValues : public Function { - public: - BoundaryValues () : Function () {} - - virtual double value (const Point &p, - const unsigned int component) const; +public: + BoundaryValues () : Function () {} + + virtual double value (const Point &p, + const unsigned int component) const; }; template double BoundaryValues::value (const Point &p, - const unsigned int /*component*/) const + const unsigned int /*component*/) const { double sum = 0; for (unsigned int d=0; d::value (const Point &p, template class RightHandSide : public Function { - public: - RightHandSide () : Function () {} - - virtual double value (const Point &p, - const unsigned int component) const; +public: + RightHandSide () : Function () {} + + virtual double value (const Point &p, + const unsigned int component) const; }; template double RightHandSide::value (const Point &p, - const unsigned int /*component*/) const + const unsigned int /*component*/) const { double product = 1; for (unsigned int d=0; d::value (const Point &p, template LaplaceProblem::LaplaceProblem () - : - dof_handler (triangulation), - max_degree (5) + : + dof_handler (triangulation), + max_degree (5) { if (dim == 2) for (unsigned int degree=2; degree<=max_degree; ++degree) { - fe_collection.push_back (FE_Q(degree)); - quadrature_collection.push_back (QGauss(degree+1)); - face_quadrature_collection.push_back (QGauss(degree+1)); + fe_collection.push_back (FE_Q(degree)); + quadrature_collection.push_back (QGauss(degree+1)); + face_quadrature_collection.push_back (QGauss(degree+1)); } else for (unsigned int degree=1; degree(degree)); - quadrature_collection.push_back (QGauss(degree+1)); - face_quadrature_collection.push_back (QGauss(degree+1)); + fe_collection.push_back (FE_Q(degree)); + quadrature_collection.push_back (QGauss(degree+1)); + face_quadrature_collection.push_back (QGauss(degree+1)); } } template -LaplaceProblem::~LaplaceProblem () +LaplaceProblem::~LaplaceProblem () { dof_handler.clear (); } @@ -190,41 +190,41 @@ void LaplaceProblem::setup_system () test_all_constraints.clear (); DoFTools::make_hanging_node_constraints (dof_handler, - hanging_nodes_only); + hanging_nodes_only); hanging_nodes_only.close (); - // add boundary conditions as inhomogeneous - // constraints here, do it after having - // added the hanging node constraints in - // order to be consistent and skip dofs - // that are already constrained (i.e., are - // hanging nodes on the boundary in 3D). In - // contrast to step-27, we choose a sine - // function. + // add boundary conditions as inhomogeneous + // constraints here, do it after having + // added the hanging node constraints in + // order to be consistent and skip dofs + // that are already constrained (i.e., are + // hanging nodes on the boundary in 3D). In + // contrast to step-27, we choose a sine + // function. { test_all_constraints.merge (hanging_nodes_only); std::map boundary_values; VectorTools::interpolate_boundary_values (dof_handler, - 0, - BoundaryValues(), - boundary_values); + 0, + BoundaryValues(), + boundary_values); std::map::const_iterator boundary_value = boundary_values.begin(); for ( ; boundary_value !=boundary_values.end(); ++boundary_value) { - if (!test_all_constraints.is_constrained(boundary_value->first)) - { - test_all_constraints.add_line(boundary_value->first); - test_all_constraints.set_inhomogeneity (boundary_value->first, - boundary_value->second); - } + if (!test_all_constraints.is_constrained(boundary_value->first)) + { + test_all_constraints.add_line(boundary_value->first); + test_all_constraints.set_inhomogeneity (boundary_value->first, + boundary_value->second); + } } } test_all_constraints.close (); CompressedSimpleSparsityPattern csp (dof_handler.n_dofs(), - dof_handler.n_dofs()); + dof_handler.n_dofs()); DoFTools::make_sparsity_pattern (dof_handler, csp, - hanging_nodes_only, true); + hanging_nodes_only, true); sparsity_pattern.copy_from (csp); reference_matrix.reinit (sparsity_pattern); @@ -233,44 +233,44 @@ void LaplaceProblem::setup_system () - // test whether we are equal with the - // standard matrix and right hand side +// test whether we are equal with the +// standard matrix and right hand side template void LaplaceProblem::test_equality () { - // need to manually go through the - // matrix, since we can have different - // entries in constrained lines. + // need to manually go through the + // matrix, since we can have different + // entries in constrained lines. for (unsigned int i=0; i::const_iterator reference = reference_matrix.begin(i); SparseMatrix::iterator test = test_matrix.begin(i); if (test_all_constraints.is_constrained(i) == false) - { - for ( ; test != test_matrix.end(i); ++test, ++reference) - test->value() -= reference->value(); - } + { + for ( ; test != test_matrix.end(i); ++test, ++reference) + test->value() -= reference->value(); + } else - for ( ; test != test_matrix.end(i); ++test) - test->value() = 0; + for ( ; test != test_matrix.end(i); ++test) + test->value() = 0; } - deallog << " Matrix difference norm: " - << test_matrix.frobenius_norm() << std::endl; + deallog << " Matrix difference norm: " + << test_matrix.frobenius_norm() << std::endl; Assert (test_matrix.frobenius_norm() < 1e-13, ExcInternalError()); - // same here -- Dirichlet lines will have - // nonzero rhs, whereas we will have zero - // rhs when using inhomogeneous - // constraints. + // same here -- Dirichlet lines will have + // nonzero rhs, whereas we will have zero + // rhs when using inhomogeneous + // constraints. for (unsigned int i=0; i::test_equality () template -void LaplaceProblem::assemble_reference () +void LaplaceProblem::assemble_reference () { reference_matrix = 0; reference_rhs = 0; hp::FEValues hp_fe_values (fe_collection, - quadrature_collection, - update_values | update_gradients | - update_quadrature_points | update_JxW_values); + quadrature_collection, + update_values | update_gradients | + update_quadrature_points | update_JxW_values); const RightHandSide rhs_function; @@ -295,10 +295,10 @@ void LaplaceProblem::assemble_reference () Vector cell_rhs; std::vector local_dof_indices; - + 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 (; cell!=endc; ++cell) { const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell; @@ -310,75 +310,75 @@ void LaplaceProblem::assemble_reference () cell_rhs = 0; hp_fe_values.reinit (cell); - + const FEValues &fe_values = hp_fe_values.get_present_fe_values (); std::vector rhs_values (fe_values.n_quadrature_points); rhs_function.value_list (fe_values.get_quadrature_points(), - rhs_values); - + rhs_values); + for (unsigned int q_point=0; - q_pointget_dof_indices (local_dof_indices); reference_matrix.add(local_dof_indices, cell_matrix); for (unsigned int i=0; i boundary_values; VectorTools::interpolate_boundary_values (dof_handler, - 0, - BoundaryValues(), - boundary_values); + 0, + BoundaryValues(), + boundary_values); MatrixTools::apply_boundary_values (boundary_values, - reference_matrix, - solution, - reference_rhs); + reference_matrix, + solution, + reference_rhs); - deallog << " Reference matrix nonzeros: " << reference_matrix.n_nonzero_elements() - << ", actually: " << reference_matrix.n_actually_nonzero_elements (1e-10) - << std::endl; + deallog << " Reference matrix nonzeros: " << reference_matrix.n_nonzero_elements() + << ", actually: " << reference_matrix.n_actually_nonzero_elements (1e-10) + << std::endl; } template -void LaplaceProblem::assemble_test_1 () +void LaplaceProblem::assemble_test_1 () { test_matrix = 0; test_rhs = 0; hp::FEValues hp_fe_values (fe_collection, - quadrature_collection, - update_values | update_gradients | - update_quadrature_points | update_JxW_values); + quadrature_collection, + update_values | update_gradients | + update_quadrature_points | update_JxW_values); const RightHandSide rhs_function; - + FullMatrix cell_matrix; Vector cell_rhs; std::vector local_dof_indices; - + 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 (; cell!=endc; ++cell) { const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell; @@ -390,41 +390,41 @@ void LaplaceProblem::assemble_test_1 () cell_rhs = 0; hp_fe_values.reinit (cell); - + const FEValues &fe_values = hp_fe_values.get_present_fe_values (); std::vector rhs_values (fe_values.n_quadrature_points); rhs_function.value_list (fe_values.get_quadrature_points(), - rhs_values); - + rhs_values); + for (unsigned int q_point=0; - q_pointget_dof_indices (local_dof_indices); test_matrix.add(local_dof_indices, cell_matrix); for (unsigned int i=0; i::assemble_test_1 () template -void LaplaceProblem::assemble_test_2 () +void LaplaceProblem::assemble_test_2 () { test_matrix = 0; test_rhs = 0; hp::FEValues hp_fe_values (fe_collection, - quadrature_collection, - update_values | update_gradients | - update_quadrature_points | update_JxW_values); + quadrature_collection, + update_values | update_gradients | + update_quadrature_points | update_JxW_values); const RightHandSide rhs_function; - + FullMatrix cell_matrix; Vector cell_rhs; std::vector local_dof_indices; - + 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 (; cell!=endc; ++cell) { const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell; @@ -463,62 +463,62 @@ void LaplaceProblem::assemble_test_2 () cell_rhs = 0; hp_fe_values.reinit (cell); - + const FEValues &fe_values = hp_fe_values.get_present_fe_values (); std::vector rhs_values (fe_values.n_quadrature_points); rhs_function.value_list (fe_values.get_quadrature_points(), - rhs_values); - + rhs_values); + for (unsigned int q_point=0; - q_pointget_dof_indices (local_dof_indices); test_all_constraints.distribute_local_to_global (cell_matrix, - cell_rhs, - local_dof_indices, - test_matrix, - test_rhs); + cell_rhs, + local_dof_indices, + test_matrix, + test_rhs); } - deallog << " Test matrix 2 nonzeros: " << test_matrix.n_nonzero_elements() - << ", actually: " << test_matrix.n_actually_nonzero_elements (1e-10) - << std::endl; + deallog << " Test matrix 2 nonzeros: " << test_matrix.n_nonzero_elements() + << ", actually: " << test_matrix.n_actually_nonzero_elements (1e-10) + << std::endl; test_equality(); } template -void LaplaceProblem::solve () +void LaplaceProblem::solve () { SolverControl solver_control (reference_rhs.size(), - 1e-8*reference_rhs.l2_norm()); + 1e-8*reference_rhs.l2_norm()); SolverCG<> cg (solver_control); PreconditionSSOR<> preconditioner; preconditioner.initialize(reference_matrix, 1.2); cg.solve (reference_matrix, solution, reference_rhs, - preconditioner); + preconditioner); Vector solution_test (solution); hanging_nodes_only.distribute (solution); - // test also distribute function + // test also distribute function test_all_constraints.distribute(solution_test); solution_test -= solution; deallog << "Distribute error: " << solution_test.l2_norm () << std::endl; @@ -534,8 +534,8 @@ void LaplaceProblem::postprocess () estimated_error_per_cell(i) = i; GridRefinement::refine_and_coarsen_fixed_number (triangulation, - estimated_error_per_cell, - 0.3, 0.03); + estimated_error_per_cell, + 0.3, 0.03); triangulation.execute_coarsening_and_refinement (); } @@ -544,58 +544,60 @@ template <> void LaplaceProblem<2>::create_coarse_grid () { const unsigned int dim = 2; - + static const Point<2> vertices_1[] = { Point<2> (-1., -1.), Point<2> (-1./2, -1.), Point<2> (0., -1.), Point<2> (+1./2, -1.), Point<2> (+1, -1.), - + Point<2> (-1., -1./2.), Point<2> (-1./2, -1./2.), Point<2> (0., -1./2.), Point<2> (+1./2, -1./2.), Point<2> (+1, -1./2.), - + Point<2> (-1., 0.), Point<2> (-1./2, 0.), Point<2> (+1./2, 0.), Point<2> (+1, 0.), - + Point<2> (-1., 1./2.), Point<2> (-1./2, 1./2.), Point<2> (0., 1./2.), Point<2> (+1./2, 1./2.), Point<2> (+1, 1./2.), - + Point<2> (-1., 1.), Point<2> (-1./2, 1.), - Point<2> (0., 1.), + Point<2> (0., 1.), Point<2> (+1./2, 1.), - Point<2> (+1, 1.) }; + Point<2> (+1, 1.) + }; const unsigned int - n_vertices = sizeof(vertices_1) / sizeof(vertices_1[0]); + 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, 5, 6}, - {1, 2, 6, 7}, - {2, 3, 7, 8}, - {3, 4, 8, 9}, - {5, 6, 10, 11}, - {8, 9, 12, 13}, - {10, 11, 14, 15}, - {12, 13, 17, 18}, - {14, 15, 19, 20}, - {15, 16, 20, 21}, - {16, 17, 21, 22}, - {17, 18, 22, 23}}; + = {{0, 1, 5, 6}, + {1, 2, 6, 7}, + {2, 3, 7, 8}, + {3, 4, 8, 9}, + {5, 6, 10, 11}, + {8, 9, 12, 13}, + {10, 11, 14, 15}, + {12, 13, 17, 18}, + {14, 15, 19, 20}, + {15, 16, 20, 21}, + {16, 17, 21, 22}, + {17, 18, 22, 23} + }; const unsigned int - n_cells = sizeof(cell_vertices) / sizeof(cell_vertices[0]); + n_cells = sizeof(cell_vertices) / sizeof(cell_vertices[0]); std::vector > cells (n_cells, CellData()); - for (unsigned int i=0; i::vertices_per_cell; @@ -605,8 +607,8 @@ void LaplaceProblem<2>::create_coarse_grid () } triangulation.create_triangulation (vertices, - cells, - SubCellData()); + cells, + SubCellData()); triangulation.refine_global (2); } @@ -621,28 +623,28 @@ void LaplaceProblem<3>::create_coarse_grid () template -void LaplaceProblem::run () +void LaplaceProblem::run () { for (unsigned int cycle=0; cycle<3; ++cycle) { if (cycle == 0) - create_coarse_grid (); + create_coarse_grid (); setup_system (); deallog << std::endl << std::endl - << " Number of active cells: " - << triangulation.n_active_cells() - << std::endl - << " Number of degrees of freedom: " - << dof_handler.n_dofs() - << std::endl - << " Number of hanging node constraints: " - << hanging_nodes_only.n_constraints() - << std::endl - << " Total number of constraints: " - << test_all_constraints.n_constraints() - << std::endl; + << " Number of active cells: " + << triangulation.n_active_cells() + << std::endl + << " Number of degrees of freedom: " + << dof_handler.n_dofs() + << std::endl + << " Number of hanging node constraints: " + << hanging_nodes_only.n_constraints() + << std::endl + << " Total number of constraints: " + << test_all_constraints.n_constraints() + << std::endl; assemble_reference (); assemble_test_1 (); @@ -650,13 +652,13 @@ void LaplaceProblem::run () solve (); if (cycle < 2) - postprocess (); + postprocess (); } } - // this function is copied verbatim from - // step-27 +// this function is copied verbatim from +// step-27 template void LaplaceProblem:: @@ -668,135 +670,135 @@ estimate_smoothness (Vector &smoothness_indicators) const std::vector k_vectors_magnitude; switch (dim) { - case 2: - { - for (unsigned int i=0; i(numbers::PI * i, - numbers::PI * j)); - k_vectors_magnitude.push_back (i*i+j*j); - } - - break; - } + case 2: + { + for (unsigned int i=0; i(numbers::PI * i, + numbers::PI * j)); + k_vectors_magnitude.push_back (i*i+j*j); + } + + break; + } - case 3: - { - for (unsigned int i=0; i(numbers::PI * i, - numbers::PI * j, - numbers::PI * k)); - k_vectors_magnitude.push_back (i*i+j*j+k*k); - } - - break; - } - - default: - Assert (false, ExcNotImplemented()); + case 3: + { + for (unsigned int i=0; i(numbers::PI * i, + numbers::PI * j, + numbers::PI * k)); + k_vectors_magnitude.push_back (i*i+j*j+k*k); + } + + break; + } + + default: + Assert (false, ExcNotImplemented()); } const unsigned n_fourier_modes = k_vectors.size(); std::vector ln_k (n_fourier_modes); for (unsigned int i=0; i > > - fourier_transform_matrices (fe_collection.size()); + fourier_transform_matrices (fe_collection.size()); QGauss<1> base_quadrature (2); QIterated quadrature (base_quadrature, N); for (unsigned int fe=0; fe sum = 0; - for (unsigned int q=0; q x_q = quadrature.point(q); - sum += std::exp(std::complex(0,1) * - (k_vectors[k] * x_q)) * - fe_collection[fe].shape_value(j,x_q) * - quadrature.weight(q); - } - fourier_transform_matrices[fe](k,j) - = sum / std::pow(2*numbers::PI, 1.*dim/2); - } + for (unsigned int j=0; j sum = 0; + for (unsigned int q=0; q x_q = quadrature.point(q); + sum += std::exp(std::complex(0,1) * + (k_vectors[k] * x_q)) * + fe_collection[fe].shape_value(j,x_q) * + quadrature.weight(q); + } + fourier_transform_matrices[fe](k,j) + = sum / std::pow(2*numbers::PI, 1.*dim/2); + } } std::vector > fourier_coefficients (n_fourier_modes); Vector local_dof_values; 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 index=0; cell!=endc; ++cell, ++index) { local_dof_values.reinit (cell->get_fe().dofs_per_cell); cell->get_dof_values (solution, local_dof_values); for (unsigned int f=0; fget_fe().dofs_per_cell; ++i) - fourier_coefficients[f] += - fourier_transform_matrices[cell->active_fe_index()](f,i) - * - local_dof_values(i); - } + { + fourier_coefficients[f] = 0; + + for (unsigned int i=0; iget_fe().dofs_per_cell; ++i) + fourier_coefficients[f] += + fourier_transform_matrices[cell->active_fe_index()](f,i) + * + local_dof_values(i); + } std::map k_to_max_U_map; for (unsigned int f=0; f mat(sp); Vector rhs(5); std::vector local_dofs; - for (unsigned int i=0;i<5;++i) + for (unsigned int i=0; i<5; ++i) local_dofs.push_back(i); FullMatrix local_mat(5,5); Vector local_vec(5); - for (unsigned int i=0;i<5;++i) + for (unsigned int i=0; i<5; ++i) local_mat(i,i)=2.0; - + local_vec = 0; cm.distribute_local_to_global(local_mat, local_vec, local_dofs, mat, rhs, use_inhomogeneity_for_rhs); mat.print(logfile); rhs.print(logfile); - + } -int main () +int main () { deallog << std::setprecision (2); logfile << std::setprecision (2); @@ -109,7 +109,7 @@ int main () // Use the constraints for the right-hand-side { - test(true); + test(true); } // Don not use the constraints for the right-hand-side diff --git a/tests/deal.II/inhomogeneous_constraints_03.cc b/tests/deal.II/inhomogeneous_constraints_03.cc index 9aa7ab18f1..5224966109 100644 --- a/tests/deal.II/inhomogeneous_constraints_03.cc +++ b/tests/deal.II/inhomogeneous_constraints_03.cc @@ -73,11 +73,11 @@ void test(bool use_inhomogeneity_for_rhs) cm.close(); cm.print(logfile); - + CompressedSimpleSparsityPattern csp(8,8); - for (unsigned int i=0;i<8;++i) + for (unsigned int i=0; i<8; ++i) csp.add(i,i); - + SparsityPattern sp; sp.copy_from(csp); SparseMatrix mat(sp); @@ -86,19 +86,19 @@ void test(bool use_inhomogeneity_for_rhs) // "assemble": std::vector local_dofs1; - for (unsigned int i=0;i<5;++i) + for (unsigned int i=0; i<5; ++i) local_dofs1.push_back(i); std::vector local_dofs2; local_dofs2.push_back(1); - for (unsigned int i=1;i<5;++i) + for (unsigned int i=1; i<5; ++i) local_dofs2.push_back(3+i); FullMatrix local_mat(5,5); Vector local_vec(5); - for (unsigned int i=0;i<5;++i) + for (unsigned int i=0; i<5; ++i) local_mat(i,i)=2.0; - + local_vec = 1; cm.distribute_local_to_global(local_mat, local_vec, local_dofs1, mat, rhs, use_inhomogeneity_for_rhs); @@ -109,18 +109,18 @@ void test(bool use_inhomogeneity_for_rhs) rhs.print(logfile); Vector solution(8); - for (unsigned int i=0;i<8;++i) + for (unsigned int i=0; i<8; ++i) { solution(i)=rhs(i)/mat(i,i); } solution.print(logfile); cm.distribute(solution); - solution.print(logfile); + solution.print(logfile); } -int main () +int main () { deallog << std::setprecision (2); logfile << std::setprecision (2); @@ -130,7 +130,7 @@ int main () // Use the constraints for the right-hand-side { - test(true); + test(true); } // Don not use the constraints for the right-hand-side diff --git a/tests/deal.II/inhomogeneous_constraints_04.cc b/tests/deal.II/inhomogeneous_constraints_04.cc index c257afccdd..93c1ab1a41 100644 --- a/tests/deal.II/inhomogeneous_constraints_04.cc +++ b/tests/deal.II/inhomogeneous_constraints_04.cc @@ -60,9 +60,9 @@ using namespace dealii; void test(bool use_constraint_matrix) { CompressedSimpleSparsityPattern csp(8,8); - for (unsigned int i=0;i<8;++i) + for (unsigned int i=0; i<8; ++i) csp.add(i,i); - + SparsityPattern sp; sp.copy_from(csp); SparseMatrix mat(sp); @@ -72,25 +72,25 @@ void test(bool use_constraint_matrix) // "assemble": std::vector local_dofs1; - for (unsigned int i=0;i<5;++i) + for (unsigned int i=0; i<5; ++i) local_dofs1.push_back(i); std::vector local_dofs2; local_dofs2.push_back(1); - for (unsigned int i=1;i<5;++i) + for (unsigned int i=1; i<5; ++i) local_dofs2.push_back(3+i); FullMatrix local_mat(5,5); Vector local_vec(5); - for (unsigned int i=0;i<5;++i) + for (unsigned int i=0; i<5; ++i) local_mat(i,i)=2.0; - + local_vec = 1; if (use_constraint_matrix == true) { ConstraintMatrix cm; - + cm.add_line(1); cm.set_inhomogeneity(1, -5.0); cm.add_line(3); @@ -107,40 +107,40 @@ void test(bool use_constraint_matrix) else { for (unsigned int i=0; i<5; i++) - { - mat.add (local_dofs1[i], local_dofs1[i], local_mat (i,i)); - rhs (local_dofs1[i]) += local_vec (i); - } + { + mat.add (local_dofs1[i], local_dofs1[i], local_mat (i,i)); + rhs (local_dofs1[i]) += local_vec (i); + } for (unsigned int i=0; i<5; i++) - { - mat.add (local_dofs2[i], local_dofs2[i], local_mat (i,i)); - rhs (local_dofs2[i]) += local_vec (i); - } + { + mat.add (local_dofs2[i], local_dofs2[i], local_mat (i,i)); + rhs (local_dofs2[i]) += local_vec (i); + } std::map boundary_values; boundary_values.insert (std::pair(1, -5.0)); boundary_values.insert (std::pair(3, 2.0)); boundary_values.insert (std::pair(4, 0.0)); MatrixTools::apply_boundary_values (boundary_values, - mat, - solution, - rhs); + mat, + solution, + rhs); } mat.print(logfile); rhs.print(logfile); - for (unsigned int i=0;i<8;++i) + for (unsigned int i=0; i<8; ++i) { solution(i)=rhs(i)/mat(i,i); } - solution.print(logfile); + solution.print(logfile); } -int main () +int main () { deallog << std::setprecision (2); logfile << std::setprecision (2); @@ -150,7 +150,7 @@ int main () // Use the constraints for the right-hand-side { - test(true); + test(true); } // Don not use the constraints for the right-hand-side diff --git a/tests/deal.II/inhomogeneous_constraints_block.cc b/tests/deal.II/inhomogeneous_constraints_block.cc index 1ba9b70ef1..8a51ed02bc 100644 --- a/tests/deal.II/inhomogeneous_constraints_block.cc +++ b/tests/deal.II/inhomogeneous_constraints_block.cc @@ -54,33 +54,33 @@ using namespace dealii; template class AdvectionProblem { - public: - AdvectionProblem (); - ~AdvectionProblem (); +public: + AdvectionProblem (); + ~AdvectionProblem (); - void run (); + void run (); - private: - void setup_system (); - void test_equality (); - void assemble_reference (); - void assemble_test_1 (); - void assemble_test_2 (); +private: + void setup_system (); + void test_equality (); + void assemble_reference (); + void assemble_test_1 (); + void assemble_test_2 (); - Triangulation triangulation; + Triangulation triangulation; - DoFHandler dof_handler; - FESystem fe; + DoFHandler dof_handler; + FESystem fe; - ConstraintMatrix hanging_nodes_only; - ConstraintMatrix test_all_constraints; + ConstraintMatrix hanging_nodes_only; + ConstraintMatrix test_all_constraints; - BlockSparsityPattern sparsity_pattern; - BlockSparseMatrix reference_matrix; - BlockSparseMatrix test_matrix; + BlockSparsityPattern sparsity_pattern; + BlockSparseMatrix reference_matrix; + BlockSparseMatrix test_matrix; - BlockVector reference_rhs; - BlockVector test_rhs; + BlockVector reference_rhs; + BlockVector test_rhs; }; @@ -88,18 +88,18 @@ class AdvectionProblem template class RightHandSide : public Function { - public: - RightHandSide () : Function () {} +public: + RightHandSide () : Function () {} - virtual double value (const Point &p, - const unsigned int component) const; + virtual double value (const Point &p, + const unsigned int component) const; }; template double RightHandSide::value (const Point &p, - const unsigned int /*component*/) const + const unsigned int /*component*/) const { double product = 1; for (unsigned int d=0; d::value (const Point &p, template AdvectionProblem::AdvectionProblem () - : - dof_handler (triangulation), - fe (FE_Q(2),2) + : + dof_handler (triangulation), + fe (FE_Q(2),2) {} @@ -131,27 +131,27 @@ void AdvectionProblem::setup_system () hanging_nodes_only.clear (); test_all_constraints.clear (); - // add boundary conditions as - // inhomogeneous constraints here. + // add boundary conditions as + // inhomogeneous constraints here. { std::map boundary_values; VectorTools::interpolate_boundary_values (dof_handler, - 0, - ConstantFunction(1.,2), - boundary_values); + 0, + ConstantFunction(1.,2), + boundary_values); std::map::const_iterator boundary_value = boundary_values.begin(); for ( ; boundary_value !=boundary_values.end(); ++boundary_value) { - test_all_constraints.add_line(boundary_value->first); - test_all_constraints.set_inhomogeneity (boundary_value->first, - boundary_value->second); + test_all_constraints.add_line(boundary_value->first); + test_all_constraints.set_inhomogeneity (boundary_value->first, + boundary_value->second); } } DoFTools::make_hanging_node_constraints (dof_handler, - hanging_nodes_only); + hanging_nodes_only); DoFTools::make_hanging_node_constraints (dof_handler, - test_all_constraints); + test_all_constraints); hanging_nodes_only.close (); test_all_constraints.close (); @@ -166,7 +166,7 @@ void AdvectionProblem::setup_system () } DoFTools::make_sparsity_pattern (dof_handler, csp, - hanging_nodes_only, true); + hanging_nodes_only, true); sparsity_pattern.copy_from (csp); reference_matrix.reinit (sparsity_pattern); @@ -181,57 +181,57 @@ void AdvectionProblem::setup_system () - // test whether we are equal with the - // standard matrix and right hand side +// test whether we are equal with the +// standard matrix and right hand side template void AdvectionProblem::test_equality () { - // need to manually go through the - // matrix, since we can have different - // entries in constrained lines because - // the diagonal is set differently + // need to manually go through the + // matrix, since we can have different + // entries in constrained lines because + // the diagonal is set differently const BlockIndices & - index_mapping = sparsity_pattern.get_column_indices(); + index_mapping = sparsity_pattern.get_column_indices(); for (unsigned int i=0; i::const_iterator reference = - reference_matrix.block(block_row,block_col).begin(index_in_block); - SparseMatrix::iterator test = - test_matrix.block(block_row,block_col).begin(index_in_block); - if (test_all_constraints.is_constrained(i) == false) - { - for ( ; test != test_matrix.block(block_row,block_col).end(index_in_block); - ++test, ++reference) - test->value() -= reference->value(); - } - else - for ( ; test != test_matrix.block(block_row,block_col).end(index_in_block); - ++test) - test->value() = 0; - } + ++block_col) + { + SparseMatrix::const_iterator reference = + reference_matrix.block(block_row,block_col).begin(index_in_block); + SparseMatrix::iterator test = + test_matrix.block(block_row,block_col).begin(index_in_block); + if (test_all_constraints.is_constrained(i) == false) + { + for ( ; test != test_matrix.block(block_row,block_col).end(index_in_block); + ++test, ++reference) + test->value() -= reference->value(); + } + else + for ( ; test != test_matrix.block(block_row,block_col).end(index_in_block); + ++test) + test->value() = 0; + } } double frobenius_norm = 0.; - for (unsigned int row=0;row::test_equality () test_rhs(i) = 0; deallog << " RHS difference norm: " - << test_rhs.l2_norm() << std::endl; + << test_rhs.l2_norm() << std::endl; Assert (test_rhs.l2_norm() < 1e-14, ExcInternalError()); } @@ -255,8 +255,8 @@ void AdvectionProblem::assemble_reference () QGauss quadrature_formula (3); FEValues 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 RightHandSide rhs_function; const unsigned int dofs_per_cell = fe.dofs_per_cell; @@ -269,8 +269,8 @@ void AdvectionProblem::assemble_reference () std::vector rhs_values (n_q_points); 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) { cell_matrix = 0; @@ -278,7 +278,7 @@ void AdvectionProblem::assemble_reference () fe_values.reinit (cell); rhs_function.value_list (fe_values.get_quadrature_points(), - rhs_values); + rhs_values); Tensor<1,dim> advection_direction; advection_direction[0] = 1; @@ -286,49 +286,49 @@ void AdvectionProblem::assemble_reference () advection_direction[dim-1] = -1; for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); reference_matrix.add(local_dof_indices, cell_matrix); for (unsigned int i=0; i boundary_values; VectorTools::interpolate_boundary_values (dof_handler, - 0, - ConstantFunction(1.,2), - boundary_values); + 0, + ConstantFunction(1.,2), + boundary_values); MatrixTools::apply_boundary_values (boundary_values, - reference_matrix, - test_rhs, - reference_rhs); + reference_matrix, + test_rhs, + reference_rhs); deallog << " Reference matrix nonzeros: " << reference_matrix.n_nonzero_elements() - << ", actually: " << reference_matrix.n_actually_nonzero_elements (1e-10) - << std::endl; + << ", actually: " << reference_matrix.n_actually_nonzero_elements (1e-10) + << std::endl; } @@ -342,8 +342,8 @@ void AdvectionProblem::assemble_test_1 () QGauss quadrature_formula (3); FEValues 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 RightHandSide rhs_function; const unsigned int dofs_per_cell = fe.dofs_per_cell; @@ -356,8 +356,8 @@ void AdvectionProblem::assemble_test_1 () std::vector rhs_values (n_q_points); 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) { cell_matrix = 0; @@ -365,7 +365,7 @@ void AdvectionProblem::assemble_test_1 () fe_values.reinit (cell); rhs_function.value_list (fe_values.get_quadrature_points(), - rhs_values); + rhs_values); Tensor<1,dim> advection_direction; advection_direction[0] = 1; @@ -373,37 +373,37 @@ void AdvectionProblem::assemble_test_1 () advection_direction[dim-1] = -1; for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); test_matrix.add(local_dof_indices, cell_matrix); for (unsigned int i=0; i::assemble_test_2 () QGauss quadrature_formula (3); FEValues 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 RightHandSide rhs_function; const unsigned int dofs_per_cell = fe.dofs_per_cell; @@ -432,8 +432,8 @@ void AdvectionProblem::assemble_test_2 () std::vector rhs_values (n_q_points); 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) { cell_matrix = 0; @@ -441,7 +441,7 @@ void AdvectionProblem::assemble_test_2 () fe_values.reinit (cell); rhs_function.value_list (fe_values.get_quadrature_points(), - rhs_values); + rhs_values); Tensor<1,dim> advection_direction; advection_direction[0] = 1; @@ -449,36 +449,36 @@ void AdvectionProblem::assemble_test_2 () advection_direction[dim-1] = -1; for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); test_all_constraints.distribute_local_to_global (cell_matrix, - cell_rhs, - local_dof_indices, - test_matrix, - test_rhs); + cell_rhs, + local_dof_indices, + test_matrix, + test_rhs); } deallog << " Test matrix 2 nonzeros: " << test_matrix.n_nonzero_elements() - << ", actually: " << test_matrix.n_actually_nonzero_elements (1e-10) - << std::endl; + << ", actually: " << test_matrix.n_actually_nonzero_elements (1e-10) + << std::endl; test_equality(); } @@ -489,36 +489,36 @@ void AdvectionProblem::run () GridGenerator::hyper_cube (triangulation); triangulation.refine_global (4-dim); - // manually refine the first two cells to - // create some hanging nodes + // manually refine the first two cells to + // create some hanging nodes { typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(); cell->set_refine_flag(); } triangulation.execute_coarsening_and_refinement(); { - // find the last cell and mark it - // for refinement + // find the last cell and mark it + // for refinement for (typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(); - cell != dof_handler.end(); ++cell) + cell != dof_handler.end(); ++cell) if (++typename DoFHandler::active_cell_iterator(cell) == - dof_handler.end()) - cell->set_refine_flag(); + dof_handler.end()) + cell->set_refine_flag(); } triangulation.execute_coarsening_and_refinement(); setup_system (); deallog << std::endl << std::endl - << " Number of active cells: " - << triangulation.n_active_cells() - << std::endl - << " Number of degrees of freedom: " - << dof_handler.n_dofs() - << std::endl - << " Number of constraints : " - << hanging_nodes_only.n_constraints() - << std::endl; + << " Number of active cells: " + << triangulation.n_active_cells() + << std::endl + << " Number of degrees of freedom: " + << dof_handler.n_dofs() + << std::endl + << " Number of constraints : " + << hanging_nodes_only.n_constraints() + << std::endl; assemble_reference (); assemble_test_1 (); diff --git a/tests/deal.II/inhomogeneous_constraints_nonsymmetric.cc b/tests/deal.II/inhomogeneous_constraints_nonsymmetric.cc index c6dbcb74f7..e15d28c303 100644 --- a/tests/deal.II/inhomogeneous_constraints_nonsymmetric.cc +++ b/tests/deal.II/inhomogeneous_constraints_nonsymmetric.cc @@ -53,33 +53,33 @@ using namespace dealii; template class AdvectionProblem { - public: - AdvectionProblem (); - ~AdvectionProblem (); +public: + AdvectionProblem (); + ~AdvectionProblem (); - void run (); + void run (); - private: - void setup_system (); - void test_equality (); - void assemble_reference (); - void assemble_test_1 (); - void assemble_test_2 (); +private: + void setup_system (); + void test_equality (); + void assemble_reference (); + void assemble_test_1 (); + void assemble_test_2 (); - Triangulation triangulation; + Triangulation triangulation; - DoFHandler dof_handler; - FE_Q fe; + DoFHandler dof_handler; + FE_Q fe; - ConstraintMatrix hanging_nodes_only; - ConstraintMatrix test_all_constraints; + ConstraintMatrix hanging_nodes_only; + ConstraintMatrix test_all_constraints; - SparsityPattern sparsity_pattern; - SparseMatrix reference_matrix; - SparseMatrix test_matrix; + SparsityPattern sparsity_pattern; + SparseMatrix reference_matrix; + SparseMatrix test_matrix; - Vector reference_rhs; - Vector test_rhs; + Vector reference_rhs; + Vector test_rhs; }; @@ -87,18 +87,18 @@ class AdvectionProblem template class RightHandSide : public Function { - public: - RightHandSide () : Function () {} +public: + RightHandSide () : Function () {} - virtual double value (const Point &p, - const unsigned int component) const; + virtual double value (const Point &p, + const unsigned int component) const; }; template double RightHandSide::value (const Point &p, - const unsigned int /*component*/) const + const unsigned int /*component*/) const { double product = 1; for (unsigned int d=0; d::value (const Point &p, template AdvectionProblem::AdvectionProblem () - : - dof_handler (triangulation), - fe (2) + : + dof_handler (triangulation), + fe (2) {} @@ -133,36 +133,36 @@ void AdvectionProblem::setup_system () hanging_nodes_only.clear (); test_all_constraints.clear (); - // add boundary conditions as - // inhomogeneous constraints here. just - // take the right hand side function as - // boundary function + // add boundary conditions as + // inhomogeneous constraints here. just + // take the right hand side function as + // boundary function { std::map boundary_values; VectorTools::interpolate_boundary_values (dof_handler, - 0, - RightHandSide(), - boundary_values); + 0, + RightHandSide(), + boundary_values); std::map::const_iterator boundary_value = boundary_values.begin(); for ( ; boundary_value !=boundary_values.end(); ++boundary_value) { - test_all_constraints.add_line(boundary_value->first); - test_all_constraints.set_inhomogeneity (boundary_value->first, - boundary_value->second); + test_all_constraints.add_line(boundary_value->first); + test_all_constraints.set_inhomogeneity (boundary_value->first, + boundary_value->second); } } DoFTools::make_hanging_node_constraints (dof_handler, - hanging_nodes_only); + hanging_nodes_only); DoFTools::make_hanging_node_constraints (dof_handler, - test_all_constraints); + test_all_constraints); hanging_nodes_only.close (); test_all_constraints.close (); CompressedSimpleSparsityPattern csp (dof_handler.n_dofs(), - dof_handler.n_dofs()); + dof_handler.n_dofs()); DoFTools::make_sparsity_pattern (dof_handler, csp, - hanging_nodes_only, true); + hanging_nodes_only, true); sparsity_pattern.copy_from (csp); reference_matrix.reinit (sparsity_pattern); @@ -171,36 +171,36 @@ void AdvectionProblem::setup_system () - // test whether we are equal with the - // standard matrix and right hand side +// test whether we are equal with the +// standard matrix and right hand side template void AdvectionProblem::test_equality () { - // need to manually go through the - // matrix, since we can have different - // entries in constrained lines. + // need to manually go through the + // matrix, since we can have different + // entries in constrained lines. for (unsigned int i=0; i::const_iterator reference = reference_matrix.begin(i); SparseMatrix::iterator test = test_matrix.begin(i); if (test_all_constraints.is_constrained(i) == false) - { - for ( ; test != test_matrix.end(i); ++test, ++reference) - test->value() -= reference->value(); - } + { + for ( ; test != test_matrix.end(i); ++test, ++reference) + test->value() -= reference->value(); + } else - for ( ; test != test_matrix.end(i); ++test) - test->value() = 0; + for ( ; test != test_matrix.end(i); ++test) + test->value() = 0; } deallog << " Matrix difference norm: " - << test_matrix.frobenius_norm() << std::endl; + << test_matrix.frobenius_norm() << std::endl; Assert (test_matrix.frobenius_norm() < 1e-13, ExcInternalError()); - // same here -- Dirichlet lines will have - // nonzero rhs, whereas we will have zero - // rhs when using inhomogeneous - // constraints. + // same here -- Dirichlet lines will have + // nonzero rhs, whereas we will have zero + // rhs when using inhomogeneous + // constraints. for (unsigned int i=0; i::test_equality () test_rhs(i) = 0; deallog << " RHS difference norm: " - << test_rhs.l2_norm() << std::endl; + << test_rhs.l2_norm() << std::endl; Assert (test_rhs.l2_norm() < 1e-14, ExcInternalError()); } @@ -224,8 +224,8 @@ void AdvectionProblem::assemble_reference () QGauss quadrature_formula (3); FEValues 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 RightHandSide rhs_function; const unsigned int dofs_per_cell = fe.dofs_per_cell; @@ -238,8 +238,8 @@ void AdvectionProblem::assemble_reference () std::vector rhs_values (n_q_points); 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) { cell_matrix = 0; @@ -247,7 +247,7 @@ void AdvectionProblem::assemble_reference () fe_values.reinit (cell); rhs_function.value_list (fe_values.get_quadrature_points(), - rhs_values); + rhs_values); Tensor<1,dim> advection_direction; advection_direction[0] = 1; @@ -255,44 +255,44 @@ void AdvectionProblem::assemble_reference () advection_direction[dim-1] = -1; for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); reference_matrix.add(local_dof_indices, cell_matrix); for (unsigned int i=0; i boundary_values; VectorTools::interpolate_boundary_values (dof_handler, - 0, - RightHandSide(), - boundary_values); + 0, + RightHandSide(), + boundary_values); MatrixTools::apply_boundary_values (boundary_values, - reference_matrix, - test_rhs, - reference_rhs); + reference_matrix, + test_rhs, + reference_rhs); deallog << " Reference matrix nonzeros: " << reference_matrix.n_nonzero_elements() - << ", actually: " << reference_matrix.n_actually_nonzero_elements (1e-12) - << std::endl; + << ", actually: " << reference_matrix.n_actually_nonzero_elements (1e-12) + << std::endl; } @@ -306,8 +306,8 @@ void AdvectionProblem::assemble_test_1 () QGauss quadrature_formula (3); FEValues 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 RightHandSide rhs_function; const unsigned int dofs_per_cell = fe.dofs_per_cell; @@ -320,8 +320,8 @@ void AdvectionProblem::assemble_test_1 () std::vector rhs_values (n_q_points); 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) { cell_matrix = 0; @@ -329,7 +329,7 @@ void AdvectionProblem::assemble_test_1 () fe_values.reinit (cell); rhs_function.value_list (fe_values.get_quadrature_points(), - rhs_values); + rhs_values); Tensor<1,dim> advection_direction; advection_direction[0] = 1; @@ -337,32 +337,32 @@ void AdvectionProblem::assemble_test_1 () advection_direction[dim-1] = -1; for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); test_matrix.add(local_dof_indices, cell_matrix); for (unsigned int i=0; i::assemble_test_2 () QGauss quadrature_formula (3); FEValues 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 RightHandSide rhs_function; const unsigned int dofs_per_cell = fe.dofs_per_cell; @@ -391,8 +391,8 @@ void AdvectionProblem::assemble_test_2 () std::vector rhs_values (n_q_points); 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) { cell_matrix = 0; @@ -400,7 +400,7 @@ void AdvectionProblem::assemble_test_2 () fe_values.reinit (cell); rhs_function.value_list (fe_values.get_quadrature_points(), - rhs_values); + rhs_values); Tensor<1,dim> advection_direction; advection_direction[0] = 1; @@ -408,31 +408,31 @@ void AdvectionProblem::assemble_test_2 () advection_direction[dim-1] = -1; for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); test_all_constraints.distribute_local_to_global (cell_matrix, - cell_rhs, - local_dof_indices, - test_matrix, - test_rhs); + cell_rhs, + local_dof_indices, + test_matrix, + test_rhs); } deallog << " Test matrix 2 nonzeros: " << test_matrix.n_nonzero_elements() - << ", actually: " << test_matrix.n_actually_nonzero_elements (1e-12) - << std::endl; + << ", actually: " << test_matrix.n_actually_nonzero_elements (1e-12) + << std::endl; test_equality(); } @@ -443,37 +443,37 @@ void AdvectionProblem::run () GridGenerator::hyper_ball (triangulation); triangulation.refine_global (3-dim); - // manually refine the first two cells - // and then one of these cells once again - // to create some hanging nodes + // manually refine the first two cells + // and then one of these cells once again + // to create some hanging nodes { typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(); cell->set_refine_flag(); } triangulation.execute_coarsening_and_refinement(); { - // find the last cell and mark it - // for refinement + // find the last cell and mark it + // for refinement for (typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(); - cell != dof_handler.end(); ++cell) + cell != dof_handler.end(); ++cell) if (++typename DoFHandler::active_cell_iterator(cell) == - dof_handler.end()) - cell->set_refine_flag(); + dof_handler.end()) + cell->set_refine_flag(); } triangulation.execute_coarsening_and_refinement(); setup_system (); deallog << std::endl << std::endl - << " Number of active cells: " - << triangulation.n_active_cells() - << std::endl - << " Number of degrees of freedom: " - << dof_handler.n_dofs() - << std::endl - << " Number of constraints : " - << hanging_nodes_only.n_constraints() - << std::endl; + << " Number of active cells: " + << triangulation.n_active_cells() + << std::endl + << " Number of degrees of freedom: " + << dof_handler.n_dofs() + << std::endl + << " Number of constraints : " + << hanging_nodes_only.n_constraints() + << std::endl; assemble_reference (); assemble_test_1 (); diff --git a/tests/deal.II/inhomogeneous_constraints_vector.cc b/tests/deal.II/inhomogeneous_constraints_vector.cc index d6ebdd18ae..fb437615b7 100644 --- a/tests/deal.II/inhomogeneous_constraints_vector.cc +++ b/tests/deal.II/inhomogeneous_constraints_vector.cc @@ -57,45 +57,45 @@ using namespace dealii; template class LaplaceProblem { - public: - LaplaceProblem (); - void run (); +public: + LaplaceProblem (); + void run (); - private: - void setup_system (); - void assemble_system (); - void solve (); +private: + void setup_system (); + void assemble_system (); + void solve (); - Triangulation triangulation; - FE_Q fe; - DoFHandler dof_handler; + Triangulation triangulation; + FE_Q fe; + DoFHandler dof_handler; - SparsityPattern sparsity_pattern; - SparseMatrix system_matrix; + SparsityPattern sparsity_pattern; + SparseMatrix system_matrix; - Vector solution; - Vector system_rhs; - ConstraintMatrix constraints; + Vector solution; + Vector system_rhs; + ConstraintMatrix constraints; }; template class Coefficient : public Function { - public: - Coefficient () : Function() {} +public: + Coefficient () : Function() {} - virtual double value (const Point &p, - const unsigned int component = 0) const; + virtual double value (const Point &p, + const unsigned int component = 0) const; - virtual void value_list (const std::vector > &points, - std::vector &values, - const unsigned int component = 0) const; + virtual void value_list (const std::vector > &points, + std::vector &values, + const unsigned int component = 0) const; }; template double Coefficient::value (const Point &p, - const unsigned int /*component*/) const + const unsigned int /*component*/) const { if (p.square() < 0.5*0.5) return 20; @@ -106,30 +106,30 @@ double Coefficient::value (const Point &p, template void Coefficient::value_list (const std::vector > &points, - std::vector &values, - const unsigned int component) const + std::vector &values, + const unsigned int component) const { Assert (values.size() == points.size(), - ExcDimensionMismatch (values.size(), points.size())); + ExcDimensionMismatch (values.size(), points.size())); Assert (component == 0, - ExcIndexRange (component, 0, 1)); + ExcIndexRange (component, 0, 1)); const unsigned int n_points = points.size(); for (unsigned int i=0; i LaplaceProblem::LaplaceProblem () : - fe (1), - dof_handler (triangulation) + fe (1), + dof_handler (triangulation) {} @@ -140,18 +140,18 @@ void LaplaceProblem::setup_system () dof_handler.distribute_dofs (fe); deallog << " Number of degrees of freedom: " - << dof_handler.n_dofs() - << std::endl; + << dof_handler.n_dofs() + << std::endl; constraints.clear(); VectorTools::interpolate_boundary_values (dof_handler, - 0, - ConstantFunction(1), - constraints); + 0, + ConstantFunction(1), + constraints); constraints.close(); sparsity_pattern.reinit (dof_handler.n_dofs(), - dof_handler.n_dofs(), - dof_handler.max_couplings_between_dofs()); + dof_handler.n_dofs(), + dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern, constraints, false); sparsity_pattern.compress(); @@ -170,8 +170,8 @@ void LaplaceProblem::assemble_system () Vector test(dof_handler.n_dofs()); FEValues 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(); @@ -185,8 +185,8 @@ void LaplaceProblem::assemble_system () std::vector coefficient_values (n_q_points); 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) { cell_matrix = 0; @@ -195,45 +195,45 @@ void LaplaceProblem::assemble_system () fe_values.reinit (cell); coefficient.value_list (fe_values.get_quadrature_points(), - coefficient_values); + coefficient_values); for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); - // use standard function with matrix and - // vector argument + // use standard function with matrix and + // vector argument constraints.distribute_local_to_global(cell_matrix, cell_rhs, - local_dof_indices, - system_matrix, system_rhs); + local_dof_indices, + system_matrix, system_rhs); - // now do just the right hand side (with - // local matrix for eliminating - // inhomogeneities) + // now do just the right hand side (with + // local matrix for eliminating + // inhomogeneities) constraints.distribute_local_to_global(cell_rhs, - local_dof_indices, - test, cell_matrix); + local_dof_indices, + test, cell_matrix); } - // and compare whether we really got the - // same right hand side vector + // and compare whether we really got the + // same right hand side vector test -= system_rhs; Assert (test.l2_norm() <= 1e-12, ExcInternalError()); } @@ -248,13 +248,13 @@ void LaplaceProblem::solve () preconditioner.initialize(system_matrix, 1.2); bicgstab.solve (system_matrix, solution, system_rhs, - preconditioner); + preconditioner); constraints.distribute (solution); deallog << " " << solver_control.last_step() - << " Bicgstab iterations needed to obtain convergence." - << std::endl; + << " Bicgstab iterations needed to obtain convergence." + << std::endl; } @@ -267,34 +267,34 @@ void LaplaceProblem::run () deallog << "Cycle " << cycle << ':' << std::endl; if (cycle != 0) - triangulation.refine_global (1); + triangulation.refine_global (1); else - { - GridGenerator::hyper_cube (triangulation, -1, 1); - triangulation.refine_global (4-dim); - { - typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(); - cell->set_refine_flag(); - } - triangulation.execute_coarsening_and_refinement(); - { - // find the last cell and mark it - // for refinement - for (typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(); - cell != dof_handler.end(); ++cell) - if (++typename DoFHandler::active_cell_iterator(cell) == - dof_handler.end()) - cell->set_refine_flag(); - } - triangulation.execute_coarsening_and_refinement(); - } + { + GridGenerator::hyper_cube (triangulation, -1, 1); + triangulation.refine_global (4-dim); + { + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(); + cell->set_refine_flag(); + } + triangulation.execute_coarsening_and_refinement(); + { + // find the last cell and mark it + // for refinement + for (typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(); + cell != dof_handler.end(); ++cell) + if (++typename DoFHandler::active_cell_iterator(cell) == + dof_handler.end()) + cell->set_refine_flag(); + } + triangulation.execute_coarsening_and_refinement(); + } deallog << " Number of active cells: " - << triangulation.n_active_cells() - << std::endl - << " Total number of cells: " - << triangulation.n_cells() - << std::endl; + << triangulation.n_active_cells() + << std::endl + << " Total number of cells: " + << triangulation.n_cells() + << std::endl; setup_system (); assemble_system (); diff --git a/tests/deal.II/intergrid_constraints.cc b/tests/deal.II/intergrid_constraints.cc index 6a2abf66f3..1ab324eace 100644 --- a/tests/deal.II/intergrid_constraints.cc +++ b/tests/deal.II/intergrid_constraints.cc @@ -49,63 +49,63 @@ template void check () { deallog << "Checking in " << dim << " space dimensions" - << std::endl - << "---------------------------------------" << std::endl; - - // create two grids + << std::endl + << "---------------------------------------" << std::endl; + + // create two grids Triangulation tria_1, tria_2; GridGenerator::hyper_cube (tria_1, -1, 1); tria_1.refine_global (4-dim); tria_2.copy_triangulation (tria_1); - - // create two different fe's: - // create two really perverse - // finite elements to check for - // obscure effects when mixing - // different FEs and creating - // constraints in between them - // - // note that presently dq2 elements - // are not implemented in 3d, so - // take special measures + + // create two different fe's: + // create two really perverse + // finite elements to check for + // obscure effects when mixing + // different FEs and creating + // constraints in between them + // + // note that presently dq2 elements + // are not implemented in 3d, so + // take special measures const FE_DGQ fe_constant(0); const FE_Q fe_quadratic(2); const FE_DGQ fe_dq_linear(1); const FE_DGQ *fe_dq_quadratic = (dim != 3 - ? - new FE_DGQ(2) - : - 0); - - // define composed finite - // elements. to limit memory - // consumption in 3d to reasonable - // values, use simpler finite - // elements there + ? + new FE_DGQ(2) + : + 0); + + // define composed finite + // elements. to limit memory + // consumption in 3d to reasonable + // values, use simpler finite + // elements there const FESystem - *fe_1 = (dim != 3 - ? - new FESystem(fe_quadratic, 4, - *fe_dq_quadratic, 2, - fe_constant, 12) - : - new FESystem(fe_dq_linear, 1, - fe_constant, 1) - ); + *fe_1 = (dim != 3 + ? + new FESystem(fe_quadratic, 4, + *fe_dq_quadratic, 2, + fe_constant, 12) + : + new FESystem(fe_dq_linear, 1, + fe_constant, 1) + ); const FESystem - *fe_2 = (dim != 3 - ? - new FESystem(fe_constant, 1, - *fe_dq_quadratic, 2, - fe_quadratic, 5) - : - new FESystem(fe_constant, 1, - fe_dq_linear, 1) - ); - - // make several loops to refine the - // two grids + *fe_2 = (dim != 3 + ? + new FESystem(fe_constant, 1, + *fe_dq_quadratic, 2, + fe_quadratic, 5) + : + new FESystem(fe_constant, 1, + fe_dq_linear, 1) + ); + + // make several loops to refine the + // two grids for (unsigned int i=0; i<3; ++i) { deallog << "Refinement step " << i << std::endl; @@ -116,117 +116,117 @@ void check () dof_1.distribute_dofs (*fe_1); dof_2.distribute_dofs (*fe_2); - // if not in 3d, check - // renumbering functions as - // well. in 3d, elements are - // entirely discontinuous here, - // so renumbering functions - // don't work + // if not in 3d, check + // renumbering functions as + // well. in 3d, elements are + // entirely discontinuous here, + // so renumbering functions + // don't work if (dim != 3) - { - DoFRenumbering::Cuthill_McKee (dof_1); - DoFRenumbering::Cuthill_McKee (dof_2); - }; + { + DoFRenumbering::Cuthill_McKee (dof_1); + DoFRenumbering::Cuthill_McKee (dof_2); + }; deallog << " Grid 1: " << tria_1.n_active_cells() << " cells, " - << dof_1.n_dofs() << " dofs" << std::endl; + << dof_1.n_dofs() << " dofs" << std::endl; deallog << " Grid 2: " << tria_2.n_active_cells() << " cells, " - << dof_2.n_dofs() << " dofs" << std::endl; - - // now compute intergrid - // constraints + << dof_2.n_dofs() << " dofs" << std::endl; + + // now compute intergrid + // constraints InterGridMap > intergrid_map; intergrid_map.make_mapping (dof_1, dof_2); ConstraintMatrix intergrid_constraints; if (dim != 3) - { - // dq quadratic - DoFTools::compute_intergrid_constraints (dof_1, 5, dof_2, 2, - intergrid_map, - intergrid_constraints); - // dq constant - DoFTools::compute_intergrid_constraints (dof_1, 8, dof_2, 0, - intergrid_map, - intergrid_constraints); - } + { + // dq quadratic + DoFTools::compute_intergrid_constraints (dof_1, 5, dof_2, 2, + intergrid_map, + intergrid_constraints); + // dq constant + DoFTools::compute_intergrid_constraints (dof_1, 8, dof_2, 0, + intergrid_map, + intergrid_constraints); + } else - // 3d - { - // dq linear - DoFTools::compute_intergrid_constraints (dof_1, 0, dof_2, 1, - intergrid_map, - intergrid_constraints); - // dq constant - DoFTools::compute_intergrid_constraints (dof_1, 1, dof_2, 0, - intergrid_map, - intergrid_constraints); - }; - - - // continuous - // quadratic. continuous - // elements only work for 1d at - // present! + // 3d + { + // dq linear + DoFTools::compute_intergrid_constraints (dof_1, 0, dof_2, 1, + intergrid_map, + intergrid_constraints); + // dq constant + DoFTools::compute_intergrid_constraints (dof_1, 1, dof_2, 0, + intergrid_map, + intergrid_constraints); + }; + + + // continuous + // quadratic. continuous + // elements only work for 1d at + // present! if (dim == 1) - DoFTools::compute_intergrid_constraints (dof_1, 3, dof_2, 5, - intergrid_map, - intergrid_constraints); - + DoFTools::compute_intergrid_constraints (dof_1, 3, dof_2, 5, + intergrid_map, + intergrid_constraints); + intergrid_constraints.print (logfile); - - - // now refine grids a little, - // but make sure that grid 2 is - // always more refined than - // grid 1 + + + // now refine grids a little, + // but make sure that grid 2 is + // always more refined than + // grid 1 typename DoFHandler::cell_iterator cell, endc; cell = dof_1.begin(); endc = dof_1.end(); for (unsigned int index=0; cell!=endc; ++cell) - if (cell->active()) - { - ++index; - if (index % 3 == 0) - { - cell->set_refine_flag (); - - // make sure that the - // corrsponding cell - // on grid 2 is also - // refined if that - // has not yet - // happened - typename DoFHandler::cell_iterator cell2 (&tria_2, - cell->level(), - cell->index(), - &dof_2); - if (!cell2->has_children()) - cell2->set_refine_flag(); - }; - }; + if (cell->active()) + { + ++index; + if (index % 3 == 0) + { + cell->set_refine_flag (); + + // make sure that the + // corrsponding cell + // on grid 2 is also + // refined if that + // has not yet + // happened + typename DoFHandler::cell_iterator cell2 (&tria_2, + cell->level(), + cell->index(), + &dof_2); + if (!cell2->has_children()) + cell2->set_refine_flag(); + }; + }; tria_1.execute_coarsening_and_refinement (); tria_2.execute_coarsening_and_refinement (); - // next refine grid 2 a little more + // next refine grid 2 a little more cell = dof_2.begin(); endc = dof_2.end(); for (unsigned int index=0; cell!=endc; ++cell) - if (cell->active()) - { - ++index; - if (index % 3 == 1) - cell->set_refine_flag (); - }; - + if (cell->active()) + { + ++index; + if (index % 3 == 1) + cell->set_refine_flag (); + }; + tria_2.execute_coarsening_and_refinement (); - // use the following instead of - // the previous block when - // testing continuous elements - // in 2d + // use the following instead of + // the previous block when + // testing continuous elements + // in 2d // tria_2.refine_global(1); }; diff --git a/tests/deal.II/intergrid_map.cc b/tests/deal.II/intergrid_map.cc index cf17a32318..dac68c853b 100644 --- a/tests/deal.II/intergrid_map.cc +++ b/tests/deal.II/intergrid_map.cc @@ -40,10 +40,10 @@ template void check () { deallog << "Checking in " << dim << " space dimensions" - << std::endl - << "---------------------------------------" << std::endl; - - // create two grids + << std::endl + << "---------------------------------------" << std::endl; + + // create two grids Triangulation tria_1, tria_2; GridGenerator::hyper_cube (tria_1, -1, 1); tria_1.refine_global (5-dim); @@ -51,64 +51,64 @@ void check () FE_Q fe_1(1); FE_Q fe_2(2); - - // make several loops to refine the - // two grids + + // make several loops to refine the + // two grids for (unsigned int i=0; i<3; ++i) { deallog << "Refinement step " << i << std::endl; - + DoFHandler dof_1 (tria_1); DoFHandler dof_2 (tria_2); dof_1.distribute_dofs (fe_1); dof_2.distribute_dofs (fe_2); - // create some mapping + // create some mapping InterGridMap > intergrid_map_1; InterGridMap > intergrid_map_2; intergrid_map_1.make_mapping (dof_1, dof_2); intergrid_map_2.make_mapping (dof_2, dof_1); - // write out the mapping + // write out the mapping typename DoFHandler::cell_iterator cell=dof_1.begin(), - endc=dof_1.end(); + endc=dof_1.end(); for (; cell!=endc; ++cell) - { - deallog << cell - << "->" - << intergrid_map_1[cell] - << "->" - << intergrid_map_2[intergrid_map_1[cell]] - << std::endl; + { + deallog << cell + << "->" + << intergrid_map_1[cell] + << "->" + << intergrid_map_2[intergrid_map_1[cell]] + << std::endl; // note that not necessarily intergrid_map_2[intergrid_map_1[cell]] == // cell, since the meshes have different refinement steps. - }; - + }; - // now refine grids a little, - // but differently. this - // produces quite random grids + + // now refine grids a little, + // but differently. this + // produces quite random grids cell = dof_1.begin(); for (unsigned int index=0; cell!=endc; ++cell) - if (cell->active()) - { - ++index; - if (index % 3 == 0) - cell->set_refine_flag (); - }; + if (cell->active()) + { + ++index; + if (index % 3 == 0) + cell->set_refine_flag (); + }; cell = dof_2.begin(); endc = dof_2.end(); for (unsigned int index=0; cell!=endc; ++cell) - if (cell->active()) - { - ++index; - if (index % 3 == 1) - cell->set_refine_flag (); - }; - + if (cell->active()) + { + ++index; + if (index % 3 == 1) + cell->set_refine_flag (); + }; + tria_1.execute_coarsening_and_refinement (); tria_2.execute_coarsening_and_refinement (); }; @@ -120,7 +120,7 @@ int main () { std::ofstream logfile("intergrid_map/output"); deallog << std::setprecision(2); - + deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); diff --git a/tests/deal.II/interpolate_boundary_values_01.cc b/tests/deal.II/interpolate_boundary_values_01.cc index 229e1b834c..fb75b39d52 100644 --- a/tests/deal.II/interpolate_boundary_values_01.cc +++ b/tests/deal.II/interpolate_boundary_values_01.cc @@ -34,11 +34,11 @@ #include #include - // We need a FESystem +// We need a FESystem #include - // we need RT-elements - // and Q1-elements +// we need RT-elements +// and Q1-elements #include #include @@ -50,15 +50,15 @@ template class VectorBoundaryValues : public Function { - public: - VectorBoundaryValues (); - virtual void vector_value (const Point &p, - Vector &values) const; +public: + VectorBoundaryValues (); + virtual void vector_value (const Point &p, + Vector &values) const; }; template VectorBoundaryValues::VectorBoundaryValues () : - Function (dim+1) + Function (dim+1) {} template @@ -68,8 +68,8 @@ void VectorBoundaryValues::vector_value (const Point &, { Assert (values.size() == dim+1, ExcDimensionMismatch (values.size(), dim+1)); - - for (unsigned int d=0;d::vector_value (const Point &, template class FindBug { - public: - FindBug (); - void run (); - private: - void make_grid_and_dofs (); - void dirichlet_conditions (); - - Triangulation triangulation; - FESystem fe; - DoFHandler dof_handler; - Vector solution; +public: + FindBug (); + void run (); +private: + void make_grid_and_dofs (); + void dirichlet_conditions (); + + Triangulation triangulation; + FESystem fe; + DoFHandler dof_handler; + Vector solution; }; - // Construct FESystem with - // first component: Q1-Element, - // second component: lowest order DG_Element +// Construct FESystem with +// first component: Q1-Element, +// second component: lowest order DG_Element template FindBug::FindBug () : - fe (FE_RaviartThomas(0), 1, - FE_Q(1), 1), - dof_handler (triangulation) + fe (FE_RaviartThomas(0), 1, + FE_Q(1), 1), + dof_handler (triangulation) {} @@ -137,13 +137,13 @@ void FindBug::dirichlet_conditions () std::vector component_mask(dim+1, false); component_mask[dim] = true; - // This is just for the final - // output-test + // This is just for the final + // output-test for (unsigned int i=0; i (), @@ -155,19 +155,19 @@ void FindBug::dirichlet_conditions () std::set boundary_indicators; boundary_indicators.insert (0); - // get a list of those boundary DoFs which - // we want to be fixed: + // get a list of those boundary DoFs which + // we want to be fixed: DoFTools::extract_boundary_dofs (dof_handler, component_mask, fixed_dofs, boundary_indicators); - // (Primitive) Check if the DoFs - // where adjusted correctly (note - // that we have preset all values - // to 1, and interpolate_b_v should - // have overwritten those for - // component 0 by 0) + // (Primitive) Check if the DoFs + // where adjusted correctly (note + // that we have preset all values + // to 1, and interpolate_b_v should + // have overwritten those for + // component 0 by 0) for (unsigned int i=0; i::dirichlet_conditions () }; }; - // check 1 has obviously succeeded, - // so also check a more complicated - // boundary value function + // check 1 has obviously succeeded, + // so also check a more complicated + // boundary value function dirichlet_dofs.clear (); VectorTools::interpolate_boundary_values (dof_handler, 0, @@ -214,7 +214,7 @@ int main () FindBug<2>().run (); FindBug<3>().run (); - + return 0; } diff --git a/tests/deal.II/interpolate_boundary_values_02.cc b/tests/deal.II/interpolate_boundary_values_02.cc index 933a90ff9c..b90b81d0be 100644 --- a/tests/deal.II/interpolate_boundary_values_02.cc +++ b/tests/deal.II/interpolate_boundary_values_02.cc @@ -69,7 +69,7 @@ void test () boundary_values); deallog << boundary_values.size() << std::endl; for (std::map::const_iterator - p = boundary_values.begin(); + p = boundary_values.begin(); p != boundary_values.end(); ++p) deallog << p->first << ' ' << p->second << std::endl; } diff --git a/tests/deal.II/interpolate_dgq_01.cc b/tests/deal.II/interpolate_dgq_01.cc index 140f03752b..87e31c96a1 100644 --- a/tests/deal.II/interpolate_dgq_01.cc +++ b/tests/deal.II/interpolate_dgq_01.cc @@ -44,21 +44,21 @@ template class F : public Function { - public: - F (const unsigned int q) : q(q) {} - - virtual double value (const Point &p, - const unsigned int) const - { - double v=0; - for (unsigned int d=0; d &p, + const unsigned int) const + { + double v=0; + for (unsigned int d=0; d interpolant (dof_handler.n_dofs()); Vector error (triangulation.n_active_cells()); for (unsigned int q=0; q<=p+2; ++q) - { - // interpolate the function - VectorTools::interpolate (dof_handler, - F (q), - interpolant); - - // then compute the interpolation error - VectorTools::integrate_difference (dof_handler, - interpolant, - F (q), - error, - QGauss(q+2), - VectorTools::L2_norm); - if (q<=p) - Assert (error.l2_norm() < 1e-12*interpolant.l2_norm(), - ExcInternalError()); - - deallog << fe.get_name() << ", P_" << q - << ", rel. error=" << error.l2_norm() / interpolant.l2_norm() - << std::endl; - } + { + // interpolate the function + VectorTools::interpolate (dof_handler, + F (q), + interpolant); + + // then compute the interpolation error + VectorTools::integrate_difference (dof_handler, + interpolant, + F (q), + error, + QGauss(q+2), + VectorTools::L2_norm); + if (q<=p) + Assert (error.l2_norm() < 1e-12*interpolant.l2_norm(), + ExcInternalError()); + + deallog << fe.get_name() << ", P_" << q + << ", rel. error=" << error.l2_norm() / interpolant.l2_norm() + << std::endl; + } } } @@ -109,7 +109,7 @@ int main () { std::ofstream logfile("interpolate_dgq_01/output"); deallog << std::setprecision (3); - + deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); diff --git a/tests/deal.II/interpolate_dgq_02.cc b/tests/deal.II/interpolate_dgq_02.cc index a7e8abccfb..1b7b595295 100644 --- a/tests/deal.II/interpolate_dgq_02.cc +++ b/tests/deal.II/interpolate_dgq_02.cc @@ -46,21 +46,21 @@ template class F : public Function { - public: - F (const unsigned int q) : q(q) {} - - virtual double value (const Point &p, - const unsigned int) const - { - double v=0; - for (unsigned int d=0; d &p, + const unsigned int) const + { + double v=0; + for (unsigned int d=0; dset_refine_flag (); triangulation.execute_coarsening_and_refinement (); - triangulation.refine_global (1); + triangulation.refine_global (1); for (unsigned int p=1; p<6-dim; ++p) { @@ -84,32 +84,32 @@ void test () ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof_handler, constraints); constraints.close (); - + Vector interpolant (dof_handler.n_dofs()); Vector error (triangulation.n_active_cells()); for (unsigned int q=0; q<=p+2; ++q) - { - // interpolate the function - VectorTools::interpolate (dof_handler, - F (q), - interpolant); - constraints.distribute (interpolant); - - // then compute the interpolation error - VectorTools::integrate_difference (dof_handler, - interpolant, - F (q), - error, - QGauss(q+2), - VectorTools::L2_norm); - if (q<=p) - Assert (error.l2_norm() < 1e-12*interpolant.l2_norm(), - ExcInternalError()); - - deallog << fe.get_name() << ", P_" << q - << ", rel. error=" << error.l2_norm() / interpolant.l2_norm() - << std::endl; - } + { + // interpolate the function + VectorTools::interpolate (dof_handler, + F (q), + interpolant); + constraints.distribute (interpolant); + + // then compute the interpolation error + VectorTools::integrate_difference (dof_handler, + interpolant, + F (q), + error, + QGauss(q+2), + VectorTools::L2_norm); + if (q<=p) + Assert (error.l2_norm() < 1e-12*interpolant.l2_norm(), + ExcInternalError()); + + deallog << fe.get_name() << ", P_" << q + << ", rel. error=" << error.l2_norm() / interpolant.l2_norm() + << std::endl; + } } } @@ -119,7 +119,7 @@ int main () { std::ofstream logfile("interpolate_dgq_02/output"); deallog << std::setprecision (3); - + deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); diff --git a/tests/deal.II/interpolate_q_01.cc b/tests/deal.II/interpolate_q_01.cc index 60891b7ded..608e0f8dfa 100644 --- a/tests/deal.II/interpolate_q_01.cc +++ b/tests/deal.II/interpolate_q_01.cc @@ -44,21 +44,21 @@ template class F : public Function { - public: - F (const unsigned int q) : q(q) {} - - virtual double value (const Point &p, - const unsigned int) const - { - double v=0; - for (unsigned int d=0; d &p, + const unsigned int) const + { + double v=0; + for (unsigned int d=0; d interpolant (dof_handler.n_dofs()); Vector error (triangulation.n_active_cells()); for (unsigned int q=0; q<=p+2; ++q) - { - // interpolate the function - VectorTools::interpolate (dof_handler, - F (q), - interpolant); - - // then compute the interpolation error - VectorTools::integrate_difference (dof_handler, - interpolant, - F (q), - error, - QGauss(q+2), - VectorTools::L2_norm); - if (q<=p) - Assert (error.l2_norm() < 1e-12*interpolant.l2_norm(), - ExcInternalError()); - - deallog << fe.get_name() << ", P_" << q - << ", rel. error=" << error.l2_norm() / interpolant.l2_norm() - << std::endl; - } + { + // interpolate the function + VectorTools::interpolate (dof_handler, + F (q), + interpolant); + + // then compute the interpolation error + VectorTools::integrate_difference (dof_handler, + interpolant, + F (q), + error, + QGauss(q+2), + VectorTools::L2_norm); + if (q<=p) + Assert (error.l2_norm() < 1e-12*interpolant.l2_norm(), + ExcInternalError()); + + deallog << fe.get_name() << ", P_" << q + << ", rel. error=" << error.l2_norm() / interpolant.l2_norm() + << std::endl; + } } } @@ -109,7 +109,7 @@ int main () { std::ofstream logfile("interpolate_q_01/output"); deallog << std::setprecision (3); - + deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); diff --git a/tests/deal.II/interpolate_q_02.cc b/tests/deal.II/interpolate_q_02.cc index 1782c29ed8..d42752295e 100644 --- a/tests/deal.II/interpolate_q_02.cc +++ b/tests/deal.II/interpolate_q_02.cc @@ -46,21 +46,21 @@ template class F : public Function { - public: - F (const unsigned int q) : q(q) {} - - virtual double value (const Point &p, - const unsigned int) const - { - double v=0; - for (unsigned int d=0; d &p, + const unsigned int) const + { + double v=0; + for (unsigned int d=0; dset_refine_flag (); triangulation.execute_coarsening_and_refinement (); - triangulation.refine_global (1); + triangulation.refine_global (1); for (unsigned int p=1; p<6-dim; ++p) { @@ -84,32 +84,32 @@ void test () ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof_handler, constraints); constraints.close (); - + Vector interpolant (dof_handler.n_dofs()); Vector error (triangulation.n_active_cells()); for (unsigned int q=0; q<=p+2; ++q) - { - // interpolate the function - VectorTools::interpolate (dof_handler, - F (q), - interpolant); - constraints.distribute (interpolant); - - // then compute the interpolation error - VectorTools::integrate_difference (dof_handler, - interpolant, - F (q), - error, - QGauss(q+2), - VectorTools::L2_norm); - if (q<=p) - Assert (error.l2_norm() < 1e-12*interpolant.l2_norm(), - ExcInternalError()); - - deallog << fe.get_name() << ", P_" << q - << ", rel. error=" << error.l2_norm() / interpolant.l2_norm() - << std::endl; - } + { + // interpolate the function + VectorTools::interpolate (dof_handler, + F (q), + interpolant); + constraints.distribute (interpolant); + + // then compute the interpolation error + VectorTools::integrate_difference (dof_handler, + interpolant, + F (q), + error, + QGauss(q+2), + VectorTools::L2_norm); + if (q<=p) + Assert (error.l2_norm() < 1e-12*interpolant.l2_norm(), + ExcInternalError()); + + deallog << fe.get_name() << ", P_" << q + << ", rel. error=" << error.l2_norm() / interpolant.l2_norm() + << std::endl; + } } } @@ -119,7 +119,7 @@ int main () { std::ofstream logfile("interpolate_q_02/output"); deallog << std::setprecision (3); - + deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); diff --git a/tests/deal.II/interpolate_q_system_01.cc b/tests/deal.II/interpolate_q_system_01.cc index 3e37057383..c79b6807e1 100644 --- a/tests/deal.II/interpolate_q_system_01.cc +++ b/tests/deal.II/interpolate_q_system_01.cc @@ -45,23 +45,23 @@ template class F : public Function { - public: - F (const unsigned int q) : Function(3), q(q) {} - - virtual void vector_value (const Point &p, - Vector &v) const +public: + F (const unsigned int q) : Function(3), q(q) {} + + virtual void vector_value (const Point &p, + Vector &v) const + { + for (unsigned int c=0; c fe_1(p); FE_Q fe_2(p+1); FESystem fe(fe_1, 2, - fe_2, 1); + fe_2, 1); DoFHandler dof_handler(triangulation); dof_handler.distribute_dofs (fe); Vector interpolant (dof_handler.n_dofs()); Vector error (triangulation.n_active_cells()); for (unsigned int q=0; q<=p+2; ++q) - { - // interpolate the function - VectorTools::interpolate (dof_handler, - F (q), - interpolant); - - // then compute the interpolation error - VectorTools::integrate_difference (dof_handler, - interpolant, - F (q), - error, - QGauss(q+2), - VectorTools::L2_norm); - if (q<=p) - Assert (error.l2_norm() < 1e-12*interpolant.l2_norm(), - ExcInternalError()); - - deallog << fe.get_name() << ", P_" << q - << ", rel. error=" << error.l2_norm() / interpolant.l2_norm() - << std::endl; - } + { + // interpolate the function + VectorTools::interpolate (dof_handler, + F (q), + interpolant); + + // then compute the interpolation error + VectorTools::integrate_difference (dof_handler, + interpolant, + F (q), + error, + QGauss(q+2), + VectorTools::L2_norm); + if (q<=p) + Assert (error.l2_norm() < 1e-12*interpolant.l2_norm(), + ExcInternalError()); + + deallog << fe.get_name() << ", P_" << q + << ", rel. error=" << error.l2_norm() / interpolant.l2_norm() + << std::endl; + } } } @@ -115,7 +115,7 @@ int main () { std::ofstream logfile("interpolate_q_system_01/output"); deallog << std::setprecision (3); - + deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); diff --git a/tests/deal.II/interpolate_q_system_02.cc b/tests/deal.II/interpolate_q_system_02.cc index b89b5aafdf..9208919f9e 100644 --- a/tests/deal.II/interpolate_q_system_02.cc +++ b/tests/deal.II/interpolate_q_system_02.cc @@ -47,23 +47,23 @@ template class F : public Function { - public: - F (const unsigned int q) : Function(3), q(q) {} - - virtual void vector_value (const Point &p, - Vector &v) const +public: + F (const unsigned int q) : Function(3), q(q) {} + + virtual void vector_value (const Point &p, + Vector &v) const + { + for (unsigned int c=0; cset_refine_flag (); triangulation.execute_coarsening_and_refinement (); - triangulation.refine_global (1); + triangulation.refine_global (1); for (unsigned int p=1; p<6-dim; ++p) { @@ -93,28 +93,28 @@ void test () Vector interpolant (dof_handler.n_dofs()); Vector error (triangulation.n_active_cells()); for (unsigned int q=0; q<=p+2; ++q) - { - // interpolate the function - VectorTools::interpolate (dof_handler, - F (q), - interpolant); - constraints.distribute (interpolant); - - // then compute the interpolation error - VectorTools::integrate_difference (dof_handler, - interpolant, - F (q), - error, - QGauss(q+2), - VectorTools::L2_norm); - if (q<=p) - Assert (error.l2_norm() < 1e-12*interpolant.l2_norm(), - ExcInternalError()); - - deallog << fe.get_name() << ", P_" << q - << ", rel. error=" << error.l2_norm() / interpolant.l2_norm() - << std::endl; - } + { + // interpolate the function + VectorTools::interpolate (dof_handler, + F (q), + interpolant); + constraints.distribute (interpolant); + + // then compute the interpolation error + VectorTools::integrate_difference (dof_handler, + interpolant, + F (q), + error, + QGauss(q+2), + VectorTools::L2_norm); + if (q<=p) + Assert (error.l2_norm() < 1e-12*interpolant.l2_norm(), + ExcInternalError()); + + deallog << fe.get_name() << ", P_" << q + << ", rel. error=" << error.l2_norm() / interpolant.l2_norm() + << std::endl; + } } } @@ -124,7 +124,7 @@ int main () { std::ofstream logfile("interpolate_q_system_02/output"); deallog << std::setprecision (3); - + deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); diff --git a/tests/deal.II/kelly_crash_02.cc b/tests/deal.II/kelly_crash_02.cc index ba331b472e..500e67e42a 100644 --- a/tests/deal.II/kelly_crash_02.cc +++ b/tests/deal.II/kelly_crash_02.cc @@ -50,149 +50,150 @@ char logname[] = "kelly_crash_02/output"; void test () { const unsigned int dim = 3; - + static const Point<3> vertices_1[] - = - { - // points on the lower surface - Point(0, 0, -4), - Point(std::cos(0*numbers::PI/6), - std::sin(0*numbers::PI/6), - -4), - Point(std::cos(2*numbers::PI/6), - std::sin(2*numbers::PI/6), - -4), - Point(std::cos(4*numbers::PI/6), - std::sin(4*numbers::PI/6), - -4), - Point(std::cos(6*numbers::PI/6), - std::sin(6*numbers::PI/6), - -4), - Point(std::cos(8*numbers::PI/6), - std::sin(8*numbers::PI/6), - -4), - Point(std::cos(10*numbers::PI/6), - std::sin(10*numbers::PI/6), - -4), - - // same points on the top - // of the stem, with - // indentation in the middle - Point(0, 0, 4-std::sqrt(2.)/2), - Point(std::cos(0*numbers::PI/6), - std::sin(0*numbers::PI/6), - 4), - Point(std::cos(2*numbers::PI/6), - std::sin(2*numbers::PI/6), - 4), - Point(std::cos(4*numbers::PI/6), - std::sin(4*numbers::PI/6), - 4), - Point(std::cos(6*numbers::PI/6), - std::sin(6*numbers::PI/6), - 4), - Point(std::cos(8*numbers::PI/6), - std::sin(8*numbers::PI/6), - 4), - Point(std::cos(10*numbers::PI/6), - std::sin(10*numbers::PI/6), - 4), - - // point at top of chevron - Point(0,0,4+std::sqrt(2.)/2), - - // points at the top of the - // first extension - // points 15-18 - Point(0, 0, 7) + Point (std::cos(2*numbers::PI/6), - std::sin(2*numbers::PI/6), - 0) * 4, - Point(std::cos(0*numbers::PI/6), - std::sin(0*numbers::PI/6), - 7) + Point (std::cos(2*numbers::PI/6), - std::sin(2*numbers::PI/6), - 0) * 4, - Point(std::cos(2*numbers::PI/6), - std::sin(2*numbers::PI/6), - 7) + Point (std::cos(2*numbers::PI/6), - std::sin(2*numbers::PI/6), - 0) * 4, - Point(std::cos(4*numbers::PI/6), - std::sin(4*numbers::PI/6), - 7) + Point (std::cos(2*numbers::PI/6), - std::sin(2*numbers::PI/6), - 0) * 4, - - // points at the top of the - // second extension - // points 19-22 - Point(0, 0, 7) + Point (std::cos(6*numbers::PI/6), - std::sin(6*numbers::PI/6), - 0) * 4, - Point(std::cos(4*numbers::PI/6), - std::sin(4*numbers::PI/6), - 7) + Point (std::cos(6*numbers::PI/6), - std::sin(6*numbers::PI/6), - 0) * 4, - Point(std::cos(6*numbers::PI/6), - std::sin(6*numbers::PI/6), - 7) + Point (std::cos(6*numbers::PI/6), - std::sin(6*numbers::PI/6), - 0) * 4, - Point(std::cos(8*numbers::PI/6), - std::sin(8*numbers::PI/6), - 7) + Point (std::cos(6*numbers::PI/6), - std::sin(6*numbers::PI/6), - 0) * 4, - - // points at the top of the - // third extension - // points 23-26 - Point(0, 0, 7) + Point (std::cos(10*numbers::PI/6), - std::sin(10*numbers::PI/6), - 0) * 4, - Point(std::cos(8*numbers::PI/6), - std::sin(8*numbers::PI/6), - 7) + Point (std::cos(10*numbers::PI/6), - std::sin(10*numbers::PI/6), - 0) * 4, - Point(std::cos(10*numbers::PI/6), - std::sin(10*numbers::PI/6), - 7) + Point (std::cos(10*numbers::PI/6), - std::sin(10*numbers::PI/6), - 0) * 4, - Point(std::cos(0*numbers::PI/6), - std::sin(0*numbers::PI/6), - 7) + Point (std::cos(10*numbers::PI/6), - std::sin(10*numbers::PI/6), - 0) * 4, - - }; - + = + { + // points on the lower surface + Point(0, 0, -4), + Point(std::cos(0*numbers::PI/6), + std::sin(0*numbers::PI/6), + -4), + Point(std::cos(2*numbers::PI/6), + std::sin(2*numbers::PI/6), + -4), + Point(std::cos(4*numbers::PI/6), + std::sin(4*numbers::PI/6), + -4), + Point(std::cos(6*numbers::PI/6), + std::sin(6*numbers::PI/6), + -4), + Point(std::cos(8*numbers::PI/6), + std::sin(8*numbers::PI/6), + -4), + Point(std::cos(10*numbers::PI/6), + std::sin(10*numbers::PI/6), + -4), + + // same points on the top + // of the stem, with + // indentation in the middle + Point(0, 0, 4-std::sqrt(2.)/2), + Point(std::cos(0*numbers::PI/6), + std::sin(0*numbers::PI/6), + 4), + Point(std::cos(2*numbers::PI/6), + std::sin(2*numbers::PI/6), + 4), + Point(std::cos(4*numbers::PI/6), + std::sin(4*numbers::PI/6), + 4), + Point(std::cos(6*numbers::PI/6), + std::sin(6*numbers::PI/6), + 4), + Point(std::cos(8*numbers::PI/6), + std::sin(8*numbers::PI/6), + 4), + Point(std::cos(10*numbers::PI/6), + std::sin(10*numbers::PI/6), + 4), + + // point at top of chevron + Point(0,0,4+std::sqrt(2.)/2), + + // points at the top of the + // first extension + // points 15-18 + Point(0, 0, 7) + Point (std::cos(2*numbers::PI/6), + std::sin(2*numbers::PI/6), + 0) * 4, + Point(std::cos(0*numbers::PI/6), + std::sin(0*numbers::PI/6), + 7) + Point (std::cos(2*numbers::PI/6), + std::sin(2*numbers::PI/6), + 0) * 4, + Point(std::cos(2*numbers::PI/6), + std::sin(2*numbers::PI/6), + 7) + Point (std::cos(2*numbers::PI/6), + std::sin(2*numbers::PI/6), + 0) * 4, + Point(std::cos(4*numbers::PI/6), + std::sin(4*numbers::PI/6), + 7) + Point (std::cos(2*numbers::PI/6), + std::sin(2*numbers::PI/6), + 0) * 4, + + // points at the top of the + // second extension + // points 19-22 + Point(0, 0, 7) + Point (std::cos(6*numbers::PI/6), + std::sin(6*numbers::PI/6), + 0) * 4, + Point(std::cos(4*numbers::PI/6), + std::sin(4*numbers::PI/6), + 7) + Point (std::cos(6*numbers::PI/6), + std::sin(6*numbers::PI/6), + 0) * 4, + Point(std::cos(6*numbers::PI/6), + std::sin(6*numbers::PI/6), + 7) + Point (std::cos(6*numbers::PI/6), + std::sin(6*numbers::PI/6), + 0) * 4, + Point(std::cos(8*numbers::PI/6), + std::sin(8*numbers::PI/6), + 7) + Point (std::cos(6*numbers::PI/6), + std::sin(6*numbers::PI/6), + 0) * 4, + + // points at the top of the + // third extension + // points 23-26 + Point(0, 0, 7) + Point (std::cos(10*numbers::PI/6), + std::sin(10*numbers::PI/6), + 0) * 4, + Point(std::cos(8*numbers::PI/6), + std::sin(8*numbers::PI/6), + 7) + Point (std::cos(10*numbers::PI/6), + std::sin(10*numbers::PI/6), + 0) * 4, + Point(std::cos(10*numbers::PI/6), + std::sin(10*numbers::PI/6), + 7) + Point (std::cos(10*numbers::PI/6), + std::sin(10*numbers::PI/6), + 0) * 4, + Point(std::cos(0*numbers::PI/6), + std::sin(0*numbers::PI/6), + 7) + Point (std::cos(10*numbers::PI/6), + std::sin(10*numbers::PI/6), + 0) * 4, + + }; + const unsigned int - n_vertices = sizeof(vertices_1) / sizeof(vertices_1[0]); + 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] - = { - // the three cells in the stem - {0, 2, 4, 3, 7, 9, 11, 10}, - {6, 0, 5, 4, 13, 7, 12, 11}, - {6, 1, 0, 2, 13, 8, 7, 9}, - // the chevron at the center - {13, 8, 7, 9, 12, 14, 11, 10}, - // first extension - {14, 8, 10, 9, 15, 16, 18, 17}, - // second extension - {11, 12, 10, 14, 21, 22, 20, 19}, - // third extension - {12, 13, 14, 8, 24, 25, 23, 26}, - }; + = + { + // the three cells in the stem + {0, 2, 4, 3, 7, 9, 11, 10}, + {6, 0, 5, 4, 13, 7, 12, 11}, + {6, 1, 0, 2, 13, 8, 7, 9}, + // the chevron at the center + {13, 8, 7, 9, 12, 14, 11, 10}, + // first extension + {14, 8, 10, 9, 15, 16, 18, 17}, + // second extension + {11, 12, 10, 14, 21, 22, 20, 19}, + // third extension + {12, 13, 14, 8, 24, 25, 23, 26}, + }; const unsigned int - n_cells = sizeof(cell_vertices) / sizeof(cell_vertices[0]); + n_cells = sizeof(cell_vertices) / sizeof(cell_vertices[0]); std::vector > cells (n_cells, CellData()); - for (unsigned int i=0; i::vertices_per_cell; @@ -203,41 +204,41 @@ void test () Triangulation<3> triangulation; triangulation.create_triangulation (vertices, - cells, - SubCellData()); + cells, + SubCellData()); for (Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + cell = triangulation.begin_active(); cell != triangulation.end(); ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) if ((cell->face(f)->center()[2] != -4) - && - (cell->face(f)->center()[2] != 7) - && - (cell->face(f)->at_boundary())) - cell->face(f)->set_boundary_indicator (1); - + && + (cell->face(f)->center()[2] != 7) + && + (cell->face(f)->at_boundary())) + cell->face(f)->set_boundary_indicator (1); + triangulation.refine_global (1); for (Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + cell = triangulation.begin_active(); cell != triangulation.end(); ++cell) for (unsigned int face_no=0; - face_no::faces_per_cell; ++face_no) + face_no::faces_per_cell; ++face_no) Assert (cell->at_boundary(face_no) - == - cell->face(face_no)->at_boundary(), - ExcInternalError()); + == + cell->face(face_no)->at_boundary(), + ExcInternalError()); deallog << "OK" << std::endl; } -int main () +int main () { std::ofstream logfile(logname); logfile.precision (3); - + deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); diff --git a/tests/deal.II/line_coarsening_3d.cc b/tests/deal.II/line_coarsening_3d.cc index a037a0947f..71f2b8f9f3 100644 --- a/tests/deal.II/line_coarsening_3d.cc +++ b/tests/deal.II/line_coarsening_3d.cc @@ -36,27 +36,27 @@ std::ofstream logfile("line_coarsening_3d/output"); // this is not accounted for (for n_cells>5) and the child lines are deleted, // although they are still needed. void create_star_structured_cylinder (Triangulation<3> &coarse_grid, - const unsigned int n_cells) + const unsigned int n_cells) { Assert(n_cells>1, ExcNotImplemented()); - + std::vector > points(2*(1+2*n_cells)); points[0] = Point<3>(); points[1] = Point<3>(1,0,0); for (unsigned int i=0; i<2*n_cells-1; ++i) { points[2+i]=Point<3>(std::cos(numbers::PI/n_cells*(i+1)), - std::sin(numbers::PI/n_cells*(i+1)), - 0); + std::sin(numbers::PI/n_cells*(i+1)), + 0); } - + for (unsigned int i=0; i<2*n_cells+1; ++i) { points[1+2*n_cells+i]=points[i]+Point<3>(0,0,-1); } - + std::vector > cells(n_cells); - + for (unsigned int c=0; c &coarse_grid, cells[c].vertices[6] = 2+2*c+2*n_cells+1; cells[c].vertices[7] = (3+2*c)%(2*n_cells)+2*n_cells+1; } - // finally generate a triangulation - // out of this + // finally generate a triangulation + // out of this coarse_grid.create_triangulation_compatibility (points, cells, SubCellData()); } @@ -77,12 +77,12 @@ void create_star_structured_cylinder (Triangulation<3> &coarse_grid, void check () { const unsigned int dim=3; - - // create tria + + // create tria Triangulation tria; create_star_structured_cylinder(tria,6); - // out of the six cells, refine the first and - // fourth + // out of the six cells, refine the first and + // fourth Triangulation<3>::active_cell_iterator cell=tria.begin_active(); cell->set_refine_flag(); ++cell; @@ -90,19 +90,19 @@ void check () ++cell; cell->set_refine_flag(); tria.execute_coarsening_and_refinement (); - // write grid to file + // write grid to file GridOut go; - go.set_flags (GridOutFlags::Ucd(true)); + go.set_flags (GridOutFlags::Ucd(true)); go.write_ucd(tria,logfile); - // coarsen the first cell again + // coarsen the first cell again cell=tria.begin_active(1); - for (unsigned int c=0;c<8; ++c) + for (unsigned int c=0; c<8; ++c) { cell->set_coarsen_flag(); ++cell; } tria.execute_coarsening_and_refinement (); - + go.write_ucd(tria,logfile); } diff --git a/tests/deal.II/matrices.cc b/tests/deal.II/matrices.cc index 1f021791c6..c87f3a0080 100644 --- a/tests/deal.II/matrices.cc +++ b/tests/deal.II/matrices.cc @@ -44,17 +44,21 @@ template class MySquareFunction : public Function { - public: - MySquareFunction () : Function(2) {} - - virtual double value (const Point &p, - const unsigned int component) const - { return (component+1)*p.square(); } - - virtual void vector_value (const Point &p, - Vector &values) const - { values(0) = value(p,0); - values(1) = value(p,1); } +public: + MySquareFunction () : Function(2) {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return (component+1)*p.square(); + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + values(0) = value(p,0); + values(1) = value(p,1); + } }; @@ -63,48 +67,48 @@ class MySquareFunction : public Function template void check_boundary (const DoFHandler &dof, - const Mapping &mapping) + const Mapping &mapping) { MySquareFunction coefficient; typename FunctionMap::type function_map; function_map[0] = &coefficient; QGauss face_quadrature(6); - + std::vector dof_to_boundary_mapping; DoFTools::map_dof_to_boundary_indices (dof, - dof_to_boundary_mapping); + dof_to_boundary_mapping); SparsityPattern sparsity(dof.n_boundary_dofs(function_map), - dof.max_couplings_between_boundary_dofs()); + dof.max_couplings_between_boundary_dofs()); DoFTools::make_boundary_sparsity_pattern (dof, - function_map, - dof_to_boundary_mapping, - sparsity); + function_map, + dof_to_boundary_mapping, + sparsity); sparsity.compress (); SparseMatrix matrix; matrix.reinit (sparsity); - + Vector rhs (dof.n_boundary_dofs(function_map)); MatrixTools:: - create_boundary_mass_matrix (mapping, dof, - face_quadrature, matrix, - function_map, rhs, - dof_to_boundary_mapping, - &coefficient); - - // since we only generate - // output with two digits after - // the dot, and since matrix - // entries are usually in the - // range of 1 or below, - // multiply matrix by 100 to - // make test more sensitive + create_boundary_mass_matrix (mapping, dof, + face_quadrature, matrix, + function_map, rhs, + dof_to_boundary_mapping, + &coefficient); + + // since we only generate + // output with two digits after + // the dot, and since matrix + // entries are usually in the + // range of 1 or below, + // multiply matrix by 100 to + // make test more sensitive for (unsigned int i=0; i &dof, void check_boundary (const DoFHandler<1> &, - const Mapping<1> &) + const Mapping<1> &) {} @@ -122,7 +126,7 @@ template void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -133,23 +137,23 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping (3); QGauss quadrature(6); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); std::vector > mask (2, std::vector(2, false)); mask[0][0] = mask[1][1] = true; @@ -159,11 +163,11 @@ check () constraints.close (); constraints.condense (sparsity); sparsity.compress (); - + SparseMatrix matrix; Functions::ExpFunction coefficient; - + typename FunctionMap::type function_map; function_map[0] = &coefficient; @@ -171,31 +175,31 @@ check () { matrix.reinit(sparsity); switch (test) - { - case 0: - MatrixTools:: - create_mass_matrix (mapping, dof, - quadrature, matrix, &coefficient); - break; - case 1: - MatrixTools:: - create_laplace_matrix (mapping, dof, - quadrature, matrix, &coefficient); - break; - default: - Assert (false, ExcInternalError()); - }; - - // since we only generate - // output with two digits after - // the dot, and since matrix - // entries are usually in the - // range of 1 or below, - // multiply matrix by 100 to - // make test more sensitive + { + case 0: + MatrixTools:: + create_mass_matrix (mapping, dof, + quadrature, matrix, &coefficient); + break; + case 1: + MatrixTools:: + create_laplace_matrix (mapping, dof, + quadrature, matrix, &coefficient); + break; + default: + Assert (false, ExcInternalError()); + }; + + // since we only generate + // output with two digits after + // the dot, and since matrix + // entries are usually in the + // range of 1 or below, + // multiply matrix by 100 to + // make test more sensitive for (unsigned int i=0; i 1) @@ -208,9 +212,9 @@ int main () { std::ofstream logfile ("matrices/output"); logfile << std::setprecision (2); - logfile << std::fixed; + logfile << std::fixed; deallog << std::setprecision (2); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console (0); diff --git a/tests/deal.II/maximal_cell_diameter.cc b/tests/deal.II/maximal_cell_diameter.cc index ecef945b99..854c24fc96 100644 --- a/tests/deal.II/maximal_cell_diameter.cc +++ b/tests/deal.II/maximal_cell_diameter.cc @@ -34,44 +34,44 @@ std::ofstream logfile("maximal_cell_diameter/output"); template void test1 () { - // test 1: hypercube + // test 1: hypercube if (true) { Triangulation tria; GridGenerator::hyper_cube(tria); for (unsigned int i=0; i<2; ++i) - { - tria.refine_global(2); - deallog << dim << "d, " - << "max diameter: " - << GridTools::maximal_cell_diameter (tria) - << std::endl; - Assert (GridTools::maximal_cell_diameter (tria) - >= - GridTools::minimal_cell_diameter (tria), - ExcInternalError()); - }; + { + tria.refine_global(2); + deallog << dim << "d, " + << "max diameter: " + << GridTools::maximal_cell_diameter (tria) + << std::endl; + Assert (GridTools::maximal_cell_diameter (tria) + >= + GridTools::minimal_cell_diameter (tria), + ExcInternalError()); + }; }; - // test 2: hyperball + // test 2: hyperball if (dim >= 2) { Triangulation tria; GridGenerator::hyper_ball(tria, Point(), 1); for (unsigned int i=0; i<2; ++i) - { - tria.refine_global(2); - deallog << dim << "d, " - << "max diameter: " - << GridTools::maximal_cell_diameter (tria) - << std::endl; - Assert (GridTools::maximal_cell_diameter (tria) - >= - GridTools::minimal_cell_diameter (tria), - ExcInternalError()); - }; + { + tria.refine_global(2); + deallog << dim << "d, " + << "max diameter: " + << GridTools::maximal_cell_diameter (tria) + << std::endl; + Assert (GridTools::maximal_cell_diameter (tria) + >= + GridTools::minimal_cell_diameter (tria), + ExcInternalError()); + }; }; } diff --git a/tests/deal.II/measure_et_al.cc b/tests/deal.II/measure_et_al.cc index f8972ae264..23797aaea7 100644 --- a/tests/deal.II/measure_et_al.cc +++ b/tests/deal.II/measure_et_al.cc @@ -30,7 +30,7 @@ template void create_triangulation(const unsigned int, - Triangulation &) + Triangulation &) { Assert(false, ExcNotImplemented()); } @@ -38,48 +38,48 @@ void create_triangulation(const unsigned int, template<> void create_triangulation(const unsigned int case_no, - Triangulation<2> &tria) + Triangulation<2> &tria) { switch (case_no) { - case 0: - GridGenerator::hyper_cube(tria, 1., 3.); - break; - case 1: - { - GridGenerator::hyper_cube(tria, 1., 3.); - Point<2> &v0=tria.begin_active()->vertex(0); - v0(0) = 0.; - Point<2> &v2=tria.begin_active()->vertex(3); - v2(0) = 5.; - v2(1) = 4.; -// exact_areas.push_back(7.); - break; - } - default: - Assert(false, ExcNotImplemented()); + case 0: + GridGenerator::hyper_cube(tria, 1., 3.); + break; + case 1: + { + GridGenerator::hyper_cube(tria, 1., 3.); + Point<2> &v0=tria.begin_active()->vertex(0); + v0(0) = 0.; + Point<2> &v2=tria.begin_active()->vertex(3); + v2(0) = 5.; + v2(1) = 4.; +// exact_areas.push_back(7.); + break; + } + default: + Assert(false, ExcNotImplemented()); }; } template<> void create_triangulation(const unsigned int case_no, - Triangulation<3> &tria) + Triangulation<3> &tria) { switch (case_no) { - case 0: - GridGenerator::hyper_cube(tria, 1., 3.); - break; - case 1: - { - GridGenerator::hyper_cube(tria, 1., 3.); - Point<3> &v0=tria.begin_active()->vertex(0); - v0(0) = 0.; - break; - } - default: - Assert(false, ExcNotImplemented()); + case 0: + GridGenerator::hyper_cube(tria, 1., 3.); + break; + case 1: + { + GridGenerator::hyper_cube(tria, 1., 3.); + Point<3> &v0=tria.begin_active()->vertex(0); + v0(0) = 0.; + break; + } + default: + Assert(false, ExcNotImplemented()); }; } @@ -92,11 +92,11 @@ void test() { create_triangulation(case_no, tria); deallog << "dim" << dim << ":case" << case_no << ":measure=" - << tria.begin_active()->measure() << std::endl; + << tria.begin_active()->measure() << std::endl; deallog << "dim" << dim << ":case" << case_no << ":center=" - << tria.begin_active()->center() << std::endl; + << tria.begin_active()->center() << std::endl; deallog << "dim" << dim << ":case" << case_no << ":barycenter=" - << tria.begin_active()->barycenter() << std::endl; + << tria.begin_active()->barycenter() << std::endl; tria.clear(); } } diff --git a/tests/deal.II/measure_et_al_02.cc b/tests/deal.II/measure_et_al_02.cc index 436adb3c5c..8fce576c88 100644 --- a/tests/deal.II/measure_et_al_02.cc +++ b/tests/deal.II/measure_et_al_02.cc @@ -30,7 +30,7 @@ template void create_triangulation(const unsigned int, - Triangulation &) + Triangulation &) { Assert(false, ExcNotImplemented()); } @@ -38,54 +38,54 @@ void create_triangulation(const unsigned int, template<> void create_triangulation(const unsigned int case_no, - Triangulation<2> &tria) + Triangulation<2> &tria) { switch (case_no) { - case 0: - GridGenerator::hyper_cube(tria, 1., 3.); - break; - case 1: - { - GridGenerator::hyper_cube(tria, 1., 3.); - Point<2> &v0=tria.begin_active()->vertex(0); - v0(0) = 0.; - break; - } - case 2: - { - GridGenerator::hyper_cube(tria, 1., 3.); - Point<2> &v0=tria.begin_active()->vertex(0); - v0(0) = 0.; - Point<2> &v3=tria.begin_active()->vertex(3); - v3(0) = 4.; - break; - } - default: - Assert(false, ExcNotImplemented()); + case 0: + GridGenerator::hyper_cube(tria, 1., 3.); + break; + case 1: + { + GridGenerator::hyper_cube(tria, 1., 3.); + Point<2> &v0=tria.begin_active()->vertex(0); + v0(0) = 0.; + break; + } + case 2: + { + GridGenerator::hyper_cube(tria, 1., 3.); + Point<2> &v0=tria.begin_active()->vertex(0); + v0(0) = 0.; + Point<2> &v3=tria.begin_active()->vertex(3); + v3(0) = 4.; + break; + } + default: + Assert(false, ExcNotImplemented()); }; } template<> void create_triangulation(const unsigned int case_no, - Triangulation<3> &tria) + Triangulation<3> &tria) { switch (case_no) { - case 0: - GridGenerator::hyper_cube(tria, 1., 3.); - break; - case 1: - case 2:// like case 1 - { - GridGenerator::hyper_cube(tria, 1., 3.); - Point<3> &v0=tria.begin_active()->vertex(0); - v0(0) = 0.; - break; - } - default: - Assert(false, ExcNotImplemented()); + case 0: + GridGenerator::hyper_cube(tria, 1., 3.); + break; + case 1: + case 2:// like case 1 + { + GridGenerator::hyper_cube(tria, 1., 3.); + Point<3> &v0=tria.begin_active()->vertex(0); + v0(0) = 0.; + break; + } + default: + Assert(false, ExcNotImplemented()); }; } @@ -98,11 +98,11 @@ void test() { create_triangulation(case_no, tria); deallog << "dim" << dim << ":case" << case_no << ":diameter=" - << tria.begin_active()->diameter() << std::endl; + << tria.begin_active()->diameter() << std::endl; deallog << "dim" << dim << ":case" << case_no << ":extent_in_direction=" - << tria.begin_active()->extent_in_direction(0) << std::endl; + << tria.begin_active()->extent_in_direction(0) << std::endl; deallog << "dim" << dim << ":case" << case_no << ":minimum_vertex_distance=" - << tria.begin_active()->minimum_vertex_distance() << std::endl; + << tria.begin_active()->minimum_vertex_distance() << std::endl; tria.clear(); } } diff --git a/tests/deal.II/memory_consumption_01.cc b/tests/deal.II/memory_consumption_01.cc index a89e2c3219..ee0c478fce 100644 --- a/tests/deal.II/memory_consumption_01.cc +++ b/tests/deal.II/memory_consumption_01.cc @@ -63,30 +63,30 @@ using namespace dealii; template class Step6 { - public: - Step6 (); - ~Step6 (); +public: + Step6 (); + ~Step6 (); - void run (); + void run (); - private: - void setup_system (); - void assemble_system (); - void solve (); - void refine_grid (); +private: + void setup_system (); + void assemble_system (); + void solve (); + void refine_grid (); - Triangulation triangulation; + Triangulation triangulation; - DoFHandler dof_handler; - FE_Q fe; + DoFHandler dof_handler; + FE_Q fe; - ConstraintMatrix hanging_node_constraints; + ConstraintMatrix hanging_node_constraints; - SparsityPattern sparsity_pattern; - SparseMatrix system_matrix; + SparsityPattern sparsity_pattern; + SparseMatrix system_matrix; - Vector solution; - Vector system_rhs; + Vector solution; + Vector system_rhs; }; @@ -95,15 +95,15 @@ class Step6 template class Coefficient : public Function { - public: - Coefficient () : Function() {} +public: + Coefficient () : Function() {} - virtual double value (const Point &p, - const unsigned int component = 0) const; + virtual double value (const Point &p, + const unsigned int component = 0) const; - virtual void value_list (const std::vector > &points, - std::vector &values, - const unsigned int component = 0) const; + virtual void value_list (const std::vector > &points, + std::vector &values, + const unsigned int component = 0) const; }; @@ -147,9 +147,9 @@ void Coefficient::value_list (const std::vector > &points, template Step6::Step6 () - : - dof_handler (triangulation), - fe (2) + : + dof_handler (triangulation), + fe (2) {} @@ -209,8 +209,8 @@ void Step6::assemble_system () std::vector coefficient_values (n_q_points); 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) { cell_matrix = 0; @@ -315,54 +315,54 @@ void Step6::run () if (cycle == 0) { - if (dim > 1) - { - GridGenerator::hyper_ball (triangulation); - - static const HyperBallBoundary boundary; - triangulation.set_boundary (0, boundary); - - triangulation.refine_global (1); - } - else - { - GridGenerator::hyper_cube (triangulation); - triangulation.refine_global (3); - } + if (dim > 1) + { + GridGenerator::hyper_ball (triangulation); + + static const HyperBallBoundary boundary; + triangulation.set_boundary (0, boundary); + + triangulation.refine_global (1); + } + else + { + GridGenerator::hyper_cube (triangulation); + triangulation.refine_global (3); + } } else refine_grid (); 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 (); deallog << "Memory consumption -- Triangulation: " << triangulation.memory_consumption() - << std::endl; + << std::endl; deallog << "Memory consumption -- DoFHandler: " << dof_handler.memory_consumption() - << std::endl; + << std::endl; deallog << "Memory consumption -- FE: " << fe.memory_consumption() - << std::endl; + << std::endl; deallog << "Memory consumption -- Constraints: " << hanging_node_constraints.memory_consumption() - << std::endl; + << std::endl; deallog << "Memory consumption -- Sparsity: " << sparsity_pattern.memory_consumption() - << std::endl; + << std::endl; deallog << "Memory consumption -- Matrix: " << system_matrix.memory_consumption() - << std::endl; + << std::endl; deallog << "Memory consumption -- Solution: " << solution.memory_consumption() - << std::endl; + << std::endl; deallog << "Memory consumption -- Rhs: " << system_rhs.memory_consumption() - << std::endl; + << std::endl; } DataOutBase::EpsFlags eps_flags; @@ -376,7 +376,7 @@ void Step6::run () data_out.build_patches (); deallog << "Memory consumption -- DataOut: " << data_out.memory_consumption() - << std::endl; + << std::endl; } diff --git a/tests/deal.II/merge_triangulations_01.cc b/tests/deal.II/merge_triangulations_01.cc index 6b655dbf37..4f0cbda712 100644 --- a/tests/deal.II/merge_triangulations_01.cc +++ b/tests/deal.II/merge_triangulations_01.cc @@ -53,34 +53,34 @@ void test (const int testcase) Point shift; switch (testcase) { - case 0: - shift[0] = 2; - break; - case 1: - shift[0] = 1; - break; - case 2: - for (unsigned int d=0; dactive() ? " is active " : " is not active "); if (!cell->active()) - { - deallog << "and has children: "; - for (unsigned int i=0; i<4; ++i) - deallog << cell->child(i) << ' '; - } + { + deallog << "and has children: "; + for (unsigned int i=0; i<4; ++i) + deallog << cell->child(i) << ' '; + } deallog << std::endl; } - - // now flag everything for coarsening - // again + + // now flag everything for coarsening + // again for (Triangulation<2>::active_cell_iterator - cell = triangulation.begin_active(); + cell = triangulation.begin_active(); cell != triangulation.end(); ++cell) cell->set_coarsen_flag (); triangulation.execute_coarsening_and_refinement (); deallog << "n_active_cells = " << triangulation.n_active_cells() - << std::endl; - + << std::endl; + for (Triangulation<2>::cell_iterator - cell = triangulation.begin(); + cell = triangulation.begin(); cell != triangulation.end(); ++cell) { Assert ((cell->refine_flag_set() == false) - && - (cell->coarsen_flag_set() == false), - ExcInternalError()); + && + (cell->coarsen_flag_set() == false), + ExcInternalError()); if (!cell->active()) - Assert (cell_is_patch_level_1<2>(cell), - ExcInternalError()); + Assert (cell_is_patch_level_1<2>(cell), + ExcInternalError()); } deallog << "OK" << std::endl; @@ -132,11 +132,11 @@ void test () -int main () +int main () { std::ofstream logfile(logname); logfile.precision (3); - + deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); @@ -147,25 +147,25 @@ int main () catch (std::exception &exc) { std::cerr << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; std::cerr << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } - catch (...) + catch (...) { std::cerr << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; std::cerr << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } diff --git a/tests/deal.II/mesh_smoothing_03.cc b/tests/deal.II/mesh_smoothing_03.cc index 3834988990..e04826dfde 100644 --- a/tests/deal.II/mesh_smoothing_03.cc +++ b/tests/deal.II/mesh_smoothing_03.cc @@ -48,63 +48,63 @@ using namespace dealii; void test () { - // generate a 100x3 mesh + // generate a 100x3 mesh Triangulation<2> triangulation (Triangulation<2>::eliminate_unrefined_islands); std::vector ref(2); ref[0] = 100; ref[1] = 3; GridGenerator::subdivided_hyper_rectangle (triangulation, ref, - Point<2>(), Point<2>(100,3)); + Point<2>(), Point<2>(100,3)); - // refine all cells at the lower - // boundary. we then have 600 cells + // refine all cells at the lower + // boundary. we then have 600 cells for (Triangulation<2>::cell_iterator - cell = triangulation.begin(); + cell = triangulation.begin(); cell != triangulation.end(); ++cell) if (cell->center()[1] < 1) cell->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); deallog << "n_active_cells = " << triangulation.n_active_cells() - << std::endl; - - // now mark all cells at the top - // boundary for refinement with the - // exception of the top right - // one. this means that the only - // cell that qualifies the island - // condition is the one in the - // center at the left boundary - // (bottom neighbor already - // refined, top neighbor to be - // refined). but upon it being - // flagged, its right neighbor will - // also qualify, and then the right - // neighbor of that one, etc. in - // total, the old algorithm needs - // 102 iterations through the - // prepare_c_and_r loop (one for - // each of the cells in the middle - // stripe, plus two for apparently - // other things). after the changes - // to tria.cc, we now need 2 - // iterations + << std::endl; + + // now mark all cells at the top + // boundary for refinement with the + // exception of the top right + // one. this means that the only + // cell that qualifies the island + // condition is the one in the + // center at the left boundary + // (bottom neighbor already + // refined, top neighbor to be + // refined). but upon it being + // flagged, its right neighbor will + // also qualify, and then the right + // neighbor of that one, etc. in + // total, the old algorithm needs + // 102 iterations through the + // prepare_c_and_r loop (one for + // each of the cells in the middle + // stripe, plus two for apparently + // other things). after the changes + // to tria.cc, we now need 2 + // iterations for (Triangulation<2>::cell_iterator - cell = triangulation.begin(); + cell = triangulation.begin(); cell != triangulation.end(); ++cell) if (cell->center()[1] > 2) if (cell->center()[0] < 99) - cell->set_refine_flag (); + cell->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); - // output the new number of - // cells. should now be 1200 since - // we have refined every cell in - // the mesh. unfortunately, there - // is no way to test actually test - // the number of iterations in - // prepare_c_and_r :-( + // output the new number of + // cells. should now be 1200 since + // we have refined every cell in + // the mesh. unfortunately, there + // is no way to test actually test + // the number of iterations in + // prepare_c_and_r :-( deallog << "n_active_cells = " << triangulation.n_active_cells() - << std::endl; + << std::endl; } @@ -124,25 +124,25 @@ int main () catch (std::exception &exc) { std::cerr << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; std::cerr << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } catch (...) { std::cerr << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; std::cerr << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } diff --git a/tests/deal.II/mg_dof_handler.cc b/tests/deal.II/mg_dof_handler.cc index ab1b4ba60a..c49bf62ee3 100644 --- a/tests/deal.II/mg_dof_handler.cc +++ b/tests/deal.II/mg_dof_handler.cc @@ -36,7 +36,7 @@ int main () { std::ofstream logfile("mg_dof_handler/output"); deallog << std::setprecision(2); - + deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); @@ -47,13 +47,13 @@ int main () FE_DGQ fe(1); MGDoFHandler dof_handler(tria); - + tria.begin_active()->set_refine_flag(); tria.execute_coarsening_and_refinement(); Triangulation::active_cell_iterator - cell=tria.begin_active(), - endc=tria.end(); + cell=tria.begin_active(), + endc=tria.end(); for (; cell!=endc; ++cell) cell->set_coarsen_flag(); tria.execute_coarsening_and_refinement(); diff --git a/tests/deal.II/minimal_cell_diameter.cc b/tests/deal.II/minimal_cell_diameter.cc index fa0b308931..bebeb4bffd 100644 --- a/tests/deal.II/minimal_cell_diameter.cc +++ b/tests/deal.II/minimal_cell_diameter.cc @@ -34,36 +34,36 @@ std::ofstream logfile("minimal_cell_diameter/output"); template void test1 () { - // test 1: hypercube + // test 1: hypercube if (true) { Triangulation tria; GridGenerator::hyper_cube(tria); for (unsigned int i=0; i<2; ++i) - { - tria.refine_global(2); - deallog << dim << "d, " - << "min diameter: " - << GridTools::minimal_cell_diameter (tria) - << std::endl; - }; + { + tria.refine_global(2); + deallog << dim << "d, " + << "min diameter: " + << GridTools::minimal_cell_diameter (tria) + << std::endl; + }; }; - // test 2: hyperball + // test 2: hyperball if (dim >= 2) { Triangulation tria; GridGenerator::hyper_ball(tria, Point(), 1); for (unsigned int i=0; i<2; ++i) - { - tria.refine_global(2); - deallog << dim << "d, " - << "min diameter: " - << GridTools::minimal_cell_diameter (tria) - << std::endl; - }; + { + tria.refine_global(2); + deallog << dim << "d, " + << "min diameter: " + << GridTools::minimal_cell_diameter (tria) + << std::endl; + }; }; } diff --git a/tests/deal.II/newton_01.cc b/tests/deal.II/newton_01.cc index ae937ee50c..bbe9655293 100644 --- a/tests/deal.II/newton_01.cc +++ b/tests/deal.II/newton_01.cc @@ -28,76 +28,76 @@ using namespace dealii; class SquareRoot : public Subscriptor { - public: - void start_vector (Vector& start) const; - void residual (NamedData*>& out, - const NamedData*>& in); - void solve (NamedData*>& out, - const NamedData*>& in); +public: + void start_vector (Vector &start) const; + void residual (NamedData*> &out, + const NamedData*> &in); + void solve (NamedData*> &out, + const NamedData*> &in); }; -class SquareRootResidual : public - Algorithms::Operator > +class SquareRootResidual : public + Algorithms::Operator > { - SmartPointer - discretization; - public: - - SquareRootResidual(SquareRoot& problem) - : discretization(&problem) - {} - - virtual void operator ()( - NamedData*>& out, - const NamedData*>& in) - { - discretization->residual(out,in); - } + SmartPointer + discretization; +public: + + SquareRootResidual(SquareRoot &problem) + : discretization(&problem) + {} + + virtual void operator ()( + NamedData*> &out, + const NamedData*> &in) + { + discretization->residual(out,in); + } }; -class SquareRootSolver : public - Algorithms::Operator > +class SquareRootSolver : public + Algorithms::Operator > { - SmartPointer - solver; - public: - - SquareRootSolver(SquareRoot& problem) - : solver(&problem) - {} - - virtual void operator ()( - NamedData*>& out, - const NamedData*>& in) - { - solver->solve(out,in); - } + SmartPointer + solver; +public: + + SquareRootSolver(SquareRoot &problem) + : solver(&problem) + {} + + virtual void operator ()( + NamedData*> &out, + const NamedData*> &in) + { + solver->solve(out,in); + } }; void SquareRoot::residual ( - NamedData*>& out, - const NamedData*>& in) + NamedData*> &out, + const NamedData*> &in) { //residuum = 0 *out(0) = 0.; - const Vector &x = *in(in.find("Newton iterate")); + const Vector &x = *in(in.find("Newton iterate")); *out(0) = x*x - 2.; } void SquareRoot::solve ( - NamedData*>& out, - const NamedData*>& in) + NamedData*> &out, + const NamedData*> &in) { *out(0) = 0; - const Vector &x = *in(in.find("Newton iterate")); + const Vector &x = *in(in.find("Newton iterate")); const Vector &r = *in(in.find("Newton residual")); (*out(0))(0) = 1./2./x(0)* r(0); -} +} -void test () +void test () { SquareRoot square_root; SquareRootSolver sq_solver (square_root); @@ -106,8 +106,8 @@ void test () Algorithms::OutputOperator > output; Algorithms::Newton > newton( - sq_residual, - sq_solver); + sq_residual, + sq_solver); newton.initialize(output); NamedData*> in_data; @@ -115,7 +115,7 @@ void test () Vector solution (1); solution = 10.; - Vector* p = &solution; + Vector *p = &solution; out_data.add(p, "solution"); newton.control.set_reduction(1.e-20); @@ -125,8 +125,8 @@ void test () deallog << " square root " << (*out_data(0))(0) << std::endl; } - - + + int main() { diff --git a/tests/deal.II/no_flux_01.cc b/tests/deal.II/no_flux_01.cc index d2d2ed753e..66653cfd14 100644 --- a/tests/deal.II/no_flux_01.cc +++ b/tests/deal.II/no_flux_01.cc @@ -37,8 +37,8 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { DoFHandler dof(tr); dof.distribute_dofs(fe); @@ -46,13 +46,13 @@ void test (const Triangulation& tr, for (unsigned int i=0; i::faces_per_cell; ++i) { deallog << "FE=" << fe.get_name() - << ", case=" << i - << std::endl; + << ", case=" << i + << std::endl; std::set boundary_ids; for (unsigned int j=0; j<=i; ++j) - boundary_ids.insert (j); - + boundary_ids.insert (j); + ConstraintMatrix cm; VectorTools::compute_no_normal_flux_constraints (dof, 0, boundary_ids, cm); @@ -69,7 +69,7 @@ void test_hyper_cube() for (unsigned int i=0; i::faces_per_cell; ++i) tr.begin_active()->face(i)->set_boundary_indicator (i); - + tr.refine_global(2); for (unsigned int degree=1; degree<4; ++degree) @@ -84,7 +84,7 @@ int main() { std::ofstream logfile ("no_flux_01/output"); deallog << std::setprecision (2); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console (0); deallog.threshold_double(1.e-12); diff --git a/tests/deal.II/no_flux_02.cc b/tests/deal.II/no_flux_02.cc index cbb88ac636..2340508cba 100644 --- a/tests/deal.II/no_flux_02.cc +++ b/tests/deal.II/no_flux_02.cc @@ -39,8 +39,8 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { DoFHandler dof(tr); dof.distribute_dofs(fe); @@ -48,13 +48,13 @@ void test (const Triangulation& tr, for (unsigned int i=0; i::faces_per_cell; ++i) { deallog << "FE=" << fe.get_name() - << ", case=" << i - << std::endl; + << ", case=" << i + << std::endl; std::set boundary_ids; for (unsigned int j=0; j<=i; ++j) - boundary_ids.insert (j); - + boundary_ids.insert (j); + ConstraintMatrix cm; VectorTools::compute_no_normal_flux_constraints (dof, 1, boundary_ids, cm); @@ -71,14 +71,14 @@ void test_hyper_cube() for (unsigned int i=0; i::faces_per_cell; ++i) tr.begin_active()->face(i)->set_boundary_indicator (i); - + tr.refine_global(2); for (unsigned int degree=1; degree<4; ++degree) { FESystem fe (FE_Q(degree+1), 1, - FE_Q(degree), dim, - FE_Q(degree+1), 1); + FE_Q(degree), dim, + FE_Q(degree+1), 1); test(tr, fe); } } @@ -88,7 +88,7 @@ int main() { std::ofstream logfile ("no_flux_02/output"); deallog << std::setprecision (2); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console (0); deallog.threshold_double(1.e-12); diff --git a/tests/deal.II/no_flux_03.cc b/tests/deal.II/no_flux_03.cc index 17e4a86413..3dde558101 100644 --- a/tests/deal.II/no_flux_03.cc +++ b/tests/deal.II/no_flux_03.cc @@ -40,18 +40,18 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { DoFHandler dof(tr); dof.distribute_dofs(fe); deallog << "FE=" << fe.get_name() - << std::endl; + << std::endl; std::set boundary_ids; boundary_ids.insert (0); - + ConstraintMatrix cm; VectorTools::compute_no_normal_flux_constraints (dof, 0, boundary_ids, cm); @@ -68,7 +68,7 @@ void test_hyper_sphere() static const HyperBallBoundary boundary; tr.set_boundary (0, boundary); - + tr.refine_global(2); for (unsigned int degree=1; degree<4; ++degree) diff --git a/tests/deal.II/no_flux_04.cc b/tests/deal.II/no_flux_04.cc index 7b1e6bc43d..dddb88c016 100644 --- a/tests/deal.II/no_flux_04.cc +++ b/tests/deal.II/no_flux_04.cc @@ -45,42 +45,42 @@ template class RadialFunction : public Function { - public: - RadialFunction() : Function (dim) {} +public: + RadialFunction() : Function (dim) {} - virtual void vector_value (const Point &p, - Vector &v) const + virtual void vector_value (const Point &p, + Vector &v) const + { + Assert (v.size() == dim, ExcInternalError()); + + switch (dim) { - Assert (v.size() == dim, ExcInternalError()); - - switch (dim) - { - case 2: - v(0) = p[0] + p[1]; - v(1) = p[1] - p[0]; - break; - case 3: - v(0) = p[0] + p[1]; - v(1) = p[1] - p[0]; - v(2) = p[2]; - break; - default: - Assert (false, ExcNotImplemented()); - } + case 2: + v(0) = p[0] + p[1]; + v(1) = p[1] - p[0]; + break; + case 3: + v(0) = p[0] + p[1]; + v(1) = p[1] - p[0]; + v(2) = p[2]; + break; + default: + Assert (false, ExcNotImplemented()); } + } }; template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { DoFHandler dof(tr); dof.distribute_dofs(fe); deallog << "FE=" << fe.get_name() - << std::endl; + << std::endl; std::set boundary_ids; boundary_ids.insert (0); @@ -97,7 +97,7 @@ void test (const Triangulation& tr, cm.distribute (v); - // remove small entries + // remove small entries for (unsigned int i=0; i& tr, data_out.attach_dof_handler (dh); std::vector - data_component_interpretation - (dim, DataComponentInterpretation::component_is_part_of_vector); + data_component_interpretation + (dim, DataComponentInterpretation::component_is_part_of_vector); data_out.add_data_vector (v, "x", - DataOut::type_dof_data, - data_component_interpretation); + DataOut::type_dof_data, + data_component_interpretation); data_out.build_patches (fe.degree); data_out.write_vtk (deallog.get_file_stream()); diff --git a/tests/deal.II/no_flux_05.cc b/tests/deal.II/no_flux_05.cc index 5c30f9661d..ff37c5cd6f 100644 --- a/tests/deal.II/no_flux_05.cc +++ b/tests/deal.II/no_flux_05.cc @@ -47,8 +47,8 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { DoFHandler dof(tr); dof.distribute_dofs(fe); @@ -58,12 +58,12 @@ void test (const Triangulation& tr, for (unsigned int i=0; i::faces_per_cell; ++i) { deallog << "FE=" << fe.get_name() - << ", case=" << i - << std::endl; + << ", case=" << i + << std::endl; std::set boundary_ids; for (unsigned int j=0; j<=i; ++j) - boundary_ids.insert (j); + boundary_ids.insert (j); ConstraintMatrix cm; VectorTools::compute_no_normal_flux_constraints (dof, 0, boundary_ids, cm); @@ -87,7 +87,7 @@ void test_hyper_cube() for (unsigned int degree=1; degree<4; ++degree) { FESystem fe (FE_Q(degree), dim, - FE_DGP(degree+1), 1); + FE_DGP(degree+1), 1); test(tr, fe); } } diff --git a/tests/deal.II/no_flux_06.cc b/tests/deal.II/no_flux_06.cc index 8c8b1d820a..6e1fac5e04 100644 --- a/tests/deal.II/no_flux_06.cc +++ b/tests/deal.II/no_flux_06.cc @@ -43,26 +43,26 @@ void test_hyper_cube() { Triangulation tr; GridGenerator::hyper_rectangle(tr, Point(), Point(1,1,1), true); - + FESystem fe (FE_Q(2), dim); DoFHandler dof(tr); dof.distribute_dofs(fe); deallog << "FE=" << fe.get_name() - << std::endl; + << std::endl; std::set boundary_ids; boundary_ids.insert (1); boundary_ids.insert (3); - + ConstraintMatrix cm; const MappingQ mapping(4); VectorTools::compute_no_normal_flux_constraints (dof, 0, - boundary_ids, cm, - mapping); + boundary_ids, cm, + mapping); cm.close(); - + cm.print (deallog.get_file_stream ()); } @@ -71,7 +71,7 @@ int main() { std::ofstream logfile ("no_flux_06/output"); deallog << std::setprecision (2); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console (0); deallog.threshold_double(1.e-12); diff --git a/tests/deal.II/no_flux_07.cc b/tests/deal.II/no_flux_07.cc index 7ea2bde901..fb6aac300b 100644 --- a/tests/deal.II/no_flux_07.cc +++ b/tests/deal.II/no_flux_07.cc @@ -45,8 +45,8 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { DoFHandler dof(tr); dof.distribute_dofs(fe); @@ -66,9 +66,9 @@ void test_hyper_cube() { Triangulation tr; - // create a hypercube, then shear - // its top surface to make the - // result non-square + // create a hypercube, then shear + // its top surface to make the + // result non-square GridGenerator::hyper_cube(tr); Point shift; for (unsigned int i=GeometryInfo::vertices_per_cell/2; diff --git a/tests/deal.II/no_flux_08.cc b/tests/deal.II/no_flux_08.cc index c8d549d49d..720412ddce 100644 --- a/tests/deal.II/no_flux_08.cc +++ b/tests/deal.II/no_flux_08.cc @@ -46,10 +46,10 @@ void check () { Triangulation tr; - GridGenerator::half_hyper_shell (tr, - Point(), - 0.5, - 1,0); + GridGenerator::half_hyper_shell (tr, + Point(), + 0.5, + 1,0); ConstraintMatrix cm; MappingQ mapping(1); diff --git a/tests/deal.II/no_flux_10.cc b/tests/deal.II/no_flux_10.cc index ade57e725e..65800f6591 100644 --- a/tests/deal.II/no_flux_10.cc +++ b/tests/deal.II/no_flux_10.cc @@ -46,83 +46,83 @@ void -colorize_sixty_deg_hyper_shell(Triangulation<3> & tria, - const Point<3>& center, - const double inner_radius, - const double outer_radius) +colorize_sixty_deg_hyper_shell(Triangulation<3> &tria, + const Point<3> ¢er, + const double inner_radius, + const double outer_radius) { - // if (tria.n_cells() != 4) - // AssertThrow (false, ExcNotImplemented()); + // if (tria.n_cells() != 4) + // AssertThrow (false, ExcNotImplemented()); double middle = (outer_radius-inner_radius)/2e0 + inner_radius; double eps = 1e-3*middle; Triangulation<3>::cell_iterator cell = tria.begin(); - for (;cell!=tria.end();++cell) - for(unsigned int f=0; f::faces_per_cell; ++f) + for (; cell!=tria.end(); ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) { - if(!cell->face(f)->at_boundary()) + if (!cell->face(f)->at_boundary()) continue; double radius = cell->face(f)->center().norm() - center.norm(); if (std::fabs(cell->face(f)->center()(2) - sqrt(3.)*cell->face(f)->center()(0)) < eps ) // z = sqrt(3)x set boundary 2 { cell->face(f)->set_boundary_indicator(2); - for (unsigned int j=0;j::lines_per_face;++j) - if(cell->face(f)->line(j)->at_boundary()) + for (unsigned int j=0; j::lines_per_face; ++j) + if (cell->face(f)->line(j)->at_boundary()) if (std::fabs(cell->face(f)->line(j)->vertex(0).norm() - cell->face(f)->line(j)->vertex(1).norm()) > eps) cell->face(f)->line(j)->set_boundary_indicator(2); } else if (std::fabs(cell->face(f)->center()(2) + sqrt(3.)*cell->face(f)->center()(0)) < eps) // z = -sqrt(3)x set boundary 3 { cell->face(f)->set_boundary_indicator(3); - for (unsigned int j=0;j::lines_per_face;++j) - if(cell->face(f)->line(j)->at_boundary()) + for (unsigned int j=0; j::lines_per_face; ++j) + if (cell->face(f)->line(j)->at_boundary()) if (std::fabs(cell->face(f)->line(j)->vertex(0).norm() - cell->face(f)->line(j)->vertex(1).norm()) > eps) cell->face(f)->line(j)->set_boundary_indicator(3); } else if (std::fabs(cell->face(f)->center()(2) - sqrt(3.)*cell->face(f)->center()(1)) < eps ) // z = sqrt(3)y set boundary 4 { cell->face(f)->set_boundary_indicator(4); - for (unsigned int j=0;j::lines_per_face;++j) - if(cell->face(f)->line(j)->at_boundary()) + for (unsigned int j=0; j::lines_per_face; ++j) + if (cell->face(f)->line(j)->at_boundary()) if (std::fabs(cell->face(f)->line(j)->vertex(0).norm() - cell->face(f)->line(j)->vertex(1).norm()) > eps) cell->face(f)->line(j)->set_boundary_indicator(4); } else if (std::fabs(cell->face(f)->center()(2) + sqrt(3.)*cell->face(f)->center()(1)) < eps ) // z = -sqrt(3)y set boundary 5 { cell->face(f)->set_boundary_indicator(5); - for (unsigned int j=0;j::lines_per_face;++j) - if(cell->face(f)->line(j)->at_boundary()) + for (unsigned int j=0; j::lines_per_face; ++j) + if (cell->face(f)->line(j)->at_boundary()) if (std::fabs(cell->face(f)->line(j)->vertex(0).norm() - cell->face(f)->line(j)->vertex(1).norm()) > eps) cell->face(f)->line(j)->set_boundary_indicator(5); } else if (radius < middle) // inner radius set boundary 0 { cell->face(f)->set_boundary_indicator(0); - for (unsigned int j=0;j::lines_per_face;++j) - if(cell->face(f)->line(j)->at_boundary()) + for (unsigned int j=0; j::lines_per_face; ++j) + if (cell->face(f)->line(j)->at_boundary()) if (std::fabs(cell->face(f)->line(j)->vertex(0).norm() - cell->face(f)->line(j)->vertex(1).norm()) < eps) cell->face(f)->line(j)->set_boundary_indicator(0); } else if (radius > middle) // outer radius set boundary 1 { cell->face(f)->set_boundary_indicator(1); - for (unsigned int j=0;j::lines_per_face;++j) - if(cell->face(f)->line(j)->at_boundary()) + for (unsigned int j=0; j::lines_per_face; ++j) + if (cell->face(f)->line(j)->at_boundary()) if (std::fabs(cell->face(f)->line(j)->vertex(0).norm() - cell->face(f)->line(j)->vertex(1).norm()) < eps) - cell->face(f)->line(j)->set_boundary_indicator(1); + cell->face(f)->line(j)->set_boundary_indicator(1); } else AssertThrow (false, ExcInternalError()); } } -void sixty_deg_hyper_shell (Triangulation<3> & tria, - const Point<3>& center, - const double inner_radius, - const double outer_radius) +void sixty_deg_hyper_shell (Triangulation<3> &tria, + const Point<3> ¢er, + const double inner_radius, + const double outer_radius) { const double r0 = inner_radius; const double r1 = outer_radius; @@ -138,8 +138,9 @@ void sixty_deg_hyper_shell (Triangulation<3> & tria, vertices.push_back (center+Point<3>( -1.0/sqrt(5.)*r0, -1.0/sqrt(5.)*r0, sqrt(3./5.)*r0)); //16 -> 6 vertices.push_back (center+Point<3>( -1.0/sqrt(5.)*r1, -1.0/sqrt(5.)*r1, sqrt(3./5.)*r1)); //17 -> 7 - const int cell_vertices[1][8] = { - {6, 2, 4, 0, 7, 3, 5, 1}, + const int cell_vertices[1][8] = + { + {6, 2, 4, 0, 7, 3, 5, 1}, }; std::vector > cells(1); @@ -147,7 +148,7 @@ void sixty_deg_hyper_shell (Triangulation<3> & tria, for (unsigned int i=0; i<1; ++i) { for (unsigned int j=0; j<8; ++j) - cells[i].vertices[j] = cell_vertices[i][j]; + cells[i].vertices[j] = cell_vertices[i][j]; cells[i].material_id = 0; } @@ -166,18 +167,18 @@ void run() ConstraintMatrix constraints; sixty_deg_hyper_shell (triangulation, - Point(), - 0.5, - 1.0); + Point(), + 0.5, + 1.0); static HyperShellBoundary boundary((Point())); triangulation.set_boundary (0, boundary); - // write out the mesh. may not be - // strictly necessary here, but is - // a good test for functionality - // that may not actually be tested - // anywhere else + // write out the mesh. may not be + // strictly necessary here, but is + // a good test for functionality + // that may not actually be tested + // anywhere else MappingQ<3> m(4); GridOut go; GridOutFlags::Gnuplot gof; @@ -189,15 +190,15 @@ void run() for (unsigned int f=0; f<6; ++f) deallog << "Face=" << f << ", boundary_id=" - << (int)triangulation.begin_active()->face(f)->boundary_indicator() << std::endl; + << (int)triangulation.begin_active()->face(f)->boundary_indicator() << std::endl; std::set no_normal_flux_boundaries; no_normal_flux_boundaries.insert (0); no_normal_flux_boundaries.insert (2); 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/deal.II/no_flux_hp_01.cc b/tests/deal.II/no_flux_hp_01.cc index bd71f4407e..f87e5376d1 100644 --- a/tests/deal.II/no_flux_hp_01.cc +++ b/tests/deal.II/no_flux_hp_01.cc @@ -33,8 +33,8 @@ template -void test (const Triangulation& tr, - const hp::FECollection& fe) +void test (const Triangulation &tr, + const hp::FECollection &fe) { hp::DoFHandler dof(tr); dof.distribute_dofs(fe); @@ -42,13 +42,13 @@ void test (const Triangulation& tr, for (unsigned int i=0; i::faces_per_cell; ++i) { deallog << "FE=" << fe[0].get_name() - << ", case=" << i - << std::endl; + << ", case=" << i + << std::endl; std::set boundary_ids; for (unsigned int j=0; j<=i; ++j) - boundary_ids.insert (j); - + boundary_ids.insert (j); + ConstraintMatrix cm; VectorTools::compute_no_normal_flux_constraints (dof, 0, boundary_ids, cm); @@ -65,7 +65,7 @@ void test_hyper_cube() for (unsigned int i=0; i::faces_per_cell; ++i) tr.begin_active()->face(i)->set_boundary_indicator (i); - + tr.refine_global(2); for (unsigned int degree=1; degree<4; ++degree) @@ -80,7 +80,7 @@ int main() { std::ofstream logfile ("no_flux_hp_01/output"); deallog << std::setprecision (2); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console (0); deallog.threshold_double(1.e-12); diff --git a/tests/deal.II/no_flux_hp_02.cc b/tests/deal.II/no_flux_hp_02.cc index 7baac79f6f..f2b56339a5 100644 --- a/tests/deal.II/no_flux_hp_02.cc +++ b/tests/deal.II/no_flux_hp_02.cc @@ -35,8 +35,8 @@ template -void test (const Triangulation& tr, - const hp::FECollection& fe) +void test (const Triangulation &tr, + const hp::FECollection &fe) { hp::DoFHandler dof(tr); dof.distribute_dofs(fe); @@ -44,13 +44,13 @@ void test (const Triangulation& tr, for (unsigned int i=0; i::faces_per_cell; ++i) { deallog << "FE=" << fe[0].get_name() - << ", case=" << i - << std::endl; + << ", case=" << i + << std::endl; std::set boundary_ids; for (unsigned int j=0; j<=i; ++j) - boundary_ids.insert (j); - + boundary_ids.insert (j); + ConstraintMatrix cm; VectorTools::compute_no_normal_flux_constraints (dof, 1, boundary_ids, cm); @@ -67,14 +67,14 @@ void test_hyper_cube() for (unsigned int i=0; i::faces_per_cell; ++i) tr.begin_active()->face(i)->set_boundary_indicator (i); - + tr.refine_global(2); for (unsigned int degree=1; degree<4; ++degree) { hp::FECollection fe (FESystem (FE_Q(degree+1), 1, - FE_Q(degree), dim, - FE_Q(degree+1), 1)); + FE_Q(degree), dim, + FE_Q(degree+1), 1)); test(tr, fe); } } @@ -84,7 +84,7 @@ int main() { std::ofstream logfile ("no_flux_hp_02/output"); deallog << std::setprecision (2); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console (0); deallog.threshold_double(1.e-12); diff --git a/tests/deal.II/no_flux_hp_03.cc b/tests/deal.II/no_flux_hp_03.cc index 9e73c99db5..ffd1f5c1a6 100644 --- a/tests/deal.II/no_flux_hp_03.cc +++ b/tests/deal.II/no_flux_hp_03.cc @@ -34,18 +34,18 @@ template -void test (const Triangulation& tr, - const hp::FECollection& fe) +void test (const Triangulation &tr, + const hp::FECollection &fe) { hp::DoFHandler dof(tr); dof.distribute_dofs(fe); deallog << "FE=" << fe[0].get_name() - << std::endl; + << std::endl; std::set boundary_ids; boundary_ids.insert (0); - + ConstraintMatrix cm; VectorTools::compute_no_normal_flux_constraints (dof, 0, boundary_ids, cm); @@ -62,7 +62,7 @@ void test_hyper_sphere() static const HyperBallBoundary boundary; tr.set_boundary (0, boundary); - + tr.refine_global(2); for (unsigned int degree=1; degree<4; ++degree) diff --git a/tests/deal.II/no_flux_hp_04.cc b/tests/deal.II/no_flux_hp_04.cc index 6ba2e6562e..65ee5a93f2 100644 --- a/tests/deal.II/no_flux_hp_04.cc +++ b/tests/deal.II/no_flux_hp_04.cc @@ -38,42 +38,42 @@ template class RadialFunction : public Function { - public: - RadialFunction() : Function (dim) {} +public: + RadialFunction() : Function (dim) {} - virtual void vector_value (const Point &p, - Vector &v) const + virtual void vector_value (const Point &p, + Vector &v) const + { + Assert (v.size() == dim, ExcInternalError()); + + switch (dim) { - Assert (v.size() == dim, ExcInternalError()); - - switch (dim) - { - case 2: - v(0) = p[0] + p[1]; - v(1) = p[1] - p[0]; - break; - case 3: - v(0) = p[0] + p[1]; - v(1) = p[1] - p[0]; - v(2) = p[2]; - break; - default: - Assert (false, ExcNotImplemented()); - } + case 2: + v(0) = p[0] + p[1]; + v(1) = p[1] - p[0]; + break; + case 3: + v(0) = p[0] + p[1]; + v(1) = p[1] - p[0]; + v(2) = p[2]; + break; + default: + Assert (false, ExcNotImplemented()); } + } }; template -void test (const Triangulation& tr, - const hp::FECollection& fe) +void test (const Triangulation &tr, + const hp::FECollection &fe) { hp::DoFHandler dof(tr); dof.distribute_dofs(fe); deallog << "FE=" << fe[0].get_name() - << std::endl; + << std::endl; std::set boundary_ids; boundary_ids.insert (0); @@ -90,7 +90,7 @@ void test (const Triangulation& tr, cm.distribute (v); - // remove small entries + // remove small entries for (unsigned int i=0; i& tr, data_out.attach_dof_handler (dh); std::vector - data_component_interpretation - (dim, DataComponentInterpretation::component_is_part_of_vector); + data_component_interpretation + (dim, DataComponentInterpretation::component_is_part_of_vector); data_out.add_data_vector (v, "x", - DataOut >::type_dof_data, - data_component_interpretation); + DataOut >::type_dof_data, + data_component_interpretation); data_out.build_patches (fe[0].degree); data_out.write_vtk (deallog.get_file_stream()); diff --git a/tests/deal.II/no_flux_hp_05.cc b/tests/deal.II/no_flux_hp_05.cc index 847cc90be3..05450a31ed 100644 --- a/tests/deal.II/no_flux_hp_05.cc +++ b/tests/deal.II/no_flux_hp_05.cc @@ -38,8 +38,8 @@ template -void test (const Triangulation& tr, - const hp::FECollection& fe) +void test (const Triangulation &tr, + const hp::FECollection &fe) { hp::DoFHandler dof(tr); dof.distribute_dofs(fe); @@ -49,12 +49,12 @@ void test (const Triangulation& tr, for (unsigned int i=0; i::faces_per_cell; ++i) { deallog << "FE=" << fe[0].get_name() - << ", case=" << i - << std::endl; + << ", case=" << i + << std::endl; std::set boundary_ids; for (unsigned int j=0; j<=i; ++j) - boundary_ids.insert (j); + boundary_ids.insert (j); ConstraintMatrix cm; VectorTools::compute_no_normal_flux_constraints (dof, 0, boundary_ids, cm); @@ -78,7 +78,7 @@ void test_hyper_cube() for (unsigned int degree=1; degree<4; ++degree) { hp::FECollection fe (FESystem (FE_Q(degree), dim, - FE_DGP(degree+1), 1)); + FE_DGP(degree+1), 1)); test(tr, fe); } } diff --git a/tests/deal.II/normal_vector_01.cc b/tests/deal.II/normal_vector_01.cc index 979e2364b3..ad5446a3a8 100644 --- a/tests/deal.II/normal_vector_01.cc +++ b/tests/deal.II/normal_vector_01.cc @@ -36,24 +36,24 @@ void create_triangulation(const unsigned int case_no, - Triangulation<3> &tria) + Triangulation<3> &tria) { switch (case_no) { - case 0: - GridGenerator::hyper_cube(tria, 1., 3.); - break; - case 1: - { - GridGenerator::hyper_cube(tria, 1., 3.); - Point<3> &v0=tria.begin_active()->vertex(0); - v0 = Point<3> (0,-0.5,-1); - Point<3> &v1=tria.begin_active()->vertex(1); - v1 = Point<3> (1.25, 0.25, 0.25); - break; - } - default: - Assert(false, ExcNotImplemented()); + case 0: + GridGenerator::hyper_cube(tria, 1., 3.); + break; + case 1: + { + GridGenerator::hyper_cube(tria, 1., 3.); + Point<3> &v0=tria.begin_active()->vertex(0); + v0 = Point<3> (0,-0.5,-1); + Point<3> &v1=tria.begin_active()->vertex(1); + v1 = Point<3> (1.25, 0.25, 0.25); + break; + } + default: + Assert(false, ExcNotImplemented()); }; } @@ -77,18 +77,18 @@ int main () const Triangulation<3>::active_cell_iterator cell=tria.begin_active(); Triangulation<3>::face_iterator face; for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no) - { - face=cell->face(face_no); - boundary.get_normals_at_vertices(face, normals); - for (unsigned int v=0; v::vertices_per_face; ++v) - Assert ((boundary.normal_vector (face, - face->vertex(v)) - - - normals[v] / normals[v].norm()).norm() - < - 1e-12, - ExcInternalError()); - } + { + face=cell->face(face_no); + boundary.get_normals_at_vertices(face, normals); + for (unsigned int v=0; v::vertices_per_face; ++v) + Assert ((boundary.normal_vector (face, + face->vertex(v)) + - + normals[v] / normals[v].norm()).norm() + < + 1e-12, + ExcInternalError()); + } tria.clear(); } diff --git a/tests/deal.II/normal_vector_01_2d.cc b/tests/deal.II/normal_vector_01_2d.cc index e3ab94dc8d..19f04f394c 100644 --- a/tests/deal.II/normal_vector_01_2d.cc +++ b/tests/deal.II/normal_vector_01_2d.cc @@ -36,24 +36,24 @@ void create_triangulation(const unsigned int case_no, - Triangulation<2> &tria) + Triangulation<2> &tria) { switch (case_no) { - case 0: - GridGenerator::hyper_cube(tria, 1., 3.); - break; - case 1: - { - GridGenerator::hyper_cube(tria, 1., 3.); - Point<2> &v0=tria.begin_active()->vertex(0); - v0 = Point<2> (-0.5,-1); - Point<2> &v1=tria.begin_active()->vertex(1); - v1 = Point<2> (0.25, 0.25); - break; - } - default: - Assert(false, ExcNotImplemented()); + case 0: + GridGenerator::hyper_cube(tria, 1., 3.); + break; + case 1: + { + GridGenerator::hyper_cube(tria, 1., 3.); + Point<2> &v0=tria.begin_active()->vertex(0); + v0 = Point<2> (-0.5,-1); + Point<2> &v1=tria.begin_active()->vertex(1); + v1 = Point<2> (0.25, 0.25); + break; + } + default: + Assert(false, ExcNotImplemented()); }; } @@ -77,18 +77,18 @@ int main () const Triangulation<2>::active_cell_iterator cell=tria.begin_active(); Triangulation<2>::face_iterator face; for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no) - { - face=cell->face(face_no); - boundary.get_normals_at_vertices(face, normals); - for (unsigned int v=0; v::vertices_per_face; ++v) - Assert ((boundary.normal_vector (face, - face->vertex(v)) - - - normals[v] / normals[v].norm()).norm() - < - 1e-12, - ExcInternalError()); - } + { + face=cell->face(face_no); + boundary.get_normals_at_vertices(face, normals); + for (unsigned int v=0; v::vertices_per_face; ++v) + Assert ((boundary.normal_vector (face, + face->vertex(v)) + - + normals[v] / normals[v].norm()).norm() + < + 1e-12, + ExcInternalError()); + } tria.clear(); } diff --git a/tests/deal.II/normal_vector_02.cc b/tests/deal.II/normal_vector_02.cc index 1c850b1ceb..4e29cb56fd 100644 --- a/tests/deal.II/normal_vector_02.cc +++ b/tests/deal.II/normal_vector_02.cc @@ -50,20 +50,20 @@ int main () Triangulation<3>::active_cell_iterator cell=tria.begin_active(); for (; cell!=tria.end(); ++cell) for (unsigned int face_no=0; - face_no::faces_per_cell; ++face_no) + face_no::faces_per_cell; ++face_no) if (cell->at_boundary(face_no)) - { - Triangulation<3>::face_iterator face = cell->face(face_no); - boundary.get_normals_at_vertices(face, normals); - for (unsigned int v=0; v::vertices_per_face; ++v) - Assert ((boundary.normal_vector (face, - face->vertex(v)) - - - normals[v] / normals[v].norm()).norm() - < - 1e-12, - ExcInternalError()); - } + { + Triangulation<3>::face_iterator face = cell->face(face_no); + boundary.get_normals_at_vertices(face, normals); + for (unsigned int v=0; v::vertices_per_face; ++v) + Assert ((boundary.normal_vector (face, + face->vertex(v)) + - + normals[v] / normals[v].norm()).norm() + < + 1e-12, + ExcInternalError()); + } deallog << "OK" << std::endl; } diff --git a/tests/deal.II/normal_vector_02_2d.cc b/tests/deal.II/normal_vector_02_2d.cc index 7f8ba09dc1..bdc2889962 100644 --- a/tests/deal.II/normal_vector_02_2d.cc +++ b/tests/deal.II/normal_vector_02_2d.cc @@ -50,20 +50,20 @@ int main () Triangulation<2>::active_cell_iterator cell=tria.begin_active(); for (; cell!=tria.end(); ++cell) for (unsigned int face_no=0; - face_no::faces_per_cell; ++face_no) + face_no::faces_per_cell; ++face_no) if (cell->at_boundary(face_no)) - { - Triangulation<2>::face_iterator face = cell->face(face_no); - boundary.get_normals_at_vertices(face, normals); - for (unsigned int v=0; v::vertices_per_face; ++v) - Assert ((boundary.normal_vector (face, - face->vertex(v)) - - - normals[v] / normals[v].norm()).norm() - < - 1e-12, - ExcInternalError()); - } + { + Triangulation<2>::face_iterator face = cell->face(face_no); + boundary.get_normals_at_vertices(face, normals); + for (unsigned int v=0; v::vertices_per_face; ++v) + Assert ((boundary.normal_vector (face, + face->vertex(v)) + - + normals[v] / normals[v].norm()).norm() + < + 1e-12, + ExcInternalError()); + } deallog << "OK" << std::endl; } diff --git a/tests/deal.II/normal_vector_03.cc b/tests/deal.II/normal_vector_03.cc index b58297dd4c..c1a47bd26d 100644 --- a/tests/deal.II/normal_vector_03.cc +++ b/tests/deal.II/normal_vector_03.cc @@ -37,24 +37,24 @@ void create_triangulation(const unsigned int case_no, - Triangulation<3> &tria) + Triangulation<3> &tria) { switch (case_no) { - case 0: - GridGenerator::hyper_cube(tria, 1., 3.); - break; - case 1: - { - GridGenerator::hyper_cube(tria, 1., 3.); - Point<3> &v0=tria.begin_active()->vertex(0); - v0 = Point<3> (0,-0.5,-1); - Point<3> &v1=tria.begin_active()->vertex(1); - v1 = Point<3> (1.25, 0.25, 0.25); - break; - } - default: - Assert(false, ExcNotImplemented()); + case 0: + GridGenerator::hyper_cube(tria, 1., 3.); + break; + case 1: + { + GridGenerator::hyper_cube(tria, 1., 3.); + Point<3> &v0=tria.begin_active()->vertex(0); + v0 = Point<3> (0,-0.5,-1); + Point<3> &v1=tria.begin_active()->vertex(1); + v1 = Point<3> (1.25, 0.25, 0.25); + break; + } + default: + Assert(false, ExcNotImplemented()); }; } @@ -80,36 +80,36 @@ int main () const Triangulation<3>::active_cell_iterator cell=tria.begin_active(); Triangulation<3>::face_iterator face; for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no) - { - face=cell->face(face_no); - boundary.get_normals_at_vertices(face, normals); - - for (double xi=0; xi<=1; xi+=0.234) - for (double eta=0; eta<=1; eta+=0.234) - { - Point<3> p; - Tensor<1,3> normal; - - for (unsigned int v=0; v::vertices_per_face; ++v) - { - p += face->vertex(v) * linear_interpolator.shape_value(v,Point<2>(xi,eta)); - normal += normals[v] * - linear_interpolator.shape_value(v,Point<2>(xi,eta)); - } - normal /= normal.norm(); - - deallog << "p=" << p - << ", n=" << boundary.normal_vector (face, p) - << std::endl; - - Assert ((boundary.normal_vector (face, p) - - - normal).norm() - < - 1e-10, - ExcInternalError()); - } - } + { + face=cell->face(face_no); + boundary.get_normals_at_vertices(face, normals); + + for (double xi=0; xi<=1; xi+=0.234) + for (double eta=0; eta<=1; eta+=0.234) + { + Point<3> p; + Tensor<1,3> normal; + + for (unsigned int v=0; v::vertices_per_face; ++v) + { + p += face->vertex(v) * linear_interpolator.shape_value(v,Point<2>(xi,eta)); + normal += normals[v] * + linear_interpolator.shape_value(v,Point<2>(xi,eta)); + } + normal /= normal.norm(); + + deallog << "p=" << p + << ", n=" << boundary.normal_vector (face, p) + << std::endl; + + Assert ((boundary.normal_vector (face, p) + - + normal).norm() + < + 1e-10, + ExcInternalError()); + } + } tria.clear(); } diff --git a/tests/deal.II/normal_vector_03_2d.cc b/tests/deal.II/normal_vector_03_2d.cc index 22bdefa457..6ef13d3c01 100644 --- a/tests/deal.II/normal_vector_03_2d.cc +++ b/tests/deal.II/normal_vector_03_2d.cc @@ -37,24 +37,24 @@ void create_triangulation(const unsigned int case_no, - Triangulation<2> &tria) + Triangulation<2> &tria) { switch (case_no) { - case 0: - GridGenerator::hyper_cube(tria, 1., 3.); - break; - case 1: - { - GridGenerator::hyper_cube(tria, 1., 3.); - Point<2> &v0=tria.begin_active()->vertex(0); - v0 = Point<2> (-0.5,-1); - Point<2> &v1=tria.begin_active()->vertex(1); - v1 = Point<2> (1.25, 0.25); - break; - } - default: - Assert(false, ExcNotImplemented()); + case 0: + GridGenerator::hyper_cube(tria, 1., 3.); + break; + case 1: + { + GridGenerator::hyper_cube(tria, 1., 3.); + Point<2> &v0=tria.begin_active()->vertex(0); + v0 = Point<2> (-0.5,-1); + Point<2> &v1=tria.begin_active()->vertex(1); + v1 = Point<2> (1.25, 0.25); + break; + } + default: + Assert(false, ExcNotImplemented()); }; } @@ -80,36 +80,36 @@ int main () const Triangulation<2>::active_cell_iterator cell=tria.begin_active(); Triangulation<2>::face_iterator face; for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no) - { - face=cell->face(face_no); - boundary.get_normals_at_vertices(face, normals); - - for (double xi=0; xi<=1; xi+=0.234) - for (double eta=0; eta<=1; eta+=0.234) - { - Point<2> p; - Tensor<1,2> normal; - - for (unsigned int v=0; v::vertices_per_face; ++v) - { - p += face->vertex(v) * linear_interpolator.shape_value(v,Point<2>(xi,eta)); - normal += normals[v] * - linear_interpolator.shape_value(v,Point<2>(xi,eta)); - } - normal /= normal.norm(); - - deallog << "p=" << p - << ", n=" << boundary.normal_vector (face, p) - << std::endl; - - Assert ((boundary.normal_vector (face, p) - - - normal).norm() - < - 1e-10, - ExcInternalError()); - } - } + { + face=cell->face(face_no); + boundary.get_normals_at_vertices(face, normals); + + for (double xi=0; xi<=1; xi+=0.234) + for (double eta=0; eta<=1; eta+=0.234) + { + Point<2> p; + Tensor<1,2> normal; + + for (unsigned int v=0; v::vertices_per_face; ++v) + { + p += face->vertex(v) * linear_interpolator.shape_value(v,Point<2>(xi,eta)); + normal += normals[v] * + linear_interpolator.shape_value(v,Point<2>(xi,eta)); + } + normal /= normal.norm(); + + deallog << "p=" << p + << ", n=" << boundary.normal_vector (face, p) + << std::endl; + + Assert ((boundary.normal_vector (face, p) + - + normal).norm() + < + 1e-10, + ExcInternalError()); + } + } tria.clear(); } diff --git a/tests/deal.II/normals_at_vertices_01.cc b/tests/deal.II/normals_at_vertices_01.cc index 882a61c456..6f72dbe80b 100644 --- a/tests/deal.II/normals_at_vertices_01.cc +++ b/tests/deal.II/normals_at_vertices_01.cc @@ -35,24 +35,24 @@ void create_triangulation(const unsigned int case_no, - Triangulation<3> &tria) + Triangulation<3> &tria) { switch (case_no) { - case 0: - GridGenerator::hyper_cube(tria, 1., 3.); - break; - case 1: - { - GridGenerator::hyper_cube(tria, 1., 3.); - Point<3> &v0=tria.begin_active()->vertex(0); - v0 = Point<3> (0,-0.5,-1); - Point<3> &v1=tria.begin_active()->vertex(1); - v1 = Point<3> (1.25, 0.25, 0.25); - break; - } - default: - Assert(false, ExcNotImplemented()); + case 0: + GridGenerator::hyper_cube(tria, 1., 3.); + break; + case 1: + { + GridGenerator::hyper_cube(tria, 1., 3.); + Point<3> &v0=tria.begin_active()->vertex(0); + v0 = Point<3> (0,-0.5,-1); + Point<3> &v1=tria.begin_active()->vertex(1); + v1 = Point<3> (1.25, 0.25, 0.25); + break; + } + default: + Assert(false, ExcNotImplemented()); }; } @@ -76,22 +76,22 @@ int main () const Triangulation<3>::active_cell_iterator cell=tria.begin_active(); Triangulation<3>::face_iterator face; for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no) - { - deallog << " Face" << face_no << std::endl; - face=cell->face(face_no); - boundary.get_normals_at_vertices(face, normals); - for (unsigned int v=0; v::vertices_per_face; ++v) - { - deallog << " vertex=" << face->vertex(v) - << ", normal=" << normals[v] << std::endl; + { + deallog << " Face" << face_no << std::endl; + face=cell->face(face_no); + boundary.get_normals_at_vertices(face, normals); + for (unsigned int v=0; v::vertices_per_face; ++v) + { + deallog << " vertex=" << face->vertex(v) + << ", normal=" << normals[v] << std::endl; - // note that we can't check - // here that the normal vector - // is, in fact, normalized, - // since the function does not - // actually guarantee that - } - } + // note that we can't check + // here that the normal vector + // is, in fact, normalized, + // since the function does not + // actually guarantee that + } + } tria.clear(); } } diff --git a/tests/deal.II/normals_at_vertices_02.cc b/tests/deal.II/normals_at_vertices_02.cc index 4d0a477d5a..5d20005b0d 100644 --- a/tests/deal.II/normals_at_vertices_02.cc +++ b/tests/deal.II/normals_at_vertices_02.cc @@ -50,22 +50,22 @@ int main () Triangulation<3>::active_cell_iterator cell=tria.begin_active(); for (; cell!=tria.end(); ++cell) for (unsigned int face_no=0; - face_no::faces_per_cell; ++face_no) + face_no::faces_per_cell; ++face_no) if (cell->at_boundary(face_no)) - { - deallog << " Face" << face_no << std::endl; - Triangulation<3>::face_iterator face = cell->face(face_no); - boundary.get_normals_at_vertices(face, normals); - for (unsigned int v=0; v::vertices_per_face; ++v) - { - deallog << " vertex=" << face->vertex(v) - << ", normal=" << normals[v] << std::endl; + { + deallog << " Face" << face_no << std::endl; + Triangulation<3>::face_iterator face = cell->face(face_no); + boundary.get_normals_at_vertices(face, normals); + for (unsigned int v=0; v::vertices_per_face; ++v) + { + deallog << " vertex=" << face->vertex(v) + << ", normal=" << normals[v] << std::endl; - // note that we can't check - // here that the normal vector - // is, in fact, normalized, - // since the function does not - // actually guarantee that - } - } + // note that we can't check + // here that the normal vector + // is, in fact, normalized, + // since the function does not + // actually guarantee that + } + } } diff --git a/tests/deal.II/number_cache_01.cc b/tests/deal.II/number_cache_01.cc index 6d99b4fd0f..a04e88f1dd 100644 --- a/tests/deal.II/number_cache_01.cc +++ b/tests/deal.II/number_cache_01.cc @@ -42,7 +42,7 @@ std::ofstream logfile("number_cache_01/output"); template void output (const Triangulation &tria) { - + deallog << " " << tria.n_active_cells() << std::endl; deallog << " " << tria.n_cells() << std::endl; deallog << " " << tria.n_active_lines() << std::endl; @@ -57,22 +57,22 @@ void output (const Triangulation &tria) deallog << " " << tria.n_active_cells(i) << std::endl; deallog << " " << tria.n_cells(i) << std::endl; if (dim == 1) - { - deallog << " " << tria.n_active_lines(i) << std::endl; - deallog << " " << tria.n_lines(i) << std::endl; - } - + { + deallog << " " << tria.n_active_lines(i) << std::endl; + deallog << " " << tria.n_lines(i) << std::endl; + } + if (dim == 2) - { - deallog << " " << tria.n_active_quads(i) << std::endl; - deallog << " " << tria.n_quads(i) << std::endl; - } - + { + deallog << " " << tria.n_active_quads(i) << std::endl; + deallog << " " << tria.n_quads(i) << std::endl; + } + if (dim == 3) - { - deallog << " " << tria.n_active_hexs(i) << std::endl; - deallog << " " << tria.n_hexs(i) << std::endl; - } + { + deallog << " " << tria.n_active_hexs(i) << std::endl; + deallog << " " << tria.n_hexs(i) << std::endl; + } } } @@ -81,10 +81,10 @@ template void test () { deallog << dim << "d" << std::endl; - + Triangulation tria; GridGenerator::hyper_cube (tria); - + output (tria); deallog << "Refining..." << std::endl; diff --git a/tests/deal.II/number_cache_02.cc b/tests/deal.II/number_cache_02.cc index 5627f5f98b..44e7c4ce7f 100644 --- a/tests/deal.II/number_cache_02.cc +++ b/tests/deal.II/number_cache_02.cc @@ -57,22 +57,22 @@ void output (const Triangulation &tria) deallog << " " << tria.n_active_cells(i) << std::endl; deallog << " " << tria.n_cells(i) << std::endl; if (dim == 1) - { - deallog << " " << tria.n_active_lines(i) << std::endl; - deallog << " " << tria.n_lines(i) << std::endl; - } + { + deallog << " " << tria.n_active_lines(i) << std::endl; + deallog << " " << tria.n_lines(i) << std::endl; + } if (dim == 2) - { - deallog << " " << tria.n_active_quads(i) << std::endl; - deallog << " " << tria.n_quads(i) << std::endl; - } + { + deallog << " " << tria.n_active_quads(i) << std::endl; + deallog << " " << tria.n_quads(i) << std::endl; + } if (dim == 3) - { - deallog << " " << tria.n_active_hexs(i) << std::endl; - deallog << " " << tria.n_hexs(i) << std::endl; - } + { + deallog << " " << tria.n_active_hexs(i) << std::endl; + deallog << " " << tria.n_hexs(i) << std::endl; + } } } @@ -93,28 +93,28 @@ void test (const char *filename) } catch (typename Triangulation::DistortedCellList &dcv) { - // ignore the exception that we - // get because the mesh has - // distorted cells + // ignore the exception that we + // get because the mesh has + // distorted cells deallog << dcv.distorted_cells.size() << " cells are distorted." - << std::endl; + << std::endl; } catch (std::exception &exc) { deallog << " caught exception:" << std::endl - << exc.what() - << std::endl; + << exc.what() + << std::endl; return; } output (tria); - // now refine a few cells and output again + // now refine a few cells and output again deallog << " Refining..." << std::endl; typename Triangulation::active_cell_iterator - cell = tria.begin_active(); + cell = tria.begin_active(); for (unsigned int i=0; i<=std::min (tria.n_active_cells() / 3, - 10U); ++i, ++cell) + 10U); ++i, ++cell) cell->set_refine_flag (); tria.execute_coarsening_and_refinement (); diff --git a/tests/deal.II/number_cache_03.cc b/tests/deal.II/number_cache_03.cc index 89fba24697..164a6117ca 100644 --- a/tests/deal.II/number_cache_03.cc +++ b/tests/deal.II/number_cache_03.cc @@ -62,22 +62,22 @@ void output (const Triangulation &tria) deallog << " " << tria.n_active_cells(i) << std::endl; deallog << " " << tria.n_cells(i) << std::endl; if (dim == 1) - { - deallog << " " << tria.n_active_lines(i) << std::endl; - deallog << " " << tria.n_lines(i) << std::endl; - } + { + deallog << " " << tria.n_active_lines(i) << std::endl; + deallog << " " << tria.n_lines(i) << std::endl; + } if (dim == 2) - { - deallog << " " << tria.n_active_quads(i) << std::endl; - deallog << " " << tria.n_quads(i) << std::endl; - } + { + deallog << " " << tria.n_active_quads(i) << std::endl; + deallog << " " << tria.n_quads(i) << std::endl; + } if (dim == 3) - { - deallog << " " << tria.n_active_hexs(i) << std::endl; - deallog << " " << tria.n_hexs(i) << std::endl; - } + { + deallog << " " << tria.n_active_hexs(i) << std::endl; + deallog << " " << tria.n_hexs(i) << std::endl; + } } } diff --git a/tests/deal.II/point_value_history_01.cc b/tests/deal.II/point_value_history_01.cc index d4b62b5e30..1f37fee27f 100644 --- a/tests/deal.II/point_value_history_01.cc +++ b/tests/deal.II/point_value_history_01.cc @@ -56,14 +56,14 @@ template class TestPointValueHistory { public: - TestPointValueHistory(); - void run(); + TestPointValueHistory(); + void run(); private: - Triangulation triangulation; - FESystem finite_element; - DoFHandler dof_handler; - PointValueHistory test_copy; + Triangulation triangulation; + FESystem finite_element; + DoFHandler dof_handler; + PointValueHistory test_copy; }; @@ -71,9 +71,9 @@ private: template TestPointValueHistory::TestPointValueHistory() : -finite_element(FE_Q (1 + 1), dim, FE_Q (1), 1), + finite_element(FE_Q (1 + 1), dim, FE_Q (1), 1), -dof_handler(triangulation) + dof_handler(triangulation) { } @@ -82,179 +82,180 @@ dof_handler(triangulation) template void TestPointValueHistory::run() { - // Make a triangulation - GridGenerator::hyper_cube(triangulation, 0, 1); - triangulation.refine_global(2); // refine 2 times to make 5 nodes per side - - // make a DOF handler, a model solution filled with ones and a flow vector - // FESystem finite_element(FE_Q (1 + 1), dim, FE_Q (1), 1); // Already done! - // DoFHandler dof_handler(triangulation); - dof_handler.distribute_dofs(finite_element); - DoFRenumbering::Cuthill_McKee(dof_handler); - - // renumber for components so that same dof indices are used for BlockVectors and normal Vectors - std::vector block_component(dim + 1, 0); - block_component[dim] = 1; // component dim = pressure component! - DoFRenumbering::component_wise(dof_handler, block_component); - - // Vector - Vector solution, post_processed, poles; - solution.reinit(dof_handler.n_dofs()); - post_processed.reinit(dof_handler.n_dofs()); - poles.reinit(dof_handler.n_dofs()); - - // set up a simple linear discrete time system so that time plots vary - // over the mesh but can be easily checked. The basic idea is to have each - // component of the fe_system to depend on a specific dimension (i.e component 0 - // depends on dim 0, etc. % dim handles the case where there are more components - // than dimensions. The code breaks down at the edges of the mesh and this is - // not corrected for. - { - QGauss quadrature_formula(2); - FEValues fe_values(finite_element, quadrature_formula, update_values | update_quadrature_points); // just need local_dof_indices and quadrature_points - - std::vector local_dof_indices(finite_element.dofs_per_cell); - std::vector > dof_locations(finite_element.dofs_per_cell); - Vector cell_pole(finite_element.dofs_per_cell); - - typename DoFHandler::active_cell_iterator cell, endc; - cell = dof_handler.begin_active(); - endc = dof_handler.end(); - for (; cell != endc; ++cell) - { - fe_values.reinit(cell); // need to get local_dof_indices - cell->get_dof_indices(local_dof_indices); - dof_locations = fe_values.get_quadrature_points(); - cell_pole = 0; - for (unsigned int dof = 0; dof != finite_element.dofs_per_cell; dof++) - { - unsigned int dof_component = finite_element.system_to_component_index(dof).first; - - for (unsigned int q_point = 0; q_point < quadrature_formula.size(); ++q_point) - { - cell_pole(dof) += (fe_values.shape_value(dof, q_point) * dof_locations [q_point] (dof_component % dim)); - } - solution(local_dof_indices [dof]) = 1; // start all solutions at 1 - poles(local_dof_indices[dof]) -= cell_pole(dof); - - if (dof_component == dim) // components start numbering at 0 - poles(local_dof_indices[dof]) = -0.1; // dim+1th component is not handled well by the code above - } - - } // loop over all cells - poles.add(1.0); // slow down the pole settling time - post_processed.add(3.0); // set to starting value. - } + // Make a triangulation + GridGenerator::hyper_cube(triangulation, 0, 1); + triangulation.refine_global(2); // refine 2 times to make 5 nodes per side + + // make a DOF handler, a model solution filled with ones and a flow vector + // FESystem finite_element(FE_Q (1 + 1), dim, FE_Q (1), 1); // Already done! + // DoFHandler dof_handler(triangulation); + dof_handler.distribute_dofs(finite_element); + DoFRenumbering::Cuthill_McKee(dof_handler); + + // renumber for components so that same dof indices are used for BlockVectors and normal Vectors + std::vector block_component(dim + 1, 0); + block_component[dim] = 1; // component dim = pressure component! + DoFRenumbering::component_wise(dof_handler, block_component); + + // Vector + Vector solution, post_processed, poles; + solution.reinit(dof_handler.n_dofs()); + post_processed.reinit(dof_handler.n_dofs()); + poles.reinit(dof_handler.n_dofs()); + + // set up a simple linear discrete time system so that time plots vary + // over the mesh but can be easily checked. The basic idea is to have each + // component of the fe_system to depend on a specific dimension (i.e component 0 + // depends on dim 0, etc. % dim handles the case where there are more components + // than dimensions. The code breaks down at the edges of the mesh and this is + // not corrected for. + { + QGauss quadrature_formula(2); + FEValues fe_values(finite_element, quadrature_formula, update_values | update_quadrature_points); // just need local_dof_indices and quadrature_points + + std::vector local_dof_indices(finite_element.dofs_per_cell); + std::vector > dof_locations(finite_element.dofs_per_cell); + Vector cell_pole(finite_element.dofs_per_cell); + + typename DoFHandler::active_cell_iterator cell, endc; + cell = dof_handler.begin_active(); + endc = dof_handler.end(); + for (; cell != endc; ++cell) + { + fe_values.reinit(cell); // need to get local_dof_indices + cell->get_dof_indices(local_dof_indices); + dof_locations = fe_values.get_quadrature_points(); + cell_pole = 0; + for (unsigned int dof = 0; dof != finite_element.dofs_per_cell; dof++) + { + unsigned int dof_component = finite_element.system_to_component_index(dof).first; + + for (unsigned int q_point = 0; q_point < quadrature_formula.size(); ++q_point) + { + cell_pole(dof) += (fe_values.shape_value(dof, q_point) * dof_locations [q_point] (dof_component % dim)); + } + solution(local_dof_indices [dof]) = 1; // start all solutions at 1 + poles(local_dof_indices[dof]) -= cell_pole(dof); + + if (dof_component == dim) // components start numbering at 0 + poles(local_dof_indices[dof]) = -0.1; // dim+1th component is not handled well by the code above + } + + } // loop over all cells + poles.add(1.0); // slow down the pole settling time + post_processed.add(3.0); // set to starting value. + } + + // Setup monitor node to print variation over time + unsigned int n_inputs = 1; + PointValueHistory node_monitor (dof_handler, n_inputs); + PointValueHistory no_dof_handler (n_inputs); + + // check that the assignment operator is valid + test_copy = node_monitor; + test_copy.add_point(Point<2>(1, 0.2)); + test_copy.add_field_name("Solution"); + std::vector < std::vector > > selected_locations; + test_copy.get_points(selected_locations); + test_copy.mark_locations(); + test_copy.close(); + test_copy.start_new_dataset(0.1); + test_copy.evaluate_field("Solution", solution); + std::vector input_value(n_inputs, 1); + test_copy.push_back_independent(input_value); + test_copy.write_gnuplot("point_value_history_01/Test_Copy"); + test_copy.status(deallog.get_file_stream()); + test_copy.clear (); + // end of assignment operator check + + { + node_monitor.add_field_name("Solution"); + node_monitor.add_field_name("Post Processed Vector"); // not sensitive to spaces + + // two alternatives here, adding a point at a time or a vector of points + // 2d points + std::vector > point_vector(5, Point < 2 > ()); + point_vector[0] = Point < 2 > (0, 0); // some of these points will hit a node, others won't + point_vector[1] = Point < 2 > (0.25, 0); + point_vector[2] = Point < 2 > (0.25, 0.45); + point_vector[3] = Point < 2 > (0.45, 0.45); + point_vector[4] = Point < 2 > (0.8, 0.8); + + node_monitor.add_points(point_vector); + node_monitor.add_point(Point<2>(1, 0.2)); // add a single point + + // MonitorNode requires that the instance is 'closed' before any data is added + // this ensures that points are not added once time starts. + node_monitor.close(); + no_dof_handler.close(); // closing still required! - // Setup monitor node to print variation over time - unsigned int n_inputs = 1; - PointValueHistory node_monitor (dof_handler, n_inputs); - PointValueHistory no_dof_handler (n_inputs); - - // check that the assignment operator is valid - test_copy = node_monitor; - test_copy.add_point(Point<2>(1, 0.2)); - test_copy.add_field_name("Solution"); std::vector < std::vector > > selected_locations; - test_copy.get_points(selected_locations); - test_copy.mark_locations(); - test_copy.close(); - test_copy.start_new_dataset(0.1); - test_copy.evaluate_field("Solution", solution); - std::vector input_value(n_inputs, 1); - test_copy.push_back_independent(input_value); - test_copy.write_gnuplot("point_value_history_01/Test_Copy"); - test_copy.status(deallog.get_file_stream()); - test_copy.clear (); - // end of assignment operator check - - { - node_monitor.add_field_name("Solution"); - node_monitor.add_field_name("Post Processed Vector"); // not sensitive to spaces - - // two alternatives here, adding a point at a time or a vector of points - // 2d points - std::vector > point_vector(5, Point < 2 > ()); - point_vector[0] = Point < 2 > (0, 0); // some of these points will hit a node, others won't - point_vector[1] = Point < 2 > (0.25, 0); - point_vector[2] = Point < 2 > (0.25, 0.45); - point_vector[3] = Point < 2 > (0.45, 0.45); - point_vector[4] = Point < 2 > (0.8, 0.8); - - node_monitor.add_points(point_vector); - node_monitor.add_point(Point<2>(1, 0.2)); // add a single point - - // MonitorNode requires that the instance is 'closed' before any data is added - // this ensures that points are not added once time starts. - node_monitor.close(); - no_dof_handler.close(); // closing still required! - - std::vector < std::vector > > selected_locations; - node_monitor.get_points(selected_locations); - // write output to a file - Vector node_locations = node_monitor.mark_locations(); - // write output to a file - } + node_monitor.get_points(selected_locations); + // write output to a file + Vector node_locations = node_monitor.mark_locations(); + // write output to a file + } - double delta_t = 0.000001; - double t_max = 0.00001; + double delta_t = 0.000001; + double t_max = 0.00001; - for (double time = 0; time < t_max; time = time + delta_t) + for (double time = 0; time < t_max; time = time + delta_t) { - node_monitor.start_new_dataset(time); - no_dof_handler.start_new_dataset(time); - // time and input are special, they don't vary over the mesh. - - std::vector input_value(n_inputs, 1); // manufacture an input value - node_monitor.push_back_independent(input_value); - no_dof_handler.push_back_independent(input_value); - node_monitor.evaluate_field("Solution", solution); - node_monitor.evaluate_field("Post Processed Vector", post_processed); - - solution.scale(poles); // decaying exponentials of varying time constants - post_processed = solution; - post_processed.add(2.0); // simple post processing, giving it a dc offset + node_monitor.start_new_dataset(time); + no_dof_handler.start_new_dataset(time); + // time and input are special, they don't vary over the mesh. + + std::vector input_value(n_inputs, 1); // manufacture an input value + node_monitor.push_back_independent(input_value); + no_dof_handler.push_back_independent(input_value); + node_monitor.evaluate_field("Solution", solution); + node_monitor.evaluate_field("Post Processed Vector", post_processed); + + solution.scale(poles); // decaying exponentials of varying time constants + post_processed = solution; + post_processed.add(2.0); // simple post processing, giving it a dc offset } - node_monitor.write_gnuplot("point_value_history_01/node"); - no_dof_handler.write_gnuplot("point_value_history_01/no_dof"); - - node_monitor.status (deallog.get_file_stream()); - no_dof_handler.status (deallog.get_file_stream()); - - deallog << "Starting data files" << std::endl; - - // copy all the data into deallog and - // delete those files - const std::string filenames[] - = { "point_value_history_01/node_00.gpl", - "point_value_history_01/node_01.gpl", - "point_value_history_01/node_02.gpl", - "point_value_history_01/node_03.gpl", - "point_value_history_01/node_04.gpl", - "point_value_history_01/node_05.gpl", - "point_value_history_01/node_indep.gpl", - "point_value_history_01/Test_Copy_00.gpl", - "point_value_history_01/Test_Copy_indep.gpl", - "point_value_history_01/no_dof_indep.gpl" }; - - for (unsigned int i=0; i::run() int main() { - std::ofstream logfile("point_value_history_01/output"); - logfile << std::setprecision(2); - deallog << std::setprecision(2); - deallog.attach(logfile); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); - - TestPointValueHistory<2> test; - test.run(); + std::ofstream logfile("point_value_history_01/output"); + logfile << std::setprecision(2); + deallog << std::setprecision(2); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + TestPointValueHistory<2> test; + test.run(); } diff --git a/tests/deal.II/point_value_history_02.cc b/tests/deal.II/point_value_history_02.cc index d73d8ea937..4911c67084 100644 --- a/tests/deal.II/point_value_history_02.cc +++ b/tests/deal.II/point_value_history_02.cc @@ -58,78 +58,78 @@ using namespace dealii; template class Postprocess : public DataPostprocessor { - public: - - void compute_derived_quantities_vector ( - const std::vector< Vector< double > > &, - const std::vector< std::vector< Tensor< 1, dim > > > &, - const std::vector< std::vector< Tensor< 2, dim > > > &, - const std::vector< Point< dim > > &, - const std::vector< Point< dim > > &, - std::vector< Vector< double > > & - ) const; - - std::vector get_names () const; - UpdateFlags get_needed_update_flags () const; - unsigned int n_output_variables () const; - // The following function is not required - // by the point_value_history class. - //std::vector - // get_data_component_interpretation () const; +public: + + void compute_derived_quantities_vector ( + const std::vector< Vector< double > > &, + const std::vector< std::vector< Tensor< 1, dim > > > &, + const std::vector< std::vector< Tensor< 2, dim > > > &, + const std::vector< Point< dim > > &, + const std::vector< Point< dim > > &, + std::vector< Vector< double > > & + ) const; + + std::vector get_names () const; + UpdateFlags get_needed_update_flags () const; + unsigned int n_output_variables () const; + // The following function is not required + // by the point_value_history class. + //std::vector + // get_data_component_interpretation () const; }; - + template std::vector Postprocess::get_names() const { - std::vector names; - names.push_back ("Vector_out"); - names.push_back ("Vector_out_1"); - names.push_back ("Vector_out_2"); - names.push_back ("Scalar_out"); - return names; + std::vector names; + names.push_back ("Vector_out"); + names.push_back ("Vector_out_1"); + names.push_back ("Vector_out_2"); + names.push_back ("Scalar_out"); + return names; } - + template UpdateFlags Postprocess::get_needed_update_flags () const { - return update_values | update_gradients | update_hessians; + return update_values | update_gradients | update_hessians; } - + template unsigned int Postprocess::n_output_variables () const { - return 4; + return 4; } - - + + template void Postprocess::compute_derived_quantities_vector ( - const std::vector< Vector< double > > & uh, - const std::vector< std::vector< Tensor< 1, dim > > > & duh, - const std::vector< std::vector< Tensor< 2, dim > > > & dduh, - const std::vector< Point< dim > > & /* normals */, - const std::vector< Point< dim > > & /* locations */, - std::vector< Vector< double > > & computed_quantities - ) const + const std::vector< Vector< double > > &uh, + const std::vector< std::vector< Tensor< 1, dim > > > &duh, + const std::vector< std::vector< Tensor< 2, dim > > > &dduh, + const std::vector< Point< dim > > & /* normals */, + const std::vector< Point< dim > > & /* locations */, + std::vector< Vector< double > > &computed_quantities +) const { - Assert(computed_quantities.size() == uh.size(), - ExcDimensionMismatch (computed_quantities.size(), uh.size())); - - for (unsigned int i=0; i class TestPointValueHistory { public: - TestPointValueHistory(); - void run(); + TestPointValueHistory(); + void run(); private: - void output_results (unsigned int step, Vector solution) const; + void output_results (unsigned int step, Vector solution) const; - Triangulation triangulation; - FESystem finite_element; - DoFHandler dof_handler; - PointValueHistory test_copy; - std::vector > postprocessor_locations; + Triangulation triangulation; + FESystem finite_element; + DoFHandler dof_handler; + PointValueHistory test_copy; + std::vector > postprocessor_locations; }; @@ -156,9 +156,9 @@ private: template TestPointValueHistory::TestPointValueHistory() : -finite_element(FE_Q (1 + 1), dim, FE_Q (1), 1), + finite_element(FE_Q (1 + 1), dim, FE_Q (1), 1), -dof_handler(triangulation) + dof_handler(triangulation) { } @@ -167,27 +167,27 @@ dof_handler(triangulation) template void TestPointValueHistory::run() { - // Make a triangulation - GridGenerator::hyper_cube(triangulation, 0, 1); - triangulation.refine_global(2); // refine 2 times to make 5 nodes per side + // Make a triangulation + GridGenerator::hyper_cube(triangulation, 0, 1); + triangulation.refine_global(2); // refine 2 times to make 5 nodes per side - // make a DOF handler, a model solution filled with ones and a flow vector + // make a DOF handler, a model solution filled with ones and a flow vector // FESystem finite_element(FE_Q (1 + 1), dim, FE_Q (1), 1); // DoFHandler dof_handler(triangulation); - dof_handler.distribute_dofs(finite_element); - DoFRenumbering::Cuthill_McKee(dof_handler); - - // renumber for components so that same dof indices are used for BlockVectors and normal Vectors - std::vector block_component(dim + 1, 0); - block_component[dim] = 1; // component dim = pressure component! - DoFRenumbering::component_wise(dof_handler, block_component); - - // Vector - Vector solution, post_processed, poles; - solution.reinit(dof_handler.n_dofs()); - post_processed.reinit(dof_handler.n_dofs()); - poles.reinit(dof_handler.n_dofs()); - + dof_handler.distribute_dofs(finite_element); + DoFRenumbering::Cuthill_McKee(dof_handler); + + // renumber for components so that same dof indices are used for BlockVectors and normal Vectors + std::vector block_component(dim + 1, 0); + block_component[dim] = 1; // component dim = pressure component! + DoFRenumbering::component_wise(dof_handler, block_component); + + // Vector + Vector solution, post_processed, poles; + solution.reinit(dof_handler.n_dofs()); + post_processed.reinit(dof_handler.n_dofs()); + poles.reinit(dof_handler.n_dofs()); + // // BlockVector // std::vector dofs_per_block(2); // DoFTools::count_dofs_per_block(dof_handler, dofs_per_block, block_component); @@ -198,7 +198,7 @@ void TestPointValueHistory::run() // solution.block(0).reinit(n_u); // solution.block(1).reinit(n_p); // solution.collect_sizes(); -// +// // BlockVector post_processed; // post_processed.reinit(2); // post_processed.block(0).reinit(n_u); @@ -210,232 +210,233 @@ void TestPointValueHistory::run() // poles.block(1).reinit(n_p); // poles.collect_sizes(); - // set up a simple linear discrete time system so that time plots vary - // over the mesh but can be easily checked. The basic idea is to have each - // component of the fe_system to depend on a specific dimension (i.e component 0 - // depends on dim 0, etc. % dim handles the case where there are more components - // than dimensions. The code breaks down at the edges of the mesh and this is - // not corrected for. The code used in this test simplified from point_value_history_01. - { - Quadrature quadrature_formula(finite_element.get_unit_support_points ()); - FEValues fe_values(finite_element, quadrature_formula, update_values | update_quadrature_points); // just need local_dof_indices and quadrature_points - - std::vector local_dof_indices(finite_element.dofs_per_cell); - std::vector > dof_locations(finite_element.dofs_per_cell); - - typename DoFHandler::active_cell_iterator cell, endc; - cell = dof_handler.begin_active(); - endc = dof_handler.end(); - for (; cell != endc; ++cell) - { - fe_values.reinit(cell); // need to get local_dof_indices - cell->get_dof_indices(local_dof_indices); - dof_locations = fe_values.get_quadrature_points(); - - for (unsigned int dof = 0; dof != finite_element.dofs_per_cell; dof++) - { - unsigned int dof_component = finite_element.system_to_component_index(dof).first; - - poles(local_dof_indices[dof]) = -dof_locations[dof](dof_component % dim); - - if (dof_component == dim) // components start numbering at 0 - poles(local_dof_indices[dof]) = -0.1; // dim+1th component is not handled well by the code above - - solution(local_dof_indices [dof]) = 1; // start all solutions at 1 - } - - } // loop over all cells - poles.add(1.0); // slow down the pole settling time - post_processed.add(3.0); // set to starting value. + // set up a simple linear discrete time system so that time plots vary + // over the mesh but can be easily checked. The basic idea is to have each + // component of the fe_system to depend on a specific dimension (i.e component 0 + // depends on dim 0, etc. % dim handles the case where there are more components + // than dimensions. The code breaks down at the edges of the mesh and this is + // not corrected for. The code used in this test simplified from point_value_history_01. + { + Quadrature quadrature_formula(finite_element.get_unit_support_points ()); + FEValues fe_values(finite_element, quadrature_formula, update_values | update_quadrature_points); // just need local_dof_indices and quadrature_points + + std::vector local_dof_indices(finite_element.dofs_per_cell); + std::vector > dof_locations(finite_element.dofs_per_cell); + + typename DoFHandler::active_cell_iterator cell, endc; + cell = dof_handler.begin_active(); + endc = dof_handler.end(); + for (; cell != endc; ++cell) + { + fe_values.reinit(cell); // need to get local_dof_indices + cell->get_dof_indices(local_dof_indices); + dof_locations = fe_values.get_quadrature_points(); + + for (unsigned int dof = 0; dof != finite_element.dofs_per_cell; dof++) + { + unsigned int dof_component = finite_element.system_to_component_index(dof).first; + + poles(local_dof_indices[dof]) = -dof_locations[dof](dof_component % dim); + + if (dof_component == dim) // components start numbering at 0 + poles(local_dof_indices[dof]) = -0.1; // dim+1th component is not handled well by the code above + + solution(local_dof_indices [dof]) = 1; // start all solutions at 1 + } + + } // loop over all cells + poles.add(1.0); // slow down the pole settling time + post_processed.add(3.0); // set to starting value. // output_results(10, poles); - } - - // Setup monitor node to print variation over time - unsigned int n_inputs = 1; - PointValueHistory node_monitor (dof_handler, n_inputs); - PointValueHistory no_dof_handler (n_inputs); - - // check that the assignment operator is valid - test_copy = node_monitor; - test_copy.add_point(Point<2>(1, 0.2)); - test_copy.add_field_name("Solution"); - std::vector < std::vector > > selected_locations; - test_copy.get_support_locations(selected_locations); - test_copy.mark_support_locations(); - test_copy.close(); - test_copy.start_new_dataset(0.1); + } + + // Setup monitor node to print variation over time + unsigned int n_inputs = 1; + PointValueHistory node_monitor (dof_handler, n_inputs); + PointValueHistory no_dof_handler (n_inputs); + + // check that the assignment operator is valid + test_copy = node_monitor; + test_copy.add_point(Point<2>(1, 0.2)); + test_copy.add_field_name("Solution"); + std::vector < std::vector > > selected_locations; + test_copy.get_support_locations(selected_locations); + test_copy.mark_support_locations(); + test_copy.close(); + test_copy.start_new_dataset(0.1); // triangulation.refine_global(1); // should mark the triangulation as changed - test_copy.evaluate_field("Solution", solution); - std::vector input_value(n_inputs, 1); - test_copy.push_back_independent(input_value); - test_copy.write_gnuplot("point_value_history_02/Test_Copy"); - test_copy.status(deallog.get_file_stream()); - test_copy.clear (); - // end of assignment operator check + test_copy.evaluate_field("Solution", solution); + std::vector input_value(n_inputs, 1); + test_copy.push_back_independent(input_value); + test_copy.write_gnuplot("point_value_history_02/Test_Copy"); + test_copy.status(deallog.get_file_stream()); + test_copy.clear (); + // end of assignment operator check + + { + node_monitor.add_field_name("Solution"); + std::vector solution_names; + solution_names.push_back("X velocity"); + solution_names.push_back("Y velocity"); + solution_names.push_back("Z velocity"); + node_monitor.add_component_names ("Solution", solution_names); + node_monitor.add_field_name("Post Processed Vector"); // not sensitive to spaces + std::vector component_mask (3, false); + component_mask[2] = true; + node_monitor.add_field_name("Pressure", component_mask); + component_mask = std::vector (3, false); + component_mask[1] = true; + node_monitor.add_field_name("Req_sol", component_mask); + component_mask = std::vector (4, true); + component_mask[3] = false; + node_monitor.add_field_name("Vector_out", component_mask); + component_mask = std::vector (4, false); + component_mask[3] = true; + node_monitor.add_field_name("Scalar_out", component_mask); + + std::vector indep_names; + indep_names.push_back ("Input"); + node_monitor.add_independent_names(indep_names); + + // two alternatives here, adding a point at a time or a vector of points + // 2d points + std::vector > point_vector(5, Point < 2 > ()); + point_vector[0] = Point < 2 > (0, 0); // some of these points will hit a node, others won't + point_vector[1] = Point < 2 > (0.25, 0); + point_vector[2] = Point < 2 > (0.25, 0.45); + point_vector[3] = Point < 2 > (0.45, 0.45); + point_vector[4] = Point < 2 > (0.8, 0.8); + + node_monitor.add_points(point_vector); + node_monitor.add_point(Point<2>(1, 0.2)); // add a single point + + // MonitorNode requires that the instance is 'closed' before any data is added + // this ensures that points are not added once time starts. + node_monitor.close(); + no_dof_handler.close(); // closing still required! - { - node_monitor.add_field_name("Solution"); - std::vector solution_names; - solution_names.push_back("X velocity"); - solution_names.push_back("Y velocity"); - solution_names.push_back("Z velocity"); - node_monitor.add_component_names ("Solution", solution_names); - node_monitor.add_field_name("Post Processed Vector"); // not sensitive to spaces - std::vector component_mask (3, false); - component_mask[2] = true; - node_monitor.add_field_name("Pressure", component_mask); - component_mask = std::vector (3, false); - component_mask[1] = true; - node_monitor.add_field_name("Req_sol", component_mask); - component_mask = std::vector (4, true); - component_mask[3] = false; - node_monitor.add_field_name("Vector_out", component_mask); - component_mask = std::vector (4, false); - component_mask[3] = true; - node_monitor.add_field_name("Scalar_out", component_mask); - - std::vector indep_names; - indep_names.push_back ("Input"); - node_monitor.add_independent_names(indep_names); - - // two alternatives here, adding a point at a time or a vector of points - // 2d points - std::vector > point_vector(5, Point < 2 > ()); - point_vector[0] = Point < 2 > (0, 0); // some of these points will hit a node, others won't - point_vector[1] = Point < 2 > (0.25, 0); - point_vector[2] = Point < 2 > (0.25, 0.45); - point_vector[3] = Point < 2 > (0.45, 0.45); - point_vector[4] = Point < 2 > (0.8, 0.8); - - node_monitor.add_points(point_vector); - node_monitor.add_point(Point<2>(1, 0.2)); // add a single point - - // MonitorNode requires that the instance is 'closed' before any data is added - // this ensures that points are not added once time starts. - node_monitor.close(); - no_dof_handler.close(); // closing still required! - - std::vector < std::vector > > selected_locations; - node_monitor.get_support_locations(selected_locations); - Vector node_locations = node_monitor.mark_support_locations(); - QGauss postprocess_quadrature (2); - node_monitor.get_postprocessor_locations(postprocess_quadrature, postprocessor_locations); - } + std::vector < std::vector > > selected_locations; + node_monitor.get_support_locations(selected_locations); + Vector node_locations = node_monitor.mark_support_locations(); + QGauss postprocess_quadrature (2); + node_monitor.get_postprocessor_locations(postprocess_quadrature, postprocessor_locations); + } - double delta_t = 0.000001; - double t_max = 0.00001; - unsigned int step = 0; + double delta_t = 0.000001; + double t_max = 0.00001; + unsigned int step = 0; - for (double time = 0; time < t_max; time = time + delta_t) + for (double time = 0; time < t_max; time = time + delta_t) { - node_monitor.start_new_dataset(time); - no_dof_handler.start_new_dataset(time); - // time and input are special, they don't vary over the mesh. - - std::vector input_value(n_inputs, 1); // manufacture an input value - node_monitor.push_back_independent(input_value); - no_dof_handler.push_back_independent(input_value); - node_monitor.evaluate_field("Solution", solution); - node_monitor.evaluate_field("Post Processed Vector", post_processed); - node_monitor.evaluate_field("Pressure", solution); - node_monitor.evaluate_field_at_requested_location("Req_sol", solution); - - Postprocess postprocessor; - QGauss postprocess_quadrature (2); - std::vector names; - names.push_back ("Vector_out"); - names.push_back ("Scalar_out"); - node_monitor.evaluate_field(names, solution, postprocessor, postprocess_quadrature); + node_monitor.start_new_dataset(time); + no_dof_handler.start_new_dataset(time); + // time and input are special, they don't vary over the mesh. + + std::vector input_value(n_inputs, 1); // manufacture an input value + node_monitor.push_back_independent(input_value); + no_dof_handler.push_back_independent(input_value); + node_monitor.evaluate_field("Solution", solution); + node_monitor.evaluate_field("Post Processed Vector", post_processed); + node_monitor.evaluate_field("Pressure", solution); + node_monitor.evaluate_field_at_requested_location("Req_sol", solution); + + Postprocess postprocessor; + QGauss postprocess_quadrature (2); + std::vector names; + names.push_back ("Vector_out"); + names.push_back ("Scalar_out"); + node_monitor.evaluate_field(names, solution, postprocessor, postprocess_quadrature); // output_results (step, solution); - step++; + step++; - solution.scale(poles); // decaying exponentials of varying time constants - post_processed = solution; - post_processed.add(2.0); // simple post processing, giving it a dc offset + solution.scale(poles); // decaying exponentials of varying time constants + post_processed = solution; + post_processed.add(2.0); // simple post processing, giving it a dc offset } - triangulation.refine_global(1); // should mark the triangulation as changed - node_monitor.write_gnuplot("point_value_history_02/node", postprocessor_locations); - no_dof_handler.write_gnuplot("point_value_history_02/no_dof"); - - node_monitor.status (deallog.get_file_stream()); - no_dof_handler.status (deallog.get_file_stream()); - - deallog << "Starting data files" << std::endl; - - // copy all the data into deallog and - // delete those files - const std::string filenames[] - = { "point_value_history_02/node_00.gpl", - "point_value_history_02/node_01.gpl", - "point_value_history_02/node_02.gpl", - "point_value_history_02/node_03.gpl", - "point_value_history_02/node_04.gpl", - "point_value_history_02/node_05.gpl", - "point_value_history_02/node_indep.gpl", - "point_value_history_02/Test_Copy_00.gpl", - "point_value_history_02/Test_Copy_indep.gpl", - "point_value_history_02/no_dof_indep.gpl" }; - - for (unsigned int i=0; i void TestPointValueHistory::output_results (unsigned int step, Vector solution) const { - std::vector solution_names (dim, "velocity"); - solution_names.push_back ("pressure"); - - std::vector - data_component_interpretation - (dim, DataComponentInterpretation::component_is_part_of_vector); - data_component_interpretation - .push_back (DataComponentInterpretation::component_is_scalar); - - DataOut data_out; - data_out.attach_dof_handler (dof_handler); - data_out.add_data_vector (solution, solution_names, - DataOut::type_dof_data, - data_component_interpretation); - data_out.build_patches (2); - - std::ostringstream filename; - filename << "point_value_history_02/solution-" - << Utilities::int_to_string (step, 2) - << ".gpl"; - - std::ofstream output (filename.str().c_str()); - data_out.write_gnuplot (output); + std::vector solution_names (dim, "velocity"); + solution_names.push_back ("pressure"); + + std::vector + data_component_interpretation + (dim, DataComponentInterpretation::component_is_part_of_vector); + data_component_interpretation + .push_back (DataComponentInterpretation::component_is_scalar); + + DataOut data_out; + data_out.attach_dof_handler (dof_handler); + data_out.add_data_vector (solution, solution_names, + DataOut::type_dof_data, + data_component_interpretation); + data_out.build_patches (2); + + std::ostringstream filename; + filename << "point_value_history_02/solution-" + << Utilities::int_to_string (step, 2) + << ".gpl"; + + std::ofstream output (filename.str().c_str()); + data_out.write_gnuplot (output); } int main() { - std::ofstream logfile("point_value_history_02/output"); - logfile << std::setprecision(2); - deallog << std::setprecision(2); - deallog.attach(logfile); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); - - TestPointValueHistory<2> test; - test.run(); + std::ofstream logfile("point_value_history_02/output"); + logfile << std::setprecision(2); + deallog << std::setprecision(2); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + TestPointValueHistory<2> test; + test.run(); } diff --git a/tests/deal.II/point_value_history_03.cc b/tests/deal.II/point_value_history_03.cc index 5a16554520..9f5d285a90 100644 --- a/tests/deal.II/point_value_history_03.cc +++ b/tests/deal.II/point_value_history_03.cc @@ -58,73 +58,73 @@ using namespace dealii; template class Postprocess : public DataPostprocessor { - public: - - void compute_derived_quantities_scalar ( - const std::vector< double > &, - const std::vector< Tensor< 1, dim > > &, - const std::vector< Tensor< 2, dim > > &, - const std::vector< Point< dim > > &, - const std::vector< Point< dim > > &, - std::vector< Vector< double > > & - ) const; - - std::vector get_names () const; - UpdateFlags get_needed_update_flags () const; - unsigned int n_output_variables () const; - // The following function is not required - // by the point_value_history class. - //std::vector - // get_data_component_interpretation () const; +public: + + void compute_derived_quantities_scalar ( + const std::vector< double > &, + const std::vector< Tensor< 1, dim > > &, + const std::vector< Tensor< 2, dim > > &, + const std::vector< Point< dim > > &, + const std::vector< Point< dim > > &, + std::vector< Vector< double > > & + ) const; + + std::vector get_names () const; + UpdateFlags get_needed_update_flags () const; + unsigned int n_output_variables () const; + // The following function is not required + // by the point_value_history class. + //std::vector + // get_data_component_interpretation () const; }; - + template std::vector Postprocess::get_names() const { - std::vector names; - names.push_back ("X_gradient"); - names.push_back ("X_hessian"); - return names; + std::vector names; + names.push_back ("X_gradient"); + names.push_back ("X_hessian"); + return names; } - + template UpdateFlags Postprocess::get_needed_update_flags () const { return update_values | update_gradients | update_hessians; } - + template unsigned int Postprocess::n_output_variables () const { - return 2; + return 2; } - - - template - void - Postprocess::compute_derived_quantities_scalar ( - const std::vector< double > & uh, - const std::vector< Tensor< 1, dim > > & duh, - const std::vector< Tensor< 2, dim > > & dduh, - const std::vector< Point< dim > > & /* normals */, - const std::vector< Point< dim > > & /* locations */, - std::vector< Vector< double > > & computed_quantities - ) const + + +template +void +Postprocess::compute_derived_quantities_scalar ( + const std::vector< double > &uh, + const std::vector< Tensor< 1, dim > > &duh, + const std::vector< Tensor< 2, dim > > &dduh, + const std::vector< Point< dim > > & /* normals */, + const std::vector< Point< dim > > & /* locations */, + std::vector< Vector< double > > &computed_quantities +) const { - Assert(computed_quantities.size() == uh.size(), - ExcDimensionMismatch (computed_quantities.size(), uh.size())); - - for (unsigned int i=0; i class TestPointValueHistory { public: - TestPointValueHistory(); - void run(); + TestPointValueHistory(); + void run(); private: - void output_results (unsigned int step, Vector solution) const; + void output_results (unsigned int step, Vector solution) const; - Triangulation triangulation; - FE_Q finite_element; - DoFHandler dof_handler; - PointValueHistory test_copy; - std::vector > postprocessor_locations; + Triangulation triangulation; + FE_Q finite_element; + DoFHandler dof_handler; + PointValueHistory test_copy; + std::vector > postprocessor_locations; }; @@ -151,8 +151,8 @@ private: template TestPointValueHistory::TestPointValueHistory() : - finite_element(2), - dof_handler(triangulation) + finite_element(2), + dof_handler(triangulation) { } @@ -161,235 +161,236 @@ TestPointValueHistory::TestPointValueHistory() : template void TestPointValueHistory::run() { - // Make a triangulation - GridGenerator::hyper_cube(triangulation, 0, 1); - triangulation.refine_global(2); // refine 2 times to make 5 nodes per side + // Make a triangulation + GridGenerator::hyper_cube(triangulation, 0, 1); + triangulation.refine_global(2); // refine 2 times to make 5 nodes per side - // make a DOF handler, a model solution filled with ones and a flow vector + // make a DOF handler, a model solution filled with ones and a flow vector // DoFHandler dof_handler(triangulation); - dof_handler.distribute_dofs(finite_element); - DoFRenumbering::Cuthill_McKee(dof_handler); - - // Vector - Vector solution, post_processed, poles; - solution.reinit(dof_handler.n_dofs()); - post_processed.reinit(dof_handler.n_dofs()); - poles.reinit(dof_handler.n_dofs()); - -// // BlockVector - // BlockVector not used with scalar fields generally - - // set up a simple linear discrete time system so that time plots vary - // over the mesh but can be easily checked. The basic idea is to have each - // component of the fe_system to depend on a specific dimension (i.e component 0 - // depends on dim 0, etc. % dim handles the case where there are more components - // than dimensions. The code breaks down at the edges of the mesh and this is - // not corrected for. The code used in this test is simplified from point_value_history_01. - { - Quadrature quadrature_formula(finite_element.get_unit_support_points ()); - FEValues fe_values(finite_element, quadrature_formula, update_values | update_quadrature_points); // just need local_dof_indices and quadrature_points + dof_handler.distribute_dofs(finite_element); + DoFRenumbering::Cuthill_McKee(dof_handler); - std::vector local_dof_indices(finite_element.dofs_per_cell); - std::vector > dof_locations(finite_element.dofs_per_cell); + // Vector + Vector solution, post_processed, poles; + solution.reinit(dof_handler.n_dofs()); + post_processed.reinit(dof_handler.n_dofs()); + poles.reinit(dof_handler.n_dofs()); - typename DoFHandler::active_cell_iterator cell, endc; - cell = dof_handler.begin_active(); - endc = dof_handler.end(); - for (; cell != endc; ++cell) - { - fe_values.reinit(cell); // need to get local_dof_indices - cell->get_dof_indices(local_dof_indices); - dof_locations = fe_values.get_quadrature_points(); - - for (unsigned int dof = 0; dof != finite_element.dofs_per_cell; dof++) - { - unsigned int dof_component = finite_element.system_to_component_index(dof).first; - // The line above will always evaluate to 1, - // simplifying the remaining lines - - poles(local_dof_indices[dof]) = -dof_locations[dof](dof_component % dim); - - if (dof_component == dim) // components start numbering at 0 - poles(local_dof_indices[dof]) = -0.1; // dim+1th component is not handled well by the code above - - solution(local_dof_indices [dof]) = 1; // start all solutions at 1 - } - } // loop over all cells - - poles.add(1.0); // slow down the pole settling time - post_processed.add(3.0); // set to starting value. +// // BlockVector + // BlockVector not used with scalar fields generally + + // set up a simple linear discrete time system so that time plots vary + // over the mesh but can be easily checked. The basic idea is to have each + // component of the fe_system to depend on a specific dimension (i.e component 0 + // depends on dim 0, etc. % dim handles the case where there are more components + // than dimensions. The code breaks down at the edges of the mesh and this is + // not corrected for. The code used in this test is simplified from point_value_history_01. + { + Quadrature quadrature_formula(finite_element.get_unit_support_points ()); + FEValues fe_values(finite_element, quadrature_formula, update_values | update_quadrature_points); // just need local_dof_indices and quadrature_points + + std::vector local_dof_indices(finite_element.dofs_per_cell); + std::vector > dof_locations(finite_element.dofs_per_cell); + + typename DoFHandler::active_cell_iterator cell, endc; + cell = dof_handler.begin_active(); + endc = dof_handler.end(); + for (; cell != endc; ++cell) + { + fe_values.reinit(cell); // need to get local_dof_indices + cell->get_dof_indices(local_dof_indices); + dof_locations = fe_values.get_quadrature_points(); + + for (unsigned int dof = 0; dof != finite_element.dofs_per_cell; dof++) + { + unsigned int dof_component = finite_element.system_to_component_index(dof).first; + // The line above will always evaluate to 1, + // simplifying the remaining lines + + poles(local_dof_indices[dof]) = -dof_locations[dof](dof_component % dim); + + if (dof_component == dim) // components start numbering at 0 + poles(local_dof_indices[dof]) = -0.1; // dim+1th component is not handled well by the code above + + solution(local_dof_indices [dof]) = 1; // start all solutions at 1 + } + } // loop over all cells + + poles.add(1.0); // slow down the pole settling time + post_processed.add(3.0); // set to starting value. // output_results(10, poles); - } - - // Setup monitor node to print variation over time - unsigned int n_inputs = 1; - PointValueHistory node_monitor (dof_handler, n_inputs); - PointValueHistory no_dof_handler (n_inputs); + } + + // Setup monitor node to print variation over time + unsigned int n_inputs = 1; + PointValueHistory node_monitor (dof_handler, n_inputs); + PointValueHistory no_dof_handler (n_inputs); + + // check that the assignment operator is valid + test_copy = node_monitor; + test_copy.add_point(Point<2>(1, 0.2)); + test_copy.add_field_name("Solution"); + std::vector < std::vector > > selected_locations; + test_copy.get_support_locations(selected_locations); + test_copy.mark_support_locations(); + test_copy.close(); + test_copy.start_new_dataset(0.1); + test_copy.evaluate_field("Solution", solution); + std::vector input_value(n_inputs, 1); + test_copy.push_back_independent(input_value); + test_copy.write_gnuplot("point_value_history_03/Test_Copy"); + test_copy.status(deallog.get_file_stream()); + test_copy.clear (); + // end of assignment operator check + + { + node_monitor.add_field_name("Solution"); + std::vector solution_names; + solution_names.push_back("Solution"); + node_monitor.add_component_names ("Solution", solution_names); + node_monitor.add_field_name("Post Processed Vector"); // not sensitive to spaces + node_monitor.add_field_name("Pressure", 1); + std::vector component_mask (1, true); + node_monitor.add_field_name("Req_sol", component_mask); + component_mask = std::vector (2, false); + component_mask[0] = true; + node_monitor.add_field_name("X_gradient", component_mask); + component_mask = std::vector (2, false); + component_mask[1] = true; + node_monitor.add_field_name("X_hessian", component_mask); + std::vector indep_names; + indep_names.push_back ("Input"); + node_monitor.add_independent_names(indep_names); + + // two alternatives here, adding a point at a time or a vector of points + // 2d points + std::vector > point_vector(5, Point < 2 > ()); + point_vector[0] = Point < 2 > (0, 0); // some of these points will hit a node, others won't + point_vector[1] = Point < 2 > (0.25, 0); + point_vector[2] = Point < 2 > (0.25, 0.45); + point_vector[3] = Point < 2 > (0.45, 0.45); + point_vector[4] = Point < 2 > (0.8, 0.8); + + node_monitor.add_points(point_vector); + node_monitor.add_point(Point<2>(1, 0.2)); // add a single point + + // MonitorNode requires that the instance is 'closed' before any data is added + // this ensures that points are not added once time starts. + node_monitor.close(); + no_dof_handler.close(); // closing still required! - // check that the assignment operator is valid - test_copy = node_monitor; - test_copy.add_point(Point<2>(1, 0.2)); - test_copy.add_field_name("Solution"); std::vector < std::vector > > selected_locations; - test_copy.get_support_locations(selected_locations); - test_copy.mark_support_locations(); - test_copy.close(); - test_copy.start_new_dataset(0.1); - test_copy.evaluate_field("Solution", solution); - std::vector input_value(n_inputs, 1); - test_copy.push_back_independent(input_value); - test_copy.write_gnuplot("point_value_history_03/Test_Copy"); - test_copy.status(deallog.get_file_stream()); - test_copy.clear (); - // end of assignment operator check + node_monitor.get_support_locations(selected_locations); + Vector node_locations = node_monitor.mark_support_locations(); + QGauss postprocess_quadrature (2); + node_monitor.get_postprocessor_locations(postprocess_quadrature, postprocessor_locations); + } - { - node_monitor.add_field_name("Solution"); - std::vector solution_names; - solution_names.push_back("Solution"); - node_monitor.add_component_names ("Solution", solution_names); - node_monitor.add_field_name("Post Processed Vector"); // not sensitive to spaces - node_monitor.add_field_name("Pressure", 1); - std::vector component_mask (1, true); - node_monitor.add_field_name("Req_sol", component_mask); - component_mask = std::vector (2, false); - component_mask[0] = true; - node_monitor.add_field_name("X_gradient", component_mask); - component_mask = std::vector (2, false); - component_mask[1] = true; - node_monitor.add_field_name("X_hessian", component_mask); - std::vector indep_names; - indep_names.push_back ("Input"); - node_monitor.add_independent_names(indep_names); - - // two alternatives here, adding a point at a time or a vector of points - // 2d points - std::vector > point_vector(5, Point < 2 > ()); - point_vector[0] = Point < 2 > (0, 0); // some of these points will hit a node, others won't - point_vector[1] = Point < 2 > (0.25, 0); - point_vector[2] = Point < 2 > (0.25, 0.45); - point_vector[3] = Point < 2 > (0.45, 0.45); - point_vector[4] = Point < 2 > (0.8, 0.8); - - node_monitor.add_points(point_vector); - node_monitor.add_point(Point<2>(1, 0.2)); // add a single point - - // MonitorNode requires that the instance is 'closed' before any data is added - // this ensures that points are not added once time starts. - node_monitor.close(); - no_dof_handler.close(); // closing still required! - - std::vector < std::vector > > selected_locations; - node_monitor.get_support_locations(selected_locations); - Vector node_locations = node_monitor.mark_support_locations(); - QGauss postprocess_quadrature (2); - node_monitor.get_postprocessor_locations(postprocess_quadrature, postprocessor_locations); - } - - double delta_t = 0.000001; - double t_max = 0.00001; - unsigned int step = 0; + double delta_t = 0.000001; + double t_max = 0.00001; + unsigned int step = 0; - for (double time = 0; time < t_max; time = time + delta_t) + for (double time = 0; time < t_max; time = time + delta_t) { - node_monitor.start_new_dataset(time); - no_dof_handler.start_new_dataset(time); - // time and input are special, they don't vary over the mesh. - - std::vector input_value(n_inputs, 1); // manufacture an input value - node_monitor.push_back_independent(input_value); - no_dof_handler.push_back_independent(input_value); - node_monitor.evaluate_field("Solution", solution); - node_monitor.evaluate_field("Post Processed Vector", post_processed); - node_monitor.evaluate_field("Pressure", solution); - node_monitor.evaluate_field_at_requested_location("Req_sol", solution); - - Postprocess postprocessor; - QGauss postprocess_quadrature (2); - std::vector names; - names.push_back ("X_gradient"); - names.push_back ("X_hessian"); - node_monitor.evaluate_field(names, solution, postprocessor, postprocess_quadrature); + node_monitor.start_new_dataset(time); + no_dof_handler.start_new_dataset(time); + // time and input are special, they don't vary over the mesh. + + std::vector input_value(n_inputs, 1); // manufacture an input value + node_monitor.push_back_independent(input_value); + no_dof_handler.push_back_independent(input_value); + node_monitor.evaluate_field("Solution", solution); + node_monitor.evaluate_field("Post Processed Vector", post_processed); + node_monitor.evaluate_field("Pressure", solution); + node_monitor.evaluate_field_at_requested_location("Req_sol", solution); + + Postprocess postprocessor; + QGauss postprocess_quadrature (2); + std::vector names; + names.push_back ("X_gradient"); + names.push_back ("X_hessian"); + node_monitor.evaluate_field(names, solution, postprocessor, postprocess_quadrature); // output_results (step, solution); - step++; + step++; - solution.scale(poles); // decaying exponentials of varying time constants - post_processed = solution; - post_processed.add(2.0); // simple post processing, giving it a dc offset + solution.scale(poles); // decaying exponentials of varying time constants + post_processed = solution; + post_processed.add(2.0); // simple post processing, giving it a dc offset } - node_monitor.write_gnuplot("point_value_history_03/node", postprocessor_locations); - no_dof_handler.write_gnuplot("point_value_history_03/no_dof"); // no point in adding postprocessor_locations - - node_monitor.status (deallog.get_file_stream()); - no_dof_handler.status (deallog.get_file_stream()); - - deallog << "Starting data files" << std::endl; - - // copy all the data into deallog and - // delete those files - const std::string filenames[] - = { "point_value_history_03/node_00.gpl", - "point_value_history_03/node_01.gpl", - "point_value_history_03/node_02.gpl", - "point_value_history_03/node_03.gpl", - "point_value_history_03/node_04.gpl", - "point_value_history_03/node_05.gpl", - "point_value_history_03/node_indep.gpl", - "point_value_history_03/Test_Copy_00.gpl", - "point_value_history_03/Test_Copy_indep.gpl", - "point_value_history_03/no_dof_indep.gpl" }; - - for (unsigned int i=0; i void TestPointValueHistory::output_results (unsigned int step, Vector solution) const { - DataOut data_out; - data_out.attach_dof_handler (dof_handler); - data_out.add_data_vector (solution, "solution"); - - data_out.build_patches (2); - - std::ostringstream filename; - filename << "point_value_history_03/solution-" - << Utilities::int_to_string (step, 2) - << ".gpl"; - - std::ofstream output (filename.str().c_str()); - data_out.write_gnuplot (output); + DataOut data_out; + data_out.attach_dof_handler (dof_handler); + data_out.add_data_vector (solution, "solution"); + + data_out.build_patches (2); + + std::ostringstream filename; + filename << "point_value_history_03/solution-" + << Utilities::int_to_string (step, 2) + << ".gpl"; + + std::ofstream output (filename.str().c_str()); + data_out.write_gnuplot (output); } int main() { - std::ofstream logfile("point_value_history_03/output"); - logfile << std::setprecision(2); - deallog << std::setprecision(2); - deallog.attach(logfile); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); - - TestPointValueHistory<2> test; - test.run(); + std::ofstream logfile("point_value_history_03/output"); + logfile << std::setprecision(2); + deallog << std::setprecision(2); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + TestPointValueHistory<2> test; + test.run(); } diff --git a/tests/deal.II/project_01.cc b/tests/deal.II/project_01.cc index 5240921d15..3450c1d74a 100644 --- a/tests/deal.II/project_01.cc +++ b/tests/deal.II/project_01.cc @@ -40,24 +40,24 @@ template class F : public Function { - public: - virtual double value (const Point &p, - const unsigned int = 0) const - { - double s = 1; - for (unsigned int i=0; i &p, + const unsigned int = 0) const + { + double s = 1; + for (unsigned int i=0; i void test() { - // create 2 triangulations with the - // same coarse grid, and refine - // them differently + // create 2 triangulations with the + // same coarse grid, and refine + // them differently Triangulation tria; GridGenerator::hyper_cube (tria); @@ -78,10 +78,10 @@ void test() cell != dh.end(); ++cell) for (unsigned int i=0; i::vertices_per_cell; ++i) { - // check that the error is - // somewhat small. it won't - // be zero since we project - // and do not interpolate + // check that the error is + // somewhat small. it won't + // be zero since we project + // and do not interpolate Assert (std::fabs (v(cell->vertex_dof_index(i,0)) - F().value (cell->vertex(i))) < 1e-4, diff --git a/tests/deal.II/project_01_curved_boundary.cc b/tests/deal.II/project_01_curved_boundary.cc index 14ca76910b..b33987e826 100644 --- a/tests/deal.II/project_01_curved_boundary.cc +++ b/tests/deal.II/project_01_curved_boundary.cc @@ -45,18 +45,18 @@ template class F : public Function { - public: - virtual double value (const Point &p, - const unsigned int = 0) const - { - // compute the linfty norm of p - double m = 0; - for (unsigned int d=0; d &p, + const unsigned int = 0) const + { + // compute the linfty norm of p + double m = 0; + for (unsigned int d=0; d tria; GridGenerator::hyper_ball (tria); tria.set_boundary (0, boundary); - + FE_Q fe(1); DoFHandler dh (tria); @@ -85,7 +85,7 @@ void test() // use the implicit Q1 mapping. this will yield a zero solution { VectorTools::project (dh, cm, QGauss(3), F(), - v); + v); deallog << v.l2_norm() << std::endl; Assert (v.l2_norm() == 0, ExcInternalError()); } @@ -93,8 +93,8 @@ void test() // use an explicit Q1 mapping. this will yield a zero solution { VectorTools::project (MappingQ1(), - dh, cm, QGauss(3), F(), - v); + dh, cm, QGauss(3), F(), + v); deallog << v.l2_norm() << std::endl; Assert (v.l2_norm() == 0, ExcInternalError()); } @@ -104,8 +104,8 @@ void test() // the area where the function is zero { VectorTools::project (MappingQ(2), - dh, cm, QGauss(3), F(), - v); + dh, cm, QGauss(3), F(), + v); deallog << v.l2_norm() << std::endl; Assert (v.l2_norm() != 0, ExcInternalError()); } @@ -117,8 +117,8 @@ void test() // points where the function is zero) { VectorTools::project (MappingQ(2), - dh, cm, QGauss(3), F(), - v, true); + dh, cm, QGauss(3), F(), + v, true); deallog << v.l2_norm() << std::endl; Assert (v.l2_norm() != 0, ExcInternalError()); } @@ -130,34 +130,34 @@ void test() // *interpolation* of boundary values onto the trace of the Q1 space is zero { VectorTools::project (MappingQ(2), - dh, cm, QGauss(3), F(), - v, false, - QGauss(2), true); + dh, cm, QGauss(3), F(), + v, false, + QGauss(2), true); deallog << v.l2_norm() << std::endl; Assert (v.l2_norm() != 0, ExcInternalError()); for (typename DoFHandler::active_cell_iterator cell=dh.begin_active(); - cell != dh.end(); ++cell) + cell != dh.end(); ++cell) for (unsigned int i=0; i::vertices_per_cell; ++i) - deallog << cell->vertex(i) << ' ' << v(cell->vertex_dof_index(i,0)) - << std::endl; + deallog << cell->vertex(i) << ' ' << v(cell->vertex_dof_index(i,0)) + << std::endl; } - + // same as above, but use a projection with a QTrapez formula. this happens // to evaluate the function only at points where it is zero, and // consequently the values at the boundary should be zero { VectorTools::project (MappingQ(2), - dh, cm, QGauss(3), F(), - v, false, - QTrapez(), true); + dh, cm, QGauss(3), F(), + v, false, + QTrapez(), true); deallog << v.l2_norm() << std::endl; Assert (v.l2_norm() != 0, ExcInternalError()); for (typename DoFHandler::active_cell_iterator cell=dh.begin_active(); - cell != dh.end(); ++cell) + cell != dh.end(); ++cell) for (unsigned int i=0; i::vertices_per_cell; ++i) - deallog << cell->vertex(i) << ' ' << v(cell->vertex_dof_index(i,0)) - << std::endl; + deallog << cell->vertex(i) << ' ' << v(cell->vertex_dof_index(i,0)) + << std::endl; } } diff --git a/tests/deal.II/project_02.cc b/tests/deal.II/project_02.cc index d1a7b3a629..e1ac1dfb7b 100644 --- a/tests/deal.II/project_02.cc +++ b/tests/deal.II/project_02.cc @@ -40,24 +40,24 @@ template class F : public Function { - public: - virtual double value (const Point &p, - const unsigned int = 0) const - { - double s = 1; - for (unsigned int i=0; i &p, + const unsigned int = 0) const + { + double s = 1; + for (unsigned int i=0; i void test() { - // create 2 triangulations with the - // same coarse grid, and refine - // them differently + // create 2 triangulations with the + // same coarse grid, and refine + // them differently Triangulation tria; GridGenerator::hyper_cube (tria); @@ -81,10 +81,10 @@ void test() cell != dh.end(); ++cell) for (unsigned int i=0; i::vertices_per_cell; ++i) { - // check that the error is - // somewhat small. it won't - // be zero since we project - // and do not interpolate + // check that the error is + // somewhat small. it won't + // be zero since we project + // and do not interpolate Assert (std::fabs (v(cell->vertex_dof_index(i,0)) - F().value (cell->vertex(i))) < 1e-4, diff --git a/tests/deal.II/project_boundary_rt_01.cc b/tests/deal.II/project_boundary_rt_01.cc index f2386cd329..b142a6cca6 100644 --- a/tests/deal.II/project_boundary_rt_01.cc +++ b/tests/deal.II/project_boundary_rt_01.cc @@ -37,134 +37,134 @@ template class TestFunction : public Function { - public: - - /// Construct a polynomial of degree p - TestFunction(unsigned int degree); - - virtual void vector_value_list (const std::vector > &points, - std::vector > &values) const; - private: - unsigned int degree; +public: + + /// Construct a polynomial of degree p + TestFunction(unsigned int degree); + + virtual void vector_value_list (const std::vector > &points, + std::vector > &values) const; +private: + unsigned int degree; }; template TestFunction::TestFunction (unsigned int p) - : - Function(dim), degree(p) + : + Function(dim), degree(p) {} template void TestFunction::vector_value_list (const std::vector > &points, - std::vector > &values) const + std::vector > &values) const { - for (unsigned int k=0;k p = points[k]; - for (unsigned int dd=0;dd p = points[k]; + for (unsigned int dd=0; dd -double integrate_error(const DoFHandler& dof, - FEFaceValues& fe, - const Vector& u, - const Function& f) +double integrate_error(const DoFHandler &dof, + FEFaceValues &fe, + const Vector &u, + const Function &f) { double result = 0.; std::vector > f_values(fe.n_quadrature_points, Vector(dim)); - std::vector > fe_values(fe.n_quadrature_points, Vector(dim)); - + std::vector > fe_values(fe.n_quadrature_points, Vector(dim)); + for (typename DoFHandler::active_cell_iterator cell = dof.begin_active(); cell != dof.end(); ++cell) { for (unsigned int face=0 ; face != GeometryInfo::faces_per_cell; ++face) - { - if (!cell->at_boundary(face)) continue; - - fe.reinit(cell, face); - f.vector_value_list(fe.get_quadrature_points(), f_values); - fe.get_function_values(u, fe_values); - for (unsigned int k=0;kat_boundary(face)) continue; + + fe.reinit(cell, face); + f.vector_value_list(fe.get_quadrature_points(), f_values); + fe.get_function_values(u, fe_values); + for (unsigned int k=0; k -void test_projection (const Triangulation& tr, - const FiniteElement& fe) +void test_projection (const Triangulation &tr, + const FiniteElement &fe) { deallog << fe.get_name() << std::endl << "Cells: " << tr.n_active_cells() << std::endl; const unsigned int degree = fe.tensor_degree(); - + DoFHandler dof(tr); dof.distribute_dofs(fe); - + QGauss quadrature(degree+2); MappingQ1 mapping; TestFunction f(degree-1); std::map boundary_constraints; typename FunctionMap::type boundary_map; - for (types::boundary_id i=0;i<255;++i) + for (types::boundary_id i=0; i<255; ++i) boundary_map[i] = &f; VectorTools::project_boundary_values(mapping, dof, boundary_map, quadrature, - boundary_constraints); + boundary_constraints); deallog << "Constraints: " << boundary_constraints.size() << std::endl; - - // Fill a vector with the projected - // boundary values + + // Fill a vector with the projected + // boundary values Vector u(dof.n_dofs()); u = -1.; for (typename std::map::const_iterator - i = boundary_constraints.begin(); i != boundary_constraints.end(); ++i) + i = boundary_constraints.begin(); i != boundary_constraints.end(); ++i) u(i->first) = i->second; - + FEFaceValues feval(mapping, fe, quadrature, - update_quadrature_points - | update_normal_vectors - | update_JxW_values - | update_values); + update_quadrature_points + | update_normal_vectors + | update_JxW_values + | update_values); double err = integrate_error(dof, feval, u, f); deallog << err << std::endl; } template -void test_hyper_cube(const FiniteElement& fe) +void test_hyper_cube(const FiniteElement &fe) { Triangulation tr; GridGenerator::hyper_cube(tr); @@ -177,7 +177,7 @@ int main() { std::ofstream logfile ("project_boundary_rt_01/output"); deallog << std::setprecision (2); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console (0); deallog.threshold_double(1.e-12); @@ -189,5 +189,5 @@ int main() FE_RaviartThomasNodal<2> rt23(3); test_hyper_cube(rt23); FE_RaviartThomasNodal<2> rt24(4); - test_hyper_cube(rt24); + test_hyper_cube(rt24); } diff --git a/tests/deal.II/project_bv_curl_conf.cc b/tests/deal.II/project_bv_curl_conf.cc index 5a0aa1d83e..7d221c5d78 100644 --- a/tests/deal.II/project_bv_curl_conf.cc +++ b/tests/deal.II/project_bv_curl_conf.cc @@ -27,55 +27,60 @@ std::ofstream logfile ("project_bv_curl_conf/output"); template -class BoundaryFunction: public Function { - public: - BoundaryFunction (); - virtual void vector_value (const Point& p, Vector& values) const; +class BoundaryFunction: public Function +{ +public: + BoundaryFunction (); + virtual void vector_value (const Point &p, Vector &values) const; }; template -BoundaryFunction::BoundaryFunction (): Function (dim) { +BoundaryFunction::BoundaryFunction (): Function (dim) +{ } template -void BoundaryFunction::vector_value (const Point&, - Vector& values) const { +void BoundaryFunction::vector_value (const Point &, + Vector &values) const +{ for (unsigned int d = 0; d < dim; ++d) values (d) = d + 1.0; } template -void test_boundary_values (const FiniteElement& fe) { +void test_boundary_values (const FiniteElement &fe) +{ Triangulation triangulation; - + GridGenerator::subdivided_hyper_cube (triangulation, 2); - + DoFHandler dof_handler (triangulation); - + dof_handler.distribute_dofs (fe); - + BoundaryFunction boundary_function; ConstraintMatrix constraints; - + constraints.clear (); VectorTools::project_boundary_values_curl_conforming (dof_handler, 0, boundary_function, 0, constraints); constraints.close (); constraints.print (logfile); } -int main () { +int main () +{ deallog << std::setprecision (2); deallog.attach (logfile); deallog.depth_console (0); deallog.threshold_double (1e-12); - + FE_Nedelec<2> fe_2 (1); - + deallog << "dim=2:" << std::endl; test_boundary_values (fe_2); - + FE_Nedelec<3> fe_3 (1); - + deallog << "dim=3:" << std::endl; test_boundary_values (fe_3); } diff --git a/tests/deal.II/project_bv_div_conf.cc b/tests/deal.II/project_bv_div_conf.cc index 61e525f0fe..8e7eca3b44 100644 --- a/tests/deal.II/project_bv_div_conf.cc +++ b/tests/deal.II/project_bv_div_conf.cc @@ -27,54 +27,59 @@ std::ofstream logfile ("project_bv_div_conf/output"); template -class BoundaryFunction: public Function { - public: - BoundaryFunction (); - virtual void vector_value (const Point& p, Vector& values) const; +class BoundaryFunction: public Function +{ +public: + BoundaryFunction (); + virtual void vector_value (const Point &p, Vector &values) const; }; template -BoundaryFunction::BoundaryFunction (): Function (dim) { +BoundaryFunction::BoundaryFunction (): Function (dim) +{ } template -void BoundaryFunction::vector_value (const Point&, Vector& values) const { +void BoundaryFunction::vector_value (const Point &, Vector &values) const +{ for (unsigned int d = 0; d < dim; ++d) values (d) = d + 1.0; } template -void test_boundary_values (const FiniteElement& fe) { +void test_boundary_values (const FiniteElement &fe) +{ Triangulation triangulation; - + GridGenerator::subdivided_hyper_cube (triangulation, 2); - + DoFHandler dof_handler (triangulation); - + dof_handler.distribute_dofs (fe); - + BoundaryFunction boundary_function; ConstraintMatrix constraints; - + constraints.clear (); VectorTools::project_boundary_values_div_conforming (dof_handler, 0, boundary_function, 0, constraints); constraints.close (); constraints.print (logfile); } -int main () { +int main () +{ deallog << std::setprecision (2); deallog.attach (logfile); deallog.depth_console (0); deallog.threshold_double (1e-12); - + FE_RaviartThomas<2> fe_2 (1); - + deallog << "dim=2:" << std::endl; test_boundary_values (fe_2); - + FE_RaviartThomas<3> fe_3 (1); - + deallog << "dim=3:" << std::endl; test_boundary_values (fe_3); } diff --git a/tests/deal.II/project_common.h b/tests/deal.II/project_common.h index 09b0f2cc2e..4f53022348 100644 --- a/tests/deal.II/project_common.h +++ b/tests/deal.II/project_common.h @@ -1,6 +1,6 @@ //---------------------------- project_common.h --------------------------- // $Id$ -// Version: $Name$ +// Version: $Name$ // // Copyright (C) 2006, 2010 by the deal.II authors // @@ -54,50 +54,50 @@ void test (); template class F : public Function { - public: - F (const unsigned int q, - const unsigned int n_components) - : - Function(n_components), - q(q) - {} - - virtual double value (const Point &p, - const unsigned int component) const +public: + F (const unsigned int q, + const unsigned int n_components) + : + Function(n_components), + q(q) + {} + + virtual double value (const Point &p, + const unsigned int component) const + { + Assert ((component == 0) && (this->n_components == 1), + ExcInternalError()); + double val = 0; + for (unsigned int d=0; d &p, + Vector &v) const + { + for (unsigned int c=0; cn_components == 1), - ExcInternalError()); - double val = 0; - for (unsigned int d=0; d &p, - Vector &v) const - { - for (unsigned int c=0; c void do_project (const Triangulation &triangulation, - const FiniteElement &fe, - const unsigned int p, - const unsigned int order_difference) -{ + const FiniteElement &fe, + const unsigned int p, + const unsigned int order_difference) +{ DoFHandler dof_handler(triangulation); dof_handler.distribute_dofs (fe); @@ -105,40 +105,40 @@ void do_project (const Triangulation &triangulation, ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof_handler, - constraints); + constraints); constraints.close (); Vector projection (dof_handler.n_dofs()); Vector error (triangulation.n_active_cells()); for (unsigned int q=0; q<=p+2-order_difference; ++q) { - // project the function + // project the function VectorTools::project (dof_handler, - constraints, - QGauss(p+2), - F (q, fe.n_components()), - projection); - // just to make sure it doesn't get - // forgotten: handle hanging node - // constraints + constraints, + QGauss(p+2), + F (q, fe.n_components()), + projection); + // just to make sure it doesn't get + // forgotten: handle hanging node + // constraints constraints.distribute (projection); - - // then compute the interpolation error + + // then compute the interpolation error VectorTools::integrate_difference (dof_handler, - projection, - F (q, fe.n_components()), - error, - QGauss(std::max(p,q)+1), - VectorTools::L2_norm); + projection, + F (q, fe.n_components()), + error, + QGauss(std::max(p,q)+1), + VectorTools::L2_norm); deallog << fe.get_name() << ", P_" << q - << ", rel. error=" << error.l2_norm() / projection.l2_norm() - << std::endl; - + << ", rel. error=" << error.l2_norm() / projection.l2_norm() + << std::endl; + if (q<=p-order_difference) - if (error.l2_norm() > 1e-10*projection.l2_norm()) - deallog << "Projection failed with relative error " - << error.l2_norm() / projection.l2_norm() - << std::endl; + if (error.l2_norm() > 1e-10*projection.l2_norm()) + deallog << "Projection failed with relative error " + << error.l2_norm() / projection.l2_norm() + << std::endl; } } @@ -150,8 +150,8 @@ void do_project (const Triangulation &triangulation, // can only represent polynomials of degree p-1 exactly. the gap is then 1. template void test_no_hanging_nodes (const FiniteElement &fe, - const unsigned int p, - const unsigned int order_difference = 0) + const unsigned int p, + const unsigned int order_difference = 0) { Triangulation triangulation; GridGenerator::hyper_cube (triangulation); @@ -165,8 +165,8 @@ void test_no_hanging_nodes (const FiniteElement &fe, // same test as above, but this time with a mesh that has hanging nodes template void test_with_hanging_nodes (const FiniteElement &fe, - const unsigned int p, - const unsigned int order_difference = 0) + const unsigned int p, + const unsigned int order_difference = 0) { Triangulation triangulation; GridGenerator::hyper_cube (triangulation); @@ -174,7 +174,7 @@ void test_with_hanging_nodes (const FiniteElement &fe, triangulation.begin_active()->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); triangulation.refine_global (1); - + do_project (triangulation, fe, p, order_difference); } @@ -192,22 +192,22 @@ void test_with_hanging_nodes (const FiniteElement &fe, // having face_orientation==false template void test_with_wrong_face_orientation (const FiniteElement &fe, - const unsigned int p, - const unsigned int order_difference = 0) + const unsigned int p, + const unsigned int order_difference = 0) { if (dim != 3) return; - + for (unsigned int i=0; i<7; ++i) { Triangulation triangulation; GridGenerator::hyper_ball (triangulation); typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + cell = triangulation.begin_active(); std::advance (cell, i); cell->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); - + do_project (triangulation, fe, p, order_difference); } } @@ -220,12 +220,12 @@ void test_with_wrong_face_orientation (const FiniteElement &fe, // fe_poly_tensor.cc template void test_with_2d_deformed_mesh (const FiniteElement &fe, - const unsigned int p, - const unsigned int order_difference = 0) + const unsigned int p, + const unsigned int order_difference = 0) { if (dim != 2) return; - + std::vector > points_glob; std::vector > points; @@ -237,7 +237,7 @@ void test_with_2d_deformed_mesh (const FiniteElement &fe, points_glob.push_back (Point (0.5, 1.0)); points_glob.push_back (Point (0.0, 1.0)); - // Prepare cell data + // Prepare cell data std::vector > cells (3); cells[0].vertices[0] = 0; @@ -260,7 +260,7 @@ void test_with_2d_deformed_mesh (const FiniteElement &fe, Triangulation triangulation; triangulation.create_triangulation (points_glob, cells, SubCellData()); - + do_project (triangulation, fe, p, order_difference); } @@ -270,8 +270,8 @@ void test_with_2d_deformed_mesh (const FiniteElement &fe, // makes sure we also check the sign_change thingy for refined cells template void test_with_2d_deformed_refined_mesh (const FiniteElement &fe, - const unsigned int p, - const unsigned int order_difference = 0) + const unsigned int p, + const unsigned int order_difference = 0) { if (dim != 2) return; @@ -289,7 +289,7 @@ void test_with_2d_deformed_refined_mesh (const FiniteElement &fe, points_glob.push_back (Point (0.5, 1.0)); points_glob.push_back (Point (0.0, 1.0)); - // Prepare cell data + // Prepare cell data std::vector > cells (3); cells[0].vertices[0] = 0; @@ -314,21 +314,21 @@ void test_with_2d_deformed_refined_mesh (const FiniteElement &fe, triangulation.create_triangulation (points_glob, cells, SubCellData()); switch (i) - { - case 0: - triangulation.begin_active()->set_refine_flag(); - break; - case 1: - (++(triangulation.begin_active()))->set_refine_flag(); - break; - case 2: - (++(++(triangulation.begin_active())))->set_refine_flag(); - break; - default: - Assert (false, ExcNotImplemented()); - } + { + case 0: + triangulation.begin_active()->set_refine_flag(); + break; + case 1: + (++(triangulation.begin_active()))->set_refine_flag(); + break; + case 2: + (++(++(triangulation.begin_active())))->set_refine_flag(); + break; + default: + Assert (false, ExcNotImplemented()); + } triangulation.execute_coarsening_and_refinement (); - + do_project (triangulation, fe, p, order_difference); } } @@ -339,7 +339,7 @@ int main () { std::ofstream logfile(logname); deallog << std::setprecision (3); - + deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); diff --git a/tests/deal.II/project_nedelec_01.cc b/tests/deal.II/project_nedelec_01.cc index 99e99aec65..dc24424004 100644 --- a/tests/deal.II/project_nedelec_01.cc +++ b/tests/deal.II/project_nedelec_01.cc @@ -28,7 +28,7 @@ template void test () { if (dim > 1) - // only p=1 implemented at present + // only p=1 implemented at present for (unsigned int p=1; p<2; ++p) test_no_hanging_nodes (FE_Nedelec(p-1), p, 1); } diff --git a/tests/deal.II/project_nedelec_02.cc b/tests/deal.II/project_nedelec_02.cc index 3497a334fd..71153941df 100644 --- a/tests/deal.II/project_nedelec_02.cc +++ b/tests/deal.II/project_nedelec_02.cc @@ -28,7 +28,7 @@ template void test () { if (dim > 1) - // only p=1 implemented at present + // only p=1 implemented at present for (unsigned int p=0; p<2; ++p) test_with_hanging_nodes (FE_Nedelec(p), p, 1); } diff --git a/tests/deal.II/project_nedelec_03.cc b/tests/deal.II/project_nedelec_03.cc index 16d07e1e60..054ef11f27 100644 --- a/tests/deal.II/project_nedelec_03.cc +++ b/tests/deal.II/project_nedelec_03.cc @@ -28,7 +28,7 @@ template void test () { if (dim > 1) - // only p=1 implemented at present + // only p=1 implemented at present for (unsigned int p=1; p<2; ++p) test_with_wrong_face_orientation (FE_Nedelec(p-1), p, 1); } diff --git a/tests/deal.II/project_nedelec_04.cc b/tests/deal.II/project_nedelec_04.cc index 69b746ebe4..c5b215e098 100644 --- a/tests/deal.II/project_nedelec_04.cc +++ b/tests/deal.II/project_nedelec_04.cc @@ -28,7 +28,7 @@ template void test () { if (dim > 1) - // only p=1 implemented at present + // only p=1 implemented at present for (unsigned int p=1; p<2; ++p) test_with_2d_deformed_mesh (FE_Nedelec(p-1), p, 1); } diff --git a/tests/deal.II/project_nedelec_05.cc b/tests/deal.II/project_nedelec_05.cc index 2e782947b3..f9ae168a2e 100644 --- a/tests/deal.II/project_nedelec_05.cc +++ b/tests/deal.II/project_nedelec_05.cc @@ -28,7 +28,7 @@ template void test () { if (dim > 1) - // only p=1 implemented at present + // only p=1 implemented at present for (unsigned int p=1; p<2; ++p) test_with_2d_deformed_refined_mesh (FE_Nedelec(p-1), p, 1); } diff --git a/tests/deal.II/project_q_system_01.cc b/tests/deal.II/project_q_system_01.cc index 84f96c622c..7fc70b40df 100644 --- a/tests/deal.II/project_q_system_01.cc +++ b/tests/deal.II/project_q_system_01.cc @@ -30,6 +30,6 @@ void test () { for (unsigned int p=1; p<5-dim; ++p) test_no_hanging_nodes (FESystem(FE_Q(p), 1, - FE_DGQ(p+1), 1), - p); + FE_DGQ(p+1), 1), + p); } diff --git a/tests/deal.II/project_q_system_02.cc b/tests/deal.II/project_q_system_02.cc index 3238a1f212..3eb1e68c26 100644 --- a/tests/deal.II/project_q_system_02.cc +++ b/tests/deal.II/project_q_system_02.cc @@ -30,6 +30,6 @@ void test () { for (unsigned int p=1; p<5-dim; ++p) test_with_hanging_nodes (FESystem(FE_Q(p), 1, - FE_DGQ(p+1), 1), - p); + FE_DGQ(p+1), 1), + p); } diff --git a/tests/deal.II/project_q_system_03.cc b/tests/deal.II/project_q_system_03.cc index 8e0d2f84b6..17f3c1cd4e 100644 --- a/tests/deal.II/project_q_system_03.cc +++ b/tests/deal.II/project_q_system_03.cc @@ -30,6 +30,6 @@ void test () { for (unsigned int p=1; p<5-dim; ++p) test_with_wrong_face_orientation (FESystem(FE_Q(p), 1, - FE_DGQ(p+1), 1), - p); + FE_DGQ(p+1), 1), + p); } diff --git a/tests/deal.II/project_q_system_04.cc b/tests/deal.II/project_q_system_04.cc index eac0840779..9590c31cfa 100644 --- a/tests/deal.II/project_q_system_04.cc +++ b/tests/deal.II/project_q_system_04.cc @@ -30,6 +30,6 @@ void test () { for (unsigned int p=1; p<5-dim; ++p) test_with_2d_deformed_mesh (FESystem(FE_Q(p), 1, - FE_DGQ(p+1), 1), - p); + FE_DGQ(p+1), 1), + p); } diff --git a/tests/deal.II/project_q_system_05.cc b/tests/deal.II/project_q_system_05.cc index 9e05042074..b1186ad5b8 100644 --- a/tests/deal.II/project_q_system_05.cc +++ b/tests/deal.II/project_q_system_05.cc @@ -30,6 +30,6 @@ void test () { for (unsigned int p=1; p<5-dim; ++p) test_with_2d_deformed_refined_mesh (FESystem(FE_Q(p), 1, - FE_DGQ(p+1), 1), - p); + FE_DGQ(p+1), 1), + p); } diff --git a/tests/deal.II/project_rt_01.cc b/tests/deal.II/project_rt_01.cc index 298ff9bfd0..7b6606e439 100644 --- a/tests/deal.II/project_rt_01.cc +++ b/tests/deal.II/project_rt_01.cc @@ -28,9 +28,9 @@ template void test () { if (dim != 1) - // this is interesting also in 3d, but is - // exceedingly slow there. limit to the - // case of RT(0) elements in 3d + // this is interesting also in 3d, but is + // exceedingly slow there. limit to the + // case of RT(0) elements in 3d for (unsigned int p=0; p<(dim == 2 ? 3 : 1); ++p) test_no_hanging_nodes (FE_RaviartThomas(p), p+1, 1); } diff --git a/tests/deal.II/project_rt_02.cc b/tests/deal.II/project_rt_02.cc index 0868556edc..62b24299da 100644 --- a/tests/deal.II/project_rt_02.cc +++ b/tests/deal.II/project_rt_02.cc @@ -28,9 +28,9 @@ template void test () { if (dim != 1) - // this is interesting also in 3d, but is - // exceedingly slow there. limit to the - // case of RT(0) elements in 3d + // this is interesting also in 3d, but is + // exceedingly slow there. limit to the + // case of RT(0) elements in 3d for (unsigned int p=0; p<(dim == 2 ? 3 : 1); ++p) test_with_hanging_nodes (FE_RaviartThomas(p), p+1, 1); } diff --git a/tests/deal.II/project_rt_04.cc b/tests/deal.II/project_rt_04.cc index 88eecbaedd..e0ce9a4bb8 100644 --- a/tests/deal.II/project_rt_04.cc +++ b/tests/deal.II/project_rt_04.cc @@ -28,9 +28,9 @@ template void test () { if (dim != 1) - // this is interesting also in 3d, but is - // exceedingly slow there. limit to the - // case of RT(0) elements in 3d + // this is interesting also in 3d, but is + // exceedingly slow there. limit to the + // case of RT(0) elements in 3d for (unsigned int p=0; p<(dim == 2 ? 3 : 1); ++p) test_with_2d_deformed_mesh (FE_RaviartThomas(p), p+1, 1); } diff --git a/tests/deal.II/project_rt_05.cc b/tests/deal.II/project_rt_05.cc index 0906795f4d..a740156ccb 100644 --- a/tests/deal.II/project_rt_05.cc +++ b/tests/deal.II/project_rt_05.cc @@ -28,9 +28,9 @@ template void test () { if (dim != 1) - // this is interesting also in 3d, but is - // exceedingly slow there. limit to the - // case of RT(0) elements in 3d + // this is interesting also in 3d, but is + // exceedingly slow there. limit to the + // case of RT(0) elements in 3d for (unsigned int p=0; p<(dim == 2 ? 3 : 1); ++p) test_with_2d_deformed_refined_mesh (FE_RaviartThomas(p), p+1, 1); } diff --git a/tests/deal.II/project_to_surface_01.cc b/tests/deal.II/project_to_surface_01.cc index 1b31b7153b..4855daaf54 100644 --- a/tests/deal.II/project_to_surface_01.cc +++ b/tests/deal.II/project_to_surface_01.cc @@ -36,24 +36,24 @@ class Rotate2d { - public: - Rotate2d (const double angle) - : - angle(angle) - {} - - template - Point operator() (const Point p) const - { - Point q; - q[0] = std::cos(angle)*p(0) - std::sin(angle) * p(1); - q[1] = std::sin(angle)*p(0) + std::cos(angle) * p(1); - for (unsigned d=2; d + Point operator() (const Point p) const + { + Point q; + q[0] = std::cos(angle)*p(0) - std::sin(angle) * p(1); + q[1] = std::sin(angle)*p(0) + std::cos(angle) * p(1); + for (unsigned d=2; d &) template void create_triangulation(const bool rotate, - Triangulation &tria) + Triangulation &tria) { GridGenerator::hyper_cube(tria, 1., 3.); @@ -84,7 +84,7 @@ template void test () { deallog << "dim=" << dim << std::endl; - + Triangulation tria; StraightBoundary boundary; @@ -96,29 +96,29 @@ void test () const typename Triangulation::active_cell_iterator cell=tria.begin_active(); Point trial_point; for (unsigned int i=0; i::lines_per_cell; ++e) - { - deallog << " Line " << e << ", projected point="; - if (dim > 1) - deallog << boundary.project_to_surface (cell->line(e), trial_point); - else - deallog << boundary.project_to_surface (cell, trial_point); - - deallog << " (line is from "; - if (dim > 1) - deallog << cell->line(e)->vertex(0); - else - deallog << cell->vertex(0); - deallog << " to "; - if (dim > 1) - deallog << cell->line(e)->vertex(1); - else - deallog << cell->vertex(1); - - deallog << ")" << std::endl; - } + { + deallog << " Line " << e << ", projected point="; + if (dim > 1) + deallog << boundary.project_to_surface (cell->line(e), trial_point); + else + deallog << boundary.project_to_surface (cell, trial_point); + + deallog << " (line is from "; + if (dim > 1) + deallog << cell->line(e)->vertex(0); + else + deallog << cell->vertex(0); + deallog << " to "; + if (dim > 1) + deallog << cell->line(e)->vertex(1); + else + deallog << cell->vertex(1); + + deallog << ")" << std::endl; + } tria.clear(); } } @@ -130,7 +130,7 @@ int main () { std::ofstream logfile ("project_to_surface_01/output"); deallog << std::setprecision (3); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console (0); diff --git a/tests/deal.II/project_to_surface_02.cc b/tests/deal.II/project_to_surface_02.cc index 509bc367ad..ef05055d9c 100644 --- a/tests/deal.II/project_to_surface_02.cc +++ b/tests/deal.II/project_to_surface_02.cc @@ -36,24 +36,24 @@ class Rotate2d { - public: - Rotate2d (const double angle) - : - angle(angle) - {} - - template - Point operator() (const Point p) const - { - Point q; - q[0] = std::cos(angle)*p(0) - std::sin(angle) * p(1); - q[1] = std::sin(angle)*p(0) + std::cos(angle) * p(1); - for (unsigned d=2; d + Point operator() (const Point p) const + { + Point q; + q[0] = std::cos(angle)*p(0) - std::sin(angle) * p(1); + q[1] = std::sin(angle)*p(0) + std::cos(angle) * p(1); + for (unsigned d=2; d &) template void create_triangulation(const bool rotate, - Triangulation &tria) + Triangulation &tria) { GridGenerator::hyper_cube(tria, 1., 3.); @@ -84,7 +84,7 @@ template void test () { deallog << "dim=" << dim << std::endl; - + Triangulation tria; StraightBoundary boundary; @@ -96,37 +96,37 @@ void test () const typename Triangulation::active_cell_iterator cell=tria.begin_active(); Point trial_point; for (unsigned int i=0; i::quads_per_cell; ++e) - { - const typename Triangulation::quad_iterator - quad = (dim > 2 ? cell->quad(e) : - *reinterpret_cast::quad_iterator*>(&cell)); - - deallog << " Quad " << e << ", projected point="; - - const Point p = boundary.project_to_surface (quad, trial_point); - deallog << p; - deallog << " (quad is from "; - deallog << quad->vertex(0); - deallog << " to "; - deallog << quad->vertex(1); - deallog << " to "; - deallog << quad->vertex(2); - deallog << " to "; - deallog << quad->vertex(3); - deallog << ")" << std::endl; - - // now make sure that p is - // indeed closer to - // trial_point than any of - // the vertices of the quad - for (unsigned int v=0; v<4; ++v) - Assert (p.distance (trial_point) <= - quad->vertex(v).distance (trial_point), - ExcInternalError()); - } + { + const typename Triangulation::quad_iterator + quad = (dim > 2 ? cell->quad(e) : + *reinterpret_cast::quad_iterator *>(&cell)); + + deallog << " Quad " << e << ", projected point="; + + const Point p = boundary.project_to_surface (quad, trial_point); + deallog << p; + deallog << " (quad is from "; + deallog << quad->vertex(0); + deallog << " to "; + deallog << quad->vertex(1); + deallog << " to "; + deallog << quad->vertex(2); + deallog << " to "; + deallog << quad->vertex(3); + deallog << ")" << std::endl; + + // now make sure that p is + // indeed closer to + // trial_point than any of + // the vertices of the quad + for (unsigned int v=0; v<4; ++v) + Assert (p.distance (trial_point) <= + quad->vertex(v).distance (trial_point), + ExcInternalError()); + } tria.clear(); } } @@ -138,7 +138,7 @@ int main () { std::ofstream logfile ("project_to_surface_02/output"); deallog << std::setprecision (3); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console (0); diff --git a/tests/deal.II/project_to_surface_03.cc b/tests/deal.II/project_to_surface_03.cc index 4e4924c299..72ab9f749c 100644 --- a/tests/deal.II/project_to_surface_03.cc +++ b/tests/deal.II/project_to_surface_03.cc @@ -38,66 +38,66 @@ template void test () { deallog << "dim=" << dim << std::endl; - + Triangulation tria; StraightBoundary boundary; GridGenerator::hyper_cube(tria, 0, 1); const typename Triangulation::active_cell_iterator - cell=tria.begin_active(); + cell=tria.begin_active(); - // distort the cell a bit. all - // faces but face 0 stay planar; - // face 0 becomes a saddle + // distort the cell a bit. all + // faces but face 0 stay planar; + // face 0 becomes a saddle cell->vertex(0)[0] -= 0.25; cell->vertex(6)[0] -= 0.25; cell->vertex(2)[0] += 0.25; cell->vertex(4)[0] += 0.25; - + for (unsigned int point=0; point<9; ++point) { - // choose the 8 vertices of the - // original unit cell as well - // as the center point + // choose the 8 vertices of the + // original unit cell as well + // as the center point const Point trial_point = (point < 8 - ? - GeometryInfo::unit_cell_vertex(point) - : - Point(.5,.5,.5)); + ? + GeometryInfo::unit_cell_vertex(point) + : + Point(.5,.5,.5)); deallog << "Trial point = " << trial_point << std::endl; - + for (unsigned int e=0; e::quads_per_cell; ++e) - { - const typename Triangulation::quad_iterator - quad = (dim > 2 ? cell->quad(e) : - *reinterpret_cast::quad_iterator*>(&cell)); - - deallog << " Quad " << e << ", projected point="; - - const Point p = boundary.project_to_surface (quad, trial_point); - deallog << p; - deallog << " (quad is from "; - deallog << quad->vertex(0); - deallog << " to "; - deallog << quad->vertex(1); - deallog << " to "; - deallog << quad->vertex(2); - deallog << " to "; - deallog << quad->vertex(3); - deallog << ")" << std::endl; - - // now make sure that p is - // indeed closer to - // trial_point than any of - // the vertices of the quad - for (unsigned int v=0; v<4; ++v) - Assert (p.distance (trial_point) <= - quad->vertex(v).distance (trial_point), - ExcInternalError()); - } + { + const typename Triangulation::quad_iterator + quad = (dim > 2 ? cell->quad(e) : + *reinterpret_cast::quad_iterator *>(&cell)); + + deallog << " Quad " << e << ", projected point="; + + const Point p = boundary.project_to_surface (quad, trial_point); + deallog << p; + deallog << " (quad is from "; + deallog << quad->vertex(0); + deallog << " to "; + deallog << quad->vertex(1); + deallog << " to "; + deallog << quad->vertex(2); + deallog << " to "; + deallog << quad->vertex(3); + deallog << ")" << std::endl; + + // now make sure that p is + // indeed closer to + // trial_point than any of + // the vertices of the quad + for (unsigned int v=0; v<4; ++v) + Assert (p.distance (trial_point) <= + quad->vertex(v).distance (trial_point), + ExcInternalError()); + } deallog << std::endl; } } @@ -109,7 +109,7 @@ int main () { std::ofstream logfile ("project_to_surface_03/output"); deallog << std::setprecision (3); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console (0); diff --git a/tests/deal.II/recursively_set_material_id.cc b/tests/deal.II/recursively_set_material_id.cc index ba6f8097f9..6478a4cb1e 100644 --- a/tests/deal.II/recursively_set_material_id.cc +++ b/tests/deal.II/recursively_set_material_id.cc @@ -36,52 +36,52 @@ void test() for (unsigned int t=0; t<2; ++t) { deallog << "dim=" << dim << ", test=" << t << std::endl; - + Triangulation tr; if (dim > 1) - GridGenerator::hyper_ball(tr); + GridGenerator::hyper_ball(tr); else - GridGenerator::hyper_cube(tr); + GridGenerator::hyper_cube(tr); tr.refine_global(1); - // for test 1, refine a second - // time isotropically. for test - // 2, cut in only one direction + // for test 1, refine a second + // time isotropically. for test + // 2, cut in only one direction if (t==0) - tr.refine_global(1); + tr.refine_global(1); else - { - for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); cell != tr.end(); ++cell) - cell->set_refine_flag (RefinementCase::cut_x); - tr.execute_coarsening_and_refinement(); - } + { + for (typename Triangulation::active_cell_iterator + cell = tr.begin_active(); cell != tr.end(); ++cell) + cell->set_refine_flag (RefinementCase::cut_x); + tr.execute_coarsening_and_refinement(); + } deallog << tr.n_active_cells() << std::endl; - // now call the function once - // for one of the cells on - // level 1 + // now call the function once + // for one of the cells on + // level 1 tr.begin(1)->recursively_set_material_id (1); - // and then count how many - // active cells inherited this - // flag + // and then count how many + // active cells inherited this + // flag unsigned int n=0; for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); cell != tr.end(); ++cell) - if (cell->material_id() == 1) - ++n; - + cell = tr.begin_active(); cell != tr.end(); ++cell) + if (cell->material_id() == 1) + ++n; + deallog << n << std::endl; if (t==0) - Assert (n == GeometryInfo::max_children_per_cell, - ExcInternalError()) - else - Assert (n == 2, - ExcInternalError()); + Assert (n == GeometryInfo::max_children_per_cell, + ExcInternalError()) + else + Assert (n == 2, + ExcInternalError()); } } diff --git a/tests/deal.II/refinement_listener_01.cc b/tests/deal.II/refinement_listener_01.cc index 41016a9f7d..891b722dfe 100644 --- a/tests/deal.II/refinement_listener_01.cc +++ b/tests/deal.II/refinement_listener_01.cc @@ -35,45 +35,45 @@ template class RefinementListener : public Triangulation::RefinementListener { - public: - RefinementListener (const std::string &prefix) - : - prefix(prefix) - {} - - virtual - void - pre_refinement_notification (const Triangulation &tria) - { - deallog << prefix << ' ' << "Pre-refinement: " << tria.n_active_cells() << std::endl; - } - - virtual - void - post_refinement_notification (const Triangulation &tria) - { - deallog << prefix << ' ' << "Post-refinement: " << tria.n_active_cells() << std::endl; - } - - virtual - void - copy_notification (const Triangulation &old_tria, - const Triangulation &new_tria) - { - deallog << prefix << ' ' << "Copy: " - << old_tria.n_active_cells() << ' ' - << new_tria.n_active_cells() << std::endl; - } - - virtual - void - create_notification (const Triangulation &tria) - { - deallog << prefix << ' ' << "Create: " << tria.n_active_cells() << std::endl; - } - - private: - std::string prefix; +public: + RefinementListener (const std::string &prefix) + : + prefix(prefix) + {} + + virtual + void + pre_refinement_notification (const Triangulation &tria) + { + deallog << prefix << ' ' << "Pre-refinement: " << tria.n_active_cells() << std::endl; + } + + virtual + void + post_refinement_notification (const Triangulation &tria) + { + deallog << prefix << ' ' << "Post-refinement: " << tria.n_active_cells() << std::endl; + } + + virtual + void + copy_notification (const Triangulation &old_tria, + const Triangulation &new_tria) + { + deallog << prefix << ' ' << "Copy: " + << old_tria.n_active_cells() << ' ' + << new_tria.n_active_cells() << std::endl; + } + + virtual + void + create_notification (const Triangulation &tria) + { + deallog << prefix << ' ' << "Create: " << tria.n_active_cells() << std::endl; + } + +private: + std::string prefix; }; @@ -91,18 +91,18 @@ void test () tria_1.add_refinement_listener (rl_1); tria_2.add_refinement_listener (rl_2); - // this should print the create note + // this should print the create note GridGenerator::hyper_cube(tria_1); - // this should print the pre- and - // post-refinement note + // this should print the pre- and + // post-refinement note tria_1.refine_global (1); - // this should print the copy note + // this should print the copy note tria_1.clear (); tria_1.copy_triangulation (tria_2); - // no longer print anything + // no longer print anything tria_1.remove_refinement_listener (rl_1); tria_1.refine_global (2); } diff --git a/tests/deal.II/refinement_listener_02.cc b/tests/deal.II/refinement_listener_02.cc index 3b4122233f..cd56e10e2b 100644 --- a/tests/deal.II/refinement_listener_02.cc +++ b/tests/deal.II/refinement_listener_02.cc @@ -36,7 +36,7 @@ std::ofstream logfile("refinement_listener_02/output"); template void pre_refinement_notification (const std::string &prefix, - const Triangulation &tria) + const Triangulation &tria) { deallog << prefix << ' ' << "Pre-refinement: " << tria.n_active_cells() << std::endl; } @@ -45,7 +45,7 @@ pre_refinement_notification (const std::string &prefix, template void post_refinement_notification (const std::string &prefix, - const Triangulation &tria) + const Triangulation &tria) { deallog << prefix << ' ' << "Post-refinement: " << tria.n_active_cells() << std::endl; } @@ -54,19 +54,19 @@ post_refinement_notification (const std::string &prefix, template void copy_notification (const std::string &prefix, - const Triangulation &old_tria, - const Triangulation &new_tria) + const Triangulation &old_tria, + const Triangulation &new_tria) { deallog << prefix << ' ' << "Copy: " - << old_tria.n_active_cells() << ' ' - << new_tria.n_active_cells() << std::endl; + << old_tria.n_active_cells() << ' ' + << new_tria.n_active_cells() << std::endl; } template void create_notification (const std::string &prefix, - const Triangulation &tria) + const Triangulation &tria) { deallog << prefix << ' ' << "Create: " << tria.n_active_cells() << std::endl; } @@ -84,56 +84,56 @@ void test () boost::signals2::connection connections_1[4] = {tria_1.signals.pre_refinement .connect (std_cxx1x::bind (&pre_refinement_notification, - "tria_1", - std_cxx1x::cref(tria_1))), + "tria_1", + std_cxx1x::cref(tria_1))), tria_1.signals.post_refinement .connect (std_cxx1x::bind (&post_refinement_notification, - "tria_1", - std_cxx1x::cref(tria_1))), + "tria_1", + std_cxx1x::cref(tria_1))), tria_1.signals.create .connect (std_cxx1x::bind (&create_notification, - "tria_1", - std_cxx1x::cref(tria_1))), + "tria_1", + std_cxx1x::cref(tria_1))), tria_1.signals.copy .connect (std_cxx1x::bind (©_notification, - "tria_1", - std_cxx1x::_1, - std_cxx1x::cref(tria_1))) - }; + "tria_1", + std_cxx1x::_1, + std_cxx1x::cref(tria_1))) + }; boost::signals2::connection connections_2[4] = {tria_2.signals.pre_refinement .connect (std_cxx1x::bind (&pre_refinement_notification, - "tria_2", - std_cxx1x::cref(tria_2))), + "tria_2", + std_cxx1x::cref(tria_2))), tria_2.signals.post_refinement .connect (std_cxx1x::bind (&post_refinement_notification, - "tria_2", - std_cxx1x::cref(tria_2))), + "tria_2", + std_cxx1x::cref(tria_2))), tria_2.signals.create .connect (std_cxx1x::bind (&create_notification, - "tria_2", - std_cxx1x::cref(tria_2))), + "tria_2", + std_cxx1x::cref(tria_2))), tria_2.signals.copy .connect (std_cxx1x::bind (©_notification, - "tria_2", - std_cxx1x::_1, - std_cxx1x::cref(tria_2))) - }; + "tria_2", + std_cxx1x::_1, + std_cxx1x::cref(tria_2))) + }; - // this should print the create note + // this should print the create note GridGenerator::hyper_cube(tria_1); - // this should print the pre- and - // post-refinement note + // this should print the pre- and + // post-refinement note tria_1.refine_global (1); - // this should print the copy note + // this should print the copy note tria_1.clear (); tria_1.copy_triangulation (tria_2); - // no longer print anything + // no longer print anything for (unsigned int i=0; i<4; ++i) connections_1[i].disconnect (); diff --git a/tests/deal.II/refinement_listener_03.cc b/tests/deal.II/refinement_listener_03.cc index 4b36c16570..34f9b13c8f 100644 --- a/tests/deal.II/refinement_listener_03.cc +++ b/tests/deal.II/refinement_listener_03.cc @@ -35,7 +35,7 @@ std::ofstream logfile("refinement_listener_03/output"); template void pre_refinement_notification (const std::string &prefix, - const Triangulation &tria) + const Triangulation &tria) { deallog << prefix << ' ' << "Pre-refinement: " << tria.n_active_cells() << std::endl; } @@ -44,7 +44,7 @@ pre_refinement_notification (const std::string &prefix, template void post_refinement_notification (const std::string &prefix, - const Triangulation &tria) + const Triangulation &tria) { deallog << prefix << ' ' << "Post-refinement: " << tria.n_active_cells() << std::endl; } @@ -53,19 +53,19 @@ post_refinement_notification (const std::string &prefix, template void copy_notification (const std::string &prefix, - const Triangulation &old_tria, - const Triangulation &new_tria) + const Triangulation &old_tria, + const Triangulation &new_tria) { deallog << prefix << ' ' << "Copy: " - << old_tria.n_active_cells() << ' ' - << new_tria.n_active_cells() << std::endl; + << old_tria.n_active_cells() << ' ' + << new_tria.n_active_cells() << std::endl; } template void create_notification (const std::string &prefix, - const Triangulation &tria) + const Triangulation &tria) { deallog << prefix << ' ' << "Create: " << tria.n_active_cells() << std::endl; } @@ -74,10 +74,10 @@ create_notification (const std::string &prefix, template void any_change_notification (const std::string &prefix, - const Triangulation &tria) + const Triangulation &tria) { deallog << prefix << ' ' << "Any change: " - << tria.n_active_cells() << std::endl; + << tria.n_active_cells() << std::endl; } @@ -93,76 +93,76 @@ void test () boost::signals2::connection connections_1[5] = {tria_1.signals.pre_refinement .connect (std_cxx1x::bind (&pre_refinement_notification, - "tria_1", - std_cxx1x::cref(tria_1))), + "tria_1", + std_cxx1x::cref(tria_1))), tria_1.signals.post_refinement .connect (std_cxx1x::bind (&post_refinement_notification, - "tria_1", - std_cxx1x::cref(tria_1))), + "tria_1", + std_cxx1x::cref(tria_1))), tria_1.signals.create .connect (std_cxx1x::bind (&create_notification, - "tria_1", - std_cxx1x::cref(tria_1))), + "tria_1", + std_cxx1x::cref(tria_1))), tria_1.signals.copy .connect (std_cxx1x::bind (©_notification, - "tria_1", - std_cxx1x::_1, - std_cxx1x::cref(tria_1))), + "tria_1", + std_cxx1x::_1, + std_cxx1x::cref(tria_1))), tria_1.signals.any_change .connect (std_cxx1x::bind (&any_change_notification, - "tria_1", - std_cxx1x::cref(tria_1))) - }; + "tria_1", + std_cxx1x::cref(tria_1))) + }; boost::signals2::connection connections_2[5] = {tria_2.signals.pre_refinement .connect (std_cxx1x::bind (&pre_refinement_notification, - "tria_2", - std_cxx1x::cref(tria_2))), + "tria_2", + std_cxx1x::cref(tria_2))), tria_2.signals.post_refinement .connect (std_cxx1x::bind (&post_refinement_notification, - "tria_2", - std_cxx1x::cref(tria_2))), + "tria_2", + std_cxx1x::cref(tria_2))), tria_2.signals.create .connect (std_cxx1x::bind (&create_notification, - "tria_2", - std_cxx1x::cref(tria_2))), + "tria_2", + std_cxx1x::cref(tria_2))), tria_2.signals.copy .connect (std_cxx1x::bind (©_notification, - "tria_2", - std_cxx1x::_1, - std_cxx1x::cref(tria_2))), + "tria_2", + std_cxx1x::_1, + std_cxx1x::cref(tria_2))), tria_2.signals.any_change .connect (std_cxx1x::bind (&any_change_notification, - "tria_2", - std_cxx1x::cref(tria_2))) - }; + "tria_2", + std_cxx1x::cref(tria_2))) + }; - // this should print the create note + // this should print the create note GridGenerator::hyper_cube(tria_1); - // this should print the pre- and - // post-refinement note + // this should print the pre- and + // post-refinement note tria_1.refine_global (1); - // this should print the copy note + // this should print the copy note tria_1.clear (); tria_1.copy_triangulation (tria_2); - // no longer print anything with the - // exception of the any_change signal + // no longer print anything with the + // exception of the any_change signal for (unsigned int i=0; i<4; ++i) connections_1[i].disconnect (); - // still show the any_change signal + // still show the any_change signal tria_1.refine_global (2); - // and now really nothing + // and now really nothing connections_1[4].disconnect (); tria_1.refine_global (1); - // avoid compiler warning + // avoid compiler warning (void)connections_2; } diff --git a/tests/deal.II/rt_covariant.cc b/tests/deal.II/rt_covariant.cc index f6322426d8..e884cf1ca8 100644 --- a/tests/deal.II/rt_covariant.cc +++ b/tests/deal.II/rt_covariant.cc @@ -40,19 +40,19 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { DoFHandler dof(tr); dof.distribute_dofs(fe); deallog << "FE=" << fe.get_name() - << std::endl; + << std::endl; const QGauss quadrature(2); FEValues fe_values (fe, quadrature, update_hessians); - // we used to fail here + // we used to fail here fe_values.reinit (dof.begin_active()); deallog << "OK" << std::endl; diff --git a/tests/deal.II/rt_hessian.cc b/tests/deal.II/rt_hessian.cc index 3dc30e6cc9..1e15ed34cf 100644 --- a/tests/deal.II/rt_hessian.cc +++ b/tests/deal.II/rt_hessian.cc @@ -40,8 +40,8 @@ template -void test (const Triangulation& tr, - const FiniteElement& fe) +void test (const Triangulation &tr, + const FiniteElement &fe) { DoFHandler dof(tr); dof.distribute_dofs(fe); @@ -54,16 +54,16 @@ void test (const Triangulation& tr, for (unsigned int i=0; i &dof) { std::vector dof_to_boundary_mapping; DoFTools::map_dof_to_boundary_indices (dof, - dof_to_boundary_mapping); + dof_to_boundary_mapping); - // first way: direct generation + // first way: direct generation SparsityPattern sparsity_1(dof.n_boundary_dofs(), - dof.max_couplings_between_boundary_dofs()); + dof.max_couplings_between_boundary_dofs()); DoFTools::make_boundary_sparsity_pattern (dof, - dof_to_boundary_mapping, - sparsity_1); + dof_to_boundary_mapping, + sparsity_1); sparsity_1.compress (); - // second way: via a CompressedSparsityPattern + // second way: via a CompressedSparsityPattern SparsityPattern sparsity_2; CompressedSparsityPattern csp(dof.n_boundary_dofs()); DoFTools::make_boundary_sparsity_pattern (dof, - dof_to_boundary_mapping, - csp); + dof_to_boundary_mapping, + csp); sparsity_2.copy_from (csp); - // the exact content of sparsity - // patterns is checked in other - // tests, so only make sure that - // sparsity_[12] are equal + // the exact content of sparsity + // patterns is checked in other + // tests, so only make sure that + // sparsity_[12] are equal deallog << "Check boundary" - << " -- " - << (sparsity_1 == sparsity_2 ? "ok" : "failed") - << std::endl; + << " -- " + << (sparsity_1 == sparsity_2 ? "ok" : "failed") + << std::endl; } @@ -101,7 +101,7 @@ template void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -114,10 +114,10 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); @@ -125,23 +125,23 @@ check () DoFTools::make_hanging_node_constraints (dof, constraints); constraints.close (); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern std::vector > mask (2, std::vector(2, false)); mask[0][0] = mask[1][1] = true; - + //--------------- Regular sparsity pattern checks ----------------- - - // first way: directly + + // first way: directly SparsityPattern sparsity_1 (dof.n_dofs(), dof.n_dofs()); DoFTools::make_sparsity_pattern (dof, mask, sparsity_1); constraints.condense (sparsity_1); sparsity_1.compress (); - // second way: via - // CompressedSparsityPattern + // second way: via + // CompressedSparsityPattern SparsityPattern sparsity_2; CompressedSparsityPattern csp_2 (dof.n_dofs()); DoFTools::make_sparsity_pattern (dof, mask, csp_2); @@ -149,17 +149,17 @@ check () sparsity_2.copy_from (csp_2); - // the exact content of sparsity - // patterns is checked in other - // tests, so only make sure that - // sparsity_[12] are equal + // the exact content of sparsity + // patterns is checked in other + // tests, so only make sure that + // sparsity_[12] are equal deallog << "Check 1:" - << " -- " - << (sparsity_1 == sparsity_2 ? "ok" : "failed") - << std::endl; + << " -- " + << (sparsity_1 == sparsity_2 ? "ok" : "failed") + << std::endl; + - //--------------- Block sparsity pattern checks ----------------- const unsigned int n = dof.n_dofs(); @@ -192,15 +192,15 @@ check () sparsity_4.copy_from (csp_4); deallog << "Check 2:" - << " -- " - << (sparsity_3 == sparsity_4 ? "ok" : "failed") - << std::endl; + << " -- " + << (sparsity_3 == sparsity_4 ? "ok" : "failed") + << std::endl; + - //--------------- Sparsity pattern checks for // boundary sparsity generators ----------------- - // check boundary matrices + // check boundary matrices check_boundary (dof); } @@ -210,7 +210,7 @@ int main () { std::ofstream logfile ("sparsity_pattern/output"); deallog << std::setprecision (2); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console (0); diff --git a/tests/deal.II/sparsity_pattern_01.cc b/tests/deal.II/sparsity_pattern_01.cc index 487bf452ae..e4f9f9a6af 100644 --- a/tests/deal.II/sparsity_pattern_01.cc +++ b/tests/deal.II/sparsity_pattern_01.cc @@ -41,19 +41,19 @@ bool operator == (const BlockSparsityPattern &sp1, - const BlockSparsityPattern &sp2) + const BlockSparsityPattern &sp2) { if (sp1.n_block_rows() != sp2.n_block_rows()) return false; - + if (sp1.n_block_cols() != sp2.n_block_cols()) return false; - + for (unsigned int i=0; i &dof) { std::vector dof_to_boundary_mapping; DoFTools::map_dof_to_boundary_indices (dof, - dof_to_boundary_mapping); + dof_to_boundary_mapping); - // first way: direct generation + // first way: direct generation SparsityPattern sparsity_1(dof.n_boundary_dofs(), - dof.max_couplings_between_boundary_dofs()); + dof.max_couplings_between_boundary_dofs()); DoFTools::make_boundary_sparsity_pattern (dof, - dof_to_boundary_mapping, - sparsity_1); + dof_to_boundary_mapping, + sparsity_1); sparsity_1.compress (); - // second way: via a CompressedSparsityPattern + // second way: via a CompressedSparsityPattern SparsityPattern sparsity_2; CompressedSparsityPattern csp(dof.n_boundary_dofs()); DoFTools::make_boundary_sparsity_pattern (dof, - dof_to_boundary_mapping, - csp); + dof_to_boundary_mapping, + csp); sparsity_2.copy_from (csp); - // the exact content of sparsity - // patterns is checked in other - // tests, so only make sure that - // sparsity_[12] are equal + // the exact content of sparsity + // patterns is checked in other + // tests, so only make sure that + // sparsity_[12] are equal deallog << "Check boundary" - << " -- " - << (sparsity_1 == sparsity_2 ? "ok" : "failed") - << std::endl; + << " -- " + << (sparsity_1 == sparsity_2 ? "ok" : "failed") + << std::endl; } @@ -100,7 +100,7 @@ template void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -113,10 +113,10 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); @@ -124,23 +124,23 @@ check () DoFTools::make_hanging_node_constraints (dof, constraints); constraints.close (); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern std::vector > mask (2, std::vector(2, false)); mask[0][0] = mask[1][1] = true; - + //--------------- Regular sparsity pattern checks ----------------- - - // first way: directly + + // first way: directly SparsityPattern sparsity_1 (dof.n_dofs(), dof.n_dofs()); DoFTools::make_sparsity_pattern (dof, mask, sparsity_1); constraints.condense (sparsity_1); sparsity_1.compress (); - // second way: via - // CompressedSparsityPattern + // second way: via + // CompressedSparsityPattern SparsityPattern sparsity_2; CompressedSparsityPattern csp_2 (dof.n_dofs()); DoFTools::make_sparsity_pattern (dof, mask, csp_2); @@ -148,17 +148,17 @@ check () sparsity_2.copy_from (csp_2); - // the exact content of sparsity - // patterns is checked in other - // tests, so only make sure that - // sparsity_[12] are equal + // the exact content of sparsity + // patterns is checked in other + // tests, so only make sure that + // sparsity_[12] are equal deallog << "Check 1:" - << " -- " - << (sparsity_1 == sparsity_2 ? "ok" : "failed") - << std::endl; + << " -- " + << (sparsity_1 == sparsity_2 ? "ok" : "failed") + << std::endl; + - //--------------- Block sparsity pattern checks ----------------- const unsigned int n = dof.n_dofs(); @@ -191,15 +191,15 @@ check () sparsity_4.copy_from (csp_4); deallog << "Check 2:" - << " -- " - << (sparsity_3 == sparsity_4 ? "ok" : "failed") - << std::endl; + << " -- " + << (sparsity_3 == sparsity_4 ? "ok" : "failed") + << std::endl; + - //--------------- Sparsity pattern checks for // boundary sparsity generators ----------------- - // check boundary matrices + // check boundary matrices check_boundary (dof); } @@ -209,7 +209,7 @@ int main () { std::ofstream logfile ("sparsity_pattern_01/output"); deallog << std::setprecision (2); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console (0); diff --git a/tests/deal.II/sparsity_pattern_01_x.cc b/tests/deal.II/sparsity_pattern_01_x.cc index 2624a3025e..0a4f66ae0a 100644 --- a/tests/deal.II/sparsity_pattern_01_x.cc +++ b/tests/deal.II/sparsity_pattern_01_x.cc @@ -42,19 +42,19 @@ bool operator == (const BlockSparsityPattern &sp1, - const BlockSparsityPattern &sp2) + const BlockSparsityPattern &sp2) { if (sp1.n_block_rows() != sp2.n_block_rows()) return false; - + if (sp1.n_block_cols() != sp2.n_block_cols()) return false; - + for (unsigned int i=0; i &dof) { std::vector dof_to_boundary_mapping; DoFTools::map_dof_to_boundary_indices (dof, - dof_to_boundary_mapping); + dof_to_boundary_mapping); - // first way: direct generation + // first way: direct generation SparsityPattern sparsity_1(dof.n_boundary_dofs(), - dof.max_couplings_between_boundary_dofs()); + dof.max_couplings_between_boundary_dofs()); DoFTools::make_boundary_sparsity_pattern (dof, - dof_to_boundary_mapping, - sparsity_1); + dof_to_boundary_mapping, + sparsity_1); sparsity_1.compress (); - // second way: via a CompressedSetSparsityPattern + // second way: via a CompressedSetSparsityPattern SparsityPattern sparsity_2; CompressedSetSparsityPattern csp(dof.n_boundary_dofs()); DoFTools::make_boundary_sparsity_pattern (dof, - dof_to_boundary_mapping, - csp); + dof_to_boundary_mapping, + csp); sparsity_2.copy_from (csp); - // the exact content of sparsity - // patterns is checked in other - // tests, so only make sure that - // sparsity_[12] are equal + // the exact content of sparsity + // patterns is checked in other + // tests, so only make sure that + // sparsity_[12] are equal deallog << "Check boundary" - << " -- " - << (sparsity_1 == sparsity_2 ? "ok" : "failed") - << std::endl; + << " -- " + << (sparsity_1 == sparsity_2 ? "ok" : "failed") + << std::endl; } @@ -101,7 +101,7 @@ template void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -114,10 +114,10 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); @@ -125,23 +125,23 @@ check () DoFTools::make_hanging_node_constraints (dof, constraints); constraints.close (); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern std::vector > mask (2, std::vector(2, false)); mask[0][0] = mask[1][1] = true; - + //--------------- Regular sparsity pattern checks ----------------- - - // first way: directly + + // first way: directly SparsityPattern sparsity_1 (dof.n_dofs(), dof.n_dofs()); DoFTools::make_sparsity_pattern (dof, mask, sparsity_1); constraints.condense (sparsity_1); sparsity_1.compress (); - // second way: via - // CompressedSetSparsityPattern + // second way: via + // CompressedSetSparsityPattern SparsityPattern sparsity_2; CompressedSetSparsityPattern csp_2 (dof.n_dofs()); DoFTools::make_sparsity_pattern (dof, mask, csp_2); @@ -149,17 +149,17 @@ check () sparsity_2.copy_from (csp_2); - // the exact content of sparsity - // patterns is checked in other - // tests, so only make sure that - // sparsity_[12] are equal + // the exact content of sparsity + // patterns is checked in other + // tests, so only make sure that + // sparsity_[12] are equal deallog << "Check 1:" - << " -- " - << (sparsity_1 == sparsity_2 ? "ok" : "failed") - << std::endl; + << " -- " + << (sparsity_1 == sparsity_2 ? "ok" : "failed") + << std::endl; + - //--------------- Block sparsity pattern checks ----------------- const unsigned int n = dof.n_dofs(); @@ -192,15 +192,15 @@ check () sparsity_4.copy_from (csp_4); deallog << "Check 2:" - << " -- " - << (sparsity_3 == sparsity_4 ? "ok" : "failed") - << std::endl; + << " -- " + << (sparsity_3 == sparsity_4 ? "ok" : "failed") + << std::endl; + - //--------------- Sparsity pattern checks for // boundary sparsity generators ----------------- - // check boundary matrices + // check boundary matrices check_boundary (dof); } @@ -210,7 +210,7 @@ int main () { std::ofstream logfile ("sparsity_pattern_01_x/output"); deallog << std::setprecision (2); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console (0); diff --git a/tests/deal.II/sparsity_pattern_02.cc b/tests/deal.II/sparsity_pattern_02.cc index cc9b9be1d9..afcec5d821 100644 --- a/tests/deal.II/sparsity_pattern_02.cc +++ b/tests/deal.II/sparsity_pattern_02.cc @@ -45,8 +45,8 @@ template void check () { - // create two different triangulations - Triangulation triangulation_1; + // create two different triangulations + Triangulation triangulation_1; if (dim==2) GridGenerator::hyper_ball(triangulation_1, Point(), 1); else @@ -60,7 +60,7 @@ check () triangulation_1.refine_global(2); - Triangulation triangulation_2; + Triangulation triangulation_2; if (dim==2) GridGenerator::hyper_ball(triangulation_2, Point(), 1); else @@ -74,18 +74,18 @@ check () triangulation_2.refine_global(2); - - // create a system element composed - // of one Q1 and one Q2 element + + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof_1(triangulation_1); DoFHandler dof_2(triangulation_2); dof_1.distribute_dofs(element); dof_2.distribute_dofs(element); SparsityPattern sparsity (dof_1.n_dofs(), dof_2.n_dofs(), - std::max(dof_1.n_dofs(), dof_2.n_dofs())); + std::max(dof_1.n_dofs(), dof_2.n_dofs())); DoFTools::make_sparsity_pattern (dof_1, dof_2, sparsity); sparsity.compress (); @@ -98,7 +98,7 @@ int main () { std::ofstream logfile ("sparsity_pattern_02/output"); deallog << std::setprecision (2); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console (0); diff --git a/tests/deal.II/sparsity_pattern_03.cc b/tests/deal.II/sparsity_pattern_03.cc index 55d50c2c7c..0b8b2cec0b 100644 --- a/tests/deal.II/sparsity_pattern_03.cc +++ b/tests/deal.II/sparsity_pattern_03.cc @@ -48,8 +48,8 @@ template void check () { - // create two different triangulations - Triangulation triangulation_1; + // create two different triangulations + Triangulation triangulation_1; if (dim==2) GridGenerator::hyper_ball(triangulation_1, Point(), 1); else @@ -63,7 +63,7 @@ check () triangulation_1.refine_global(2); - Triangulation triangulation_2; + Triangulation triangulation_2; if (dim==2) GridGenerator::hyper_ball(triangulation_2, Point(), 1); else @@ -77,18 +77,18 @@ check () triangulation_2.refine_global(2); - + FESystem element_1(FE_Q(1), 2, - FE_Q(2), 1); + FE_Q(2), 1); FESystem element_2(FE_Q(3), 1, - FE_DGQ(0), 2); + FE_DGQ(0), 2); DoFHandler dof_1(triangulation_1); DoFHandler dof_2(triangulation_2); dof_1.distribute_dofs(element_1); dof_2.distribute_dofs(element_2); SparsityPattern sparsity (dof_1.n_dofs(), dof_2.n_dofs(), - std::max(dof_1.n_dofs(), dof_2.n_dofs())); + std::max(dof_1.n_dofs(), dof_2.n_dofs())); DoFTools::make_sparsity_pattern (dof_1, dof_2, sparsity); sparsity.compress (); @@ -101,7 +101,7 @@ int main () { std::ofstream logfile ("sparsity_pattern_03/output"); deallog << std::setprecision (2); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console (0); diff --git a/tests/deal.II/sparsity_pattern_04.cc b/tests/deal.II/sparsity_pattern_04.cc index c18c63a66d..a5e45f265a 100644 --- a/tests/deal.II/sparsity_pattern_04.cc +++ b/tests/deal.II/sparsity_pattern_04.cc @@ -49,8 +49,8 @@ template void check () { - // create two different triangulations - Triangulation triangulation_1; + // create two different triangulations + Triangulation triangulation_1; if (dim==2) GridGenerator::hyper_ball(triangulation_1, Point(), 1); else @@ -64,7 +64,7 @@ check () triangulation_1.refine_global(2); - Triangulation triangulation_2; + Triangulation triangulation_2; if (dim==2) GridGenerator::hyper_ball(triangulation_2, Point(), 1); else @@ -79,18 +79,18 @@ check () triangulation_2.refine_global(1); - + FESystem element_1(FE_Q(1), 2, - FE_Q(2), 1); + FE_Q(2), 1); FESystem element_2(FE_Q(3), 1, - FE_DGQ(0), 2); + FE_DGQ(0), 2); DoFHandler dof_1(triangulation_1); DoFHandler dof_2(triangulation_2); dof_1.distribute_dofs(element_1); dof_2.distribute_dofs(element_2); SparsityPattern sparsity (dof_1.n_dofs(), dof_2.n_dofs(), - std::max(dof_1.n_dofs(), dof_2.n_dofs())); + std::max(dof_1.n_dofs(), dof_2.n_dofs())); DoFTools::make_sparsity_pattern (dof_1, dof_2, sparsity); sparsity.compress (); @@ -103,7 +103,7 @@ int main () { std::ofstream logfile ("sparsity_pattern_04/output"); deallog << std::setprecision (2); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console (0); diff --git a/tests/deal.II/sparsity_pattern_05.cc b/tests/deal.II/sparsity_pattern_05.cc index 4104e88e5e..af6b6cf0af 100644 --- a/tests/deal.II/sparsity_pattern_05.cc +++ b/tests/deal.II/sparsity_pattern_05.cc @@ -41,22 +41,22 @@ bool operator == (const BlockSparsityPattern &sp1, - const BlockSparsityPattern &sp2) + const BlockSparsityPattern &sp2) { if (sp1.n_block_rows() != sp2.n_block_rows()) return false; - + if (sp1.n_block_cols() != sp2.n_block_cols()) return false; - + for (unsigned int i=0; i void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -80,10 +80,10 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); @@ -93,32 +93,32 @@ check () //--------------- Regular sparsity pattern checks ----------------- - - // first way: directly + + // first way: directly SparsityPattern sparsity_1 (dof.n_dofs(), dof.n_dofs()); DoFTools::make_sparsity_pattern (dof, sparsity_1); constraints.condense (sparsity_1); sparsity_1.compress (); - // second way: via direct elimination of - // constraints + // second way: via direct elimination of + // constraints SparsityPattern sparsity_2; CompressedSparsityPattern csp_2 (dof.n_dofs()); DoFTools::make_sparsity_pattern (dof, csp_2, constraints); sparsity_2.copy_from (csp_2); - // the exact content of sparsity - // patterns is checked in other - // tests, so only make sure that - // sparsity_[12] are equal + // the exact content of sparsity + // patterns is checked in other + // tests, so only make sure that + // sparsity_[12] are equal deallog << "Check 1:" - << " -- " - << (sparsity_1 == sparsity_2 ? "ok" : "failed") - << std::endl; + << " -- " + << (sparsity_1 == sparsity_2 ? "ok" : "failed") + << std::endl; + - //--------------- Block sparsity pattern checks ----------------- const unsigned int n = dof.n_dofs(); @@ -150,9 +150,9 @@ check () sparsity_4.copy_from (csp_4); deallog << "Check 2:" - << " -- " - << (sparsity_3 == sparsity_4 ? "ok" : "failed") - << std::endl; + << " -- " + << (sparsity_3 == sparsity_4 ? "ok" : "failed") + << std::endl; } @@ -161,7 +161,7 @@ int main () { std::ofstream logfile ("sparsity_pattern_05/output"); deallog << std::setprecision (2); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console (0); diff --git a/tests/deal.II/sparsity_pattern_05_x.cc b/tests/deal.II/sparsity_pattern_05_x.cc index e6d1687ce4..eec60a8a6a 100644 --- a/tests/deal.II/sparsity_pattern_05_x.cc +++ b/tests/deal.II/sparsity_pattern_05_x.cc @@ -41,22 +41,22 @@ bool operator == (const BlockSparsityPattern &sp1, - const BlockSparsityPattern &sp2) + const BlockSparsityPattern &sp2) { if (sp1.n_block_rows() != sp2.n_block_rows()) return false; - + if (sp1.n_block_cols() != sp2.n_block_cols()) return false; - + for (unsigned int i=0; i void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -80,10 +80,10 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); @@ -93,32 +93,32 @@ check () //--------------- Regular sparsity pattern checks ----------------- - - // first way: directly + + // first way: directly SparsityPattern sparsity_1 (dof.n_dofs(), dof.n_dofs()); DoFTools::make_sparsity_pattern (dof, sparsity_1); constraints.condense (sparsity_1); sparsity_1.compress (); - // second way: via direct elimination of - // constraints + // second way: via direct elimination of + // constraints SparsityPattern sparsity_2; CompressedSetSparsityPattern csp_2 (dof.n_dofs()); DoFTools::make_sparsity_pattern (dof, csp_2, constraints); sparsity_2.copy_from (csp_2); - // the exact content of sparsity - // patterns is checked in other - // tests, so only make sure that - // sparsity_[12] are equal + // the exact content of sparsity + // patterns is checked in other + // tests, so only make sure that + // sparsity_[12] are equal deallog << "Check 1:" - << " -- " - << (sparsity_1 == sparsity_2 ? "ok" : "failed") - << std::endl; + << " -- " + << (sparsity_1 == sparsity_2 ? "ok" : "failed") + << std::endl; + - //--------------- Block sparsity pattern checks ----------------- const unsigned int n = dof.n_dofs(); @@ -150,9 +150,9 @@ check () sparsity_4.copy_from (csp_4); deallog << "Check 2:" - << " -- " - << (sparsity_3 == sparsity_4 ? "ok" : "failed") - << std::endl; + << " -- " + << (sparsity_3 == sparsity_4 ? "ok" : "failed") + << std::endl; } @@ -161,7 +161,7 @@ int main () { std::ofstream logfile ("sparsity_pattern_05_x/output"); deallog << std::setprecision (2); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console (0); diff --git a/tests/deal.II/sparsity_pattern_x.cc b/tests/deal.II/sparsity_pattern_x.cc index 5056349fc0..c0cbd64fbe 100644 --- a/tests/deal.II/sparsity_pattern_x.cc +++ b/tests/deal.II/sparsity_pattern_x.cc @@ -42,19 +42,19 @@ bool operator == (const BlockSparsityPattern &sp1, - const BlockSparsityPattern &sp2) + const BlockSparsityPattern &sp2) { if (sp1.n_block_rows() != sp2.n_block_rows()) return false; - + if (sp1.n_block_cols() != sp2.n_block_cols()) return false; - + for (unsigned int i=0; i &dof) { std::vector dof_to_boundary_mapping; DoFTools::map_dof_to_boundary_indices (dof, - dof_to_boundary_mapping); + dof_to_boundary_mapping); - // first way: direct generation + // first way: direct generation SparsityPattern sparsity_1(dof.n_boundary_dofs(), - dof.max_couplings_between_boundary_dofs()); + dof.max_couplings_between_boundary_dofs()); DoFTools::make_boundary_sparsity_pattern (dof, - dof_to_boundary_mapping, - sparsity_1); + dof_to_boundary_mapping, + sparsity_1); sparsity_1.compress (); - // second way: via a CompressedSetSparsityPattern + // second way: via a CompressedSetSparsityPattern SparsityPattern sparsity_2; CompressedSetSparsityPattern csp(dof.n_boundary_dofs()); DoFTools::make_boundary_sparsity_pattern (dof, - dof_to_boundary_mapping, - csp); + dof_to_boundary_mapping, + csp); sparsity_2.copy_from (csp); - // the exact content of sparsity - // patterns is checked in other - // tests, so only make sure that - // sparsity_[12] are equal + // the exact content of sparsity + // patterns is checked in other + // tests, so only make sure that + // sparsity_[12] are equal deallog << "Check boundary" - << " -- " - << (sparsity_1 == sparsity_2 ? "ok" : "failed") - << std::endl; + << " -- " + << (sparsity_1 == sparsity_2 ? "ok" : "failed") + << std::endl; } @@ -101,7 +101,7 @@ template void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -114,10 +114,10 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); @@ -125,23 +125,23 @@ check () DoFTools::make_hanging_node_constraints (dof, constraints); constraints.close (); - // create sparsity pattern. note - // that different components should - // not couple, so use pattern + // create sparsity pattern. note + // that different components should + // not couple, so use pattern std::vector > mask (2, std::vector(2, false)); mask[0][0] = mask[1][1] = true; - + //--------------- Regular sparsity pattern checks ----------------- - - // first way: directly + + // first way: directly SparsityPattern sparsity_1 (dof.n_dofs(), dof.n_dofs()); DoFTools::make_sparsity_pattern (dof, mask, sparsity_1); constraints.condense (sparsity_1); sparsity_1.compress (); - // second way: via - // CompressedSetSparsityPattern + // second way: via + // CompressedSetSparsityPattern SparsityPattern sparsity_2; CompressedSetSparsityPattern csp_2 (dof.n_dofs()); DoFTools::make_sparsity_pattern (dof, mask, csp_2); @@ -149,17 +149,17 @@ check () sparsity_2.copy_from (csp_2); - // the exact content of sparsity - // patterns is checked in other - // tests, so only make sure that - // sparsity_[12] are equal + // the exact content of sparsity + // patterns is checked in other + // tests, so only make sure that + // sparsity_[12] are equal deallog << "Check 1:" - << " -- " - << (sparsity_1 == sparsity_2 ? "ok" : "failed") - << std::endl; + << " -- " + << (sparsity_1 == sparsity_2 ? "ok" : "failed") + << std::endl; + - //--------------- Block sparsity pattern checks ----------------- const unsigned int n = dof.n_dofs(); @@ -192,15 +192,15 @@ check () sparsity_4.copy_from (csp_4); deallog << "Check 2:" - << " -- " - << (sparsity_3 == sparsity_4 ? "ok" : "failed") - << std::endl; + << " -- " + << (sparsity_3 == sparsity_4 ? "ok" : "failed") + << std::endl; + - //--------------- Sparsity pattern checks for // boundary sparsity generators ----------------- - // check boundary matrices + // check boundary matrices check_boundary (dof); } @@ -210,7 +210,7 @@ int main () { std::ofstream logfile ("sparsity_pattern_x/output"); deallog << std::setprecision (2); - deallog << std::fixed; + deallog << std::fixed; deallog.attach(logfile); deallog.depth_console (0); diff --git a/tests/deal.II/subcelldata.cc b/tests/deal.II/subcelldata.cc index 580c78ce47..07ba176f28 100644 --- a/tests/deal.II/subcelldata.cc +++ b/tests/deal.II/subcelldata.cc @@ -26,11 +26,12 @@ static unsigned subcells[6][4] = {{0, 1, 2, 3}, - {4, 5, 6, 7}, - {0, 1, 5, 4}, - {1, 5, 6, 2}, - {3, 2, 6, 7}, - {0, 4, 7, 3}}; + {4, 5, 6, 7}, + {0, 1, 5, 4}, + {1, 5, 6, 2}, + {3, 2, 6, 7}, + {0, 4, 7, 3} +}; @@ -38,7 +39,7 @@ template void test() { Assert(dim==2 || dim==3, ExcNotImplemented()); - + std::vector > vertices (GeometryInfo::vertices_per_cell); vertices[0](0)=0; vertices[0](1)=0; @@ -50,24 +51,24 @@ void test() vertices[3](1)=1; if (dim==3) { - // for the new numbering + // for the new numbering // for (unsigned int i=0; i<4; ++i) -// { -// vertices[i+4]=vertices[i]; -// vertices[i+4](2)=1; -// } - // for the old numbering +// { +// vertices[i+4]=vertices[i]; +// vertices[i+4](2)=1; +// } + // for the old numbering for (unsigned int i=0; i<4; ++i) - { - std::swap(vertices[i](1),vertices[i](2)); - vertices[i+4]=vertices[i]; - vertices[i+4](1)=1; - } - + { + std::swap(vertices[i](1),vertices[i](2)); + vertices[i+4]=vertices[i]; + vertices[i+4](1)=1; + } + } std::vector > cells (1); - for (unsigned int i=0;i::vertices_per_cell;++i) + for (unsigned int i=0; i::vertices_per_cell; ++i) cells[0].vertices[i] = i; cells[0].material_id = 0; @@ -75,22 +76,22 @@ void test() if (dim==2) { subcelldata.boundary_lines.resize(GeometryInfo::faces_per_cell); - for(unsigned int i=0; i::faces_per_cell; ++i) - { - subcelldata.boundary_lines[i].vertices[0]=i; - subcelldata.boundary_lines[i].vertices[1]=(i+1)%4; - subcelldata.boundary_lines[i].material_id=10*i+1; - } + for (unsigned int i=0; i::faces_per_cell; ++i) + { + subcelldata.boundary_lines[i].vertices[0]=i; + subcelldata.boundary_lines[i].vertices[1]=(i+1)%4; + subcelldata.boundary_lines[i].material_id=10*i+1; + } } else if (dim==3) { subcelldata.boundary_quads.resize(GeometryInfo::faces_per_cell); - for(unsigned int f=0; f::faces_per_cell; ++f) - { - for(unsigned int i=0; i::vertices_per_face; ++i) - subcelldata.boundary_quads[f].vertices[i]=subcells[f][i]; - subcelldata.boundary_quads[f].material_id=10*f+1; - } + for (unsigned int f=0; f::faces_per_cell; ++f) + { + for (unsigned int i=0; i::vertices_per_face; ++i) + subcelldata.boundary_quads[f].vertices[i]=subcells[f][i]; + subcelldata.boundary_quads[f].material_id=10*f+1; + } } Triangulation tria; @@ -113,9 +114,9 @@ int main () std::ofstream logfile("subcelldata/output"); deallog.attach(logfile); deallog.depth_console(0); - + test<2>(); test<3>(); - + return 0; } diff --git a/tests/deal.II/subdomain_ids.cc b/tests/deal.II/subdomain_ids.cc index 1e0bd67b60..ffab29f8a4 100644 --- a/tests/deal.II/subdomain_ids.cc +++ b/tests/deal.II/subdomain_ids.cc @@ -38,9 +38,9 @@ std::ofstream logfile("subdomain_ids/output"); DeclException2 (ExcNumberMismatch, - int, int, - << "The numbers " << arg1 << " and " << arg2 - << " should be equal, but are not."); + int, int, + << "The numbers " << arg1 << " and " << arg2 + << " should be equal, but are not."); template @@ -50,28 +50,28 @@ void test () GridGenerator::hyper_cube(tria, -1, 1); tria.refine_global (2); - // we now have a number of cells, - // flag them with some subdomain - // ids based on their position, in - // particular we take the quadrant - // (octant) + // we now have a number of cells, + // flag them with some subdomain + // ids based on their position, in + // particular we take the quadrant + // (octant) typename Triangulation::active_cell_iterator - cell = tria.begin_active (), - endc = tria.end (); + cell = tria.begin_active (), + endc = tria.end (); for (; cell!=endc; ++cell) { unsigned int subdomain = 0; for (unsigned int d=0; dcenter()(d) > 0) - subdomain |= (1<center()(d) > 0) + subdomain |= (1<set_subdomain_id (subdomain); }; - // refine twice (for 3d only once) - // and count again the numbers of - // cells in each subdomain + // refine twice (for 3d only once) + // and count again the numbers of + // cells in each subdomain tria.refine_global ((dim != 3) ? 2 : 1); if (true) { @@ -79,45 +79,45 @@ void test () endc = tria.end(); std::vector subdomain_cells(1<subdomain_id() < (1<subdomain_id()]; - }; + { + Assert (cell->subdomain_id() < (1<subdomain_id()]; + }; for (unsigned int i=0; i<(1<set_coarsen_flag (); + cell->set_coarsen_flag (); tria.execute_coarsening_and_refinement (); - + cell = tria.begin_active(); endc = tria.end(); std::vector subdomain_cells(1<subdomain_id() < (1<subdomain_id()]; - }; + { + Assert (cell->subdomain_id() < (1<subdomain_id()]; + }; for (unsigned int i=0; i<(1< fe(2); @@ -125,28 +125,28 @@ void test () dof_handler.distribute_dofs (fe); std::vector selected_dofs (dof_handler.n_dofs()); for (unsigned int subdomain=0; subdomain<(1<(std::count (selected_dofs.begin(), - selected_dofs.end(), - true)) - == - dof_handler.n_dofs() / (1<(std::count (selected_dofs.begin(), + selected_dofs.end(), + true)) + == + dof_handler.n_dofs() / (1< fe(1); @@ -154,25 +154,25 @@ void test () dof_handler.distribute_dofs (fe); const unsigned int cells_per_direction - = static_cast(rint(std::pow(tria.n_active_cells(), 1./dim))); - + = static_cast(rint(std::pow(tria.n_active_cells(), 1./dim))); + std::vector selected_dofs (dof_handler.n_dofs()); for (unsigned int subdomain=0; subdomain<(1<(std::count (selected_dofs.begin(), - selected_dofs.end(), - true)) - == - std::pow(static_cast(cells_per_direction/2+1),dim), - ExcNumberMismatch(std::count (selected_dofs.begin(), - selected_dofs.end(), - true), - static_cast(std::pow(static_cast( - cells_per_direction/2+1),dim)))); - } - deallog << "Check 4 (dim=" << dim << ") ok" << std::endl; + { + DoFTools::extract_subdomain_dofs (dof_handler, subdomain, + selected_dofs); + Assert (static_cast(std::count (selected_dofs.begin(), + selected_dofs.end(), + true)) + == + std::pow(static_cast(cells_per_direction/2+1),dim), + ExcNumberMismatch(std::count (selected_dofs.begin(), + selected_dofs.end(), + true), + static_cast(std::pow(static_cast( + cells_per_direction/2+1),dim)))); + } + deallog << "Check 4 (dim=" << dim << ") ok" << std::endl; }; } @@ -187,6 +187,6 @@ int main () test<1> (); test<2> (); test<3> (); - + return 0; } diff --git a/tests/deal.II/subdomain_on_refinement.cc b/tests/deal.II/subdomain_on_refinement.cc index cfb3c8df62..9b680100e0 100644 --- a/tests/deal.II/subdomain_on_refinement.cc +++ b/tests/deal.II/subdomain_on_refinement.cc @@ -38,9 +38,9 @@ std::ofstream logfile("subdomain_on_refinement/output"); DeclException2 (ExcNumberMismatch, - int, int, - << "The numbers " << arg1 << " and " << arg2 - << " should be equal, but are not."); + int, int, + << "The numbers " << arg1 << " and " << arg2 + << " should be equal, but are not."); template @@ -51,11 +51,11 @@ void test () tria.begin_active()->set_subdomain_id (42); tria.refine_global (2); typename Triangulation::active_cell_iterator - cell = tria.begin_active (), - endc = tria.end (); + cell = tria.begin_active (), + endc = tria.end (); for (; cell!=endc; ++cell) Assert (cell->subdomain_id() == 42, - ExcInternalError()); + ExcInternalError()); deallog << "OK" << std::endl; } @@ -70,6 +70,6 @@ int main () test<1> (); test<2> (); test<3> (); - + return 0; } diff --git a/tests/deal.II/time_dependent_01.cc b/tests/deal.II/time_dependent_01.cc index bf1c6fe468..e2feb65594 100644 --- a/tests/deal.II/time_dependent_01.cc +++ b/tests/deal.II/time_dependent_01.cc @@ -37,17 +37,17 @@ class TimeStep : public TimeStepBase { public: TimeStep (const unsigned int time_step_number) - : - TimeStepBase(0), - time_step_number (time_step_number) - {} + : + TimeStepBase(0), + time_step_number (time_step_number) + {} virtual void end_sweep () - { - static Threads::Mutex mutex; - Threads::Mutex::ScopedLock lock(mutex); - end_sweep_flags[time_step_number] = true; - } + { + static Threads::Mutex mutex; + Threads::Mutex::ScopedLock lock(mutex); + end_sweep_flags[time_step_number] = true; + } virtual void solve_primal_problem () {} @@ -60,8 +60,8 @@ void test () { // create time steps, more than there are likely threads on current machines TimeDependent td (TimeDependent::TimeSteppingData(0,0), - TimeDependent::TimeSteppingData(0,0), - TimeDependent::TimeSteppingData(0,0)); + TimeDependent::TimeSteppingData(0,0), + TimeDependent::TimeSteppingData(0,0)); const unsigned int n_time_steps = 10000; for (unsigned int i=0; i (n_time_steps, true), - ExcInternalError()); + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/deal.II/union_triangulation.cc b/tests/deal.II/union_triangulation.cc index 0ea1f4f8d9..ad0a7b1e0e 100644 --- a/tests/deal.II/union_triangulation.cc +++ b/tests/deal.II/union_triangulation.cc @@ -43,20 +43,20 @@ void test () GridGenerator::hyper_cube(tria_1); GridGenerator::hyper_cube(tria_2); - // fill tria_3 with something, to - // make sure that the function we - // call later can deal with prior - // content + // fill tria_3 with something, to + // make sure that the function we + // call later can deal with prior + // content GridGenerator::hyper_cube(tria_3); - // refine once, then refine first - // cell + // refine once, then refine first + // cell tria_1.refine_global (1); tria_1.begin_active()->set_refine_flag(); tria_1.execute_coarsening_and_refinement (); - // similar for second grid, but - // different cell + // similar for second grid, but + // different cell tria_2.refine_global (1); (++tria_2.begin_active())->set_refine_flag(); tria_2.execute_coarsening_and_refinement (); @@ -66,7 +66,7 @@ void test () GridOut().write_gnuplot (tria_3, logfile); deallog << " Total number of cells = " << tria_3.n_cells() << std::endl - << " Total number of active cells = " << tria_3.n_active_cells() << std::endl; + << " Total number of active cells = " << tria_3.n_active_cells() << std::endl; } @@ -77,10 +77,10 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + test<1> (); test<2> (); test<3> (); - + return 0; } diff --git a/tests/deal.II/user_data_01.cc b/tests/deal.II/user_data_01.cc index d7f1eab8dd..614d841a30 100644 --- a/tests/deal.II/user_data_01.cc +++ b/tests/deal.II/user_data_01.cc @@ -37,47 +37,47 @@ */ template void -check_user_pointers(Triangulation& tr) +check_user_pointers(Triangulation &tr) { - // Check if values are the same as below - Triangulation* p = &tr; + // Check if values are the same as below + Triangulation *p = &tr; for (typename Triangulation::cell_iterator it = tr.begin(); - it != tr.end();++it) + it != tr.end(); ++it) { deallog << '.'; if (it->user_pointer() != p++) - deallog << "Error" << std::endl; + deallog << "Error" << std::endl; } deallog << "cells" << std::endl; - // now for faces and lines. since - // we visit them multiple times, - // check only the first time around + // now for faces and lines. since + // we visit them multiple times, + // check only the first time around tr.clear_user_flags (); if (dim > 1) for (typename Triangulation::cell_iterator it = tr.begin(); - it != tr.end();++it) + it != tr.end(); ++it) for (unsigned int f=0; f::faces_per_cell; ++f) - if (it->face(f)->user_flag_set() == false) - { - deallog << '.'; - if (it->face(f)->user_pointer() != p++) - deallog << "Error" << std::endl; - it->face(f)->set_user_flag(); - } + if (it->face(f)->user_flag_set() == false) + { + deallog << '.'; + if (it->face(f)->user_pointer() != p++) + deallog << "Error" << std::endl; + it->face(f)->set_user_flag(); + } deallog << "faces" << std::endl; if (dim > 2) for (typename Triangulation::cell_iterator it = tr.begin(); - it != tr.end();++it) + it != tr.end(); ++it) for (unsigned int l=0; l::lines_per_cell; ++l) - if (it->line(l)->user_flag_set() == false) - { - deallog << '.'; - if (it->line(l)->user_pointer() != p++) - deallog << "Error" << std::endl; - it->line(l)->set_user_flag(); - } + if (it->line(l)->user_flag_set() == false) + { + deallog << '.'; + if (it->line(l)->user_pointer() != p++) + deallog << "Error" << std::endl; + it->line(l)->set_user_flag(); + } deallog << "lines" << std::endl; } @@ -86,92 +86,92 @@ check_user_pointers(Triangulation& tr) */ template void -check_user_indices(Triangulation& tr) +check_user_indices(Triangulation &tr) { - // Check if values are the same as below + // Check if values are the same as below unsigned int p=1; for (typename Triangulation::cell_iterator it = tr.begin(); - it != tr.end();++it) + it != tr.end(); ++it) { deallog << '.'; if (it->user_index() != p++) - deallog << "Error" << std::endl; + deallog << "Error" << std::endl; } deallog << "cells" << std::endl; - // now for faces and lines. since - // we visit them multiple times, - // check only the first time around + // now for faces and lines. since + // we visit them multiple times, + // check only the first time around tr.clear_user_flags (); if (dim > 1) for (typename Triangulation::cell_iterator it = tr.begin(); - it != tr.end();++it) + it != tr.end(); ++it) for (unsigned int f=0; f::faces_per_cell; ++f) - if (it->face(f)->user_flag_set() == false) - { - deallog << '.'; - if (it->face(f)->user_index() != p++) - deallog << "Error" << std::endl; - it->face(f)->set_user_flag(); - } + if (it->face(f)->user_flag_set() == false) + { + deallog << '.'; + if (it->face(f)->user_index() != p++) + deallog << "Error" << std::endl; + it->face(f)->set_user_flag(); + } deallog << "faces" << std::endl; if (dim > 2) for (typename Triangulation::cell_iterator it = tr.begin(); - it != tr.end();++it) + it != tr.end(); ++it) for (unsigned int l=0; l::lines_per_cell; ++l) - if (it->line(l)->user_flag_set() == false) - { - deallog << '.'; - if (it->line(l)->user_index() != p++) - deallog << "Error" << std::endl; - it->line(l)->set_user_flag(); - } + if (it->line(l)->user_flag_set() == false) + { + deallog << '.'; + if (it->line(l)->user_index() != p++) + deallog << "Error" << std::endl; + it->line(l)->set_user_flag(); + } deallog << "lines" << std::endl; } template void -user_pointers(Triangulation& tr) +user_pointers(Triangulation &tr) { deallog << "Pointers" << dim << 'D' << std::endl; - // Fill user pointers with some - // nonsense. clear them first - Triangulation* p = &tr; + // Fill user pointers with some + // nonsense. clear them first + Triangulation *p = &tr; tr.clear_user_pointers(); for (typename Triangulation::cell_iterator it = tr.begin(); - it != tr.end();++it) + it != tr.end(); ++it) it->set_user_pointer(p++); - // we hit faces and lines more than - // once, possibly. only set them - // the first time around + // we hit faces and lines more than + // once, possibly. only set them + // the first time around tr.clear_user_flags (); if (dim > 1) for (typename Triangulation::cell_iterator it = tr.begin(); - it != tr.end();++it) + it != tr.end(); ++it) for (unsigned int f=0; f::faces_per_cell; ++f) - if (it->face(f)->user_flag_set() == false) - { - it->face(f)->set_user_pointer(p++); - it->face(f)->set_user_flag(); - } + if (it->face(f)->user_flag_set() == false) + { + it->face(f)->set_user_pointer(p++); + it->face(f)->set_user_flag(); + } if (dim > 2) for (typename Triangulation::cell_iterator it = tr.begin(); - it != tr.end();++it) + it != tr.end(); ++it) for (unsigned int l=0; l::lines_per_cell; ++l) - if (it->line(l)->user_flag_set() == false) - { - it->line(l)->set_user_pointer(p++); - it->line(l)->set_user_flag(); - } + if (it->line(l)->user_flag_set() == false) + { + it->line(l)->set_user_pointer(p++); + it->line(l)->set_user_flag(); + } - // Check if they are still the same + // Check if they are still the same check_user_pointers(tr); - // Create two pointer index clashes here + // Create two pointer index clashes here try { tr.begin()->user_index(); @@ -182,8 +182,8 @@ user_pointers(Triangulation& tr) tr.begin()->user_pointer(); - // Check if save and load work - std::vector cell_pointers(tr.n_cells()); + // Check if save and load work + std::vector cell_pointers(tr.n_cells()); deallog << "Save" << dim << 'D' << std::endl; tr.save_user_pointers(cell_pointers); tr.clear_user_data(); @@ -195,60 +195,60 @@ user_pointers(Triangulation& tr) template void -user_indices(Triangulation& tr) +user_indices(Triangulation &tr) { deallog << "Indices" << dim << 'D' << std::endl; - // Fill user indices with some - // nonsense. clear them first + // Fill user indices with some + // nonsense. clear them first for (typename Triangulation::cell_iterator it = tr.begin(); - it != tr.end();++it) + it != tr.end(); ++it) { it->clear_user_index(); if (dim > 1) - for (unsigned int f=0; f::faces_per_cell; ++f) - it->face(f)->clear_user_index(); + for (unsigned int f=0; f::faces_per_cell; ++f) + it->face(f)->clear_user_index(); if (dim > 2) - for (unsigned int l=0; l::lines_per_cell; ++l) - it->line(l)->clear_user_index(); + for (unsigned int l=0; l::lines_per_cell; ++l) + it->line(l)->clear_user_index(); } unsigned int p=1; for (typename Triangulation::cell_iterator it = tr.begin(); - it != tr.end();++it) + it != tr.end(); ++it) it->set_user_index(p++); - // we hit faces and lines more than - // once, possibly. only set them - // the first time around + // we hit faces and lines more than + // once, possibly. only set them + // the first time around tr.clear_user_flags (); if (dim > 1) for (typename Triangulation::cell_iterator it = tr.begin(); - it != tr.end();++it) + it != tr.end(); ++it) for (unsigned int f=0; f::faces_per_cell; ++f) - if (it->face(f)->user_flag_set() == false) - { - it->face(f)->set_user_index(p++); - it->face(f)->set_user_flag(); - } + if (it->face(f)->user_flag_set() == false) + { + it->face(f)->set_user_index(p++); + it->face(f)->set_user_flag(); + } if (dim > 2) for (typename Triangulation::cell_iterator it = tr.begin(); - it != tr.end();++it) + it != tr.end(); ++it) for (unsigned int l=0; l::lines_per_cell; ++l) - if (it->line(l)->user_flag_set() == false) - { - it->line(l)->set_user_index(p++); - it->line(l)->set_user_flag(); - } + if (it->line(l)->user_flag_set() == false) + { + it->line(l)->set_user_index(p++); + it->line(l)->set_user_flag(); + } - // Check if they are still the same + // Check if they are still the same check_user_indices(tr); - // Create two pointer index clashes here + // Create two pointer index clashes here try { tr.begin()->user_pointer(); @@ -258,10 +258,10 @@ user_indices(Triangulation& tr) deallog << e.get_exc_name() << std::endl; } tr.begin()->user_index(); - - // Check if save and load work + + // Check if save and load work std::vector indices(tr.n_cells()); deallog << "Save" << dim << 'D' << std::endl; tr.save_user_indices(indices); diff --git a/tests/deal.II/vectors_boundary_rhs_01.cc b/tests/deal.II/vectors_boundary_rhs_01.cc index 9ec53ec4ca..d97ab2b99d 100644 --- a/tests/deal.II/vectors_boundary_rhs_01.cc +++ b/tests/deal.II/vectors_boundary_rhs_01.cc @@ -46,19 +46,21 @@ template class MySquareFunction : public Function { - public: - MySquareFunction () : Function(2) {} - - virtual double value (const Point &p, - const unsigned int component) const - { return (component+1)*p.square(); } - - virtual void vector_value (const Point &p, - Vector &values) const - { - for (unsigned int d=0; d<2; ++d) - values(d) = value(p,d); - } +public: + MySquareFunction () : Function(2) {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return (component+1)*p.square(); + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + for (unsigned int d=0; d<2; ++d) + values(d) = value(p,d); + } }; @@ -66,7 +68,7 @@ template void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -77,25 +79,25 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping(3); QGauss quadrature(3); Vector rhs (dof.n_dofs()); VectorTools::create_boundary_right_hand_side (dof, quadrature, - MySquareFunction(), - rhs); + MySquareFunction(), + rhs); for (unsigned int i=0; i class MySquareFunction : public Function { - public: - MySquareFunction () : Function(dim) {} - - virtual double value (const Point &p, - const unsigned int component) const - { return (component+1)*p.square(); } - - virtual void vector_value (const Point &p, - Vector &values) const - { - for (unsigned int d=0; d(dim) {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return (component+1)*p.square(); + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + for (unsigned int d=0; d void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -80,24 +82,24 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FE_RaviartThomas element(0); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping(3); QGauss quadrature(3); Vector rhs (dof.n_dofs()); VectorTools::create_boundary_right_hand_side (dof, quadrature, - MySquareFunction(), - rhs); + MySquareFunction(), + rhs); for (unsigned int i=0; i class MySquareFunction : public Function { - public: - MySquareFunction () : Function(1) {} - - virtual double value (const Point &p, - const unsigned int component) const - { return (component+1)*p.square(); } - - virtual void vector_value (const Point &p, - Vector &values) const - { - values(0) = value(p,0); - } +public: + MySquareFunction () : Function(1) {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return (component+1)*p.square(); + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + values(0) = value(p,0); + } }; @@ -67,7 +69,7 @@ template void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -78,24 +80,24 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FE_Q element(1); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping(3); QGauss quadrature(3); Vector rhs (dof.n_dofs()); VectorTools::create_boundary_right_hand_side (dof, quadrature, - MySquareFunction(), - rhs); + MySquareFunction(), + rhs); for (unsigned int i=0; i class MySquareFunction : public Function { - public: - MySquareFunction () : Function(1) {} - - virtual double value (const Point &p, - const unsigned int component) const - { return (component+1)*p.square(); } - - virtual void vector_value (const Point &p, - Vector &values) const - { values(0) = value(p,0); } +public: + MySquareFunction () : Function(1) {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return (component+1)*p.square(); + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + values(0) = value(p,0); + } }; @@ -66,7 +70,7 @@ template void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -77,22 +81,22 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FE_Q element(1); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping(3); Vector rhs (dof.n_dofs()); VectorTools::create_point_source_vector (dof, - tr.begin()->center(), - rhs); + tr.begin()->center(), + rhs); for (unsigned int i=0; i class MySquareFunction : public Function { - public: - MySquareFunction () : Function(2) {} - - virtual double value (const Point &p, - const unsigned int component) const - { return (component+1)*p.square(); } - - virtual void vector_value (const Point &p, - Vector &values) const - { values(0) = value(p,0); - values(1) = value(p,1); } +public: + MySquareFunction () : Function(2) {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return (component+1)*p.square(); + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + values(0) = value(p,0); + values(1) = value(p,1); + } }; @@ -66,7 +70,7 @@ template void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -77,25 +81,25 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FESystem element(FE_Q(1), 1, - FE_Q(2), 1); + FE_Q(2), 1); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping(3); QGauss quadrature(3); Vector rhs (dof.n_dofs()); VectorTools::create_right_hand_side (dof, quadrature, - MySquareFunction(), - rhs); + MySquareFunction(), + rhs); for (unsigned int i=0; i class MySquareFunction : public Function { - public: - MySquareFunction () : Function(1) {} - - virtual double value (const Point &p, - const unsigned int component) const - { return (component+1)*p.square(); } - - virtual void vector_value (const Point &p, - Vector &values) const - { values(0) = value(p,0); } +public: + MySquareFunction () : Function(1) {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return (component+1)*p.square(); + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + values(0) = value(p,0); + } }; @@ -66,7 +70,7 @@ template void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -77,24 +81,24 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element FE_Q element(1); DoFHandler dof(tr); dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here MappingQ mapping(3); QGauss quadrature(3); Vector rhs (dof.n_dofs()); VectorTools::create_right_hand_side (dof, quadrature, - MySquareFunction(), - rhs); + MySquareFunction(), + rhs); for (unsigned int i=0; i::active_cell_iterator - cell = tria.begin_active(); + cell = tria.begin_active(); cell != tria.end(); ++cell) { deallog << "Cell: " << cell << std::endl; diff --git a/tests/deal.II/vertex_as_face_02.cc b/tests/deal.II/vertex_as_face_02.cc index e0b1f3323f..deea3caa90 100644 --- a/tests/deal.II/vertex_as_face_02.cc +++ b/tests/deal.II/vertex_as_face_02.cc @@ -41,7 +41,7 @@ void test () tria.refine_global (2); for (typename Triangulation<1,spacedim>::active_cell_iterator - cell = tria.begin_active(); + cell = tria.begin_active(); cell != tria.end(); ++cell) { deallog << "Cell: " << cell << std::endl; diff --git a/tests/deal.II/vertex_as_face_03.cc b/tests/deal.II/vertex_as_face_03.cc index c5f54148db..7b3bdbc886 100644 --- a/tests/deal.II/vertex_as_face_03.cc +++ b/tests/deal.II/vertex_as_face_03.cc @@ -41,7 +41,7 @@ void test () tria.refine_global (2); for (typename Triangulation<1,spacedim>::active_cell_iterator - cell = tria.begin_active(); + cell = tria.begin_active(); cell != tria.end(); ++cell) { deallog << "Cell: " << cell << std::endl; diff --git a/tests/deal.II/vertex_as_face_04.cc b/tests/deal.II/vertex_as_face_04.cc index d8db9a99ce..4a79ab2f0f 100644 --- a/tests/deal.II/vertex_as_face_04.cc +++ b/tests/deal.II/vertex_as_face_04.cc @@ -41,7 +41,7 @@ void test () tria.refine_global (2); for (typename Triangulation<1,spacedim>::active_cell_iterator - cell = tria.begin_active(); + cell = tria.begin_active(); cell != tria.end(); ++cell) { deallog << "Cell: " << cell << std::endl; diff --git a/tests/deal.II/vertex_as_face_05.cc b/tests/deal.II/vertex_as_face_05.cc index 97b27850aa..21cc9d07dc 100644 --- a/tests/deal.II/vertex_as_face_05.cc +++ b/tests/deal.II/vertex_as_face_05.cc @@ -40,7 +40,7 @@ void test () GridGenerator::hyper_cube (tria); FESystem<1,spacedim> fe(FE_Q<1,spacedim>(2),2, - FE_Q<1,spacedim>(1),1); + FE_Q<1,spacedim>(1),1); DoFHandler<1,spacedim> dof_handler (tria); dof_handler.distribute_dofs (fe); @@ -52,7 +52,7 @@ void test () dof_handler.distribute_dofs (fe); for (typename DoFHandler<1,spacedim>::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) { deallog << "Cell: " << cell << std::endl; diff --git a/tests/deal.II/vertex_as_face_06.cc b/tests/deal.II/vertex_as_face_06.cc index 6313755b92..e7740bcd5e 100644 --- a/tests/deal.II/vertex_as_face_06.cc +++ b/tests/deal.II/vertex_as_face_06.cc @@ -40,7 +40,7 @@ void test () GridGenerator::hyper_cube (tria); FESystem<1,spacedim> fe(FE_Q<1,spacedim>(2),1, - FE_Q<1,spacedim>(1),1); + FE_Q<1,spacedim>(1),1); DoFHandler<1,spacedim> dof_handler (tria); dof_handler.distribute_dofs (fe); @@ -58,16 +58,16 @@ void test () dof_handler.distribute_dofs (fe); for (typename DoFHandler<1,spacedim>::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell) { deallog << "Cell: " << cell << std::endl; cell->face(0)->get_dof_indices (dof_indices); for (unsigned int i=0; i -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); diff --git a/tests/distributed_grids/2d_coarse_grid_04.cc b/tests/distributed_grids/2d_coarse_grid_04.cc index bf9ce495a4..1d92ba9c95 100644 --- a/tests/distributed_grids/2d_coarse_grid_04.cc +++ b/tests/distributed_grids/2d_coarse_grid_04.cc @@ -30,7 +30,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); diff --git a/tests/distributed_grids/2d_coarse_grid_x_01.cc b/tests/distributed_grids/2d_coarse_grid_x_01.cc index 505979cc6e..f37f5e90ab 100644 --- a/tests/distributed_grids/2d_coarse_grid_x_01.cc +++ b/tests/distributed_grids/2d_coarse_grid_x_01.cc @@ -32,7 +32,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { if (true) { @@ -43,8 +43,8 @@ void test(std::ostream& /*out*/) GridGenerator::hyper_cube(tr); deallog << "Triangulation copied back from p4est has " - << tr.n_active_cells() - << " active cells" << std::endl; + << tr.n_active_cells() + << " active cells" << std::endl; GridOut().write_gnuplot (tr, deallog.get_file_stream()); } @@ -58,8 +58,8 @@ void test(std::ostream& /*out*/) GridGenerator::hyper_ball(tr, Point(), 3.); deallog << "Triangulation copied back from p4est has " - << tr.n_active_cells() - << " active cells" << std::endl; + << tr.n_active_cells() + << " active cells" << std::endl; GridOut().write_gnuplot (tr, deallog.get_file_stream()); } @@ -72,8 +72,8 @@ void test(std::ostream& /*out*/) GridGenerator::half_hyper_ball(tr, Point(), 3.); deallog << "Triangulation copied back from p4est has " - << tr.n_active_cells() - << " active cells" << std::endl; + << tr.n_active_cells() + << " active cells" << std::endl; GridOut().write_gnuplot (tr, deallog.get_file_stream()); } } diff --git a/tests/distributed_grids/2d_coarsening_01.cc b/tests/distributed_grids/2d_coarsening_01.cc index f3c0b0caff..12845d7320 100644 --- a/tests/distributed_grids/2d_coarsening_01.cc +++ b/tests/distributed_grids/2d_coarsening_01.cc @@ -34,7 +34,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); diff --git a/tests/distributed_grids/2d_coarsening_02.cc b/tests/distributed_grids/2d_coarsening_02.cc index a6d94f7533..eaa47bc5ca 100644 --- a/tests/distributed_grids/2d_coarsening_02.cc +++ b/tests/distributed_grids/2d_coarsening_02.cc @@ -49,7 +49,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); Triangulation tr2 (Triangulation::limit_level_difference_at_vertices); @@ -61,47 +61,47 @@ void test(std::ostream& /*out*/) tr2.refine_global (2); Assert (tr.n_active_cells() == tr2.n_active_cells(), - ExcInternalError()); + ExcInternalError()); for (unsigned int i=0; i<15-2*dim; ++i) { - // refine one-fifth of cells randomly + // refine one-fifth of cells randomly std::vector flags (tr.n_active_cells(), false); for (unsigned int k=0; k > intergrid_map; intergrid_map.make_mapping (tr, tr2); - // refine tr and tr2 + // refine tr and tr2 unsigned int index=0; for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell, ++index) - if (flags[index]) - { - cell->set_refine_flag(); - intergrid_map[cell]->set_refine_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell, ++index) + if (flags[index]) + { + cell->set_refine_flag(); + intergrid_map[cell]->set_refine_flag(); + } Assert (index == tr.n_active_cells(), ExcInternalError()); - // flag all other cells for coarsening - // (this should ensure that at least - // some of them will actually be - // coarsened) + // flag all other cells for coarsening + // (this should ensure that at least + // some of them will actually be + // coarsened) index=0; for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell, ++index) - if (!flags[index]) - { - cell->set_coarsen_flag(); - intergrid_map[cell]->set_coarsen_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell, ++index) + if (!flags[index]) + { + cell->set_coarsen_flag(); + intergrid_map[cell]->set_coarsen_flag(); + } tr.execute_coarsening_and_refinement (); tr2.execute_coarsening_and_refinement (); @@ -110,9 +110,9 @@ void test(std::ostream& /*out*/) deallog << std::endl; deallog << i << " Number of cells: " - << tr.n_active_cells() << ' ' - << tr2.n_active_cells() - << std::endl; + << tr.n_active_cells() << ' ' + << tr2.n_active_cells() + << std::endl; assert_tria_equal("2d_coarsening_02", tr, tr2); } } diff --git a/tests/distributed_grids/2d_coarsening_03.cc b/tests/distributed_grids/2d_coarsening_03.cc index 73dd100cdc..f1559894e3 100644 --- a/tests/distributed_grids/2d_coarsening_03.cc +++ b/tests/distributed_grids/2d_coarsening_03.cc @@ -36,7 +36,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); Triangulation tr2 (Triangulation::limit_level_difference_at_vertices); @@ -47,14 +47,14 @@ void test(std::ostream& /*out*/) std::ifstream in ("../deal.II/grid_in_02/2d.xda"); try { - gi.read_xda (in); + gi.read_xda (in); } catch (const typename Triangulation::DistortedCellList &distorted_cells) { - // ignore distorted cells - deallog << distorted_cells.distorted_cells.size() - << " distorted cells after creating mesh." - << std::endl; + // ignore distorted cells + deallog << distorted_cells.distorted_cells.size() + << " distorted cells after creating mesh." + << std::endl; } } @@ -64,20 +64,20 @@ void test(std::ostream& /*out*/) std::ifstream in ("../deal.II/grid_in_02/2d.xda"); try { - gi.read_xda (in); + gi.read_xda (in); } catch (const typename Triangulation::DistortedCellList &distorted_cells) { - // ignore distorted cells - deallog << distorted_cells.distorted_cells.size() - << " distorted cells after creating mesh." - << std::endl; + // ignore distorted cells + deallog << distorted_cells.distorted_cells.size() + << " distorted cells after creating mesh." + << std::endl; } } deallog << tr.n_active_cells() << ' ' << tr2.n_active_cells() << std::endl; Assert (tr.n_active_cells() == tr2.n_active_cells(), - ExcInternalError()); + ExcInternalError()); try { @@ -85,10 +85,10 @@ void test(std::ostream& /*out*/) } catch (const typename Triangulation::DistortedCellList &distorted_cells) { - // ignore distorted cells + // ignore distorted cells deallog << distorted_cells.distorted_cells.size() - << " distorted cells after refining mesh." - << std::endl; + << " distorted cells after refining mesh." + << std::endl; } try @@ -97,10 +97,10 @@ void test(std::ostream& /*out*/) } catch (const typename Triangulation::DistortedCellList &distorted_cells) { - // ignore distorted cells + // ignore distorted cells deallog << distorted_cells.distorted_cells.size() - << " distorted cells after refining mesh." - << std::endl; + << " distorted cells after refining mesh." + << std::endl; } deallog << tr.n_active_cells() << ' ' << tr2.n_active_cells() << std::endl; @@ -108,72 +108,72 @@ void test(std::ostream& /*out*/) for (unsigned int i=0; i<1; ++i) { - // refine one-fifth of cells randomly + // refine one-fifth of cells randomly std::vector flags (tr.n_active_cells(), false); for (unsigned int k=0; k > intergrid_map; intergrid_map.make_mapping (tr, tr2); - // refine tr and tr2 + // refine tr and tr2 unsigned int index=0; for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell, ++index) - if (flags[index]) - { - cell->set_refine_flag(); - intergrid_map[cell]->set_refine_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell, ++index) + if (flags[index]) + { + cell->set_refine_flag(); + intergrid_map[cell]->set_refine_flag(); + } Assert (index == tr.n_active_cells(), ExcInternalError()); - // flag all other cells for coarsening - // (this should ensure that at least - // some of them will actually be - // coarsened) + // flag all other cells for coarsening + // (this should ensure that at least + // some of them will actually be + // coarsened) index=0; for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell, ++index) - if (!flags[index]) - { - cell->set_coarsen_flag(); - intergrid_map[cell]->set_coarsen_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell, ++index) + if (!flags[index]) + { + cell->set_coarsen_flag(); + intergrid_map[cell]->set_coarsen_flag(); + } try - { - tr.execute_coarsening_and_refinement (); - } + { + tr.execute_coarsening_and_refinement (); + } catch (const typename Triangulation::DistortedCellList &distorted_cells) - { - // ignore distorted cells - deallog << distorted_cells.distorted_cells.size() - << " distorted cells after adaptively refining mesh." - << std::endl; - } + { + // ignore distorted cells + deallog << distorted_cells.distorted_cells.size() + << " distorted cells after adaptively refining mesh." + << std::endl; + } try - { - tr2.execute_coarsening_and_refinement (); - } + { + tr2.execute_coarsening_and_refinement (); + } catch (const typename Triangulation::DistortedCellList &distorted_cells) - { - // ignore distorted cells - deallog << distorted_cells.distorted_cells.size() - << " distorted cells after adaptively refining mesh." - << std::endl; - } + { + // ignore distorted cells + deallog << distorted_cells.distorted_cells.size() + << " distorted cells after adaptively refining mesh." + << std::endl; + } deallog << std::endl; deallog << i << " Number of cells: " - << tr.n_active_cells() << ' ' - << tr2.n_active_cells() - << std::endl; + << tr.n_active_cells() << ' ' + << tr2.n_active_cells() + << std::endl; assert_tria_equal("2d_coarsening_03", tr, tr2); } } diff --git a/tests/distributed_grids/2d_coarsening_05.cc b/tests/distributed_grids/2d_coarsening_05.cc index b65f851992..151a9922ba 100644 --- a/tests/distributed_grids/2d_coarsening_05.cc +++ b/tests/distributed_grids/2d_coarsening_05.cc @@ -39,7 +39,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); Triangulation tr2 (Triangulation::limit_level_difference_at_vertices); @@ -51,7 +51,7 @@ void test(std::ostream& /*out*/) tr2.refine_global (1); Assert (tr.n_active_cells() == tr2.n_active_cells(), - ExcInternalError()); + ExcInternalError()); while (tr.n_active_cells() < 50000) @@ -61,45 +61,45 @@ void test(std::ostream& /*out*/) std::vector flags (tr.n_active_cells(), false); - // refine one fifth of all cells each - // time (but at least one) + // refine one fifth of all cells each + // time (but at least one) for (unsigned int i=0; i::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell, ++index) - if (flags[index]) - { - cell->set_refine_flag(); - intergrid_map[cell]->set_refine_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell, ++index) + if (flags[index]) + { + cell->set_refine_flag(); + intergrid_map[cell]->set_refine_flag(); + } Assert (index == tr.n_active_cells(), ExcInternalError()); - // flag all other cells for coarsening - // (this should ensure that at least - // some of them will actually be - // coarsened) + // flag all other cells for coarsening + // (this should ensure that at least + // some of them will actually be + // coarsened) index=0; for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell, ++index) - if (!flags[index]) - { - cell->set_coarsen_flag(); - intergrid_map[cell]->set_coarsen_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell, ++index) + if (!flags[index]) + { + cell->set_coarsen_flag(); + intergrid_map[cell]->set_coarsen_flag(); + } tr.execute_coarsening_and_refinement (); tr2.execute_coarsening_and_refinement (); deallog << " Number of cells: " - << tr.n_active_cells() << ' ' - << tr2.n_active_cells() - << std::endl; + << tr.n_active_cells() << ' ' + << tr2.n_active_cells() + << std::endl; assert_tria_equal("2d_coarsening_05", tr, tr2); } diff --git a/tests/distributed_grids/2d_dofhandler_01.cc b/tests/distributed_grids/2d_dofhandler_01.cc index da84bcf32f..171f823f45 100644 --- a/tests/distributed_grids/2d_dofhandler_01.cc +++ b/tests/distributed_grids/2d_dofhandler_01.cc @@ -39,12 +39,12 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { deallog << "hyper_cube" << std::endl; parallel::distributed::Triangulation tr(MPI_COMM_WORLD); - + GridGenerator::hyper_cube(tr); tr.refine_global (1); DoFHandler dofh(tr); @@ -52,37 +52,37 @@ void test(std::ostream& /*out*/) static const FE_Q fe(2); dofh.distribute_dofs (fe); - typename - DoFHandler::active_cell_iterator cell - = dofh.begin_active(); + typename + DoFHandler::active_cell_iterator cell + = dofh.begin_active(); + + const unsigned int dofs_per_cell = dofh.get_fe().dofs_per_cell; + std::vector local_dof_indices (dofs_per_cell); + - const unsigned int dofs_per_cell = dofh.get_fe().dofs_per_cell; - std::vector local_dof_indices (dofs_per_cell); + for (; cell != dofh.end(); ++cell) + { + cell->get_dof_indices (local_dof_indices); - - for (; cell != dofh.end(); ++cell) - { - cell->get_dof_indices (local_dof_indices); + for (unsigned int i=0; i(logfile); deallog.pop(); diff --git a/tests/distributed_grids/2d_refinement_01.cc b/tests/distributed_grids/2d_refinement_01.cc index f05b782a6b..8d3f7a4f61 100644 --- a/tests/distributed_grids/2d_refinement_01.cc +++ b/tests/distributed_grids/2d_refinement_01.cc @@ -34,7 +34,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); diff --git a/tests/distributed_grids/2d_refinement_02.cc b/tests/distributed_grids/2d_refinement_02.cc index 40b0b3c18b..90cbc96fe3 100644 --- a/tests/distributed_grids/2d_refinement_02.cc +++ b/tests/distributed_grids/2d_refinement_02.cc @@ -52,7 +52,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); Triangulation tr2 (Triangulation::limit_level_difference_at_vertices); @@ -64,31 +64,31 @@ void test(std::ostream& /*out*/) tr2.refine_global (1); Assert (tr.n_active_cells() == tr2.n_active_cells(), - ExcInternalError()); + ExcInternalError()); for (unsigned int i=0; i<15-2*dim; ++i) { std::vector flags (tr.n_active_cells(), false); { - const unsigned int x = rand() % flags.size(); - deallog << "Refining cell " << x << std::endl; - flags[x] = true; + const unsigned int x = rand() % flags.size(); + deallog << "Refining cell " << x << std::endl; + flags[x] = true; } InterGridMap > intergrid_map; intergrid_map.make_mapping (tr, tr2); - // refine tr and tr2 + // refine tr and tr2 unsigned int index=0; for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell, ++index) - if (flags[index]) - { - cell->set_refine_flag(); - intergrid_map[cell]->set_refine_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell, ++index) + if (flags[index]) + { + cell->set_refine_flag(); + intergrid_map[cell]->set_refine_flag(); + } Assert (index == tr.n_active_cells(), ExcInternalError()); tr.execute_coarsening_and_refinement (); tr2.execute_coarsening_and_refinement (); @@ -97,9 +97,9 @@ void test(std::ostream& /*out*/) deallog << std::endl; deallog << i << " Number of cells: " - << tr.n_active_cells() << ' ' - << tr2.n_active_cells() - << std::endl; + << tr.n_active_cells() << ' ' + << tr2.n_active_cells() + << std::endl; assert_tria_equal("2d_refinement_02", tr, tr2); diff --git a/tests/distributed_grids/2d_refinement_03.cc b/tests/distributed_grids/2d_refinement_03.cc index 1f5d798b6b..6ac0edffc9 100644 --- a/tests/distributed_grids/2d_refinement_03.cc +++ b/tests/distributed_grids/2d_refinement_03.cc @@ -36,7 +36,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); Triangulation tr2 (Triangulation::limit_level_difference_at_vertices); @@ -47,14 +47,14 @@ void test(std::ostream& /*out*/) std::ifstream in ("../deal.II/grid_in_02/2d.xda"); try { - gi.read_xda (in); + gi.read_xda (in); } catch (const typename Triangulation::DistortedCellList &distorted_cells) { - // ignore distorted cells - deallog << distorted_cells.distorted_cells.size() - << " distorted cells after creating mesh." - << std::endl; + // ignore distorted cells + deallog << distorted_cells.distorted_cells.size() + << " distorted cells after creating mesh." + << std::endl; } } @@ -64,72 +64,72 @@ void test(std::ostream& /*out*/) std::ifstream in ("../deal.II/grid_in_02/2d.xda"); try { - gi.read_xda (in); + gi.read_xda (in); } catch (const typename Triangulation::DistortedCellList &distorted_cells) { - // ignore distorted cells - deallog << distorted_cells.distorted_cells.size() - << " distorted cells after creating mesh." - << std::endl; + // ignore distorted cells + deallog << distorted_cells.distorted_cells.size() + << " distorted cells after creating mesh." + << std::endl; } } Assert (tr.n_active_cells() == tr2.n_active_cells(), - ExcInternalError()); + ExcInternalError()); for (unsigned int i=0; i<1; ++i) { std::vector flags (tr.n_active_cells()); for (unsigned int j=0; j > intergrid_map; intergrid_map.make_mapping (tr, tr2); - // refine tr and tr2 + // refine tr and tr2 unsigned int index=0; for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell, ++index) - if (flags[index]) - { - cell->set_refine_flag(); - intergrid_map[cell]->set_refine_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell, ++index) + if (flags[index]) + { + cell->set_refine_flag(); + intergrid_map[cell]->set_refine_flag(); + } Assert (index == tr.n_active_cells(), ExcInternalError()); try - { - tr.execute_coarsening_and_refinement (); - } + { + tr.execute_coarsening_and_refinement (); + } catch (const typename Triangulation::DistortedCellList &distorted_cells) - { - // ignore distorted cells - deallog << distorted_cells.distorted_cells.size() - << " distorted cells after adaptively refining mesh." - << std::endl; - } + { + // ignore distorted cells + deallog << distorted_cells.distorted_cells.size() + << " distorted cells after adaptively refining mesh." + << std::endl; + } try - { - tr2.execute_coarsening_and_refinement (); - } + { + tr2.execute_coarsening_and_refinement (); + } catch (const typename Triangulation::DistortedCellList &distorted_cells) - { - // ignore distorted cells - deallog << distorted_cells.distorted_cells.size() - << " distorted cells after adaptively refining mesh." - << std::endl; - } + { + // ignore distorted cells + deallog << distorted_cells.distorted_cells.size() + << " distorted cells after adaptively refining mesh." + << std::endl; + } // write_vtk (tr, "2d_refinement_03", "1"); deallog << std::endl; deallog << i << " Number of cells: " - << tr.n_active_cells() << ' ' - << tr2.n_active_cells() - << std::endl; + << tr.n_active_cells() << ' ' + << tr2.n_active_cells() + << std::endl; assert_tria_equal("2d_refinement_03", tr, tr2); diff --git a/tests/distributed_grids/2d_refinement_04.cc b/tests/distributed_grids/2d_refinement_04.cc index 8b4ae9cf1f..85e2fc745c 100644 --- a/tests/distributed_grids/2d_refinement_04.cc +++ b/tests/distributed_grids/2d_refinement_04.cc @@ -41,7 +41,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { for (unsigned int i=0; i::max_children_per_cell; ++i) { @@ -50,27 +50,27 @@ void test(std::ostream& /*out*/) GridGenerator::hyper_cube(tr); deallog << i << ' ' << tr.n_active_cells() - << std::endl; + << std::endl; tr.refine_global (1); deallog << i << ' ' << tr.n_active_cells() - << std::endl; + << std::endl; Assert (tr.n_active_cells() == 4, - ExcInternalError()); + ExcInternalError()); typename Triangulation::active_cell_iterator - cell = tr.begin_active(); + cell = tr.begin_active(); std::advance (cell, i); cell->set_refine_flag(); tr.execute_coarsening_and_refinement (); deallog << i << ' ' << tr.n_active_cells() - << std::endl; + << std::endl; Assert (tr.n_active_cells() == 7, - ExcInternalError()); + ExcInternalError()); } } diff --git a/tests/distributed_grids/2d_refinement_05.cc b/tests/distributed_grids/2d_refinement_05.cc index 3d5040be3e..47b508f748 100644 --- a/tests/distributed_grids/2d_refinement_05.cc +++ b/tests/distributed_grids/2d_refinement_05.cc @@ -40,7 +40,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); Triangulation tr2 (Triangulation::limit_level_difference_at_vertices); @@ -57,36 +57,36 @@ void test(std::ostream& /*out*/) { std::vector flags (tr.n_active_cells(), false); - // refine one fifth of all cells each - // time (but at least one) + // refine one fifth of all cells each + // time (but at least one) for (unsigned int i=0; i > intergrid_map; intergrid_map.make_mapping (tr, tr2); - // refine tr and tr2 + // refine tr and tr2 unsigned int index=0; for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell, ++index) - if (flags[index]) - { - cell->set_refine_flag(); - intergrid_map[cell]->set_refine_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell, ++index) + if (flags[index]) + { + cell->set_refine_flag(); + intergrid_map[cell]->set_refine_flag(); + } Assert (index == tr.n_active_cells(), ExcInternalError()); tr.execute_coarsening_and_refinement (); tr2.execute_coarsening_and_refinement (); deallog << " Number of cells: " - << tr.n_active_cells() << ' ' - << tr2.n_active_cells() - << std::endl; + << tr.n_active_cells() << ' ' + << tr2.n_active_cells() + << std::endl; assert_tria_equal("2d_refinement_05", tr, tr2); diff --git a/tests/distributed_grids/2d_refinement_06.cc b/tests/distributed_grids/2d_refinement_06.cc index 7309df46f1..c0a1fe651f 100644 --- a/tests/distributed_grids/2d_refinement_06.cc +++ b/tests/distributed_grids/2d_refinement_06.cc @@ -36,7 +36,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); diff --git a/tests/distributed_grids/2d_refinement_07.cc b/tests/distributed_grids/2d_refinement_07.cc index 40b069da35..6ee6442382 100644 --- a/tests/distributed_grids/2d_refinement_07.cc +++ b/tests/distributed_grids/2d_refinement_07.cc @@ -33,32 +33,32 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); GridGenerator::hyper_cube(tr); - for (unsigned int i=0;i<30;++i) + for (unsigned int i=0; i<30; ++i) { deallog << "cells: " << tr.n_active_cells() << " level:" << tr.n_levels() << std::endl; typename parallel::distributed::Triangulation::cell_iterator it; it=tr.begin_active(); while (it->level()(tr.n_levels()-1)) - ++it; + ++it; + - it->set_refine_flag(); try - { - tr.execute_coarsening_and_refinement (); - } + { + tr.execute_coarsening_and_refinement (); + } catch (ExceptionBase &e) - { - deallog << e.get_exc_name() << std::endl; - } + { + deallog << e.get_exc_name() << std::endl; + } } - + } diff --git a/tests/distributed_grids/3d_coarse_grid_01.cc b/tests/distributed_grids/3d_coarse_grid_01.cc index a50da3d66e..090e9939a3 100644 --- a/tests/distributed_grids/3d_coarse_grid_01.cc +++ b/tests/distributed_grids/3d_coarse_grid_01.cc @@ -31,7 +31,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { if (true) { diff --git a/tests/distributed_grids/3d_coarse_grid_03.cc b/tests/distributed_grids/3d_coarse_grid_03.cc index dec62669f6..a5a4e6fad9 100644 --- a/tests/distributed_grids/3d_coarse_grid_03.cc +++ b/tests/distributed_grids/3d_coarse_grid_03.cc @@ -31,7 +31,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); diff --git a/tests/distributed_grids/3d_coarse_grid_04.cc b/tests/distributed_grids/3d_coarse_grid_04.cc index e1b0f77894..c2e6115945 100644 --- a/tests/distributed_grids/3d_coarse_grid_04.cc +++ b/tests/distributed_grids/3d_coarse_grid_04.cc @@ -30,7 +30,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); diff --git a/tests/distributed_grids/3d_coarse_grid_05.cc b/tests/distributed_grids/3d_coarse_grid_05.cc index 1d5fd88b6b..f75fdcb61b 100644 --- a/tests/distributed_grids/3d_coarse_grid_05.cc +++ b/tests/distributed_grids/3d_coarse_grid_05.cc @@ -42,7 +42,7 @@ void create_disconnected_mesh (Triangulation &tria) std::vector > vertices (2*GeometryInfo::vertices_per_cell); std::vector > cells (2); - // cell 1 + // cell 1 { Point p1 = Point(); Point p2; @@ -51,39 +51,39 @@ void create_disconnected_mesh (Triangulation &tria) switch (dim) { - case 2: - vertices[0] = vertices[1] = p1; - vertices[2] = vertices[3] = p2; - - vertices[1](0) = p2(0); - vertices[2](0) = p1(0); - break; - case 3: - vertices[0] = vertices[1] = vertices[2] = vertices[3] = p1; - vertices[4] = vertices[5] = vertices[6] = vertices[7] = p2; - - vertices[1](0) = p2(0); - vertices[2](1) = p2(1); - vertices[3](0) = p2(0); - vertices[3](1) = p2(1); - - vertices[4](0) = p1(0); - vertices[4](1) = p1(1); - vertices[5](1) = p1(1); - vertices[6](0) = p1(0); - - break; - default: - Assert (false, ExcNotImplemented ()); + case 2: + vertices[0] = vertices[1] = p1; + vertices[2] = vertices[3] = p2; + + vertices[1](0) = p2(0); + vertices[2](0) = p1(0); + break; + case 3: + vertices[0] = vertices[1] = vertices[2] = vertices[3] = p1; + vertices[4] = vertices[5] = vertices[6] = vertices[7] = p2; + + vertices[1](0) = p2(0); + vertices[2](1) = p2(1); + vertices[3](0) = p2(0); + vertices[3](1) = p2(1); + + vertices[4](0) = p1(0); + vertices[4](1) = p1(1); + vertices[5](1) = p1(1); + vertices[6](0) = p1(0); + + break; + default: + Assert (false, ExcNotImplemented ()); } - // Prepare cell data - for (unsigned int i=0;i::vertices_per_cell;++i) + // Prepare cell data + for (unsigned int i=0; i::vertices_per_cell; ++i) cells[0].vertices[i] = i; cells[0].material_id = 0; } - // cell 2. shifted 2 units in x-direction + // cell 2. shifted 2 units in x-direction { Point p1 = Point(); Point p2; @@ -95,34 +95,34 @@ void create_disconnected_mesh (Triangulation &tria) switch (dim) { - case 2: - vertices[GeometryInfo::vertices_per_cell+0] = vertices[GeometryInfo::vertices_per_cell+1] = p1; - vertices[GeometryInfo::vertices_per_cell+2] = vertices[GeometryInfo::vertices_per_cell+3] = p2; - - vertices[GeometryInfo::vertices_per_cell+1](0) = p2(0); - vertices[GeometryInfo::vertices_per_cell+2](0) = p1(0); - break; - case 3: - vertices[GeometryInfo::vertices_per_cell+0] = vertices[GeometryInfo::vertices_per_cell+1] = vertices[GeometryInfo::vertices_per_cell+2] = vertices[GeometryInfo::vertices_per_cell+3] = p1; - vertices[GeometryInfo::vertices_per_cell+4] = vertices[GeometryInfo::vertices_per_cell+5] = vertices[GeometryInfo::vertices_per_cell+6] = vertices[GeometryInfo::vertices_per_cell+7] = p2; - - vertices[GeometryInfo::vertices_per_cell+1](0) = p2(0); - vertices[GeometryInfo::vertices_per_cell+2](1) = p2(1); - vertices[GeometryInfo::vertices_per_cell+3](0) = p2(0); - vertices[GeometryInfo::vertices_per_cell+3](1) = p2(1); - - vertices[GeometryInfo::vertices_per_cell+4](0) = p1(0); - vertices[GeometryInfo::vertices_per_cell+4](1) = p1(1); - vertices[GeometryInfo::vertices_per_cell+5](1) = p1(1); - vertices[GeometryInfo::vertices_per_cell+6](0) = p1(0); - - break; - default: - Assert (false, ExcNotImplemented ()); + case 2: + vertices[GeometryInfo::vertices_per_cell+0] = vertices[GeometryInfo::vertices_per_cell+1] = p1; + vertices[GeometryInfo::vertices_per_cell+2] = vertices[GeometryInfo::vertices_per_cell+3] = p2; + + vertices[GeometryInfo::vertices_per_cell+1](0) = p2(0); + vertices[GeometryInfo::vertices_per_cell+2](0) = p1(0); + break; + case 3: + vertices[GeometryInfo::vertices_per_cell+0] = vertices[GeometryInfo::vertices_per_cell+1] = vertices[GeometryInfo::vertices_per_cell+2] = vertices[GeometryInfo::vertices_per_cell+3] = p1; + vertices[GeometryInfo::vertices_per_cell+4] = vertices[GeometryInfo::vertices_per_cell+5] = vertices[GeometryInfo::vertices_per_cell+6] = vertices[GeometryInfo::vertices_per_cell+7] = p2; + + vertices[GeometryInfo::vertices_per_cell+1](0) = p2(0); + vertices[GeometryInfo::vertices_per_cell+2](1) = p2(1); + vertices[GeometryInfo::vertices_per_cell+3](0) = p2(0); + vertices[GeometryInfo::vertices_per_cell+3](1) = p2(1); + + vertices[GeometryInfo::vertices_per_cell+4](0) = p1(0); + vertices[GeometryInfo::vertices_per_cell+4](1) = p1(1); + vertices[GeometryInfo::vertices_per_cell+5](1) = p1(1); + vertices[GeometryInfo::vertices_per_cell+6](0) = p1(0); + + break; + default: + Assert (false, ExcNotImplemented ()); } - // Prepare cell data - for (unsigned int i=0;i::vertices_per_cell;++i) + // Prepare cell data + for (unsigned int i=0; i::vertices_per_cell; ++i) cells[1].vertices[i] = GeometryInfo::vertices_per_cell+i; cells[1].material_id = 0; } @@ -133,7 +133,7 @@ void create_disconnected_mesh (Triangulation &tria) template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); diff --git a/tests/distributed_grids/3d_coarse_grid_06.cc b/tests/distributed_grids/3d_coarse_grid_06.cc index 1bdd0fc550..03c1eeeb41 100644 --- a/tests/distributed_grids/3d_coarse_grid_06.cc +++ b/tests/distributed_grids/3d_coarse_grid_06.cc @@ -31,7 +31,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); @@ -40,8 +40,8 @@ void test(std::ostream& /*out*/) gi.read ("../deal.II/grid_in_3d_02/747.ucd"); deallog << "Checksum: " - << tr.get_checksum () - << std::endl; + << tr.get_checksum () + << std::endl; } diff --git a/tests/distributed_grids/3d_coarse_grid_x_01.cc b/tests/distributed_grids/3d_coarse_grid_x_01.cc index 695c70ecb2..da62cff4d5 100644 --- a/tests/distributed_grids/3d_coarse_grid_x_01.cc +++ b/tests/distributed_grids/3d_coarse_grid_x_01.cc @@ -32,7 +32,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { if (true) { @@ -43,8 +43,8 @@ void test(std::ostream& /*out*/) GridGenerator::hyper_cube(tr); deallog << "Triangulation copied back from p4est has " - << tr.n_active_cells() - << " active cells" << std::endl; + << tr.n_active_cells() + << " active cells" << std::endl; GridOut().write_gnuplot (tr, deallog.get_file_stream()); } @@ -58,8 +58,8 @@ void test(std::ostream& /*out*/) GridGenerator::hyper_ball(tr, Point(), 3.); deallog << "Triangulation copied back from p4est has " - << tr.n_active_cells() - << " active cells" << std::endl; + << tr.n_active_cells() + << " active cells" << std::endl; GridOut().write_gnuplot (tr, deallog.get_file_stream()); } @@ -72,8 +72,8 @@ void test(std::ostream& /*out*/) GridGenerator::half_hyper_ball(tr, Point(), 3.); deallog << "Triangulation copied back from p4est has " - << tr.n_active_cells() - << " active cells" << std::endl; + << tr.n_active_cells() + << " active cells" << std::endl; GridOut().write_gnuplot (tr, deallog.get_file_stream()); } } diff --git a/tests/distributed_grids/3d_coarsening_01.cc b/tests/distributed_grids/3d_coarsening_01.cc index 81ada4a373..fe03304b21 100644 --- a/tests/distributed_grids/3d_coarsening_01.cc +++ b/tests/distributed_grids/3d_coarsening_01.cc @@ -34,7 +34,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); diff --git a/tests/distributed_grids/3d_coarsening_02.cc b/tests/distributed_grids/3d_coarsening_02.cc index cc87be8aba..dbb63d9adb 100644 --- a/tests/distributed_grids/3d_coarsening_02.cc +++ b/tests/distributed_grids/3d_coarsening_02.cc @@ -49,7 +49,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); Triangulation tr2 (Triangulation::limit_level_difference_at_vertices); @@ -61,47 +61,47 @@ void test(std::ostream& /*out*/) tr2.refine_global (2); Assert (tr.n_active_cells() == tr2.n_active_cells(), - ExcInternalError()); + ExcInternalError()); for (unsigned int i=0; i<15-3*dim; ++i) { - // refine one-fifth of cells randomly + // refine one-fifth of cells randomly std::vector flags (tr.n_active_cells(), false); for (unsigned int k=0; k > intergrid_map; intergrid_map.make_mapping (tr, tr2); - // refine tr and tr2 + // refine tr and tr2 unsigned int index=0; for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell, ++index) - if (flags[index]) - { - cell->set_refine_flag(); - intergrid_map[cell]->set_refine_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell, ++index) + if (flags[index]) + { + cell->set_refine_flag(); + intergrid_map[cell]->set_refine_flag(); + } Assert (index == tr.n_active_cells(), ExcInternalError()); - // flag all other cells for coarsening - // (this should ensure that at least - // some of them will actually be - // coarsened) + // flag all other cells for coarsening + // (this should ensure that at least + // some of them will actually be + // coarsened) index=0; for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell, ++index) - if (!flags[index]) - { - cell->set_coarsen_flag(); - intergrid_map[cell]->set_coarsen_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell, ++index) + if (!flags[index]) + { + cell->set_coarsen_flag(); + intergrid_map[cell]->set_coarsen_flag(); + } tr.execute_coarsening_and_refinement (); tr2.execute_coarsening_and_refinement (); @@ -110,9 +110,9 @@ void test(std::ostream& /*out*/) deallog << std::endl; deallog << i << " Number of cells: " - << tr.n_active_cells() << ' ' - << tr2.n_active_cells() - << std::endl; + << tr.n_active_cells() << ' ' + << tr2.n_active_cells() + << std::endl; assert_tria_equal("3d_coarsening_02", tr, tr2); diff --git a/tests/distributed_grids/3d_coarsening_03.cc b/tests/distributed_grids/3d_coarsening_03.cc index c7f558e0b9..ac0d016bc1 100644 --- a/tests/distributed_grids/3d_coarsening_03.cc +++ b/tests/distributed_grids/3d_coarsening_03.cc @@ -36,7 +36,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); Triangulation tr2 (Triangulation::limit_level_difference_at_vertices); @@ -58,47 +58,47 @@ void test(std::ostream& /*out*/) } Assert (tr.n_active_cells() == tr2.n_active_cells(), - ExcInternalError()); + ExcInternalError()); for (unsigned int i=0; i<1; ++i) { - // refine one-fifth of cells randomly + // refine one-fifth of cells randomly std::vector flags (tr.n_active_cells(), false); for (unsigned int k=0; k > intergrid_map; intergrid_map.make_mapping (tr, tr2); - // refine tr and tr2 + // refine tr and tr2 unsigned int index=0; for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell, ++index) - if (flags[index]) - { - cell->set_refine_flag(); - intergrid_map[cell]->set_refine_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell, ++index) + if (flags[index]) + { + cell->set_refine_flag(); + intergrid_map[cell]->set_refine_flag(); + } Assert (index == tr.n_active_cells(), ExcInternalError()); - // flag all other cells for coarsening - // (this should ensure that at least - // some of them will actually be - // coarsened) + // flag all other cells for coarsening + // (this should ensure that at least + // some of them will actually be + // coarsened) index=0; for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell, ++index) - if (!flags[index]) - { - cell->set_coarsen_flag(); - intergrid_map[cell]->set_coarsen_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell, ++index) + if (!flags[index]) + { + cell->set_coarsen_flag(); + intergrid_map[cell]->set_coarsen_flag(); + } tr.execute_coarsening_and_refinement (); tr2.execute_coarsening_and_refinement (); @@ -107,9 +107,9 @@ void test(std::ostream& /*out*/) deallog << std::endl; deallog << i << " Number of cells: " - << tr.n_active_cells() << ' ' - << tr2.n_active_cells() - << std::endl; + << tr.n_active_cells() << ' ' + << tr2.n_active_cells() + << std::endl; assert_tria_equal("3d_coarsening_03", tr, tr2); diff --git a/tests/distributed_grids/3d_coarsening_04.cc b/tests/distributed_grids/3d_coarsening_04.cc index 3fbb0f7bee..be1c6c2a3f 100644 --- a/tests/distributed_grids/3d_coarsening_04.cc +++ b/tests/distributed_grids/3d_coarsening_04.cc @@ -36,7 +36,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); Triangulation tr2 (Triangulation::limit_level_difference_at_vertices); @@ -46,7 +46,7 @@ void test(std::ostream& /*out*/) gi.attach_triangulation (tr); std::ifstream in ("../deal.II/grid_in_3d_02/747.ucd"); gi.read (in); - //tr.refine_global (1); + //tr.refine_global (1); } { @@ -54,63 +54,63 @@ void test(std::ostream& /*out*/) gi.attach_triangulation (tr2); std::ifstream in ("../deal.II/grid_in_3d_02/747.ucd"); gi.read (in); - //tr2.refine_global (1); + //tr2.refine_global (1); } Assert (tr.n_active_cells() == tr2.n_active_cells(), - ExcInternalError()); - deallog << " Number of cells: " - << tr.n_active_cells() << ' ' - << tr2.n_active_cells() - << std::endl; + ExcInternalError()); + deallog << " Number of cells: " + << tr.n_active_cells() << ' ' + << tr2.n_active_cells() + << std::endl; for (unsigned int i=0; i<2; ++i) { - // refine one-tenth of cells randomly + // refine one-tenth of cells randomly std::vector flags (tr.n_active_cells(), false); for (unsigned int k=0; k > intergrid_map; intergrid_map.make_mapping (tr, tr2); - // refine tr and tr2 + // refine tr and tr2 unsigned int index=0; for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell, ++index) - if (flags[index]) - { - cell->set_refine_flag(); - intergrid_map[cell]->set_refine_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell, ++index) + if (flags[index]) + { + cell->set_refine_flag(); + intergrid_map[cell]->set_refine_flag(); + } Assert (index == tr.n_active_cells(), ExcInternalError()); - // flag all other cells for coarsening - // (this should ensure that at least - // some of them will actually be - // coarsened) + // flag all other cells for coarsening + // (this should ensure that at least + // some of them will actually be + // coarsened) index=0; for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell, ++index) - if (!flags[index]) - { - cell->set_coarsen_flag(); - intergrid_map[cell]->set_coarsen_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell, ++index) + if (!flags[index]) + { + cell->set_coarsen_flag(); + intergrid_map[cell]->set_coarsen_flag(); + } tr.execute_coarsening_and_refinement (); tr2.execute_coarsening_and_refinement (); deallog << i << " Number of cells: " - << tr.n_active_cells() << ' ' - << tr2.n_active_cells() - << std::endl; + << tr.n_active_cells() << ' ' + << tr2.n_active_cells() + << std::endl; assert_tria_equal("3d_coarsening_04", tr, tr2); diff --git a/tests/distributed_grids/3d_coarsening_05.cc b/tests/distributed_grids/3d_coarsening_05.cc index b2cf2f7187..ccb18f8529 100644 --- a/tests/distributed_grids/3d_coarsening_05.cc +++ b/tests/distributed_grids/3d_coarsening_05.cc @@ -39,7 +39,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); Triangulation tr2 (Triangulation::limit_level_difference_at_vertices); @@ -51,7 +51,7 @@ void test(std::ostream& /*out*/) tr2.refine_global (1); Assert (tr.n_active_cells() == tr2.n_active_cells(), - ExcInternalError()); + ExcInternalError()); while (tr.n_active_cells() < 50000) @@ -61,45 +61,45 @@ void test(std::ostream& /*out*/) std::vector flags (tr.n_active_cells(), false); - // refine one fifth of all cells each - // time (but at least one) + // refine one fifth of all cells each + // time (but at least one) for (unsigned int i=0; i::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell, ++index) - if (flags[index]) - { - cell->set_refine_flag(); - intergrid_map[cell]->set_refine_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell, ++index) + if (flags[index]) + { + cell->set_refine_flag(); + intergrid_map[cell]->set_refine_flag(); + } Assert (index == tr.n_active_cells(), ExcInternalError()); - // flag all other cells for coarsening - // (this should ensure that at least - // some of them will actually be - // coarsened) + // flag all other cells for coarsening + // (this should ensure that at least + // some of them will actually be + // coarsened) index=0; for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell, ++index) - if (!flags[index]) - { - cell->set_coarsen_flag(); - intergrid_map[cell]->set_coarsen_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell, ++index) + if (!flags[index]) + { + cell->set_coarsen_flag(); + intergrid_map[cell]->set_coarsen_flag(); + } tr.execute_coarsening_and_refinement (); tr2.execute_coarsening_and_refinement (); deallog << " Number of cells: " - << tr.n_active_cells() << ' ' - << tr2.n_active_cells() - << std::endl; + << tr.n_active_cells() << ' ' + << tr2.n_active_cells() + << std::endl; assert_tria_equal("3d_coarsening_05", tr, tr2); diff --git a/tests/distributed_grids/3d_refinement_01.cc b/tests/distributed_grids/3d_refinement_01.cc index 81b1c9b458..d7367f509a 100644 --- a/tests/distributed_grids/3d_refinement_01.cc +++ b/tests/distributed_grids/3d_refinement_01.cc @@ -34,7 +34,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); diff --git a/tests/distributed_grids/3d_refinement_02.cc b/tests/distributed_grids/3d_refinement_02.cc index 5acce43b28..9a56a2bd2c 100644 --- a/tests/distributed_grids/3d_refinement_02.cc +++ b/tests/distributed_grids/3d_refinement_02.cc @@ -52,7 +52,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); Triangulation tr2 (Triangulation::limit_level_difference_at_vertices); @@ -64,31 +64,31 @@ void test(std::ostream& /*out*/) tr2.refine_global (1); Assert (tr.n_active_cells() == tr2.n_active_cells(), - ExcInternalError()); + ExcInternalError()); for (unsigned int i=0; i<15-2*dim; ++i) { std::vector flags (tr.n_active_cells(), false); { - const unsigned int x = rand() % flags.size(); - deallog << "Refining cell " << x << std::endl; - flags[x] = true; + const unsigned int x = rand() % flags.size(); + deallog << "Refining cell " << x << std::endl; + flags[x] = true; } InterGridMap > intergrid_map; intergrid_map.make_mapping (tr, tr2); - // refine tr and tr2 + // refine tr and tr2 unsigned int index=0; for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell, ++index) - if (flags[index]) - { - cell->set_refine_flag(); - intergrid_map[cell]->set_refine_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell, ++index) + if (flags[index]) + { + cell->set_refine_flag(); + intergrid_map[cell]->set_refine_flag(); + } Assert (index == tr.n_active_cells(), ExcInternalError()); tr.execute_coarsening_and_refinement (); tr2.execute_coarsening_and_refinement (); @@ -97,9 +97,9 @@ void test(std::ostream& /*out*/) deallog << std::endl; deallog << i << " Number of cells: " - << tr.n_active_cells() << ' ' - << tr2.n_active_cells() - << std::endl; + << tr.n_active_cells() << ' ' + << tr2.n_active_cells() + << std::endl; assert_tria_equal("3d_refinement_02", tr, tr2); diff --git a/tests/distributed_grids/3d_refinement_03.cc b/tests/distributed_grids/3d_refinement_03.cc index d6731aa653..1e74d1e5ab 100644 --- a/tests/distributed_grids/3d_refinement_03.cc +++ b/tests/distributed_grids/3d_refinement_03.cc @@ -36,7 +36,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); Triangulation tr2 (Triangulation::limit_level_difference_at_vertices); @@ -56,28 +56,28 @@ void test(std::ostream& /*out*/) } Assert (tr.n_active_cells() == tr2.n_active_cells(), - ExcInternalError()); + ExcInternalError()); for (unsigned int i=0; i<1; ++i) { std::vector flags (tr.n_active_cells()); for (unsigned int j=0; j > intergrid_map; intergrid_map.make_mapping (tr, tr2); - // refine tr and tr2 + // refine tr and tr2 unsigned int index=0; for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell, ++index) - if (flags[index]) - { - cell->set_refine_flag(); - intergrid_map[cell]->set_refine_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell, ++index) + if (flags[index]) + { + cell->set_refine_flag(); + intergrid_map[cell]->set_refine_flag(); + } Assert (index == tr.n_active_cells(), ExcInternalError()); tr.execute_coarsening_and_refinement (); tr2.execute_coarsening_and_refinement (); @@ -86,9 +86,9 @@ void test(std::ostream& /*out*/) deallog << std::endl; deallog << i << " Number of cells: " - << tr.n_active_cells() << ' ' - << tr2.n_active_cells() - << std::endl; + << tr.n_active_cells() << ' ' + << tr2.n_active_cells() + << std::endl; assert_tria_equal("3d_refinement_03", tr, tr2); diff --git a/tests/distributed_grids/3d_refinement_04.cc b/tests/distributed_grids/3d_refinement_04.cc index 39c21ba7b3..8eff960e65 100644 --- a/tests/distributed_grids/3d_refinement_04.cc +++ b/tests/distributed_grids/3d_refinement_04.cc @@ -41,7 +41,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { for (unsigned int i=0; i::max_children_per_cell; ++i) { @@ -50,27 +50,27 @@ void test(std::ostream& /*out*/) GridGenerator::hyper_cube(tr); deallog << i << ' ' << tr.n_active_cells() - << std::endl; + << std::endl; tr.refine_global (1); deallog << i << ' ' << tr.n_active_cells() - << std::endl; + << std::endl; Assert (tr.n_active_cells() == 8, - ExcInternalError()); + ExcInternalError()); typename Triangulation::active_cell_iterator - cell = tr.begin_active(); + cell = tr.begin_active(); std::advance (cell, i); cell->set_refine_flag(); tr.execute_coarsening_and_refinement (); deallog << i << ' ' << tr.n_active_cells() - << std::endl; + << std::endl; Assert (tr.n_active_cells() == 15, - ExcInternalError()); + ExcInternalError()); } } diff --git a/tests/distributed_grids/3d_refinement_05.cc b/tests/distributed_grids/3d_refinement_05.cc index b39be2ee0b..76adb480cd 100644 --- a/tests/distributed_grids/3d_refinement_05.cc +++ b/tests/distributed_grids/3d_refinement_05.cc @@ -39,7 +39,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); Triangulation tr2 (Triangulation::limit_level_difference_at_vertices); @@ -51,43 +51,43 @@ void test(std::ostream& /*out*/) tr2.refine_global (1); Assert (tr.n_active_cells() == tr2.n_active_cells(), - ExcInternalError()); + ExcInternalError()); while (tr.n_active_cells() < 50000) { std::vector flags (tr.n_active_cells(), false); - // refine one fifth of all cells each - // time (but at least one) + // refine one fifth of all cells each + // time (but at least one) for (unsigned int i=0; i > intergrid_map; intergrid_map.make_mapping (tr, tr2); - // refine tr and tr2 + // refine tr and tr2 unsigned int index=0; for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell, ++index) - if (flags[index]) - { - cell->set_refine_flag(); - intergrid_map[cell]->set_refine_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell, ++index) + if (flags[index]) + { + cell->set_refine_flag(); + intergrid_map[cell]->set_refine_flag(); + } Assert (index == tr.n_active_cells(), ExcInternalError()); tr.execute_coarsening_and_refinement (); tr2.execute_coarsening_and_refinement (); deallog << " Number of cells: " - << tr.n_active_cells() << ' ' - << tr2.n_active_cells() - << std::endl; + << tr.n_active_cells() << ' ' + << tr2.n_active_cells() + << std::endl; assert_tria_equal("3d_refinement_05", tr, tr2); diff --git a/tests/distributed_grids/3d_refinement_06.cc b/tests/distributed_grids/3d_refinement_06.cc index 450ffae6a6..d4621d59b1 100644 --- a/tests/distributed_grids/3d_refinement_06.cc +++ b/tests/distributed_grids/3d_refinement_06.cc @@ -39,7 +39,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); @@ -50,11 +50,11 @@ void test(std::ostream& /*out*/) tr.begin_active()->set_refine_flag(); tr.execute_coarsening_and_refinement (); - // for better visibility, refine - // all children of the sole - // level-1 cell once more. this - // will introduce more level-1 - // cells as well. + // for better visibility, refine + // all children of the sole + // level-1 cell once more. this + // will introduce more level-1 + // cells as well. for (unsigned int c=0; c<8; ++c) tr.begin(1)->child(c)->set_refine_flag(); tr.execute_coarsening_and_refinement (); diff --git a/tests/distributed_grids/3d_refinement_07.cc b/tests/distributed_grids/3d_refinement_07.cc index c8703f218b..e3d6e9f0c0 100644 --- a/tests/distributed_grids/3d_refinement_07.cc +++ b/tests/distributed_grids/3d_refinement_07.cc @@ -36,7 +36,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); diff --git a/tests/distributed_grids/3d_refinement_08.cc b/tests/distributed_grids/3d_refinement_08.cc index 09127c99b5..1da2a64e8c 100644 --- a/tests/distributed_grids/3d_refinement_08.cc +++ b/tests/distributed_grids/3d_refinement_08.cc @@ -36,7 +36,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); Triangulation tr2 (Triangulation::limit_level_difference_at_vertices); @@ -59,37 +59,37 @@ void test(std::ostream& /*out*/) { std::vector flags (tr.n_active_cells(), false); - // refine one tenth of all cells each - // time (but at least one) + // refine one tenth of all cells each + // time (but at least one) deallog << "Refining cells: "; for (unsigned int i=0; i > intergrid_map; intergrid_map.make_mapping (tr, tr2); - // refine tr and tr2 + // refine tr and tr2 unsigned int index=0; for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell, ++index) - if (flags[index]) - { - cell->set_refine_flag(); - intergrid_map[cell]->set_refine_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell, ++index) + if (flags[index]) + { + cell->set_refine_flag(); + intergrid_map[cell]->set_refine_flag(); + } Assert (index == tr.n_active_cells(), ExcInternalError()); tr.execute_coarsening_and_refinement (); tr2.execute_coarsening_and_refinement (); deallog << " Number of cells: " - << tr.n_active_cells() << ' ' - << tr2.n_active_cells() - << std::endl; + << tr.n_active_cells() << ' ' + << tr2.n_active_cells() + << std::endl; assert_tria_equal("3d_refinement_08", tr, tr2); diff --git a/tests/distributed_grids/3d_refinement_09.cc b/tests/distributed_grids/3d_refinement_09.cc index 3becddd6f3..b22509e383 100644 --- a/tests/distributed_grids/3d_refinement_09.cc +++ b/tests/distributed_grids/3d_refinement_09.cc @@ -33,32 +33,32 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); GridGenerator::hyper_cube(tr); - for (unsigned int i=0;i<19;++i) + for (unsigned int i=0; i<19; ++i) { deallog << "cells: " << tr.n_active_cells() << " level:" << tr.n_levels() << std::endl; typename parallel::distributed::Triangulation::cell_iterator it; it=tr.begin_active(); while (it->level()(i)) - ++it; + ++it; + - it->set_refine_flag(); try - { - tr.execute_coarsening_and_refinement (); - } + { + tr.execute_coarsening_and_refinement (); + } catch (ExceptionBase &e) - { - deallog << e.get_exc_name() << std::endl; - } + { + deallog << e.get_exc_name() << std::endl; + } } - + } diff --git a/tests/distributed_grids/anisotropic.cc b/tests/distributed_grids/anisotropic.cc index 9692117cba..1a8de77f57 100644 --- a/tests/distributed_grids/anisotropic.cc +++ b/tests/distributed_grids/anisotropic.cc @@ -33,7 +33,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); @@ -49,7 +49,7 @@ void test(std::ostream& /*out*/) { deallog << e.get_exc_name() << std::endl; } - + } diff --git a/tests/distributed_grids/coarse_grid_common.h b/tests/distributed_grids/coarse_grid_common.h index 481c137a04..c8613cb1c5 100644 --- a/tests/distributed_grids/coarse_grid_common.h +++ b/tests/distributed_grids/coarse_grid_common.h @@ -25,25 +25,25 @@ template void write_vtk (const parallel::distributed::Triangulation &tria, - const char * dirname, - const char * filename) + const char *dirname, + const char *filename) { deallog << "Checksum: " - << tria.get_checksum () - << std::endl; + << tria.get_checksum () + << std::endl; chdir (dirname); tria.write_mesh_vtk (filename); - // copy the .pvtu and .vtu files - // into the logstream + // copy the .pvtu and .vtu files + // into the logstream { std::ifstream in((std::string(filename) + ".pvtu").c_str()); while (in) { - std::string s; - std::getline(in, s); - deallog.get_file_stream() << s << "\n"; + std::string s; + std::getline(in, s); + deallog.get_file_stream() << s << "\n"; } } @@ -51,9 +51,9 @@ void write_vtk (const parallel::distributed::Triangulation &tria, std::ifstream in((std::string(filename) + "_0000.vtu").c_str()); while (in) { - std::string s; - std::getline(in, s); - deallog.get_file_stream() << s << "\n"; + std::string s; + std::getline(in, s); + deallog.get_file_stream() << s << "\n"; } } @@ -62,10 +62,10 @@ void write_vtk (const parallel::distributed::Triangulation &tria, template -void assert_tria_equal(const char* testdir, const Triangulation & a, const Triangulation & b) +void assert_tria_equal(const char *testdir, const Triangulation &a, const Triangulation &b) { Assert (a.n_active_cells() == b.n_active_cells(), - ExcInternalError()); + ExcInternalError()); std::string file1=std::string(testdir)+"/tmp_grid1"; std::string file2=std::string(testdir)+"/tmp_grid2"; @@ -78,11 +78,11 @@ void assert_tria_equal(const char* testdir, const Triangulation & a, const out1.close(); out2.close(); - //compare the two files + //compare the two files std::string cmd = std::string("diff -q ")+file1+std::string(" ")+file2; Assert (system(cmd.c_str()) == 0, ExcInternalError()); - //and delete them + //and delete them std::remove (file1.c_str()); std::remove (file2.c_str()); } diff --git a/tests/distributed_grids/count_dofs_per_block_01.cc b/tests/distributed_grids/count_dofs_per_block_01.cc index 7121e53b92..bf046470f7 100644 --- a/tests/distributed_grids/count_dofs_per_block_01.cc +++ b/tests/distributed_grids/count_dofs_per_block_01.cc @@ -43,11 +43,11 @@ template void test() { parallel::distributed::Triangulation - triangulation (MPI_COMM_WORLD, - Triangulation::limit_level_difference_at_vertices); + triangulation (MPI_COMM_WORLD, + Triangulation::limit_level_difference_at_vertices); FESystem fe (FE_Q(3),2, - FE_DGQ(1),1); + FE_DGQ(1),1); DoFHandler dof_handler (triangulation); @@ -57,33 +57,33 @@ void test() const unsigned int n_refinements[] = { 0, 4, 3, 2 }; for (unsigned int i=0; i flags (triangulation.n_active_cells(), false); for (unsigned int k=0; k::active_cell_iterator - cell = triangulation.begin_active(); - cell != triangulation.end(); ++cell, ++index) - if (flags[index]) - cell->set_refine_flag(); + cell = triangulation.begin_active(); + cell != triangulation.end(); ++cell, ++index) + if (flags[index]) + cell->set_refine_flag(); Assert (index == triangulation.n_active_cells(), ExcInternalError()); - // flag all other cells for coarsening - // (this should ensure that at least - // some of them will actually be - // coarsened) + // flag all other cells for coarsening + // (this should ensure that at least + // some of them will actually be + // coarsened) index=0; for (typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - cell != triangulation.end(); ++cell, ++index) - if (!flags[index]) - cell->set_coarsen_flag(); + cell = triangulation.begin_active(); + cell != triangulation.end(); ++cell, ++index) + if (!flags[index]) + cell->set_coarsen_flag(); triangulation.execute_coarsening_and_refinement (); dof_handler.distribute_dofs (fe); @@ -92,17 +92,17 @@ void test() DoFTools::count_dofs_per_block (dof_handler, dofs_per_block); Assert (std::accumulate (dofs_per_block.begin(), dofs_per_block.end(), 0U) - == dof_handler.n_dofs(), - ExcInternalError()); - + == dof_handler.n_dofs(), + ExcInternalError()); + unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD); if (myid == 0) - { - deallog << "Total number of dofs: " << dof_handler.n_dofs() << std::endl; - for (unsigned int i=0; i void test() { parallel::distributed::Triangulation - triangulation (MPI_COMM_WORLD, - Triangulation::limit_level_difference_at_vertices); + triangulation (MPI_COMM_WORLD, + Triangulation::limit_level_difference_at_vertices); FESystem fe (FE_Q(3),2, - FE_DGQ(1),1); + FE_DGQ(1),1); DoFHandler dof_handler (triangulation); @@ -59,16 +59,16 @@ void test() DoFTools::count_dofs_per_component (dof_handler, dofs_per_component); Assert (std::accumulate (dofs_per_component.begin(), dofs_per_component.end(), 0U) - == dof_handler.n_dofs(), - ExcInternalError()); - + == dof_handler.n_dofs(), + ExcInternalError()); + unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD); if (myid == 0) { deallog << "Total number of dofs: " << dof_handler.n_dofs() << std::endl; for (unsigned int i=0; i void test() { parallel::distributed::Triangulation - triangulation (MPI_COMM_WORLD, - Triangulation::limit_level_difference_at_vertices); + triangulation (MPI_COMM_WORLD, + Triangulation::limit_level_difference_at_vertices); FESystem fe (FE_Q(3),2, - FE_DGQ(1),1); + FE_DGQ(1),1); DoFHandler dof_handler (triangulation); @@ -58,33 +58,33 @@ void test() const unsigned int n_refinements[] = { 0, 4, 3, 2 }; for (unsigned int i=0; i flags (triangulation.n_active_cells(), false); for (unsigned int k=0; k::active_cell_iterator - cell = triangulation.begin_active(); - cell != triangulation.end(); ++cell, ++index) - if (flags[index]) - cell->set_refine_flag(); + cell = triangulation.begin_active(); + cell != triangulation.end(); ++cell, ++index) + if (flags[index]) + cell->set_refine_flag(); Assert (index == triangulation.n_active_cells(), ExcInternalError()); - // flag all other cells for coarsening - // (this should ensure that at least - // some of them will actually be - // coarsened) + // flag all other cells for coarsening + // (this should ensure that at least + // some of them will actually be + // coarsened) index=0; for (typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - cell != triangulation.end(); ++cell, ++index) - if (!flags[index]) - cell->set_coarsen_flag(); + cell = triangulation.begin_active(); + cell != triangulation.end(); ++cell, ++index) + if (!flags[index]) + cell->set_coarsen_flag(); triangulation.execute_coarsening_and_refinement (); dof_handler.distribute_dofs (fe); @@ -96,15 +96,15 @@ void test() all.add_range (0, N); Assert (dof_handler.n_locally_owned_dofs() == N, - ExcInternalError()); + ExcInternalError()); Assert (dof_handler.locally_owned_dofs() == all, - ExcInternalError()); + ExcInternalError()); Assert (dof_handler.n_locally_owned_dofs_per_processor() == - std::vector (1,N), - ExcInternalError()); + std::vector (1,N), + ExcInternalError()); Assert (dof_handler.locally_owned_dofs_per_processor() == - std::vector(1,all), - ExcInternalError()); + std::vector(1,all), + ExcInternalError()); } } diff --git a/tests/distributed_grids/solution_transfer_01.cc b/tests/distributed_grids/solution_transfer_01.cc index 4ae5d646cd..0c23ecebb3 100644 --- a/tests/distributed_grids/solution_transfer_01.cc +++ b/tests/distributed_grids/solution_transfer_01.cc @@ -40,7 +40,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); @@ -53,8 +53,8 @@ void test(std::ostream& /*out*/) parallel::distributed::SolutionTransfer > soltrans(dofh); for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell) + cell = tr.begin_active(); + cell != tr.end(); ++cell) { cell->set_refine_flag(); } diff --git a/tests/distributed_grids/solution_transfer_02.cc b/tests/distributed_grids/solution_transfer_02.cc index 5de8f95526..fd54ee7c14 100644 --- a/tests/distributed_grids/solution_transfer_02.cc +++ b/tests/distributed_grids/solution_transfer_02.cc @@ -45,22 +45,23 @@ template class MyFunction : public Function { - public: - MyFunction () : Function() {}; - - virtual double value (const Point &p, - const unsigned int) const - { double f=p[0]*2.0+1.0; - if (dim>1) - f*=p[1]*3.3-1.0; - if (dim>2) - f*=p[2]*5.0; - return f; - }; +public: + MyFunction () : Function() {}; + + virtual double value (const Point &p, + const unsigned int) const + { + double f=p[0]*2.0+1.0; + if (dim>1) + f*=p[1]*3.3-1.0; + if (dim>2) + f*=p[2]*5.0; + return f; + }; }; template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { MyFunction func; MappingQ1 mapping; @@ -75,8 +76,8 @@ void test(std::ostream& /*out*/) parallel::distributed::SolutionTransfer > soltrans(dofh); for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell) + cell = tr.begin_active(); + cell != tr.end(); ++cell) { cell->set_refine_flag(); } @@ -85,9 +86,9 @@ void test(std::ostream& /*out*/) Vector solution(dofh.n_dofs()); VectorTools::interpolate (mapping, - * static_cast* >(&dofh), - func, - solution); + * static_cast* >(&dofh), + func, + solution); soltrans.prepare_for_coarsening_and_refinement(solution); @@ -102,13 +103,13 @@ void test(std::ostream& /*out*/) Vector difference(tr.n_global_active_cells()); VectorTools::integrate_difference(mapping, - dofh, - interpolated_solution, - func, - difference, - QGauss(2), - VectorTools::L2_norm); - deallog << "error: " << difference.l2_norm() << std::endl; + dofh, + interpolated_solution, + func, + difference, + QGauss(2), + VectorTools::L2_norm); + deallog << "error: " << difference.l2_norm() << std::endl; } diff --git a/tests/distributed_grids/solution_transfer_03.cc b/tests/distributed_grids/solution_transfer_03.cc index 3fd35e9a70..a424e388b4 100644 --- a/tests/distributed_grids/solution_transfer_03.cc +++ b/tests/distributed_grids/solution_transfer_03.cc @@ -48,22 +48,23 @@ template class MyFunction : public Function { - public: - MyFunction () : Function() {}; - - virtual double value (const Point &p, - const unsigned int) const - { double f=p[0]*2.0+1.0; - if (dim>1) - f*=p[1]*3.3-1.0; - if (dim>2) - f*=p[2]*5.0; - return f; - }; +public: + MyFunction () : Function() {}; + + virtual double value (const Point &p, + const unsigned int) const + { + double f=p[0]*2.0+1.0; + if (dim>1) + f*=p[1]*3.3-1.0; + if (dim>2) + f*=p[2]*5.0; + return f; + }; }; template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { MyFunction func; MappingQ1 mapping; @@ -77,47 +78,47 @@ void test(std::ostream& /*out*/) parallel::distributed::SolutionTransfer > soltrans(dofh); - for (int i=0;i<4;++i) + for (int i=0; i<4; ++i) { for (typename Triangulation::cell_iterator - cell = tr.begin(); - cell != tr.end(); ++cell) - { - if (cell->has_children() && !(rand() % 3)) - for (unsigned int c=0;c::max_children_per_cell; ++c) - if (!cell->child(c)->has_children()) - cell->child(c)->set_coarsen_flag(); - } + cell = tr.begin(); + cell != tr.end(); ++cell) + { + if (cell->has_children() && !(rand() % 3)) + for (unsigned int c=0; c::max_children_per_cell; ++c) + if (!cell->child(c)->has_children()) + cell->child(c)->set_coarsen_flag(); + } for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell) - { - if (!(rand() % 3)) - { - cell->clear_coarsen_flag(); - cell->set_refine_flag(); - } + cell = tr.begin_active(); + cell != tr.end(); ++cell) + { + if (!(rand() % 3)) + { + cell->clear_coarsen_flag(); + cell->set_refine_flag(); + } - } + } tr.prepare_coarsening_and_refinement(); Vector solution(dofh.n_dofs()); VectorTools::interpolate (mapping, - * static_cast* >(&dofh), - func, - solution); + * static_cast* >(&dofh), + func, + solution); soltrans.prepare_for_coarsening_and_refinement(solution); tr.execute_coarsening_and_refinement (); if (0) - { - std::ofstream out ("grid-1.eps"); - GridOut grid_out; - grid_out.write_eps (tr, out); - } + { + std::ofstream out ("grid-1.eps"); + GridOut grid_out; + grid_out.write_eps (tr, out); + } dofh.distribute_dofs (fe); @@ -128,12 +129,12 @@ void test(std::ostream& /*out*/) Vector difference(tr.n_global_active_cells()); VectorTools::integrate_difference(mapping, - dofh, - interpolated_solution, - func, - difference, - QGauss(2), - VectorTools::L2_norm); + dofh, + interpolated_solution, + func, + difference, + QGauss(2), + VectorTools::L2_norm); deallog << "error: " << difference.l2_norm() << std::endl; } @@ -161,5 +162,5 @@ int main(int argc, char *argv[]) deallog.push("3d"); test<3>(logfile); deallog.pop(); - + } diff --git a/tests/distributed_grids/solution_transfer_04.cc b/tests/distributed_grids/solution_transfer_04.cc index 7e6b9a3a5d..869c7ea9cb 100644 --- a/tests/distributed_grids/solution_transfer_04.cc +++ b/tests/distributed_grids/solution_transfer_04.cc @@ -40,7 +40,7 @@ template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD); @@ -54,8 +54,8 @@ void test(std::ostream& /*out*/) parallel::distributed::SolutionTransfer > soltrans2(dofh); for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell) + cell = tr.begin_active(); + cell != tr.end(); ++cell) { cell->set_refine_flag(); } diff --git a/tests/distributed_grids/subdomain_id_01.cc b/tests/distributed_grids/subdomain_id_01.cc index 904901aadb..ba026f68f5 100644 --- a/tests/distributed_grids/subdomain_id_01.cc +++ b/tests/distributed_grids/subdomain_id_01.cc @@ -36,31 +36,31 @@ template -void check (TRIA & tr) +void check (TRIA &tr) { typename TRIA::cell_iterator cell = tr.begin(), - endc = tr.end(); - + endc = tr.end(); + for (; cell!=endc; ++cell) { deallog << cell->level_subdomain_id() << " "; try - { - deallog << cell->subdomain_id(); - } + { + deallog << cell->subdomain_id(); + } catch (...) - { - deallog << "."; - - } + { + deallog << "."; + + } deallog << std::endl; } - + deallog << "OK" << std::endl; } -int main (int argc, char *argv[]) +int main (int argc, char *argv[]) { deal_II_exceptions::disable_abort_on_exception(); @@ -80,5 +80,5 @@ int main (int argc, char *argv[]) check(tria2); } - - + + diff --git a/tests/distributed_grids/tria_settings_01.cc b/tests/distributed_grids/tria_settings_01.cc index de0feea930..7db3941e68 100644 --- a/tests/distributed_grids/tria_settings_01.cc +++ b/tests/distributed_grids/tria_settings_01.cc @@ -36,7 +36,7 @@ #include template -void testit(parallel::distributed::Triangulation & tr) +void testit(parallel::distributed::Triangulation &tr) { GridGenerator::hyper_cube(tr); tr.refine_global(1); @@ -48,38 +48,38 @@ void testit(parallel::distributed::Triangulation & tr) tr.execute_coarsening_and_refinement (); typename parallel::distributed::Triangulation::active_cell_iterator it=tr.begin_active(); - for (;it!=tr.end();++it) + for (; it!=tr.end(); ++it) { deallog << it->center() << ", "; } - deallog << std::endl; + deallog << std::endl; } template -void test(std::ostream& /*out*/) +void test(std::ostream & /*out*/) { { - - parallel::distributed::Triangulation tr(MPI_COMM_WORLD, - dealii::Triangulation::none, - parallel::distributed::Triangulation::default_setting); - testit(tr); - + + parallel::distributed::Triangulation tr(MPI_COMM_WORLD, + dealii::Triangulation::none, + parallel::distributed::Triangulation::default_setting); + testit(tr); + } - + { - - parallel::distributed::Triangulation tr(MPI_COMM_WORLD, - dealii::Triangulation::none, - parallel::distributed::Triangulation::mesh_reconstruction_after_repartitioning); - testit(tr); - + + parallel::distributed::Triangulation tr(MPI_COMM_WORLD, + dealii::Triangulation::none, + parallel::distributed::Triangulation::mesh_reconstruction_after_repartitioning); + testit(tr); + } - - + + } diff --git a/tests/fail/abf_approximation_01.cc b/tests/fail/abf_approximation_01.cc index 81172a1868..4dc074505a 100644 --- a/tests/fail/abf_approximation_01.cc +++ b/tests/fail/abf_approximation_01.cc @@ -74,18 +74,18 @@ char buf[1000]; template class TestMap1 : public Function { - public: - TestMap1 (const unsigned int n_components) : - Function (n_components) - {} - - virtual ~TestMap1 () {} - - virtual double value (const Point &p, - const unsigned int component = 0) const; - - void vector_value (const Point &p, - Vector &return_value) const; +public: + TestMap1 (const unsigned int n_components) : + Function (n_components) + {} + + virtual ~TestMap1 () {} + + virtual double value (const Point &p, + const unsigned int component = 0) const; + + void vector_value (const Point &p, + Vector &return_value) const; }; @@ -93,10 +93,10 @@ class TestMap1 : public Function template double TestMap1::value (const Point &p, - const unsigned int component) const + const unsigned int component) const { - // u = x^2, v = y^2, dudx = 2 x, dvdy = 2 y, div u = 2x + 2y - // I.e. \int div u = 2 (for unit square) + // u = x^2, v = y^2, dudx = 2 x, dvdy = 2 y, div u = 2x + 2y + // I.e. \int div u = 2 (for unit square) if (component == 0) return (p(0) * p(0)); @@ -109,12 +109,12 @@ TestMap1::value (const Point &p, template void TestMap1::vector_value (const Point &p, - Vector &return_value) const + Vector &return_value) const { Assert (return_value.size() == this->n_components, - ExcDimensionMismatch (return_value.size(), this->n_components)); - - // Just fill the vector with the appropriate components + ExcDimensionMismatch (return_value.size(), this->n_components)); + + // Just fill the vector with the appropriate components for (unsigned int iCount = 0; iCount < this->n_components; iCount++) return_value (iCount) = value (p, iCount); } @@ -126,22 +126,22 @@ void TestMap1::vector_value (const Point &p, template class TestDef1 : public Function { - private: - const double phi; - - public: - TestDef1 (const unsigned int n_components, const double ph) : - Function (n_components), - phi (ph) - {} - - virtual ~TestDef1 () {} - - virtual double value (const Point &p, - const unsigned int component = 0) const; - - void vector_value (const Point &p, - Vector &return_value) const; +private: + const double phi; + +public: + TestDef1 (const unsigned int n_components, const double ph) : + Function (n_components), + phi (ph) + {} + + virtual ~TestDef1 () {} + + virtual double value (const Point &p, + const unsigned int component = 0) const; + + void vector_value (const Point &p, + Vector &return_value) const; }; @@ -149,13 +149,13 @@ class TestDef1 : public Function template double TestDef1::value (const Point &p, - const unsigned int component) const + const unsigned int component) const { Point<2> center; center(0) = 0.5; center(1) = 0.5; double rad = p.distance (center), - phi_p = atan2 (p(0) - center(0), p(1) - center(1)); + phi_p = atan2 (p(0) - center(0), p(1) - center(1)); if (component == 0) return rad * (sin (phi + phi_p) - sin (phi_p)); @@ -166,10 +166,10 @@ TestDef1::value (const Point &p, template void TestDef1::vector_value (const Point &p, - Vector &return_value) const + Vector &return_value) const { Assert (return_value.size() == this->n_components, - ExcDimensionMismatch (return_value.size(), this->n_components)); + ExcDimensionMismatch (return_value.size(), this->n_components)); for (unsigned int iCount = 0; iCount < this->n_components; iCount++) return_value (iCount) = value (p, iCount); } @@ -181,32 +181,32 @@ void TestDef1::vector_value (const Point &p, template class TestDef2 : public Function { - private: - const double scale; - - public: - TestDef2 (const unsigned int n_components, const double sc) : - Function (n_components), - scale (sc) - {} - - virtual ~TestDef2 () {} - - virtual double value (const Point &p, - const unsigned int component = 0) const; - - void vector_value (const Point &p, - Vector &return_value) const; +private: + const double scale; + +public: + TestDef2 (const unsigned int n_components, const double sc) : + Function (n_components), + scale (sc) + {} + + virtual ~TestDef2 () {} + + virtual double value (const Point &p, + const unsigned int component = 0) const; + + void vector_value (const Point &p, + Vector &return_value) const; }; template double TestDef2::value (const Point &p, - const unsigned int component) const + const unsigned int component) const { double x = p(0), - y = p(1); + y = p(1); if (component == 0) return scale * x; @@ -217,10 +217,10 @@ TestDef2::value (const Point &p, template void TestDef2::vector_value (const Point &p, - Vector &return_value) const + Vector &return_value) const { Assert (return_value.size() == this->n_components, - ExcDimensionMismatch (return_value.size(), this->n_components)); + ExcDimensionMismatch (return_value.size(), this->n_components)); for (unsigned int iCount = 0; iCount < this->n_components; iCount++) return_value (iCount) = value (p, iCount); } @@ -233,29 +233,29 @@ void TestDef2::vector_value (const Point &p, template class TestDef3 : public Function { - private: - const double scale; - - public: - TestDef3 (const unsigned int n_components, const double sc) : - Function (n_components), - scale (sc) - {} - - virtual ~TestDef3 () {} - - virtual double value (const Point &p, - const unsigned int component = 0) const; - - void vector_value (const Point &p, - Vector &return_value) const; +private: + const double scale; + +public: + TestDef3 (const unsigned int n_components, const double sc) : + Function (n_components), + scale (sc) + {} + + virtual ~TestDef3 () {} + + virtual double value (const Point &p, + const unsigned int component = 0) const; + + void vector_value (const Point &p, + Vector &return_value) const; }; template double TestDef3::value (const Point &p, - const unsigned int component) const + const unsigned int component) const { double y = p(1); @@ -268,57 +268,57 @@ TestDef3::value (const Point &p, template void TestDef3::vector_value (const Point &p, - Vector &return_value) const + Vector &return_value) const { Assert (return_value.size() == this->n_components, - ExcDimensionMismatch (return_value.size(), this->n_components)); + ExcDimensionMismatch (return_value.size(), this->n_components)); for (unsigned int iCount = 0; iCount < this->n_components; iCount++) return_value (iCount) = value (p, iCount); } -// Wrapper class for polynomials. +// Wrapper class for polynomials. template class TestPoly : public Function { - private: - std::vector > polys; +private: + std::vector > polys; - public: - TestPoly (unsigned int deg) : - Function (2) +public: + TestPoly (unsigned int deg) : + Function (2) + { + std::vector coeff (deg, 0.0); + for (unsigned int p=0; p < 4; ++p) { - std::vector coeff (deg, 0.0); - for (unsigned int p=0; p < 4; ++p) - { - for (unsigned int i=0; i < deg; ++i) - { - double c = ((double) rand ()) / ((double) RAND_MAX + 1); - coeff[i] = c; - } - polys.push_back (Polynomials::Polynomial (coeff)); - } + for (unsigned int i=0; i < deg; ++i) + { + double c = ((double) rand ()) / ((double) RAND_MAX + 1); + coeff[i] = c; + } + polys.push_back (Polynomials::Polynomial (coeff)); } - - virtual ~TestPoly () {} - - virtual double value (const Point &p, - const unsigned int component = 0) const; - - void vector_value (const Point &p, - Vector &return_value) const; + } + + virtual ~TestPoly () {} + + virtual double value (const Point &p, + const unsigned int component = 0) const; + + void vector_value (const Point &p, + Vector &return_value) const; }; template double TestPoly::value (const Point &p, - const unsigned int component) const + const unsigned int component) const { double x = p(0), - y = p(1); + y = p(1); - // Ugly hack, but should do the job ... + // Ugly hack, but should do the job ... if (component == 0) return polys[0].value (x) + polys[1].value (y); else @@ -328,10 +328,10 @@ TestPoly::value (const Point &p, template void TestPoly::vector_value (const Point &p, - Vector &return_value) const + Vector &return_value) const { Assert (return_value.size() == this->n_components, - ExcDimensionMismatch (return_value.size(), this->n_components)); + ExcDimensionMismatch (return_value.size(), this->n_components)); for (unsigned int iCount = 0; iCount < this->n_components; iCount++) return_value (iCount) = value (p, iCount); } @@ -343,80 +343,80 @@ void TestPoly::vector_value (const Point &p, */ double TestProjection (Mapping<2> &mapping, - DoFHandler<2> *dof_handler) + DoFHandler<2> *dof_handler) { Vector solution; solution.reinit (dof_handler->n_dofs ()); - // Create and Project test function to H_div space and evaluate the error - // If the error is in the range of machine precision, this polynomial - // degree can obviously be represented by projected field. + // Create and Project test function to H_div space and evaluate the error + // If the error is in the range of machine precision, this polynomial + // degree can obviously be represented by projected field. for (unsigned int deg = 1; deg < 4; ++deg) { TestPoly<2> pol (deg); - // Project solution onto RT FE field + // Project solution onto RT FE field ConstraintMatrix hn_constraints; hn_constraints.clear (); - DoFTools::make_hanging_node_constraints (*dof_handler, - hn_constraints); + DoFTools::make_hanging_node_constraints (*dof_handler, + hn_constraints); hn_constraints.close (); VectorTools::project (mapping, *dof_handler, hn_constraints, - QGauss<2> (6), pol, - solution); + QGauss<2> (6), pol, + solution); - // Now evaluate error ... - // Use a high order quadrature. + // Now evaluate error ... + // Use a high order quadrature. QGauss<2> quad (6); - FEValues<2> fe_values (mapping, dof_handler->get_fe (), quad, - UpdateFlags(update_values | - update_q_points | - update_gradients | - update_JxW_values| - update_contravariant_transformation)); + FEValues<2> fe_values (mapping, dof_handler->get_fe (), quad, + UpdateFlags(update_values | + update_q_points | + update_gradients | + update_JxW_values| + update_contravariant_transformation)); const unsigned int n_q_points = quad.size(); const unsigned int n_components = dof_handler->get_fe().n_components(); - - // Cell iterators + + // Cell iterators DoFHandler<2>::active_cell_iterator cell = dof_handler->begin_active(), - endc = dof_handler->end(); + endc = dof_handler->end(); double err_u = 0, - err_v = 0; + err_v = 0; for (; cell!=endc; ++cell) - { - fe_values.reinit (cell); - - // Get values from solution vector (For Trap.Rule) - std::vector > this_value - (n_q_points, Vector(n_components)); - fe_values.get_function_values (solution, this_value); - - for (unsigned int q_point=0; q_point p = fe_values.quadrature_point (q_point); - - double u_ex = pol.value (p, 0), - v_ex = pol.value (p, 1); - - double JxW = fe_values.JxW (q_point); - - err_u += (u - u_ex) * (u - u_ex) * JxW; - err_v += (v - v_ex) * (v - v_ex) * JxW; - } - } + { + fe_values.reinit (cell); + + // Get values from solution vector (For Trap.Rule) + std::vector > this_value + (n_q_points, Vector(n_components)); + fe_values.get_function_values (solution, this_value); + + for (unsigned int q_point=0; q_point p = fe_values.quadrature_point (q_point); + + double u_ex = pol.value (p, 0), + v_ex = pol.value (p, 1); + + double JxW = fe_values.JxW (q_point); + + err_u += (u - u_ex) * (u - u_ex) * JxW; + err_v += (v - v_ex) * (v - v_ex) * JxW; + } + } sprintf (buf, "Deg %i ErrU %e ErrV %e\n", deg, err_u, err_v); deallog << buf; } - // Test the core functionality + // Test the core functionality DataOut<2> *data_out = new DataOut<2>; data_out->attach_dof_handler (*dof_handler); data_out->add_data_vector (solution, "solution"); @@ -433,22 +433,22 @@ double TestProjection (Mapping<2> &mapping, int main () { logfile.precision (PRECISION); - logfile.setf(std::ios::fixed); + logfile.setf(std::ios::fixed); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); Triangulation<2> tria_test; DoFHandler<2> *dof_handler, - *dof_handler_def; + *dof_handler_def; Point<2> p1 (0,0), - p2 (1, 1); + p2 (1, 1); GridGenerator::hyper_rectangle (tria_test, p1, p2); - // tria_test.refine_global (1); - // tria_test.distort_random (0.4); + // tria_test.refine_global (1); + // tria_test.distort_random (0.4); - // Create a DoFHandler for the ABF space + // Create a DoFHandler for the ABF space FE_ABF<2> fe (0); dof_handler = new DoFHandler<2> (tria_test); dof_handler->distribute_dofs (fe); @@ -459,74 +459,74 @@ int main () sprintf (buf, "QPoints %i\n", quad_temp.size()); deallog << buf; - // Create an deformation object for the Eulerian mapping + // Create an deformation object for the Eulerian mapping FESystem<2> fe_def (FE_Q<2>(1), 2); dof_handler_def = new DoFHandler<2> (tria_test); dof_handler_def->distribute_dofs (fe_def); - // Alloc some DoFs + // Alloc some DoFs Vector solution, - solution_q, - deformation; + solution_q, + deformation; solution.reinit (dof_handler->n_dofs ()); solution_q.reinit (dof_handler->n_dofs ()); deformation.reinit (dof_handler_def->n_dofs ()); ConstraintMatrix hn_constraints_def; hn_constraints_def.clear (); - DoFTools::make_hanging_node_constraints (*dof_handler_def, - hn_constraints_def); + DoFTools::make_hanging_node_constraints (*dof_handler_def, + hn_constraints_def); hn_constraints_def.close (); - + { MappingQ1Eulerian<2> mapping_euler (deformation, *dof_handler_def); - // Try rotating the elements + // Try rotating the elements for (double rotat = 0; rotat < 2 * M_PI; rotat += 0.25 * M_PI) { - // Rotate element - VectorTools::project (*dof_handler_def, hn_constraints_def, - QGauss<2> (6), TestDef1<2>(2, rotat), - deformation); - sprintf (buf, "phi = %e\n", rotat); - deallog << buf; - TestProjection (mapping_euler, dof_handler); + // Rotate element + VectorTools::project (*dof_handler_def, hn_constraints_def, + QGauss<2> (6), TestDef1<2>(2, rotat), + deformation); + sprintf (buf, "phi = %e\n", rotat); + deallog << buf; + TestProjection (mapping_euler, dof_handler); } - // Try resizing the elements + // Try resizing the elements for (double scale = -0.75; scale < 4.0; scale += 0.25) { - VectorTools::project (*dof_handler_def, hn_constraints_def, - QGauss<2> (6), TestDef2<2>(2, scale), - deformation); - sprintf (buf, "Scale = %e\n", scale); - deallog << buf; - TestProjection (mapping_euler, dof_handler); + VectorTools::project (*dof_handler_def, hn_constraints_def, + QGauss<2> (6), TestDef2<2>(2, scale), + deformation); + sprintf (buf, "Scale = %e\n", scale); + deallog << buf; + TestProjection (mapping_euler, dof_handler); } - // Try paralellogramming the elements + // Try paralellogramming the elements for (double scale = -1.0; scale < 1.0; scale += 0.25) { - VectorTools::project (*dof_handler_def, hn_constraints_def, - QGauss<2> (6), TestDef3<2>(2, scale), - deformation); - sprintf (buf, "Scale = %e\n", scale); - deallog << buf; - TestProjection (mapping_euler, dof_handler); + VectorTools::project (*dof_handler_def, hn_constraints_def, + QGauss<2> (6), TestDef3<2>(2, scale), + deformation); + sprintf (buf, "Scale = %e\n", scale); + deallog << buf; + TestProjection (mapping_euler, dof_handler); } - // Try arbitrary deformation ... + // Try arbitrary deformation ... for (unsigned int i=0; i < deformation.size (); ++i) { - double c = ((double) rand ()) / ((double) RAND_MAX + 1); - deformation (i) = 0.35 * (c - 0.5); + double c = ((double) rand ()) / ((double) RAND_MAX + 1); + deformation (i) = 0.35 * (c - 0.5); } sprintf (buf, "Arbitrary\n"); deallog << buf; TestProjection (mapping_euler, dof_handler); } - + delete (dof_handler); delete (dof_handler_def); diff --git a/tests/fail/circular_01.cc b/tests/fail/circular_01.cc index 13d5a2ae7b..7bdbe717d9 100644 --- a/tests/fail/circular_01.cc +++ b/tests/fail/circular_01.cc @@ -59,44 +59,44 @@ char logname[] = "circular_01/output"; #include - // Finally, this is as in previous - // programs: +// Finally, this is as in previous +// programs: using namespace dealii; template -class LaplaceProblem +class LaplaceProblem { - public: - LaplaceProblem (); - ~LaplaceProblem (); +public: + LaplaceProblem (); + ~LaplaceProblem (); - void run (); - - private: - void setup_system (); - void assemble_system (); - void solve (); - void create_coarse_grid (); - void refine_grid (); - void estimate_smoothness (Vector &smoothness_indicators) const; - void output_results (const unsigned int cycle) const; + void run (); - Triangulation triangulation; +private: + void setup_system (); + void assemble_system (); + void solve (); + void create_coarse_grid (); + void refine_grid (); + void estimate_smoothness (Vector &smoothness_indicators) const; + void output_results (const unsigned int cycle) const; - hp::DoFHandler dof_handler; - hp::FECollection fe_collection; - hp::QCollection quadrature_collection; - hp::QCollection face_quadrature_collection; + Triangulation triangulation; - ConstraintMatrix hanging_node_constraints; + hp::DoFHandler dof_handler; + hp::FECollection fe_collection; + hp::QCollection quadrature_collection; + hp::QCollection face_quadrature_collection; - SparsityPattern sparsity_pattern; - SparseMatrix system_matrix; + ConstraintMatrix hanging_node_constraints; - Vector solution; - Vector system_rhs; + SparsityPattern sparsity_pattern; + SparseMatrix system_matrix; - Timer distr, condense, hang, assemble, solver; + Vector solution; + Vector system_rhs; + + Timer distr, condense, hang, assemble, solver; }; @@ -104,18 +104,18 @@ class LaplaceProblem template class RightHandSide : public Function { - public: - RightHandSide () : Function () {} - - virtual double value (const Point &p, - const unsigned int component) const; +public: + RightHandSide () : Function () {} + + virtual double value (const Point &p, + const unsigned int component) const; }; template double RightHandSide::value (const Point &p, - const unsigned int /*component*/) const + const unsigned int /*component*/) const { double product = 1; for (unsigned int d=0; d::value (const Point &p, template LaplaceProblem::LaplaceProblem () : - dof_handler (triangulation) + dof_handler (triangulation) { for (unsigned int degree=2; degree<(dim == 2 ? 8 : 5); ++degree) { @@ -140,7 +140,7 @@ LaplaceProblem::LaplaceProblem () : template -LaplaceProblem::~LaplaceProblem () +LaplaceProblem::~LaplaceProblem () { dof_handler.clear (); } @@ -160,7 +160,7 @@ void LaplaceProblem::setup_system () hang.reset(); hang.start(); DoFTools::make_hanging_node_constraints (dof_handler, - hanging_node_constraints); + hanging_node_constraints); hanging_node_constraints.close (); hang.stop(); @@ -168,46 +168,46 @@ void LaplaceProblem::setup_system () if (dim < 3) { sparsity_pattern.reinit (dof_handler.n_dofs(), - dof_handler.n_dofs(), - dof_handler.max_couplings_between_dofs()); + dof_handler.n_dofs(), + dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern); condense.reset(); condense.start(); hanging_node_constraints.condense (sparsity_pattern); condense.stop(); - sparsity_pattern.compress(); + sparsity_pattern.compress(); } else { CompressedSparsityPattern csp (dof_handler.n_dofs(), - dof_handler.n_dofs()); + dof_handler.n_dofs()); DoFTools::make_sparsity_pattern (dof_handler, csp); condense.reset(); condense.start(); hanging_node_constraints.condense (csp); condense.stop(); - + sparsity_pattern.copy_from (csp); - } + } system_matrix.reinit (sparsity_pattern); } template -void LaplaceProblem::assemble_system () +void LaplaceProblem::assemble_system () { hp::FEValues hp_fe_values (fe_collection, - quadrature_collection, - update_values | update_gradients | - update_q_points | update_JxW_values); + quadrature_collection, + update_values | update_gradients | + update_q_points | update_JxW_values); const RightHandSide rhs_function; - + 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 (; cell!=endc; ++cell) { const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell; @@ -220,36 +220,36 @@ void LaplaceProblem::assemble_system () cell_rhs = 0; hp_fe_values.reinit (cell); - + const FEValues &fe_values = hp_fe_values.get_present_fe_values (); std::vector rhs_values (fe_values.n_quadrature_points); rhs_function.value_list (fe_values.get_quadrature_points(), - rhs_values); - + rhs_values); + for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); for (unsigned int i=0; i::assemble_system () condense.stop(); std::map boundary_values; VectorTools::interpolate_boundary_values (dof_handler, - 0, - ZeroFunction(), - boundary_values); + 0, + ZeroFunction(), + boundary_values); MatrixTools::apply_boundary_values (boundary_values, - system_matrix, - solution, - system_rhs); + system_matrix, + solution, + system_rhs); } template -void LaplaceProblem::solve () +void LaplaceProblem::solve () { SolverControl solver_control (system_rhs.size(), - 1e-8*system_rhs.l2_norm()); + 1e-8*system_rhs.l2_norm()); SolverCG<> cg (solver_control); PreconditionSSOR<> preconditioner; preconditioner.initialize(system_matrix, 1.2); cg.solve (system_matrix, solution, system_rhs, - preconditioner); + preconditioner); hanging_node_constraints.distribute (solution); } @@ -286,7 +286,7 @@ void LaplaceProblem::solve () unsigned int int_pow (const unsigned int x, - const unsigned int n) + const unsigned int n) { unsigned int p=1; for (unsigned int i=0; i &smoothness_indicators) const { const unsigned int N = (dim == 2 ? 7 : 4); - // form all the Fourier vectors - // that we want to - // consider. exclude k=0 to avoid - // problems with |k|^{-mu} and also - // logarithms of |k| + // form all the Fourier vectors + // that we want to + // consider. exclude k=0 to avoid + // problems with |k|^{-mu} and also + // logarithms of |k| std::vector > k_vectors; std::vector k_vectors_magnitude; switch (dim) { - case 2: - { - for (unsigned int i=0; i(numbers::PI * i, - numbers::PI * j)); - k_vectors_magnitude.push_back (i*i+j*j); - } - - break; - } - - case 3: - { - for (unsigned int i=0; i(numbers::PI * i, - numbers::PI * j, - numbers::PI * k)); - k_vectors_magnitude.push_back (i*i+j*j+k*k); - } - - break; - } - - default: - Assert (false, ExcNotImplemented()); + case 2: + { + for (unsigned int i=0; i(numbers::PI * i, + numbers::PI * j)); + k_vectors_magnitude.push_back (i*i+j*j); + } + + break; + } + + case 3: + { + for (unsigned int i=0; i(numbers::PI * i, + numbers::PI * j, + numbers::PI * k)); + k_vectors_magnitude.push_back (i*i+j*j+k*k); + } + + break; + } + + default: + Assert (false, ExcNotImplemented()); } const unsigned n_fourier_modes = k_vectors.size(); std::vector ln_k (n_fourier_modes); for (unsigned int i=0; i base_quadrature (2); QIterated quadrature (base_quadrature, N); - + std::vector > > - fourier_transform_matrices (fe_collection.size()); + fourier_transform_matrices (fe_collection.size()); for (unsigned int fe=0; fe sum = 0; - for (unsigned int q=0; q x_q = quadrature.point(q); - sum += std::exp(std::complex(0,1) * - (k_vectors[k] * x_q)) * - fe_collection[fe].shape_value(i,x_q) * - quadrature.weight(q); - } - fourier_transform_matrices[fe](k,i) - = sum / std::pow(2*numbers::PI, 1.*dim/2); - } + for (unsigned int i=0; i sum = 0; + for (unsigned int q=0; q x_q = quadrature.point(q); + sum += std::exp(std::complex(0,1) * + (k_vectors[k] * x_q)) * + fe_collection[fe].shape_value(i,x_q) * + quadrature.weight(q); + } + fourier_transform_matrices[fe](k,i) + = sum / std::pow(2*numbers::PI, 1.*dim/2); + } } - // the next thing is to loop over - // all cells and do our work there, - // i.e. to locally do the Fourier - // transform and estimate the decay - // coefficient + // the next thing is to loop over + // all cells and do our work there, + // i.e. to locally do the Fourier + // transform and estimate the decay + // coefficient std::vector > fourier_coefficients (n_fourier_modes); Vector local_dof_values; - + 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 index=0; cell!=endc; ++cell, ++index) { local_dof_values.reinit (cell->get_fe().dofs_per_cell); cell->get_dof_values (solution, local_dof_values); - // first compute the Fourier - // transform of the local - // solution + // first compute the Fourier + // transform of the local + // solution std::fill (fourier_coefficients.begin(), fourier_coefficients.end(), 0); for (unsigned int f=0; fget_fe().dofs_per_cell; ++i) - fourier_coefficients[f] += - fourier_transform_matrices[cell->active_fe_index()](f,i) - * - local_dof_values(i); - - // enter the Fourier - // coefficients into a map with - // the k-magnitudes, to make - // sure that we get only the - // largest magnitude for each - // value of |k| + for (unsigned int i=0; iget_fe().dofs_per_cell; ++i) + fourier_coefficients[f] += + fourier_transform_matrices[cell->active_fe_index()](f,i) + * + local_dof_values(i); + + // enter the Fourier + // coefficients into a map with + // the k-magnitudes, to make + // sure that we get only the + // largest magnitude for each + // value of |k| std::map k_to_max_U_map; for (unsigned int f=0; f void LaplaceProblem::refine_grid () { Vector estimated_error_per_cell (triangulation.n_active_cells()); KellyErrorEstimator::estimate (dof_handler, - face_quadrature_collection, - typename FunctionMap::type(), - solution, - estimated_error_per_cell); + face_quadrature_collection, + typename FunctionMap::type(), + solution, + estimated_error_per_cell); Vector smoothness_indicators (triangulation.n_active_cells()); estimate_smoothness (smoothness_indicators); - + GridRefinement::refine_and_coarsen_fixed_number (triangulation, - estimated_error_per_cell, - 0.3, 0.03); + estimated_error_per_cell, + 0.3, 0.03); float max_smoothness = 0, - min_smoothness = smoothness_indicators.linfty_norm(); + min_smoothness = smoothness_indicators.linfty_norm(); { 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 index=0; cell!=endc; ++cell, ++index) if (cell->refine_flag_set()) - { - max_smoothness = std::max (max_smoothness, - smoothness_indicators(index)); - min_smoothness = std::min (min_smoothness, - smoothness_indicators(index)); - } + { + max_smoothness = std::max (max_smoothness, + smoothness_indicators(index)); + min_smoothness = std::min (min_smoothness, + smoothness_indicators(index)); + } } const float cutoff_smoothness = (max_smoothness + min_smoothness) / 2; { 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 index=0; cell!=endc; ++cell, ++index) if (cell->refine_flag_set() - && - (smoothness_indicators(index) > cutoff_smoothness) - && - !(cell->active_fe_index() == fe_collection.size() - 1)) - { - cell->clear_refine_flag(); - cell->set_active_fe_index (std::min (cell->active_fe_index() + 1, - fe_collection.size() - 1)); - } - } - + && + (smoothness_indicators(index) > cutoff_smoothness) + && + !(cell->active_fe_index() == fe_collection.size() - 1)) + { + cell->clear_refine_flag(); + cell->set_active_fe_index (std::min (cell->active_fe_index() + 1, + fe_collection.size() - 1)); + } + } + triangulation.execute_coarsening_and_refinement (); } @@ -525,42 +525,42 @@ template void LaplaceProblem::output_results (const unsigned int cycle) const { Assert (cycle < 10, ExcNotImplemented()); - + { const std::string filename = "grid-" + - Utilities::int_to_string (cycle, 2) + - ".eps"; + Utilities::int_to_string (cycle, 2) + + ".eps"; std::ofstream output (filename.c_str()); - + GridOut grid_out; grid_out.write_eps (triangulation, output); } - + { Vector smoothness_indicators (triangulation.n_active_cells()); estimate_smoothness (smoothness_indicators); Vector smoothness_field (dof_handler.n_dofs()); DoFTools::distribute_cell_to_dof_vector (dof_handler, - smoothness_indicators, - smoothness_field); + smoothness_indicators, + smoothness_field); Vector fe_indices (triangulation.n_active_cells()); { 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 index=0; cell!=endc; ++cell, ++index) - { - - fe_indices(index) = cell->active_fe_index(); -// smoothness_indicators(index) *= std::sqrt(cell->diameter()); - } + { + + fe_indices(index) = cell->active_fe_index(); +// smoothness_indicators(index) *= std::sqrt(cell->diameter()); + } } - + const std::string filename = "solution-" + - Utilities::int_to_string (cycle, 2) + - ".vtk"; + Utilities::int_to_string (cycle, 2) + + ".vtk"; DataOut > data_out; data_out.attach_dof_handler (dof_handler); @@ -569,7 +569,7 @@ void LaplaceProblem::output_results (const unsigned int cycle) const data_out.add_data_vector (smoothness_field, "smoothness2"); data_out.add_data_vector (fe_indices, "fe_index"); data_out.build_patches (); - + std::ofstream output (filename.c_str()); data_out.write_vtk (output); } @@ -580,58 +580,60 @@ template <> void LaplaceProblem<2>::create_coarse_grid () { const unsigned int dim = 2; - + static const Point<2> vertices_1[] = { Point<2> (-1., -1.), Point<2> (-1./2, -1.), Point<2> (0., -1.), Point<2> (+1./2, -1.), Point<2> (+1, -1.), - + Point<2> (-1., -1./2.), Point<2> (-1./2, -1./2.), Point<2> (0., -1./2.), Point<2> (+1./2, -1./2.), Point<2> (+1, -1./2.), - + Point<2> (-1., 0.), Point<2> (-1./2, 0.), Point<2> (+1./2, 0.), Point<2> (+1, 0.), - + Point<2> (-1., 1./2.), Point<2> (-1./2, 1./2.), Point<2> (0., 1./2.), Point<2> (+1./2, 1./2.), Point<2> (+1, 1./2.), - + Point<2> (-1., 1.), Point<2> (-1./2, 1.), - Point<2> (0., 1.), + Point<2> (0., 1.), Point<2> (+1./2, 1.), - Point<2> (+1, 1.) }; + Point<2> (+1, 1.) + }; const unsigned int - n_vertices = sizeof(vertices_1) / sizeof(vertices_1[0]); + 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, 5, 6}, - {1, 2, 6, 7}, - {2, 3, 7, 8}, - {3, 4, 8, 9}, - {5, 6, 10, 11}, - {8, 9, 12, 13}, - {10, 11, 14, 15}, - {12, 13, 17, 18}, - {14, 15, 19, 20}, - {15, 16, 20, 21}, - {16, 17, 21, 22}, - {17, 18, 22, 23}}; + = {{0, 1, 5, 6}, + {1, 2, 6, 7}, + {2, 3, 7, 8}, + {3, 4, 8, 9}, + {5, 6, 10, 11}, + {8, 9, 12, 13}, + {10, 11, 14, 15}, + {12, 13, 17, 18}, + {14, 15, 19, 20}, + {15, 16, 20, 21}, + {16, 17, 21, 22}, + {17, 18, 22, 23} + }; const unsigned int - n_cells = sizeof(cell_vertices) / sizeof(cell_vertices[0]); + n_cells = sizeof(cell_vertices) / sizeof(cell_vertices[0]); std::vector > cells (n_cells, CellData()); - for (unsigned int i=0; i::vertices_per_cell; @@ -641,8 +643,8 @@ void LaplaceProblem<2>::create_coarse_grid () } triangulation.create_triangulation (vertices, - cells, - SubCellData()); + cells, + SubCellData()); triangulation.refine_global (3); } @@ -652,149 +654,150 @@ template <> void LaplaceProblem<3>::create_coarse_grid () { const unsigned int dim = 3; - + static const Point<3> vertices_1[] - = - { - // points on the lower surface - Point(0, 0, -4), - Point(std::cos(0*numbers::PI/6), - std::sin(0*numbers::PI/6), - -4), - Point(std::cos(2*numbers::PI/6), - std::sin(2*numbers::PI/6), - -4), - Point(std::cos(4*numbers::PI/6), - std::sin(4*numbers::PI/6), - -4), - Point(std::cos(6*numbers::PI/6), - std::sin(6*numbers::PI/6), - -4), - Point(std::cos(8*numbers::PI/6), - std::sin(8*numbers::PI/6), - -4), - Point(std::cos(10*numbers::PI/6), - std::sin(10*numbers::PI/6), - -4), - - // same points on the top - // of the stem, with - // indentation in the middle - Point(0, 0, 4-std::sqrt(2.)/2), - Point(std::cos(0*numbers::PI/6), - std::sin(0*numbers::PI/6), - 4), - Point(std::cos(2*numbers::PI/6), - std::sin(2*numbers::PI/6), - 4), - Point(std::cos(4*numbers::PI/6), - std::sin(4*numbers::PI/6), - 4), - Point(std::cos(6*numbers::PI/6), - std::sin(6*numbers::PI/6), - 4), - Point(std::cos(8*numbers::PI/6), - std::sin(8*numbers::PI/6), - 4), - Point(std::cos(10*numbers::PI/6), - std::sin(10*numbers::PI/6), - 4), - - // point at top of chevron - Point(0,0,4+std::sqrt(2.)/2), - - // points at the top of the - // first extension - // points 15-18 - Point(0, 0, 7) + Point (std::cos(2*numbers::PI/6), - std::sin(2*numbers::PI/6), - 0) * 4, - Point(std::cos(0*numbers::PI/6), - std::sin(0*numbers::PI/6), - 7) + Point (std::cos(2*numbers::PI/6), - std::sin(2*numbers::PI/6), - 0) * 4, - Point(std::cos(2*numbers::PI/6), - std::sin(2*numbers::PI/6), - 7) + Point (std::cos(2*numbers::PI/6), - std::sin(2*numbers::PI/6), - 0) * 4, - Point(std::cos(4*numbers::PI/6), - std::sin(4*numbers::PI/6), - 7) + Point (std::cos(2*numbers::PI/6), - std::sin(2*numbers::PI/6), - 0) * 4, - - // points at the top of the - // second extension - // points 19-22 - Point(0, 0, 7) + Point (std::cos(6*numbers::PI/6), - std::sin(6*numbers::PI/6), - 0) * 4, - Point(std::cos(4*numbers::PI/6), - std::sin(4*numbers::PI/6), - 7) + Point (std::cos(6*numbers::PI/6), - std::sin(6*numbers::PI/6), - 0) * 4, - Point(std::cos(6*numbers::PI/6), - std::sin(6*numbers::PI/6), - 7) + Point (std::cos(6*numbers::PI/6), - std::sin(6*numbers::PI/6), - 0) * 4, - Point(std::cos(8*numbers::PI/6), - std::sin(8*numbers::PI/6), - 7) + Point (std::cos(6*numbers::PI/6), - std::sin(6*numbers::PI/6), - 0) * 4, - - // points at the top of the - // third extension - // points 23-26 - Point(0, 0, 7) + Point (std::cos(10*numbers::PI/6), - std::sin(10*numbers::PI/6), - 0) * 4, - Point(std::cos(8*numbers::PI/6), - std::sin(8*numbers::PI/6), - 7) + Point (std::cos(10*numbers::PI/6), - std::sin(10*numbers::PI/6), - 0) * 4, - Point(std::cos(10*numbers::PI/6), - std::sin(10*numbers::PI/6), - 7) + Point (std::cos(10*numbers::PI/6), - std::sin(10*numbers::PI/6), - 0) * 4, - Point(std::cos(0*numbers::PI/6), - std::sin(0*numbers::PI/6), - 7) + Point (std::cos(10*numbers::PI/6), - std::sin(10*numbers::PI/6), - 0) * 4, - - }; - + = + { + // points on the lower surface + Point(0, 0, -4), + Point(std::cos(0*numbers::PI/6), + std::sin(0*numbers::PI/6), + -4), + Point(std::cos(2*numbers::PI/6), + std::sin(2*numbers::PI/6), + -4), + Point(std::cos(4*numbers::PI/6), + std::sin(4*numbers::PI/6), + -4), + Point(std::cos(6*numbers::PI/6), + std::sin(6*numbers::PI/6), + -4), + Point(std::cos(8*numbers::PI/6), + std::sin(8*numbers::PI/6), + -4), + Point(std::cos(10*numbers::PI/6), + std::sin(10*numbers::PI/6), + -4), + + // same points on the top + // of the stem, with + // indentation in the middle + Point(0, 0, 4-std::sqrt(2.)/2), + Point(std::cos(0*numbers::PI/6), + std::sin(0*numbers::PI/6), + 4), + Point(std::cos(2*numbers::PI/6), + std::sin(2*numbers::PI/6), + 4), + Point(std::cos(4*numbers::PI/6), + std::sin(4*numbers::PI/6), + 4), + Point(std::cos(6*numbers::PI/6), + std::sin(6*numbers::PI/6), + 4), + Point(std::cos(8*numbers::PI/6), + std::sin(8*numbers::PI/6), + 4), + Point(std::cos(10*numbers::PI/6), + std::sin(10*numbers::PI/6), + 4), + + // point at top of chevron + Point(0,0,4+std::sqrt(2.)/2), + + // points at the top of the + // first extension + // points 15-18 + Point(0, 0, 7) + Point (std::cos(2*numbers::PI/6), + std::sin(2*numbers::PI/6), + 0) * 4, + Point(std::cos(0*numbers::PI/6), + std::sin(0*numbers::PI/6), + 7) + Point (std::cos(2*numbers::PI/6), + std::sin(2*numbers::PI/6), + 0) * 4, + Point(std::cos(2*numbers::PI/6), + std::sin(2*numbers::PI/6), + 7) + Point (std::cos(2*numbers::PI/6), + std::sin(2*numbers::PI/6), + 0) * 4, + Point(std::cos(4*numbers::PI/6), + std::sin(4*numbers::PI/6), + 7) + Point (std::cos(2*numbers::PI/6), + std::sin(2*numbers::PI/6), + 0) * 4, + + // points at the top of the + // second extension + // points 19-22 + Point(0, 0, 7) + Point (std::cos(6*numbers::PI/6), + std::sin(6*numbers::PI/6), + 0) * 4, + Point(std::cos(4*numbers::PI/6), + std::sin(4*numbers::PI/6), + 7) + Point (std::cos(6*numbers::PI/6), + std::sin(6*numbers::PI/6), + 0) * 4, + Point(std::cos(6*numbers::PI/6), + std::sin(6*numbers::PI/6), + 7) + Point (std::cos(6*numbers::PI/6), + std::sin(6*numbers::PI/6), + 0) * 4, + Point(std::cos(8*numbers::PI/6), + std::sin(8*numbers::PI/6), + 7) + Point (std::cos(6*numbers::PI/6), + std::sin(6*numbers::PI/6), + 0) * 4, + + // points at the top of the + // third extension + // points 23-26 + Point(0, 0, 7) + Point (std::cos(10*numbers::PI/6), + std::sin(10*numbers::PI/6), + 0) * 4, + Point(std::cos(8*numbers::PI/6), + std::sin(8*numbers::PI/6), + 7) + Point (std::cos(10*numbers::PI/6), + std::sin(10*numbers::PI/6), + 0) * 4, + Point(std::cos(10*numbers::PI/6), + std::sin(10*numbers::PI/6), + 7) + Point (std::cos(10*numbers::PI/6), + std::sin(10*numbers::PI/6), + 0) * 4, + Point(std::cos(0*numbers::PI/6), + std::sin(0*numbers::PI/6), + 7) + Point (std::cos(10*numbers::PI/6), + std::sin(10*numbers::PI/6), + 0) * 4, + + }; + const unsigned int - n_vertices = sizeof(vertices_1) / sizeof(vertices_1[0]); + 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] - = { - // the three cells in the stem - {0, 2, 4, 3, 7, 9, 11, 10}, - {6, 0, 5, 4, 13, 7, 12, 11}, - {6, 1, 0, 2, 13, 8, 7, 9}, - // the chevron at the center - {13, 8, 7, 9, 12, 14, 11, 10}, - // first extension - {14, 8, 10, 9, 15, 16, 18, 17}, - // second extension - {11, 12, 10, 14, 21, 22, 20, 19}, - // third extension - {12, 13, 14, 8, 24, 25, 23, 26}, - }; + = + { + // the three cells in the stem + {0, 2, 4, 3, 7, 9, 11, 10}, + {6, 0, 5, 4, 13, 7, 12, 11}, + {6, 1, 0, 2, 13, 8, 7, 9}, + // the chevron at the center + {13, 8, 7, 9, 12, 14, 11, 10}, + // first extension + {14, 8, 10, 9, 15, 16, 18, 17}, + // second extension + {11, 12, 10, 14, 21, 22, 20, 19}, + // third extension + {12, 13, 14, 8, 24, 25, 23, 26}, + }; const unsigned int - n_cells = sizeof(cell_vertices) / sizeof(cell_vertices[0]); + n_cells = sizeof(cell_vertices) / sizeof(cell_vertices[0]); std::vector > cells (n_cells, CellData()); - for (unsigned int i=0; i::vertices_per_cell; @@ -804,72 +807,72 @@ void LaplaceProblem<3>::create_coarse_grid () } triangulation.create_triangulation (vertices, - cells, - SubCellData()); + cells, + SubCellData()); for (Triangulation::active_cell_iterator cell = triangulation.begin_active(); cell != triangulation.end(); ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) if ((cell->face(f)->center()[2] != -4) - && - (cell->face(f)->center()[2] != 7) - && - (cell->face(f)->at_boundary())) - cell->face(f)->set_boundary_indicator (1); - + && + (cell->face(f)->center()[2] != 7) + && + (cell->face(f)->at_boundary())) + cell->face(f)->set_boundary_indicator (1); + triangulation.refine_global (1); } template -void LaplaceProblem::run () +void LaplaceProblem::run () { for (unsigned int cycle=0; cycle<30; ++cycle) { deallog << "Cycle " << cycle << ':' << std::endl; if (cycle == 0) - create_coarse_grid (); + create_coarse_grid (); else - refine_grid (); - + refine_grid (); + deallog << " Number of active cells: " - << triangulation.n_active_cells() - << std::endl; + << triangulation.n_active_cells() + << std::endl; Timer all; all.start(); setup_system (); deallog << " Number of degrees of freedom: " - << dof_handler.n_dofs() - << std::endl; + << dof_handler.n_dofs() + << std::endl; deallog << " Number of constraints : " - << hanging_node_constraints.n_constraints() - << std::endl; + << hanging_node_constraints.n_constraints() + << std::endl; assemble.reset (); assemble.start (); assemble_system (); assemble.stop(); - + solver.reset(); solver.start(); solve (); solver.stop(); - + all.stop(); } } -int main () +int main () { std::ofstream logfile(logname); logfile.precision (3); - + deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); @@ -881,25 +884,25 @@ int main () catch (std::exception &exc) { std::cerr << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; std::cerr << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } - catch (...) + catch (...) { std::cerr << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; std::cerr << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } diff --git a/tests/fail/fe_nothing_04.cc b/tests/fail/fe_nothing_04.cc index ce01ff6dfc..9bdfe25f98 100644 --- a/tests/fail/fe_nothing_04.cc +++ b/tests/fail/fe_nothing_04.cc @@ -51,48 +51,48 @@ void test () triangulation.refine_global(4); hp::FECollection fe_collection; - - // test the behavior of the FE_Nothing element - // in multicomponent systems (for, e.g., solving - // Stokes' equations). - + + // test the behavior of the FE_Nothing element + // in multicomponent systems (for, e.g., solving + // Stokes' equations). + fe_collection.push_back (FESystem(FE_RaviartThomas(0), 1, FE_DGQ(0), 1)); - + fe_collection.push_back (FESystem(FE_Nothing(dim), 1, FE_Nothing(), 1)); hp::DoFHandler dof_handler (triangulation); - // loop over cells, and set cells - // within a circle to be of type - // FE_Nothing, while outside the - // circle to be of type RT(0)/DG(0) - + // loop over cells, and set cells + // within a circle to be of type + // FE_Nothing, while outside the + // circle to be of type RT(0)/DG(0) + 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(; cell != endc; cell++) - { + for (; cell != endc; cell++) + { Point center = cell->center(); - if(std::sqrt(center.square()) < 0.25 ) + if (std::sqrt(center.square()) < 0.25 ) cell->set_active_fe_index(1); else cell->set_active_fe_index(0); - } + } - // attempt to distribute dofs + // attempt to distribute dofs 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; + << triangulation.n_active_cells() + << std::endl + << " Number of degrees of freedom: " + << dof_handler.n_dofs() + << std::endl; } diff --git a/tests/fail/hp-step-14.cc b/tests/fail/hp-step-14.cc index 9e81bb7262..9ddb438dbc 100644 --- a/tests/fail/hp-step-14.cc +++ b/tests/fail/hp-step-14.cc @@ -64,26 +64,26 @@ std::ofstream logfile("step-14/output"); namespace Evaluation { template - class EvaluationBase + class EvaluationBase { - public: - virtual ~EvaluationBase (); - - void set_refinement_cycle (const unsigned int refinement_cycle); - - virtual void operator () (const hp::DoFHandler &dof_handler, - const Vector &solution) const = 0; - protected: - unsigned int refinement_cycle; + public: + virtual ~EvaluationBase (); + + void set_refinement_cycle (const unsigned int refinement_cycle); + + virtual void operator () (const hp::DoFHandler &dof_handler, + const Vector &solution) const = 0; + protected: + unsigned int refinement_cycle; }; template EvaluationBase::~EvaluationBase () {} - - + + template void EvaluationBase::set_refinement_cycle (const unsigned int step) @@ -95,61 +95,61 @@ namespace Evaluation template class PointValueEvaluation : public EvaluationBase { - public: - PointValueEvaluation (const Point &evaluation_point); - - virtual void operator () (const hp::DoFHandler &dof_handler, - const Vector &solution) const; - - DeclException1 (ExcEvaluationPointNotFound, - Point, - << "The evaluation point " << arg1 - << " was not found among the vertices of the present grid."); - private: - const Point evaluation_point; + public: + PointValueEvaluation (const Point &evaluation_point); + + virtual void operator () (const hp::DoFHandler &dof_handler, + const Vector &solution) const; + + DeclException1 (ExcEvaluationPointNotFound, + Point, + << "The evaluation point " << arg1 + << " was not found among the vertices of the present grid."); + private: + const Point evaluation_point; }; template PointValueEvaluation:: PointValueEvaluation (const Point &evaluation_point) - : - evaluation_point (evaluation_point) + : + evaluation_point (evaluation_point) {} - + template void PointValueEvaluation:: operator () (const hp::DoFHandler &dof_handler, - const Vector &solution) const + const Vector &solution) const { double point_value = 1e20; typename hp::DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(), - endc = dof_handler.end(); + cell = dof_handler.begin_active(), + endc = dof_handler.end(); bool evaluation_point_found = false; for (; (cell!=endc) && !evaluation_point_found; ++cell) for (unsigned int vertex=0; - vertex::vertices_per_cell; - ++vertex) - if (cell->vertex(vertex).distance (evaluation_point) - < - cell->diameter() * 1e-8) - { - point_value = solution(cell->vertex_dof_index(vertex,0)); - - evaluation_point_found = true; - break; - }; + vertex::vertices_per_cell; + ++vertex) + if (cell->vertex(vertex).distance (evaluation_point) + < + cell->diameter() * 1e-8) + { + point_value = solution(cell->vertex_dof_index(vertex,0)); + + evaluation_point_found = true; + break; + }; AssertThrow (evaluation_point_found, - ExcEvaluationPointNotFound(evaluation_point)); + ExcEvaluationPointNotFound(evaluation_point)); deallog << " Point value=" << point_value - << std::endl; + << std::endl; } @@ -157,160 +157,160 @@ namespace Evaluation template class PointXDerivativeEvaluation : public EvaluationBase { - public: - PointXDerivativeEvaluation (const Point &evaluation_point); - - virtual void operator () (const hp::DoFHandler &dof_handler, - const Vector &solution) const; - - DeclException1 (ExcEvaluationPointNotFound, - Point, - << "The evaluation point " << arg1 - << " was not found among the vertices of the present grid."); - private: - const Point evaluation_point; + public: + PointXDerivativeEvaluation (const Point &evaluation_point); + + virtual void operator () (const hp::DoFHandler &dof_handler, + const Vector &solution) const; + + DeclException1 (ExcEvaluationPointNotFound, + Point, + << "The evaluation point " << arg1 + << " was not found among the vertices of the present grid."); + private: + const Point evaluation_point; }; template PointXDerivativeEvaluation:: PointXDerivativeEvaluation (const Point &evaluation_point) - : - evaluation_point (evaluation_point) + : + evaluation_point (evaluation_point) {} - + template void PointXDerivativeEvaluation:: operator () (const hp::DoFHandler &dof_handler, - const Vector &solution) const + const Vector &solution) const { double point_derivative = 0; QTrapez vertex_quadrature; hp::FEValues fe_values (dof_handler.get_fe(), - vertex_quadrature, - update_gradients | update_q_points); + vertex_quadrature, + update_gradients | update_q_points); std::vector > - solution_gradients (vertex_quadrature.size()); - + solution_gradients (vertex_quadrature.size()); + typename hp::DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(), - endc = dof_handler.end(); + cell = dof_handler.begin_active(), + endc = dof_handler.end(); unsigned int evaluation_point_hits = 0; for (; cell!=endc; ++cell) for (unsigned int vertex=0; - vertex::vertices_per_cell; - ++vertex) - if (cell->vertex(vertex) == evaluation_point) - { - fe_values.reinit (cell); - fe_values.get_present_fe_values().get_function_grads (solution, - solution_gradients); - - unsigned int q_point = 0; - for (; q_point::vertices_per_cell; + ++vertex) + if (cell->vertex(vertex) == evaluation_point) + { + fe_values.reinit (cell); + fe_values.get_present_fe_values().get_function_grads (solution, + solution_gradients); + + unsigned int q_point = 0; + for (; q_point 0, - ExcEvaluationPointNotFound(evaluation_point)); + ExcEvaluationPointNotFound(evaluation_point)); point_derivative /= evaluation_point_hits; deallog << " Point x-derivative=" << point_derivative - << std::endl; + << std::endl; } - + template class GridOutput : public EvaluationBase { - public: - GridOutput (const std::string &output_name_base); - - virtual void operator () (const hp::DoFHandler &dof_handler, - const Vector &solution) const; - private: - const std::string output_name_base; + public: + GridOutput (const std::string &output_name_base); + + virtual void operator () (const hp::DoFHandler &dof_handler, + const Vector &solution) const; + private: + const std::string output_name_base; }; template GridOutput:: GridOutput (const std::string &output_name_base) - : - output_name_base (output_name_base) + : + output_name_base (output_name_base) {} - + template void GridOutput::operator () (const hp::DoFHandler &dof_handler, - const Vector &/*solution*/) const + const Vector &/*solution*/) const { std::ostringstream filename; filename << output_name_base << "-" - << this->refinement_cycle - << ".eps" - << std::ends; - + << this->refinement_cycle + << ".eps" + << std::ends; + GridOut().write_eps (dof_handler.get_tria(), - deallog.get_file_stream()); + deallog.get_file_stream()); } } - + namespace LaplaceSolver { template class WeightedResidual; - - + + template class Base { - public: - Base (Triangulation &coarse_grid); - virtual ~Base (); + public: + Base (Triangulation &coarse_grid); + virtual ~Base (); - virtual void solve_problem () = 0; - virtual void postprocess (const Evaluation::EvaluationBase &postprocessor) const = 0; - virtual void refine_grid () = 0; - virtual unsigned int n_dofs () const = 0; + virtual void solve_problem () = 0; + virtual void postprocess (const Evaluation::EvaluationBase &postprocessor) const = 0; + virtual void refine_grid () = 0; + virtual unsigned int n_dofs () const = 0; - virtual void set_refinement_cycle (const unsigned int cycle); + virtual void set_refinement_cycle (const unsigned int cycle); - virtual void output_solution () const = 0; - - protected: - const SmartPointer > triangulation; + virtual void output_solution () const = 0; - unsigned int refinement_cycle; + protected: + const SmartPointer > triangulation; + + unsigned int refinement_cycle; }; template Base::Base (Triangulation &coarse_grid) - : - triangulation (&coarse_grid) + : + triangulation (&coarse_grid) {} template - Base::~Base () + Base::~Base () {} @@ -321,86 +321,86 @@ namespace LaplaceSolver { refinement_cycle = cycle; } - + template class Solver : public virtual Base { - public: - Solver (Triangulation &triangulation, - const hp::FECollection &fe, - const hp::QCollection &quadrature, - const hp::QCollection &face_quadrature, - const Function &boundary_values); - virtual - ~Solver (); - - virtual - void - solve_problem (); - - virtual - void - postprocess (const Evaluation::EvaluationBase &postprocessor) const; - - virtual - unsigned int - n_dofs () const; - - protected: - const SmartPointer > fe; - const SmartPointer > quadrature; - const SmartPointer > face_quadrature; - hp::DoFHandler dof_handler; - Vector solution; - const SmartPointer > boundary_values; - - virtual void assemble_rhs (Vector &rhs) const = 0; - - private: - struct LinearSystem - { - LinearSystem (const hp::DoFHandler &dof_handler); - - void solve (Vector &solution) const; - - ConstraintMatrix hanging_node_constraints; - SparsityPattern sparsity_pattern; - SparseMatrix matrix; - Vector rhs; - }; + public: + Solver (Triangulation &triangulation, + const hp::FECollection &fe, + const hp::QCollection &quadrature, + const hp::QCollection &face_quadrature, + const Function &boundary_values); + virtual + ~Solver (); + + virtual + void + solve_problem (); + + virtual + void + postprocess (const Evaluation::EvaluationBase &postprocessor) const; + + virtual + unsigned int + n_dofs () const; + + protected: + const SmartPointer > fe; + const SmartPointer > quadrature; + const SmartPointer > face_quadrature; + hp::DoFHandler dof_handler; + Vector solution; + const SmartPointer > boundary_values; + + virtual void assemble_rhs (Vector &rhs) const = 0; + + private: + struct LinearSystem + { + LinearSystem (const hp::DoFHandler &dof_handler); + + void solve (Vector &solution) const; - void - assemble_linear_system (LinearSystem &linear_system); + ConstraintMatrix hanging_node_constraints; + SparsityPattern sparsity_pattern; + SparseMatrix matrix; + Vector rhs; + }; + + void + assemble_linear_system (LinearSystem &linear_system); - void - assemble_matrix (LinearSystem &linear_system, - const typename hp::DoFHandler::active_cell_iterator &begin_cell, - const typename hp::DoFHandler::active_cell_iterator &end_cell, - Threads::ThreadMutex &mutex) const; + void + assemble_matrix (LinearSystem &linear_system, + const typename hp::DoFHandler::active_cell_iterator &begin_cell, + const typename hp::DoFHandler::active_cell_iterator &end_cell, + Threads::ThreadMutex &mutex) const; }; template Solver::Solver (Triangulation &triangulation, - const hp::FECollection &fe, - const hp::QCollection &quadrature, - const hp::QCollection &face_quadrature, - const Function &boundary_values) - : - Base (triangulation), - fe (&fe), - quadrature (&quadrature), - face_quadrature (&face_quadrature), - dof_handler (triangulation), - boundary_values (&boundary_values) + const hp::FECollection &fe, + const hp::QCollection &quadrature, + const hp::QCollection &face_quadrature, + const Function &boundary_values) + : + Base (triangulation), + fe (&fe), + quadrature (&quadrature), + face_quadrature (&face_quadrature), + dof_handler (triangulation), + boundary_values (&boundary_values) {} template - Solver::~Solver () + Solver::~Solver () { dof_handler.clear (); } @@ -434,22 +434,22 @@ namespace LaplaceSolver { return dof_handler.n_dofs(); } - + template void Solver::assemble_linear_system (LinearSystem &linear_system) { typedef - typename hp::DoFHandler::active_cell_iterator - active_cell_iterator; + typename hp::DoFHandler::active_cell_iterator + active_cell_iterator; const unsigned int n_threads = multithread_info.n_default_threads; std::vector > - thread_ranges + thread_ranges = Threads::split_range (dof_handler.begin_active (), - dof_handler.end (), - n_threads); + dof_handler.end (), + n_threads); Threads::ThreadMutex mutex; Threads::ThreadGroup<> threads; @@ -465,29 +465,29 @@ namespace LaplaceSolver std::map boundary_value_map; VectorTools::interpolate_boundary_values (dof_handler, - 0, - *boundary_values, - boundary_value_map); - + 0, + *boundary_values, + boundary_value_map); + threads.join_all (); linear_system.hanging_node_constraints.condense (linear_system.matrix); MatrixTools::apply_boundary_values (boundary_value_map, - linear_system.matrix, - solution, - linear_system.rhs); + linear_system.matrix, + solution, + linear_system.rhs); } template void Solver::assemble_matrix (LinearSystem &linear_system, - const typename hp::DoFHandler::active_cell_iterator &begin_cell, - const typename hp::DoFHandler::active_cell_iterator &end_cell, - Threads::ThreadMutex &mutex) const + const typename hp::DoFHandler::active_cell_iterator &begin_cell, + const typename hp::DoFHandler::active_cell_iterator &end_cell, + Threads::ThreadMutex &mutex) const { - hp::FEValues fe_values (*fe, *quadrature, - update_gradients | update_JxW_values); + hp::FEValues fe_values (*fe, *quadrature, + update_gradients | update_JxW_values); const unsigned int dofs_per_cell = (*fe)[0].dofs_per_cell; const unsigned int n_q_points = (*quadrature)[0].size(); @@ -497,27 +497,27 @@ namespace LaplaceSolver std::vector local_dof_indices (dofs_per_cell); for (typename hp::DoFHandler::active_cell_iterator cell=begin_cell; - cell!=end_cell; ++cell) + cell!=end_cell; ++cell) { - cell_matrix = 0; + cell_matrix = 0; - fe_values.reinit (cell); + fe_values.reinit (cell); - for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); - Threads::ThreadMutex::ScopedLock lock (mutex); - for (unsigned int i=0; iget_dof_indices (local_dof_indices); + Threads::ThreadMutex::ScopedLock lock (mutex); + for (unsigned int i=0; i &, - ConstraintMatrix &) + ConstraintMatrix &) = &DoFTools::make_hanging_node_constraints; - + Threads::Thread<> - mhnc_thread = Threads::spawn (mhnc_p)(dof_handler, hanging_node_constraints); + mhnc_thread = Threads::spawn (mhnc_p)(dof_handler, hanging_node_constraints); sparsity_pattern.reinit (dof_handler.n_dofs(), - dof_handler.n_dofs(), - dof_handler.max_couplings_between_dofs()); + dof_handler.n_dofs(), + dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern); mhnc_thread.join (); @@ -573,48 +573,48 @@ namespace LaplaceSolver template class PrimalSolver : public Solver { - public: - PrimalSolver (Triangulation &triangulation, - const hp::FECollection &fe, - const hp::QCollection &quadrature, - const hp::QCollection &face_quadrature, - const Function &rhs_function, - const Function &boundary_values); - - virtual - void solve_problem (); - - virtual - unsigned int n_dofs () const; - - virtual - void postprocess (const Evaluation::EvaluationBase &postprocessor) const; - - virtual - void output_solution () const; - - protected: - const SmartPointer > rhs_function; - virtual void assemble_rhs (Vector &rhs) const; - - friend class WeightedResidual; + public: + PrimalSolver (Triangulation &triangulation, + const hp::FECollection &fe, + const hp::QCollection &quadrature, + const hp::QCollection &face_quadrature, + const Function &rhs_function, + const Function &boundary_values); + + virtual + void solve_problem (); + + virtual + unsigned int n_dofs () const; + + virtual + void postprocess (const Evaluation::EvaluationBase &postprocessor) const; + + virtual + void output_solution () const; + + protected: + const SmartPointer > rhs_function; + virtual void assemble_rhs (Vector &rhs) const; + + friend class WeightedResidual; }; template PrimalSolver:: PrimalSolver (Triangulation &triangulation, - const hp::FECollection &fe, - const hp::QCollection &quadrature, - const hp::QCollection &face_quadrature, - const Function &rhs_function, - const Function &boundary_values) - : - Base (triangulation), - Solver (triangulation, fe, - quadrature, face_quadrature, - boundary_values), - rhs_function (&rhs_function) + const hp::FECollection &fe, + const hp::QCollection &quadrature, + const hp::QCollection &face_quadrature, + const Function &rhs_function, + const Function &boundary_values) + : + Base (triangulation), + Solver (triangulation, fe, + quadrature, face_quadrature, + boundary_values), + rhs_function (&rhs_function) {} @@ -655,22 +655,22 @@ namespace LaplaceSolver std::ostringstream filename; filename << "solution-" - << this->refinement_cycle - << ".gnuplot" - << std::ends; + << this->refinement_cycle + << ".gnuplot" + << std::ends; data_out.write (deallog.get_file_stream(), DataOut::gnuplot); } - + template void PrimalSolver:: - assemble_rhs (Vector &rhs) const + assemble_rhs (Vector &rhs) const { - hp::FEValues fe_values (*this->fe, *this->quadrature, - update_values | update_q_points | - update_JxW_values); + hp::FEValues fe_values (*this->fe, *this->quadrature, + update_values | update_q_points | + update_JxW_values); const unsigned int dofs_per_cell = (*this->fe)[0].dofs_per_cell; const unsigned int n_q_points = (*this->quadrature)[0].size(); @@ -680,26 +680,26 @@ namespace LaplaceSolver std::vector local_dof_indices (dofs_per_cell); typename hp::DoFHandler::active_cell_iterator - cell = this->dof_handler.begin_active(), - endc = this->dof_handler.end(); + cell = this->dof_handler.begin_active(), + endc = this->dof_handler.end(); for (; cell!=endc; ++cell) { - cell_rhs = 0; - - fe_values.reinit (cell); - - rhs_function->value_list (fe_values.get_present_fe_values().get_quadrature_points(), - rhs_values); - - for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); - for (unsigned int i=0; ivalue_list (fe_values.get_present_fe_values().get_quadrature_points(), + rhs_values); + + for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); + for (unsigned int i=0; i class RefinementGlobal : public PrimalSolver { - public: - RefinementGlobal (Triangulation &coarse_grid, - const hp::FECollection &fe, - const hp::QCollection &quadrature, - const hp::QCollection &face_quadrature, - const Function &rhs_function, - const Function &boundary_values); - - virtual void refine_grid (); + public: + RefinementGlobal (Triangulation &coarse_grid, + const hp::FECollection &fe, + const hp::QCollection &quadrature, + const hp::QCollection &face_quadrature, + const Function &rhs_function, + const Function &boundary_values); + + virtual void refine_grid (); }; @@ -724,16 +724,16 @@ namespace LaplaceSolver template RefinementGlobal:: RefinementGlobal (Triangulation &coarse_grid, - const hp::FECollection &fe, - const hp::QCollection &quadrature, - const hp::QCollection &face_quadrature, - const Function &rhs_function, - const Function &boundary_values) - : - Base (coarse_grid), - PrimalSolver (coarse_grid, fe, quadrature, - face_quadrature, rhs_function, - boundary_values) + const hp::FECollection &fe, + const hp::QCollection &quadrature, + const hp::QCollection &face_quadrature, + const Function &rhs_function, + const Function &boundary_values) + : + Base (coarse_grid), + PrimalSolver (coarse_grid, fe, quadrature, + face_quadrature, rhs_function, + boundary_values) {} @@ -750,15 +750,15 @@ namespace LaplaceSolver template class RefinementKelly : public PrimalSolver { - public: - RefinementKelly (Triangulation &coarse_grid, - const hp::FECollection &fe, - const hp::QCollection &quadrature, - const hp::QCollection &face_quadrature, - const Function &rhs_function, - const Function &boundary_values); - - virtual void refine_grid (); + public: + RefinementKelly (Triangulation &coarse_grid, + const hp::FECollection &fe, + const hp::QCollection &quadrature, + const hp::QCollection &face_quadrature, + const Function &rhs_function, + const Function &boundary_values); + + virtual void refine_grid (); }; @@ -766,16 +766,16 @@ namespace LaplaceSolver template RefinementKelly:: RefinementKelly (Triangulation &coarse_grid, - const hp::FECollection &fe, - const hp::QCollection &quadrature, - const hp::QCollection &face_quadrature, - const Function &rhs_function, - const Function &boundary_values) - : - Base (coarse_grid), - PrimalSolver (coarse_grid, fe, quadrature, - face_quadrature, - rhs_function, boundary_values) + const hp::FECollection &fe, + const hp::QCollection &quadrature, + const hp::QCollection &face_quadrature, + const Function &rhs_function, + const Function &boundary_values) + : + Base (coarse_grid), + PrimalSolver (coarse_grid, fe, quadrature, + face_quadrature, + rhs_function, boundary_values) {} @@ -786,13 +786,13 @@ namespace LaplaceSolver { Vector estimated_error_per_cell (this->triangulation->n_active_cells()); KellyErrorEstimator::estimate (this->dof_handler, - QGauss(3), - typename FunctionMap::type(), - this->solution, - estimated_error_per_cell); + QGauss(3), + typename FunctionMap::type(), + this->solution, + estimated_error_per_cell); GridRefinement::refine_and_coarsen_fixed_number (*this->triangulation, - estimated_error_per_cell, - 0.3, 0.03); + estimated_error_per_cell, + 0.3, 0.03); this->triangulation->execute_coarsening_and_refinement (); } @@ -802,19 +802,19 @@ namespace LaplaceSolver template class RefinementWeightedKelly : public PrimalSolver { - public: - RefinementWeightedKelly (Triangulation &coarse_grid, - const hp::FECollection &fe, - const hp::QCollection &quadrature, - const hp::QCollection &face_quadrature, - const Function &rhs_function, - const Function &boundary_values, - const Function &weighting_function); - - virtual void refine_grid (); - - private: - const SmartPointer > weighting_function; + public: + RefinementWeightedKelly (Triangulation &coarse_grid, + const hp::FECollection &fe, + const hp::QCollection &quadrature, + const hp::QCollection &face_quadrature, + const Function &rhs_function, + const Function &boundary_values, + const Function &weighting_function); + + virtual void refine_grid (); + + private: + const SmartPointer > weighting_function; }; @@ -822,18 +822,18 @@ namespace LaplaceSolver template RefinementWeightedKelly:: RefinementWeightedKelly (Triangulation &coarse_grid, - const hp::FECollection &fe, - const hp::QCollection &quadrature, - const hp::QCollection &face_quadrature, - const Function &rhs_function, - const Function &boundary_values, - const Function &weighting_function) - : - Base (coarse_grid), - PrimalSolver (coarse_grid, fe, quadrature, - face_quadrature, - rhs_function, boundary_values), - weighting_function (&weighting_function) + const hp::FECollection &fe, + const hp::QCollection &quadrature, + const hp::QCollection &face_quadrature, + const Function &rhs_function, + const Function &boundary_values, + const Function &weighting_function) + : + Base (coarse_grid), + PrimalSolver (coarse_grid, fe, quadrature, + face_quadrature, + rhs_function, boundary_values), + weighting_function (&weighting_function) {} @@ -844,21 +844,21 @@ namespace LaplaceSolver { Vector estimated_error (this->triangulation->n_active_cells()); KellyErrorEstimator::estimate (this->dof_handler, - (*this->face_quadrature)[0], - typename FunctionMap::type(), - this->solution, - estimated_error); + (*this->face_quadrature)[0], + typename FunctionMap::type(), + this->solution, + estimated_error); typename hp::DoFHandler::active_cell_iterator - cell = this->dof_handler.begin_active(), - endc = this->dof_handler.end(); + cell = this->dof_handler.begin_active(), + endc = this->dof_handler.end(); for (unsigned int cell_index=0; cell!=endc; ++cell, ++cell_index) estimated_error(cell_index) - *= weighting_function->value (cell->center()); - + *= weighting_function->value (cell->center()); + GridRefinement::refine_and_coarsen_fixed_number (*this->triangulation, - estimated_error, - 0.3, 0.03); + estimated_error, + 0.3, 0.03); this->triangulation->execute_coarsening_and_refinement (); } @@ -867,39 +867,39 @@ namespace LaplaceSolver namespace Data { - + template struct SetUpBase : public Subscriptor { - virtual - const Function & get_boundary_values () const = 0; + virtual + const Function &get_boundary_values () const = 0; - virtual - const Function & get_right_hand_side () const = 0; + virtual + const Function &get_right_hand_side () const = 0; - virtual - void create_coarse_grid (Triangulation &coarse_grid) const = 0; + virtual + void create_coarse_grid (Triangulation &coarse_grid) const = 0; }; template struct SetUp : public SetUpBase { - SetUp () {} + SetUp () {} + + virtual + const Function &get_boundary_values () const; - virtual - const Function & get_boundary_values () const; + virtual + const Function &get_right_hand_side () const; - virtual - const Function & get_right_hand_side () const; - - virtual - void create_coarse_grid (Triangulation &coarse_grid) const; + virtual + void create_coarse_grid (Triangulation &coarse_grid) const; - private: - static const typename Traits::BoundaryValues boundary_values; - static const typename Traits::RightHandSide right_hand_side; + private: + static const typename Traits::BoundaryValues boundary_values; + static const typename Traits::RightHandSide right_hand_side; }; template @@ -909,7 +909,7 @@ namespace Data template const Function & - SetUp::get_boundary_values () const + SetUp::get_boundary_values () const { return boundary_values; } @@ -917,7 +917,7 @@ namespace Data template const Function & - SetUp::get_right_hand_side () const + SetUp::get_right_hand_side () const { return right_hand_side; } @@ -926,46 +926,46 @@ namespace Data template void SetUp:: - create_coarse_grid (Triangulation &coarse_grid) const + create_coarse_grid (Triangulation &coarse_grid) const { Traits::create_coarse_grid (coarse_grid); } - + template struct CurvedRidges { - class BoundaryValues : public Function - { - public: - BoundaryValues () : Function () {} - - virtual double value (const Point &p, - const unsigned int component) const; - }; + class BoundaryValues : public Function + { + public: + BoundaryValues () : Function () {} + virtual double value (const Point &p, + const unsigned int component) const; + }; - class RightHandSide : public Function - { - public: - RightHandSide () : Function () {} - - virtual double value (const Point &p, - const unsigned int component) const; - }; - static - void - create_coarse_grid (Triangulation &coarse_grid); + class RightHandSide : public Function + { + public: + RightHandSide () : Function () {} + + virtual double value (const Point &p, + const unsigned int component) const; + }; + + static + void + create_coarse_grid (Triangulation &coarse_grid); }; - - + + template double CurvedRidges::BoundaryValues:: value (const Point &p, - const unsigned int /*component*/) const + const unsigned int /*component*/) const { double q = p(0); for (unsigned int i=1; i double CurvedRidges::RightHandSide::value (const Point &p, - const unsigned int /*component*/) const + const unsigned int /*component*/) const { double q = p(0); for (unsigned int i=1; i struct Exercise_2_3 { - typedef ZeroFunction BoundaryValues; + typedef ZeroFunction BoundaryValues; - class RightHandSide : public ConstantFunction - { - public: - RightHandSide () : ConstantFunction (1.) {} - }; - - static - void - create_coarse_grid (Triangulation &coarse_grid); + class RightHandSide : public ConstantFunction + { + public: + RightHandSide () : ConstantFunction (1.) {} + }; + + static + void + create_coarse_grid (Triangulation &coarse_grid); }; @@ -1039,69 +1039,71 @@ namespace Data static const Point<2> vertices_1[] = { Point<2> (-1., -1.), - Point<2> (-1./2, -1.), - Point<2> (0., -1.), - Point<2> (+1./2, -1.), - Point<2> (+1, -1.), - - Point<2> (-1., -1./2.), - Point<2> (-1./2, -1./2.), - Point<2> (0., -1./2.), - Point<2> (+1./2, -1./2.), - Point<2> (+1, -1./2.), - - Point<2> (-1., 0.), - Point<2> (-1./2, 0.), - Point<2> (+1./2, 0.), - Point<2> (+1, 0.), - - Point<2> (-1., 1./2.), - Point<2> (-1./2, 1./2.), - Point<2> (0., 1./2.), - Point<2> (+1./2, 1./2.), - Point<2> (+1, 1./2.), - - Point<2> (-1., 1.), - Point<2> (-1./2, 1.), - Point<2> (0., 1.), - Point<2> (+1./2, 1.), - Point<2> (+1, 1.) }; + Point<2> (-1./2, -1.), + Point<2> (0., -1.), + Point<2> (+1./2, -1.), + Point<2> (+1, -1.), + + Point<2> (-1., -1./2.), + Point<2> (-1./2, -1./2.), + Point<2> (0., -1./2.), + Point<2> (+1./2, -1./2.), + Point<2> (+1, -1./2.), + + Point<2> (-1., 0.), + Point<2> (-1./2, 0.), + Point<2> (+1./2, 0.), + Point<2> (+1, 0.), + + Point<2> (-1., 1./2.), + Point<2> (-1./2, 1./2.), + Point<2> (0., 1./2.), + Point<2> (+1./2, 1./2.), + Point<2> (+1, 1./2.), + + Point<2> (-1., 1.), + Point<2> (-1./2, 1.), + Point<2> (0., 1.), + Point<2> (+1./2, 1.), + Point<2> (+1, 1.) + }; const unsigned int - n_vertices = sizeof(vertices_1) / sizeof(vertices_1[0]); + n_vertices = sizeof(vertices_1) / sizeof(vertices_1[0]); const std::vector > vertices (&vertices_1[0], - &vertices_1[n_vertices]); + &vertices_1[n_vertices]); static const int cell_vertices[][GeometryInfo::vertices_per_cell] - = {{0, 1, 5, 6}, - {1, 2, 6, 7}, - {2, 3, 7, 8}, - {3, 4, 8, 9}, - {5, 6, 10, 11}, - {8, 9, 12, 13}, - {10, 11, 14, 15}, - {12, 13, 17, 18}, - {14, 15, 19, 20}, - {15, 16, 20, 21}, - {16, 17, 21, 22}, - {17, 18, 22, 23}}; + = {{0, 1, 5, 6}, + {1, 2, 6, 7}, + {2, 3, 7, 8}, + {3, 4, 8, 9}, + {5, 6, 10, 11}, + {8, 9, 12, 13}, + {10, 11, 14, 15}, + {12, 13, 17, 18}, + {14, 15, 19, 20}, + {15, 16, 20, 21}, + {16, 17, 21, 22}, + {17, 18, 22, 23} + }; const unsigned int - n_cells = sizeof(cell_vertices) / sizeof(cell_vertices[0]); + n_cells = sizeof(cell_vertices) / sizeof(cell_vertices[0]); std::vector > cells (n_cells, CellData()); - for (unsigned int i=0; i::vertices_per_cell; - ++j) - cells[i].vertices[j] = cell_vertices[i][j]; - cells[i].material_id = 0; + for (unsigned int j=0; + j::vertices_per_cell; + ++j) + cells[i].vertices[j] = cell_vertices[i][j]; + cells[i].material_id = 0; }; coarse_grid.create_triangulation (vertices, - cells, - SubCellData()); - + cells, + SubCellData()); + coarse_grid.refine_global (1); } } @@ -1111,117 +1113,117 @@ namespace Data namespace DualFunctional { - + template class DualFunctionalBase : public Subscriptor { - public: - virtual - void - assemble_rhs (const hp::DoFHandler &dof_handler, - Vector &rhs) const = 0; + public: + virtual + void + assemble_rhs (const hp::DoFHandler &dof_handler, + Vector &rhs) const = 0; }; - + template class PointValueEvaluation : public DualFunctionalBase { - public: - PointValueEvaluation (const Point &evaluation_point); - - virtual - void - assemble_rhs (const hp::DoFHandler &dof_handler, - Vector &rhs) const; - - DeclException1 (ExcEvaluationPointNotFound, - Point, - << "The evaluation point " << arg1 - << " was not found among the vertices of the present grid."); - - protected: - const Point evaluation_point; + public: + PointValueEvaluation (const Point &evaluation_point); + + virtual + void + assemble_rhs (const hp::DoFHandler &dof_handler, + Vector &rhs) const; + + DeclException1 (ExcEvaluationPointNotFound, + Point, + << "The evaluation point " << arg1 + << " was not found among the vertices of the present grid."); + + protected: + const Point evaluation_point; }; template PointValueEvaluation:: PointValueEvaluation (const Point &evaluation_point) - : - evaluation_point (evaluation_point) + : + evaluation_point (evaluation_point) {} - + template void PointValueEvaluation:: assemble_rhs (const hp::DoFHandler &dof_handler, - Vector &rhs) const + Vector &rhs) const { rhs.reinit (dof_handler.n_dofs()); 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 (; cell!=endc; ++cell) for (unsigned int vertex=0; - vertex::vertices_per_cell; - ++vertex) - if (cell->vertex(vertex).distance(evaluation_point) - < cell->diameter()*1e-8) - { - rhs(cell->vertex_dof_index(vertex,0)) = 1; - return; - }; + vertex::vertices_per_cell; + ++vertex) + if (cell->vertex(vertex).distance(evaluation_point) + < cell->diameter()*1e-8) + { + rhs(cell->vertex_dof_index(vertex,0)) = 1; + return; + }; AssertThrow (false, ExcEvaluationPointNotFound(evaluation_point)); } - + template class PointXDerivativeEvaluation : public DualFunctionalBase { - public: - PointXDerivativeEvaluation (const Point &evaluation_point); - - virtual - void - assemble_rhs (const hp::DoFHandler &dof_handler, - Vector &rhs) const; - - DeclException1 (ExcEvaluationPointNotFound, - Point, - << "The evaluation point " << arg1 - << " was not found among the vertices of the present grid."); - - protected: - const Point evaluation_point; + public: + PointXDerivativeEvaluation (const Point &evaluation_point); + + virtual + void + assemble_rhs (const hp::DoFHandler &dof_handler, + Vector &rhs) const; + + DeclException1 (ExcEvaluationPointNotFound, + Point, + << "The evaluation point " << arg1 + << " was not found among the vertices of the present grid."); + + protected: + const Point evaluation_point; }; template PointXDerivativeEvaluation:: PointXDerivativeEvaluation (const Point &evaluation_point) - : - evaluation_point (evaluation_point) + : + evaluation_point (evaluation_point) {} - + template void PointXDerivativeEvaluation:: assemble_rhs (const hp::DoFHandler &dof_handler, - Vector &rhs) const + Vector &rhs) const { rhs.reinit (dof_handler.n_dofs()); QGauss quadrature(4); hp::FEValues fe_values (dof_handler.get_fe(), quadrature, - update_gradients | - update_q_points | - update_JxW_values); + update_gradients | + update_q_points | + update_JxW_values); const unsigned int n_q_points = fe_values.get_present_fe_values().n_quadrature_points; const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell; @@ -1229,36 +1231,36 @@ namespace DualFunctional std::vector local_dof_indices (dofs_per_cell); double total_volume = 0; - + 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 (; cell!=endc; ++cell) if (cell->center().distance(evaluation_point) <= - cell->diameter()) - { - fe_values.reinit (cell); - cell_rhs = 0; - - for (unsigned int q=0; qget_dof_indices (local_dof_indices); - for (unsigned int i=0; idiameter()) + { + fe_values.reinit (cell); + cell_rhs = 0; + + for (unsigned int q=0; qget_dof_indices (local_dof_indices); + for (unsigned int i=0; i 0, - ExcEvaluationPointNotFound(evaluation_point)); + ExcEvaluationPointNotFound(evaluation_point)); rhs.scale (1./total_volume); } - + } @@ -1270,32 +1272,32 @@ namespace LaplaceSolver template class DualSolver : public Solver { - public: - DualSolver (Triangulation &triangulation, - const hp::FECollection &fe, - const hp::QCollection &quadrature, - const hp::QCollection &face_quadrature, - const DualFunctional::DualFunctionalBase &dual_functional); - - virtual - void - solve_problem (); - - virtual - unsigned int - n_dofs () const; - - virtual - void - postprocess (const Evaluation::EvaluationBase &postprocessor) const; - - protected: - const SmartPointer > dual_functional; - virtual void assemble_rhs (Vector &rhs) const; - - static const ZeroFunction boundary_values; - - friend class WeightedResidual; + public: + DualSolver (Triangulation &triangulation, + const hp::FECollection &fe, + const hp::QCollection &quadrature, + const hp::QCollection &face_quadrature, + const DualFunctional::DualFunctionalBase &dual_functional); + + virtual + void + solve_problem (); + + virtual + unsigned int + n_dofs () const; + + virtual + void + postprocess (const Evaluation::EvaluationBase &postprocessor) const; + + protected: + const SmartPointer > dual_functional; + virtual void assemble_rhs (Vector &rhs) const; + + static const ZeroFunction boundary_values; + + friend class WeightedResidual; }; template @@ -1304,16 +1306,16 @@ namespace LaplaceSolver template DualSolver:: DualSolver (Triangulation &triangulation, - const hp::FECollection &fe, - const hp::QCollection &quadrature, - const hp::QCollection &face_quadrature, - const DualFunctional::DualFunctionalBase &dual_functional) - : - Base (triangulation), - Solver (triangulation, fe, - quadrature, face_quadrature, - boundary_values), - dual_functional (&dual_functional) + const hp::FECollection &fe, + const hp::QCollection &quadrature, + const hp::QCollection &face_quadrature, + const DualFunctional::DualFunctionalBase &dual_functional) + : + Base (triangulation), + Solver (triangulation, fe, + quadrature, face_quadrature, + boundary_values), + dual_functional (&dual_functional) {} @@ -1341,13 +1343,13 @@ namespace LaplaceSolver { Solver::postprocess(postprocessor); } - + template void DualSolver:: - assemble_rhs (Vector &rhs) const + assemble_rhs (Vector &rhs) const { dual_functional->assemble_rhs (this->dof_handler, rhs); } @@ -1356,109 +1358,109 @@ namespace LaplaceSolver template class WeightedResidual : public PrimalSolver, - public DualSolver + public DualSolver { - public: - WeightedResidual (Triangulation &coarse_grid, - const hp::FECollection &primal_fe, - const hp::FECollection &dual_fe, - const hp::QCollection &quadrature, - const hp::QCollection &face_quadrature, - const Function &rhs_function, - const Function &boundary_values, - const DualFunctional::DualFunctionalBase &dual_functional); - - virtual - void - solve_problem (); - - virtual - void - postprocess (const Evaluation::EvaluationBase &postprocessor) const; - - virtual - unsigned int - n_dofs () const; - - virtual void refine_grid (); - - virtual - void - output_solution () const; - - private: - void solve_primal_problem (); - void solve_dual_problem (); - - typedef - typename hp::DoFHandler::active_cell_iterator - active_cell_iterator; - - typedef - typename std::map::face_iterator,double> - FaceIntegrals; - - struct CellData - { - hp::FEValues fe_values; - const SmartPointer > right_hand_side; - - std::vector cell_residual; - std::vector rhs_values; - std::vector dual_weights; - typename std::vector > cell_grad_grads; - CellData (const hp::FECollection &fe, - const hp::QCollection &quadrature, - const Function &right_hand_side); - }; + public: + WeightedResidual (Triangulation &coarse_grid, + const hp::FECollection &primal_fe, + const hp::FECollection &dual_fe, + const hp::QCollection &quadrature, + const hp::QCollection &face_quadrature, + const Function &rhs_function, + const Function &boundary_values, + const DualFunctional::DualFunctionalBase &dual_functional); - struct FaceData - { - hp::FEFaceValues fe_face_values_cell; - hp::FEFaceValues fe_face_values_neighbor; - hp::FESubfaceValues fe_subface_values_cell; - - std::vector jump_residual; - std::vector dual_weights; - typename std::vector > cell_grads; - typename std::vector > neighbor_grads; - FaceData (const hp::FECollection &fe, - const hp::QCollection &face_quadrature); - }; + virtual + void + solve_problem (); + + virtual + void + postprocess (const Evaluation::EvaluationBase &postprocessor) const; + + virtual + unsigned int + n_dofs () const; + + virtual void refine_grid (); + + virtual + void + output_solution () const; - - - void estimate_error (Vector &error_indicators) const; - - void estimate_some (const Vector &primal_solution, - const Vector &dual_weights, - const unsigned int n_threads, - const unsigned int this_thread, - Vector &error_indicators, - FaceIntegrals &face_integrals) const; - - void - integrate_over_cell (const active_cell_iterator &cell, - const unsigned int cell_index, - const Vector &primal_solution, - const Vector &dual_weights, - CellData &cell_data, - Vector &error_indicators) const; - - void - integrate_over_regular_face (const active_cell_iterator &cell, - const unsigned int face_no, - const Vector &primal_solution, - const Vector &dual_weights, - FaceData &face_data, - FaceIntegrals &face_integrals) const; - void - integrate_over_irregular_face (const active_cell_iterator &cell, - const unsigned int face_no, - const Vector &primal_solution, - const Vector &dual_weights, - FaceData &face_data, - FaceIntegrals &face_integrals) const; + private: + void solve_primal_problem (); + void solve_dual_problem (); + + typedef + typename hp::DoFHandler::active_cell_iterator + active_cell_iterator; + + typedef + typename std::map::face_iterator,double> + FaceIntegrals; + + struct CellData + { + hp::FEValues fe_values; + const SmartPointer > right_hand_side; + + std::vector cell_residual; + std::vector rhs_values; + std::vector dual_weights; + typename std::vector > cell_grad_grads; + CellData (const hp::FECollection &fe, + const hp::QCollection &quadrature, + const Function &right_hand_side); + }; + + struct FaceData + { + hp::FEFaceValues fe_face_values_cell; + hp::FEFaceValues fe_face_values_neighbor; + hp::FESubfaceValues fe_subface_values_cell; + + std::vector jump_residual; + std::vector dual_weights; + typename std::vector > cell_grads; + typename std::vector > neighbor_grads; + FaceData (const hp::FECollection &fe, + const hp::QCollection &face_quadrature); + }; + + + + void estimate_error (Vector &error_indicators) const; + + void estimate_some (const Vector &primal_solution, + const Vector &dual_weights, + const unsigned int n_threads, + const unsigned int this_thread, + Vector &error_indicators, + FaceIntegrals &face_integrals) const; + + void + integrate_over_cell (const active_cell_iterator &cell, + const unsigned int cell_index, + const Vector &primal_solution, + const Vector &dual_weights, + CellData &cell_data, + Vector &error_indicators) const; + + void + integrate_over_regular_face (const active_cell_iterator &cell, + const unsigned int face_no, + const Vector &primal_solution, + const Vector &dual_weights, + FaceData &face_data, + FaceIntegrals &face_integrals) const; + void + integrate_over_irregular_face (const active_cell_iterator &cell, + const unsigned int face_no, + const Vector &primal_solution, + const Vector &dual_weights, + FaceData &face_data, + FaceIntegrals &face_integrals) const; }; @@ -1466,75 +1468,75 @@ namespace LaplaceSolver template WeightedResidual::CellData:: CellData (const hp::FECollection &fe, - const hp::QCollection &quadrature, - const Function &right_hand_side) - : - fe_values (fe, quadrature, - update_values | - update_second_derivatives | - update_q_points | - update_JxW_values), - right_hand_side (&right_hand_side) - { + const hp::QCollection &quadrature, + const Function &right_hand_side) + : + fe_values (fe, quadrature, + update_values | + update_second_derivatives | + update_q_points | + update_JxW_values), + right_hand_side (&right_hand_side) + { const unsigned int n_q_points = quadrature[0].size(); - + cell_residual.resize(n_q_points); - rhs_values.resize(n_q_points); - dual_weights.resize(n_q_points); + rhs_values.resize(n_q_points); + dual_weights.resize(n_q_points); cell_grad_grads.resize(n_q_points); } - - + + template WeightedResidual::FaceData:: FaceData (const hp::FECollection &fe, - const hp::QCollection &face_quadrature) - : - fe_face_values_cell (fe, face_quadrature, - update_values | - update_gradients | - update_JxW_values | - update_normal_vectors), - fe_face_values_neighbor (fe, face_quadrature, - update_values | - update_gradients | - update_JxW_values | - update_normal_vectors), - fe_subface_values_cell (fe, face_quadrature, - update_gradients) - { + const hp::QCollection &face_quadrature) + : + fe_face_values_cell (fe, face_quadrature, + update_values | + update_gradients | + update_JxW_values | + update_normal_vectors), + fe_face_values_neighbor (fe, face_quadrature, + update_values | + update_gradients | + update_JxW_values | + update_normal_vectors), + fe_subface_values_cell (fe, face_quadrature, + update_gradients) + { const unsigned int n_face_q_points = face_quadrature[0].size(); - + jump_residual.resize(n_face_q_points); - dual_weights.resize(n_face_q_points); + dual_weights.resize(n_face_q_points); cell_grads.resize(n_face_q_points); neighbor_grads.resize(n_face_q_points); } - + template WeightedResidual:: WeightedResidual (Triangulation &coarse_grid, - const hp::FECollection &primal_fe, - const hp::FECollection &dual_fe, - const hp::QCollection &quadrature, - const hp::QCollection &face_quadrature, - const Function &rhs_function, - const Function &bv, - const DualFunctional::DualFunctionalBase &dual_functional) - : - Base (coarse_grid), - PrimalSolver (coarse_grid, primal_fe, - quadrature, face_quadrature, - rhs_function, bv), - DualSolver (coarse_grid, dual_fe, - quadrature, face_quadrature, - dual_functional) + const hp::FECollection &primal_fe, + const hp::FECollection &dual_fe, + const hp::QCollection &quadrature, + const hp::QCollection &face_quadrature, + const Function &rhs_function, + const Function &bv, + const DualFunctional::DualFunctionalBase &dual_functional) + : + Base (coarse_grid), + PrimalSolver (coarse_grid, primal_fe, + quadrature, face_quadrature, + rhs_function, bv), + DualSolver (coarse_grid, dual_fe, + quadrature, face_quadrature, + dual_functional) {} @@ -1548,7 +1550,7 @@ namespace LaplaceSolver threads.join_all (); } - + template void WeightedResidual::solve_primal_problem () @@ -1562,7 +1564,7 @@ namespace LaplaceSolver { DualSolver::solve_problem (); } - + template void @@ -1571,8 +1573,8 @@ namespace LaplaceSolver { PrimalSolver::postprocess (postprocessor); } - - + + template unsigned int WeightedResidual::n_dofs () const @@ -1590,15 +1592,15 @@ namespace LaplaceSolver estimate_error (error_indicators); for (Vector::iterator i=error_indicators.begin(); - i != error_indicators.end(); ++i) + i != error_indicators.end(); ++i) *i = std::fabs (*i); GridRefinement::refine_and_coarsen_fixed_fraction (*this->triangulation, - error_indicators, - 0.8, 0.02); + error_indicators, + 0.8, 0.02); this->triangulation->execute_coarsening_and_refinement (); } - + template void @@ -1606,39 +1608,39 @@ namespace LaplaceSolver { const PrimalSolver &primal_solver = *this; const DualSolver &dual_solver = *this; - + ConstraintMatrix primal_hanging_node_constraints; DoFTools::make_hanging_node_constraints (primal_solver.dof_handler, - primal_hanging_node_constraints); + primal_hanging_node_constraints); primal_hanging_node_constraints.close(); Vector dual_solution (primal_solver.dof_handler.n_dofs()); FETools::interpolate (dual_solver.dof_handler, - dual_solver.solution, - primal_solver.dof_handler, - primal_hanging_node_constraints, - dual_solution); + dual_solver.solution, + primal_solver.dof_handler, + primal_hanging_node_constraints, + dual_solution); DataOut > data_out; data_out.attach_dof_handler (primal_solver.dof_handler); data_out.add_data_vector (primal_solver.solution, - "primal_solution"); + "primal_solution"); data_out.add_data_vector (dual_solution, - "dual_solution"); - + "dual_solution"); + data_out.build_patches (); - + std::ostringstream filename; filename << "solution-" - << this->refinement_cycle - << ".gnuplot" - << std::ends; + << this->refinement_cycle + << ".gnuplot" + << std::ends; data_out.write (deallog.get_file_stream(), DataOut::gnuplot); } - + template void WeightedResidual:: @@ -1649,39 +1651,39 @@ namespace LaplaceSolver ConstraintMatrix dual_hanging_node_constraints; DoFTools::make_hanging_node_constraints (dual_solver.dof_handler, - dual_hanging_node_constraints); + dual_hanging_node_constraints); dual_hanging_node_constraints.close(); Vector primal_solution (dual_solver.dof_handler.n_dofs()); FETools::interpolate (primal_solver.dof_handler, - primal_solver.solution, - dual_solver.dof_handler, - dual_hanging_node_constraints, - primal_solution); - + primal_solver.solution, + dual_solver.dof_handler, + dual_hanging_node_constraints, + primal_solution); + ConstraintMatrix primal_hanging_node_constraints; DoFTools::make_hanging_node_constraints (primal_solver.dof_handler, - primal_hanging_node_constraints); + primal_hanging_node_constraints); primal_hanging_node_constraints.close(); Vector dual_weights (dual_solver.dof_handler.n_dofs()); FETools::interpolation_difference (dual_solver.dof_handler, - dual_hanging_node_constraints, - dual_solver.solution, - primal_solver.dof_handler, - primal_hanging_node_constraints, - dual_weights); - - + dual_hanging_node_constraints, + dual_solver.solution, + primal_solver.dof_handler, + primal_hanging_node_constraints, + dual_weights); + + FaceIntegrals face_integrals; for (active_cell_iterator cell=dual_solver.dof_handler.begin_active(); - cell!=dual_solver.dof_handler.end(); - ++cell) + cell!=dual_solver.dof_handler.end(); + ++cell) for (unsigned int face_no=0; - face_no::faces_per_cell; - ++face_no) - face_integrals[cell->face(face_no)] = -1e20; + face_no::faces_per_cell; + ++face_no) + face_integrals[cell->face(face_no)] = -1e20; error_indicators.reinit (dual_solver.dof_handler - .get_tria().n_active_cells()); + .get_tria().n_active_cells()); const unsigned int n_threads = multithread_info.n_default_threads; Threads::ThreadGroup<> threads; @@ -1692,25 +1694,25 @@ namespace LaplaceSolver n_threads, i, error_indicators, face_integrals); - threads.join_all(); + threads.join_all(); - unsigned int present_cell=0; + unsigned int present_cell=0; for (active_cell_iterator cell=dual_solver.dof_handler.begin_active(); - cell!=dual_solver.dof_handler.end(); - ++cell, ++present_cell) + cell!=dual_solver.dof_handler.end(); + ++cell, ++present_cell) for (unsigned int face_no=0; face_no::faces_per_cell; - ++face_no) - { - Assert(face_integrals.find(cell->face(face_no)) != - face_integrals.end(), - ExcInternalError()); - error_indicators(present_cell) - -= 0.5*face_integrals[cell->face(face_no)]; - }; + ++face_no) + { + Assert(face_integrals.find(cell->face(face_no)) != + face_integrals.end(), + ExcInternalError()); + error_indicators(present_cell) + -= 0.5*face_integrals[cell->face(face_no)]; + }; deallog << " Estimated error=" - << std::accumulate (error_indicators.begin(), - error_indicators.end(), 0.) - << std::endl; + << std::accumulate (error_indicators.begin(), + error_indicators.end(), 0.) + << std::endl; } @@ -1719,76 +1721,76 @@ namespace LaplaceSolver void WeightedResidual:: estimate_some (const Vector &primal_solution, - const Vector &dual_weights, - const unsigned int n_threads, - const unsigned int this_thread, - Vector &error_indicators, - FaceIntegrals &face_integrals) const + const Vector &dual_weights, + const unsigned int n_threads, + const unsigned int this_thread, + Vector &error_indicators, + FaceIntegrals &face_integrals) const { const PrimalSolver &primal_solver = *this; const DualSolver &dual_solver = *this; CellData cell_data (*dual_solver.fe, - *dual_solver.quadrature, - *primal_solver.rhs_function); + *dual_solver.quadrature, + *primal_solver.rhs_function); FaceData face_data (*dual_solver.fe, - *dual_solver.face_quadrature); + *dual_solver.face_quadrature); active_cell_iterator cell=dual_solver.dof_handler.begin_active(); for (unsigned int t=0; - (t::faces_per_cell; - ++face_no) - { - if (cell->face(face_no)->at_boundary()) - { - face_integrals[cell->face(face_no)] = 0; - continue; - }; - - if ((cell->neighbor(face_no)->has_children() == false) && - (cell->neighbor(face_no)->level() == cell->level()) && - (cell->neighbor(face_no)->index() < cell->index())) - continue; - - if (cell->at_boundary(face_no) == false) - if (cell->neighbor(face_no)->level() < cell->level()) - continue; - - - if (cell->face(face_no)->has_children() == false) - integrate_over_regular_face (cell, face_no, - primal_solution, - dual_weights, - face_data, - face_integrals); - else - integrate_over_irregular_face (cell, face_no, - primal_solution, - dual_weights, - face_data, - face_integrals); - }; - - for (unsigned int t=0; - ((t::faces_per_cell; + ++face_no) + { + if (cell->face(face_no)->at_boundary()) + { + face_integrals[cell->face(face_no)] = 0; + continue; + }; + + if ((cell->neighbor(face_no)->has_children() == false) && + (cell->neighbor(face_no)->level() == cell->level()) && + (cell->neighbor(face_no)->index() < cell->index())) + continue; + + if (cell->at_boundary(face_no) == false) + if (cell->neighbor(face_no)->level() < cell->level()) + continue; + + + if (cell->face(face_no)->has_children() == false) + integrate_over_regular_face (cell, face_no, + primal_solution, + dual_weights, + face_data, + face_integrals); + else + integrate_over_irregular_face (cell, face_no, + primal_solution, + dual_weights, + face_data, + face_integrals); + }; + + for (unsigned int t=0; + ((t void WeightedResidual:: integrate_over_cell (const active_cell_iterator &cell, - const unsigned int cell_index, - const Vector &primal_solution, - const Vector &dual_weights, - CellData &cell_data, - Vector &error_indicators) const + const unsigned int cell_index, + const Vector &primal_solution, + const Vector &dual_weights, + CellData &cell_data, + Vector &error_indicators) const { cell_data.fe_values.reinit (cell); cell_data.right_hand_side - ->value_list (cell_data.fe_values.get_present_fe_values().get_quadrature_points(), - cell_data.rhs_values); + ->value_list (cell_data.fe_values.get_present_fe_values().get_quadrature_points(), + cell_data.rhs_values); cell_data.fe_values.get_present_fe_values().get_function_2nd_derivatives (primal_solution, - cell_data.cell_grad_grads); + cell_data.cell_grad_grads); cell_data.fe_values.get_present_fe_values().get_function_values (dual_weights, - cell_data.dual_weights); + cell_data.dual_weights); double sum = 0; for (unsigned int p=0; p void WeightedResidual:: integrate_over_regular_face (const active_cell_iterator &cell, - const unsigned int face_no, - const Vector &primal_solution, - const Vector &dual_weights, - FaceData &face_data, - FaceIntegrals &face_integrals) const + const unsigned int face_no, + const Vector &primal_solution, + const Vector &dual_weights, + FaceData &face_data, + FaceIntegrals &face_integrals) const { const unsigned int - n_q_points = face_data.fe_face_values_cell.get_present_fe_values().n_quadrature_points; + n_q_points = face_data.fe_face_values_cell.get_present_fe_values().n_quadrature_points; face_data.fe_face_values_cell.reinit (cell, face_no); face_data.fe_face_values_cell.get_present_fe_values().get_function_grads (primal_solution, - face_data.cell_grads); + face_data.cell_grads); Assert (cell->neighbor(face_no).state() == IteratorState::valid, - ExcInternalError()); + ExcInternalError()); const unsigned int - neighbor_neighbor = cell->neighbor_of_neighbor (face_no); + neighbor_neighbor = cell->neighbor_of_neighbor (face_no); 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.reinit (neighbor, neighbor_neighbor); face_data.fe_face_values_neighbor.get_present_fe_values().get_function_grads (primal_solution, - face_data.neighbor_grads); + face_data.neighbor_grads); for (unsigned int p=0; pface(face_no)) != face_integrals.end(), - ExcInternalError()); + ExcInternalError()); Assert (face_integrals[cell->face(face_no)] == -1e20, - ExcInternalError()); + ExcInternalError()); face_integrals[cell->face(face_no)] = face_integral; } - + template void WeightedResidual:: integrate_over_irregular_face (const active_cell_iterator &cell, - const unsigned int face_no, - const Vector &primal_solution, - const Vector &dual_weights, - FaceData &face_data, - FaceIntegrals &face_integrals) const + const unsigned int face_no, + const Vector &primal_solution, + const Vector &dual_weights, + FaceData &face_data, + FaceIntegrals &face_integrals) const { const unsigned int - n_q_points = face_data.fe_face_values_cell.get_present_fe_values().n_quadrature_points; + n_q_points = face_data.fe_face_values_cell.get_present_fe_values().n_quadrature_points; const typename hp::DoFHandler::face_iterator - face = cell->face(face_no); + face = cell->face(face_no); const typename hp::DoFHandler::cell_iterator - neighbor = cell->neighbor(face_no); + neighbor = cell->neighbor(face_no); Assert (neighbor.state() == IteratorState::valid, - ExcInternalError()); + ExcInternalError()); Assert (neighbor->has_children(), - ExcInternalError()); + ExcInternalError()); const unsigned int - neighbor_neighbor = cell->neighbor_of_neighbor (face_no); - + neighbor_neighbor = cell->neighbor_of_neighbor (face_no); + for (unsigned int subface_no=0; - subface_non_children(); ++subface_no) + subface_non_children(); ++subface_no) { - const active_cell_iterator neighbor_child + const active_cell_iterator neighbor_child = cell->neighbor_child_on_subface (face_no, subface_no); - Assert (neighbor_child->face(neighbor_neighbor) == - cell->face(face_no)->child(subface_no), - ExcInternalError()); - - face_data.fe_subface_values_cell.reinit (cell, face_no, subface_no); - face_data.fe_subface_values_cell.get_present_fe_values().get_function_grads (primal_solution, - face_data.cell_grads); - face_data.fe_face_values_neighbor.reinit (neighbor_child, - neighbor_neighbor); - face_data.fe_face_values_neighbor.get_present_fe_values().get_function_grads (primal_solution, - face_data.neighbor_grads); - - for (unsigned int p=0; pface(neighbor_neighbor)] - = face_integral; + Assert (neighbor_child->face(neighbor_neighbor) == + cell->face(face_no)->child(subface_no), + ExcInternalError()); + + face_data.fe_subface_values_cell.reinit (cell, face_no, subface_no); + face_data.fe_subface_values_cell.get_present_fe_values().get_function_grads (primal_solution, + face_data.cell_grads); + face_data.fe_face_values_neighbor.reinit (neighbor_child, + neighbor_neighbor); + face_data.fe_face_values_neighbor.get_present_fe_values().get_function_grads (primal_solution, + face_data.neighbor_grads); + + for (unsigned int p=0; pface(neighbor_neighbor)] + = face_integral; }; double sum = 0; for (unsigned int subface_no=0; - subface_non_children(); ++subface_no) + subface_non_children(); ++subface_no) { - Assert (face_integrals.find(face->child(subface_no)) != - face_integrals.end(), - ExcInternalError()); - Assert (face_integrals[face->child(subface_no)] != -1e20, - ExcInternalError()); - - sum += face_integrals[face->child(subface_no)]; + Assert (face_integrals.find(face->child(subface_no)) != + face_integrals.end(), + ExcInternalError()); + Assert (face_integrals[face->child(subface_no)] != -1e20, + ExcInternalError()); + + sum += face_integrals[face->child(subface_no)]; }; face_integrals[face] = sum; } - + } @@ -1952,49 +1954,50 @@ namespace LaplaceSolver template struct Framework { - public: - typedef Evaluation::EvaluationBase Evaluator; - typedef std::list EvaluatorList; +public: + typedef Evaluation::EvaluationBase Evaluator; + typedef std::list EvaluatorList; - struct ProblemDescription - { - unsigned int primal_fe_degree; - unsigned int dual_fe_degree; + struct ProblemDescription + { + unsigned int primal_fe_degree; + unsigned int dual_fe_degree; - SmartPointer > data; + SmartPointer > data; - enum RefinementCriterion { - dual_weighted_error_estimator, - global_refinement, - kelly_indicator, - weighted_kelly_indicator - }; + enum RefinementCriterion + { + dual_weighted_error_estimator, + global_refinement, + kelly_indicator, + weighted_kelly_indicator + }; - RefinementCriterion refinement_criterion; + RefinementCriterion refinement_criterion; - SmartPointer > dual_functional; + SmartPointer > dual_functional; - EvaluatorList evaluator_list; + EvaluatorList evaluator_list; - SmartPointer > kelly_weight; + SmartPointer > kelly_weight; - unsigned int max_degrees_of_freedom; + unsigned int max_degrees_of_freedom; - ProblemDescription (); - }; + ProblemDescription (); + }; - static void run (const ProblemDescription &descriptor); + static void run (const ProblemDescription &descriptor); }; template Framework::ProblemDescription::ProblemDescription () - : - primal_fe_degree (1), - dual_fe_degree (2), - refinement_criterion (dual_weighted_error_estimator), - max_degrees_of_freedom (5000) + : + primal_fe_degree (1), + dual_fe_degree (2), + refinement_criterion (dual_weighted_error_estimator), + max_degrees_of_freedom (5000) {} @@ -2003,7 +2006,7 @@ template void Framework::run (const ProblemDescription &descriptor) { Triangulation - triangulation (Triangulation::smoothing_on_refinement); + triangulation (Triangulation::smoothing_on_refinement); descriptor.data->create_coarse_grid (triangulation); const hp::FECollection primal_fe(FE_Q(descriptor.primal_fe_degree)); @@ -2011,89 +2014,89 @@ void Framework::run (const ProblemDescription &descriptor) const hp::QCollection quadrature(QGauss(descriptor.dual_fe_degree+1)); const hp::QCollection face_quadrature(QGauss(descriptor.dual_fe_degree+1)); - LaplaceSolver::Base * solver = 0; + LaplaceSolver::Base *solver = 0; switch (descriptor.refinement_criterion) { - case ProblemDescription::dual_weighted_error_estimator: - { - solver - = new LaplaceSolver::WeightedResidual (triangulation, - primal_fe, - dual_fe, - quadrature, - face_quadrature, - descriptor.data->get_right_hand_side(), - descriptor.data->get_boundary_values(), - *descriptor.dual_functional); - break; - }; - - case ProblemDescription::global_refinement: - { - solver - = new LaplaceSolver::RefinementGlobal (triangulation, - primal_fe, - quadrature, - face_quadrature, - descriptor.data->get_right_hand_side(), - descriptor.data->get_boundary_values()); - break; - }; - - case ProblemDescription::kelly_indicator: - { - solver - = new LaplaceSolver::RefinementKelly (triangulation, - primal_fe, - quadrature, - face_quadrature, - descriptor.data->get_right_hand_side(), - descriptor.data->get_boundary_values()); - break; - }; + case ProblemDescription::dual_weighted_error_estimator: + { + solver + = new LaplaceSolver::WeightedResidual (triangulation, + primal_fe, + dual_fe, + quadrature, + face_quadrature, + descriptor.data->get_right_hand_side(), + descriptor.data->get_boundary_values(), + *descriptor.dual_functional); + break; + }; - case ProblemDescription::weighted_kelly_indicator: - { - solver - = new LaplaceSolver::RefinementWeightedKelly (triangulation, - primal_fe, - quadrature, - face_quadrature, - descriptor.data->get_right_hand_side(), - descriptor.data->get_boundary_values(), - *descriptor.kelly_weight); - break; - }; - - default: - AssertThrow (false, ExcInternalError()); + case ProblemDescription::global_refinement: + { + solver + = new LaplaceSolver::RefinementGlobal (triangulation, + primal_fe, + quadrature, + face_quadrature, + descriptor.data->get_right_hand_side(), + descriptor.data->get_boundary_values()); + break; + }; + + case ProblemDescription::kelly_indicator: + { + solver + = new LaplaceSolver::RefinementKelly (triangulation, + primal_fe, + quadrature, + face_quadrature, + descriptor.data->get_right_hand_side(), + descriptor.data->get_boundary_values()); + break; + }; + + case ProblemDescription::weighted_kelly_indicator: + { + solver + = new LaplaceSolver::RefinementWeightedKelly (triangulation, + primal_fe, + quadrature, + face_quadrature, + descriptor.data->get_right_hand_side(), + descriptor.data->get_boundary_values(), + *descriptor.kelly_weight); + break; }; - + + default: + AssertThrow (false, ExcInternalError()); + }; + for (unsigned int step=0; true; ++step) { - deallog << "Refinement cycle: " << step - << std::endl; - + deallog << "Refinement cycle: " << step + << std::endl; + solver->set_refinement_cycle (step); solver->solve_problem (); solver->output_solution (); deallog << " Number of degrees of freedom=" - << solver->n_dofs() << std::endl; - + << solver->n_dofs() << std::endl; + for (typename EvaluatorList::const_iterator - e = descriptor.evaluator_list.begin(); - e != descriptor.evaluator_list.end(); ++e) - { - (*e)->set_refinement_cycle (step); - solver->postprocess (**e); - }; - - + e = descriptor.evaluator_list.begin(); + e != descriptor.evaluator_list.end(); ++e) + { + (*e)->set_refinement_cycle (step); + solver->postprocess (**e); + }; + + if (solver->n_dofs() < descriptor.max_degrees_of_freedom) - solver->refine_grid (); + solver->refine_grid (); else - break; + break; }; deallog << std::endl; @@ -2105,66 +2108,66 @@ void Framework::run (const ProblemDescription &descriptor) -int main () +int main () { deallog.depth_console (0); try { logfile.precision(2); - + deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); const unsigned int dim = 2; Framework::ProblemDescription descriptor; descriptor.refinement_criterion - = Framework::ProblemDescription::dual_weighted_error_estimator; + = Framework::ProblemDescription::dual_weighted_error_estimator; descriptor.primal_fe_degree = 1; descriptor.dual_fe_degree = 2; descriptor.data = new Data::SetUp,dim> (); - + const Point evaluation_point (0.75, 0.75); descriptor.dual_functional - = new DualFunctional::PointValueEvaluation (evaluation_point); - + = new DualFunctional::PointValueEvaluation (evaluation_point); + Evaluation::PointValueEvaluation - postprocessor1 (evaluation_point); + postprocessor1 (evaluation_point); Evaluation::GridOutput - postprocessor2 ("grid"); - + postprocessor2 ("grid"); + descriptor.evaluator_list.push_back (&postprocessor1); descriptor.evaluator_list.push_back (&postprocessor2); descriptor.max_degrees_of_freedom = 20000; - + Framework::run (descriptor); } catch (std::exception &exc) { std::cerr << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; std::cerr << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } - catch (...) + catch (...) { std::cerr << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; std::cerr << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; }; diff --git a/tests/fail/hp-step-15.cc b/tests/fail/hp-step-15.cc index 0956f04576..5a7c267548 100644 --- a/tests/fail/hp-step-15.cc +++ b/tests/fail/hp-step-15.cc @@ -71,19 +71,19 @@ double gradient_power (const Tensor<1,dim> &v, -class InitializationValues : public Function<1> +class InitializationValues : public Function<1> { - public: - InitializationValues () : Function<1>() {} - - virtual double value (const Point<1> &p, - const unsigned int component = 0) const; +public: + InitializationValues () : Function<1>() {} + + virtual double value (const Point<1> &p, + const unsigned int component = 0) const; }; double InitializationValues::value (const Point<1> &p, - const unsigned int) const + const unsigned int) const { const double base = std::pow(p(0), 1./3.); const double random = 2.*rand()/RAND_MAX-1; @@ -93,54 +93,54 @@ double InitializationValues::value (const Point<1> &p, template -class MinimizationProblem +class MinimizationProblem { - public: - MinimizationProblem (const unsigned int run_number); - void run (); - - private: - void initialize_solution (); - void setup_system_on_mesh (); - void assemble_step (); - double line_search (const Vector & update) const; - void do_step (); - void output_results () const; - void refine_grid (); - - static double energy (const hp::DoFHandler &dof_handler, - const Vector &function); - - - const unsigned int run_number; - - Triangulation triangulation; - - hp::FECollection fe; - hp::DoFHandler dof_handler; - - ConstraintMatrix hanging_node_constraints; - - SparsityPattern sparsity_pattern; - SparseMatrix matrix; - - Vector present_solution; - Vector residual; +public: + MinimizationProblem (const unsigned int run_number); + void run (); + +private: + void initialize_solution (); + void setup_system_on_mesh (); + void assemble_step (); + double line_search (const Vector &update) const; + void do_step (); + void output_results () const; + void refine_grid (); + + static double energy (const hp::DoFHandler &dof_handler, + const Vector &function); + + + const unsigned int run_number; + + Triangulation triangulation; + + hp::FECollection fe; + hp::DoFHandler dof_handler; + + ConstraintMatrix hanging_node_constraints; + + SparsityPattern sparsity_pattern; + SparseMatrix matrix; + + Vector present_solution; + Vector residual; }; template MinimizationProblem::MinimizationProblem (const unsigned int run_number) - : - run_number (run_number), - fe (FE_Q(1)), - dof_handler (triangulation) + : + run_number (run_number), + fe (FE_Q(1)), + dof_handler (triangulation) {} template <> -void MinimizationProblem<1>::initialize_solution () +void MinimizationProblem<1>::initialize_solution () { present_solution.reinit (dof_handler.n_dofs()); VectorTools::interpolate (dof_handler, @@ -169,12 +169,12 @@ void MinimizationProblem::setup_system_on_mesh () { hanging_node_constraints.clear (); DoFTools::make_hanging_node_constraints (dof_handler, - hanging_node_constraints); + hanging_node_constraints); hanging_node_constraints.close (); sparsity_pattern.reinit (dof_handler.n_dofs(), - dof_handler.n_dofs(), - dof_handler.max_couplings_between_dofs()); + dof_handler.n_dofs(), + dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern); hanging_node_constraints.condense (sparsity_pattern); @@ -191,9 +191,9 @@ void MinimizationProblem::assemble_step () residual.reinit (dof_handler.n_dofs()); hp::QCollection quadrature_formula(QGauss(4)); - hp::FEValues fe_values (fe, quadrature_formula, - update_values | update_gradients | - update_q_points | update_JxW_values); + hp::FEValues fe_values (fe, quadrature_formula, + update_values | update_gradients | + update_q_points | update_JxW_values); const unsigned int dofs_per_cell = fe[0].dofs_per_cell; const unsigned int n_q_points = quadrature_formula[0].size(); @@ -207,8 +207,8 @@ void MinimizationProblem::assemble_step () std::vector > local_solution_grads (n_q_points); 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 (; cell!=endc; ++cell) { cell_matrix = 0; @@ -217,9 +217,9 @@ void MinimizationProblem::assemble_step () fe_values.reinit (cell); fe_values.get_present_fe_values().get_function_values (present_solution, - local_solution_values); + local_solution_values); fe_values.get_present_fe_values().get_function_grads (present_solution, - local_solution_grads); + local_solution_grads); for (unsigned int q_point=0; q_point::assemble_step () for (unsigned int i=0; idiameter() * - cell->diameter() - + - fe_values.get_present_fe_values().shape_value(i,q_point) * - fe_values.get_present_fe_values().shape_value(j,q_point)) * - fe_values.get_present_fe_values().JxW(q_point); + += (fe_values.get_present_fe_values().shape_grad(i,q_point) * + fe_values.get_present_fe_values().shape_grad(j,q_point) * + cell->diameter() * + cell->diameter() + + + fe_values.get_present_fe_values().shape_value(i,q_point) * + fe_values.get_present_fe_values().shape_value(j,q_point)) * + fe_values.get_present_fe_values().JxW(q_point); for (unsigned int i=0; i::assemble_step () fe_values.get_present_fe_values().shape_value(i,q_point) * (x_minus_u3 * - (u_prime * + (u_prime * fe_values.get_present_fe_values().shape_grad(i,q_point)) - (u_prime*u_prime) * u * u * fe_values.get_present_fe_values().shape_value(i,q_point)) - ) + ) * fe_values.get_present_fe_values().JxW(q_point)); } - + cell->get_dof_indices (local_dof_indices); for (unsigned int i=0; i::assemble_step () std::map boundary_values; VectorTools::interpolate_boundary_values (dof_handler, - 0, - ZeroFunction(), - boundary_values); + 0, + ZeroFunction(), + boundary_values); if (dim == 1) VectorTools::interpolate_boundary_values (dof_handler, 1, @@ -283,9 +283,9 @@ void MinimizationProblem::assemble_step () boundary_values); Vector dummy (residual.size()); MatrixTools::apply_boundary_values (boundary_values, - matrix, - dummy, - residual); + matrix, + dummy, + residual); } @@ -303,7 +303,7 @@ MinimizationProblem::line_search (const Vector &update) const const double f_a = energy (dof_handler, tmp); const double dalpha = (alpha != 0 ? alpha/100 : 0.01); - + tmp = present_solution; tmp.add (alpha+dalpha, update); const double f_a_plus = energy (dof_handler, tmp); @@ -329,7 +329,7 @@ MinimizationProblem::line_search (const Vector &update) const tmp = present_solution; tmp.add (alpha+step_length, update); const double e = energy (dof_handler, tmp); - + if (e >= f_a) step_length /= 2; else @@ -346,7 +346,7 @@ MinimizationProblem::line_search (const Vector &update) const template void MinimizationProblem::do_step () -{ +{ assemble_step (); Vector update (present_solution.size()); @@ -354,7 +354,7 @@ void MinimizationProblem::do_step () SolverControl solver_control (residual.size(), 1e-2*residual.l2_norm()); SolverCG<> solver (solver_control); - + PreconditionSSOR<> preconditioner; preconditioner.initialize(matrix); @@ -393,26 +393,26 @@ template <> void MinimizationProblem<1>::refine_grid () { const unsigned int dim = 1; - + Vector error_indicators (triangulation.n_active_cells()); QTrapez q; hp::QCollection quadrature(q); hp::FEValues fe_values (fe, quadrature, - update_values | update_gradients | - update_second_derivatives | - update_q_points | update_JxW_values); + update_values | update_gradients | + update_second_derivatives | + update_q_points | update_JxW_values); hp::FEValues neighbor_fe_values (fe, quadrature, - update_gradients); + update_gradients); std::vector local_values (quadrature[0].size()); std::vector > local_gradients (quadrature[0].size()); std::vector > local_2nd_derivs (quadrature[0].size()); 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 cell_index = 0; cell!=endc; ++cell, ++cell_index) { fe_values.reinit (cell); @@ -434,7 +434,7 @@ void MinimizationProblem<1>::refine_grid () 5*(x-u*u*u)*u_doubleprime + 2*u_prime*(1-3*u*u*u_prime))); - + cell_residual_norm += (local_residual_value * local_residual_value * fe_values.get_present_fe_values().JxW(q)); } @@ -476,23 +476,23 @@ void MinimizationProblem<1>::refine_grid () hp::DoFHandler::cell_iterator right_neighbor = cell->neighbor(1); while (right_neighbor->has_children()) right_neighbor = right_neighbor->child(0); - + neighbor_fe_values.reinit (right_neighbor); neighbor_fe_values.get_present_fe_values().get_function_grads (present_solution, local_gradients); const double neighbor_u_prime_right = local_gradients[0][0]; const double right_jump = std::pow(x_right-std::pow(u_right,3), 2) * - (std::pow(neighbor_u_prime_right,5) - - std::pow(u_prime_right,5)); + (std::pow(neighbor_u_prime_right,5) - + std::pow(u_prime_right,5)); error_indicators(cell_index) += right_jump * right_jump * cell->diameter(); - } - } + } + } GridRefinement::refine_and_coarsen_fixed_number (triangulation, - error_indicators, - 0.3, 0.03); + error_indicators, + 0.3, 0.03); triangulation.prepare_coarsening_and_refinement(); SolutionTransfer solution_transfer(dof_handler); @@ -507,8 +507,8 @@ void MinimizationProblem<1>::refine_grid () hanging_node_constraints.clear (); DoFTools::make_hanging_node_constraints (dof_handler, - hanging_node_constraints); - hanging_node_constraints.close (); + hanging_node_constraints); + hanging_node_constraints.close (); hanging_node_constraints.distribute (present_solution); } @@ -520,9 +520,9 @@ MinimizationProblem::energy (const hp::DoFHandler &dof_handler, const Vector &function) { hp::QCollection quadrature_formula(QGauss(4)); - hp::FEValues fe_values (dof_handler.get_fe(), quadrature_formula, - update_values | update_gradients | - update_q_points | update_JxW_values); + hp::FEValues fe_values (dof_handler.get_fe(), quadrature_formula, + update_values | update_gradients | + update_q_points | update_JxW_values); const unsigned int n_q_points = quadrature_formula[0].size(); @@ -532,15 +532,15 @@ MinimizationProblem::energy (const hp::DoFHandler &dof_handler, double energy = 0.; 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 (; cell!=endc; ++cell) { fe_values.reinit (cell); fe_values.get_present_fe_values().get_function_values (function, - local_solution_values); + local_solution_values); fe_values.get_present_fe_values().get_function_grads (function, - local_solution_grads); + local_solution_grads); for (unsigned int q_point=0; q_point::energy (const hp::DoFHandler &dof_handler, template -void MinimizationProblem::run () +void MinimizationProblem::run () { GridGenerator::hyper_cube (triangulation, 0., 1.); triangulation.refine_global (4); @@ -564,11 +564,11 @@ void MinimizationProblem::run () initialize_solution (); double last_energy = energy (dof_handler, present_solution); - + while (true) { setup_system_on_mesh (); - + for (unsigned int iteration=0; iteration<5; ++iteration) do_step (); @@ -582,19 +582,19 @@ void MinimizationProblem::run () refine_grid (); } - + output_results (); - + deallog << std::endl; } -int main () +int main () { try { logfile.precision(2); - + deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); @@ -603,7 +603,7 @@ int main () for (unsigned int realization=0; realization minimization_problem_1d (realization); minimization_problem_1d.run (); } @@ -611,24 +611,24 @@ int main () catch (std::exception &exc) { std::cerr << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; std::cerr << "Exception on processing: " << std::endl - << exc.what() << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } - catch (...) + catch (...) { std::cerr << std::endl << std::endl - << "----------------------------------------------------" - << std::endl; + << "----------------------------------------------------" + << std::endl; std::cerr << "Unknown exception!" << std::endl - << "Aborting!" << std::endl - << "----------------------------------------------------" - << std::endl; + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; return 1; } return 0; diff --git a/tests/fail/hp_constraints_q_system_08.cc b/tests/fail/hp_constraints_q_system_08.cc index 323d1ec345..40c046a755 100644 --- a/tests/fail/hp_constraints_q_system_08.cc +++ b/tests/fail/hp_constraints_q_system_08.cc @@ -31,7 +31,7 @@ void test () hp::FECollection fe; for (unsigned int i=1; i<4; ++i) fe.push_back (FESystem(FE_Q(i), 1, - FE_DGQ(i+1), 1)); - + FE_DGQ(i+1), 1)); + test_with_hanging_nodes_random_aniso (fe); } diff --git a/tests/fail/hp_constraints_q_system_x_08.cc b/tests/fail/hp_constraints_q_system_x_08.cc index 9bfe173bb1..0434b1f8a4 100644 --- a/tests/fail/hp_constraints_q_system_x_08.cc +++ b/tests/fail/hp_constraints_q_system_x_08.cc @@ -35,7 +35,7 @@ void test () for (unsigned int i=1; i<4; ++i) for (unsigned int j=0; j<4; ++j) fe.push_back (FESystem(FE_Q(i), 1, - FE_DGQ(j), 1)); - + FE_DGQ(j), 1)); + test_with_hanging_nodes_random_aniso (fe); } diff --git a/tests/fail/hp_constraints_rt_01.cc b/tests/fail/hp_constraints_rt_01.cc index 79d00c0f12..dfda7338c6 100644 --- a/tests/fail/hp_constraints_rt_01.cc +++ b/tests/fail/hp_constraints_rt_01.cc @@ -30,7 +30,7 @@ void test () { if (dim == 1) return; - + hp::FECollection fe; for (unsigned int i=1; i<4; ++i) fe.push_back (FE_RaviartThomas(i)); diff --git a/tests/fail/hp_constraints_rt_02.cc b/tests/fail/hp_constraints_rt_02.cc index a90bc28fae..ebb4ae05db 100644 --- a/tests/fail/hp_constraints_rt_02.cc +++ b/tests/fail/hp_constraints_rt_02.cc @@ -30,7 +30,7 @@ void test () { if (dim == 1) return; - + hp::FECollection fe; for (unsigned int i=1; i<4; ++i) fe.push_back (FE_RaviartThomas(i)); diff --git a/tests/fail/hp_constraints_rt_03.cc b/tests/fail/hp_constraints_rt_03.cc index e65a960c02..2fba2ce0f1 100644 --- a/tests/fail/hp_constraints_rt_03.cc +++ b/tests/fail/hp_constraints_rt_03.cc @@ -30,7 +30,7 @@ void test () { if (dim == 1) return; - + hp::FECollection fe; for (unsigned int i=1; i<4; ++i) fe.push_back (FE_RaviartThomas(i)); diff --git a/tests/fail/hp_constraints_rt_04.cc b/tests/fail/hp_constraints_rt_04.cc index 847304a48c..808e1ea861 100644 --- a/tests/fail/hp_constraints_rt_04.cc +++ b/tests/fail/hp_constraints_rt_04.cc @@ -30,7 +30,7 @@ void test () { if (dim == 1) return; - + hp::FECollection fe; for (unsigned int i=1; i<4; ++i) fe.push_back (FE_RaviartThomas(i)); diff --git a/tests/fail/hp_constraints_rt_05.cc b/tests/fail/hp_constraints_rt_05.cc index 7a49b3aadb..e5a7dd7042 100644 --- a/tests/fail/hp_constraints_rt_05.cc +++ b/tests/fail/hp_constraints_rt_05.cc @@ -30,7 +30,7 @@ void test () { if (dim == 1) return; - + hp::FECollection fe; for (unsigned int i=1; i<4; ++i) fe.push_back (FE_RaviartThomas(i)); diff --git a/tests/fail/hp_constraints_rt_06.cc b/tests/fail/hp_constraints_rt_06.cc index 12e9f647ed..814d0a72d5 100644 --- a/tests/fail/hp_constraints_rt_06.cc +++ b/tests/fail/hp_constraints_rt_06.cc @@ -30,7 +30,7 @@ void test () { if (dim == 1) return; - + hp::FECollection fe; std::vector degrees; for (unsigned int i=1; i<7-dim; ++i) @@ -38,6 +38,6 @@ void test () fe.push_back (FE_RaviartThomas(i)); degrees.push_back (i); } - + test_interpolation (fe, degrees); } diff --git a/tests/fail/injection_nedelec.cc b/tests/fail/injection_nedelec.cc index d3a745db72..c11ee8fbac 100644 --- a/tests/fail/injection_nedelec.cc +++ b/tests/fail/injection_nedelec.cc @@ -27,7 +27,7 @@ void test () { if (dim == 1) return; - + for (unsigned int i=1; i<4; ++i) for (unsigned int j=i; j<4; ++j) do_check (FE_Nedelec(i), FE_Nedelec(j)); diff --git a/tests/fail/injection_rt.cc b/tests/fail/injection_rt.cc index bc4cae641f..b982c62d23 100644 --- a/tests/fail/injection_rt.cc +++ b/tests/fail/injection_rt.cc @@ -27,7 +27,7 @@ void test () { if (dim == 1) return; - + for (unsigned int i=0; i<4; ++i) for (unsigned int j=i; j<4; ++j) do_check (FE_RaviartThomas(i), FE_RaviartThomas(j)); diff --git a/tests/fail/project_rt_03.cc b/tests/fail/project_rt_03.cc index 4f9371d74f..d064cb95e6 100644 --- a/tests/fail/project_rt_03.cc +++ b/tests/fail/project_rt_03.cc @@ -28,9 +28,9 @@ template void test () { if (dim != 1) - // this is interesting also in 3d, but is - // exceedingly slow there. limit to the - // case of RT(0) elements in 3d + // this is interesting also in 3d, but is + // exceedingly slow there. limit to the + // case of RT(0) elements in 3d for (unsigned int p=0; p<(dim == 2 ? 3 : 1); ++p) test_with_wrong_face_orientation (FE_RaviartThomas(p), p+1, 1); } diff --git a/tests/fail/rt_4.cc b/tests/fail/rt_4.cc index 6946bebe28..ecd0534ae9 100644 --- a/tests/fail/rt_4.cc +++ b/tests/fail/rt_4.cc @@ -34,21 +34,21 @@ void test(const unsigned int degree) { deallog << "FE_RaviartThomas<" << dim << "> (" << degree << ")" - << std::endl; - + << std::endl; + FE_RaviartThomas fe_rt(degree); for (unsigned int c=0; c::max_children_per_cell; ++c) { - const FullMatrix & m = fe_rt.get_prolongation_matrix(c,RefinementCase::isotropic_refinement); + const FullMatrix &m = fe_rt.get_prolongation_matrix(c,RefinementCase::isotropic_refinement); for (unsigned int i=0; i(degree); // test<3>(degree); - + return 0; } diff --git a/tests/fail/rt_6.cc b/tests/fail/rt_6.cc index b8d1e10b5e..2834535ee4 100644 --- a/tests/fail/rt_6.cc +++ b/tests/fail/rt_6.cc @@ -40,19 +40,19 @@ template Point transform (const Point p) { - switch (dim) + switch (dim) { - case 1: - return p; - case 2: - return Point(p(0)*(1+p(1)), p(1)*(1+p(0))); - case 3: - return Point(p(0)*(1+p(1))*(1+p(2)), - p(1)*(1+p(0))*(1+p(2)), - p(2)*(1+p(0))*(1+p(1))); - default: - Assert (false, ExcNotImplemented()); - return Point(); + case 1: + return p; + case 2: + return Point(p(0)*(1+p(1)), p(1)*(1+p(0))); + case 3: + return Point(p(0)*(1+p(1))*(1+p(2)), + p(1)*(1+p(0))*(1+p(2)), + p(2)*(1+p(0))*(1+p(1))); + default: + Assert (false, ExcNotImplemented()); + return Point(); }; } @@ -64,17 +64,17 @@ void check_element (const Triangulation &tr, DoFHandler dof_handler(tr); dof_handler.distribute_dofs (fe); - // create a mostly arbitrary - // function plus a trend on this - // grid + // create a mostly arbitrary + // function plus a trend on this + // grid Vector tmp(dof_handler.n_dofs()); for (unsigned int i=0; i x(tmp.size()); Vector v(fe.dofs_per_cell); for (typename DoFHandler::cell_iterator cell=dof_handler.begin(); @@ -82,24 +82,24 @@ void check_element (const Triangulation &tr, if (cell->has_children() && cell->child(0)->active()) { - // first make sure that what - // we do is reasonable. for - // this, _all_ children have - // to be active, not only - // some of them + // first make sure that what + // we do is reasonable. for + // this, _all_ children have + // to be active, not only + // some of them for (unsigned int c=0; c::max_children_per_cell; ++c) Assert (cell->child(c)->active(), ExcInternalError()); - // then restrict and prolongate + // then restrict and prolongate cell->get_interpolated_dof_values (tmp, v); cell->set_dof_values_by_interpolation (v, x); }; - // now x is a function on the fine - // grid that is representable on - // the coarse grid. so another - // cycle should not alter it any - // more: + // now x is a function on the fine + // grid that is representable on + // the coarse grid. so another + // cycle should not alter it any + // more: Vector x2(x.size()); for (typename DoFHandler::cell_iterator cell=dof_handler.begin(); cell!=dof_handler.end(); ++cell) @@ -110,7 +110,7 @@ void check_element (const Triangulation &tr, cell->set_dof_values_by_interpolation (v, x2); }; - // then check that this is so: + // then check that this is so: x2 -= x; const double relative_residual = (x2.l2_norm() / x.l2_norm()); @@ -118,7 +118,7 @@ void check_element (const Triangulation &tr, deallog << ", dofs_per_cell=" << fe.dofs_per_cell << "; relative residual: " << (relative_residual &tr, template void test () { - // make a coarse triangulation as a - // hypercube. if in more than 1d, - // distort it so that it is no more - // an affine image of the - // hypercube, to make things more - // difficult. then refine it twice + // make a coarse triangulation as a + // hypercube. if in more than 1d, + // distort it so that it is no more + // an affine image of the + // hypercube, to make things more + // difficult. then refine it twice Triangulation tr; GridGenerator::hyper_cube(tr, 0., 1.); Point (*p) (Point) = &transform; GridTools::transform (p, tr); tr.refine_global (2); - // now for a list of finite - // elements, for which we want to - // test. we happily waste tons of - // memory here, but who cares... + // now for a list of finite + // elements, for which we want to + // test. we happily waste tons of + // memory here, but who cares... const FiniteElement *fe_list[] - = - { - new FE_RaviartThomas(0), - new FE_RaviartThomas(1), - new FE_RaviartThomas(2) - }; - + = + { + new FE_RaviartThomas(0), + new FE_RaviartThomas(1), + new FE_RaviartThomas(2) + }; + for (unsigned int i=0; i(); test<3>(); return 0; diff --git a/tests/fail/rt_crash_01.cc b/tests/fail/rt_crash_01.cc index a8f7b4e5ae..df6c51dfb3 100644 --- a/tests/fail/rt_crash_01.cc +++ b/tests/fail/rt_crash_01.cc @@ -36,19 +36,19 @@ template void check_this (const DoFHandler &dof_handler) { - // there's presently a crash in the - // Raviart-Thomas element. only - // check for these elements, - // everything else is handled in - // dof_tools_19 + // there's presently a crash in the + // Raviart-Thomas element. only + // check for these elements, + // everything else is handled in + // dof_tools_19 if (dof_handler.get_fe().get_name().find ("RaviartThomas") == std::string::npos) return; ConstantFunction test_func (1, dof_handler.get_fe().n_components ()); - // don't run this test if hanging - // nodes are not implemented + // don't run this test if hanging + // nodes are not implemented if (dof_handler.get_fe().constraints_are_implemented() == false) return; @@ -64,16 +64,16 @@ check_this (const DoFHandler &dof_handler) Vector solution (dof_handler.n_dofs ()); VectorTools::project (dof_handler, cm, - quadrature, test_func, - solution); + quadrature, test_func, + solution); cm.distribute (solution); - // all values of the projected solution - // should be close around 1 (the value of - // the original function) + // all values of the projected solution + // should be close around 1 (the value of + // the original function) for (unsigned int i=0; i cellwise_errors (dof_handler.get_tria ().n_active_cells()); diff --git a/tests/fail/rt_distorted_01.cc b/tests/fail/rt_distorted_01.cc index cf854748d2..41a563b1d0 100644 --- a/tests/fail/rt_distorted_01.cc +++ b/tests/fail/rt_distorted_01.cc @@ -68,18 +68,18 @@ std::ofstream logfile ("rt_distorted_01/output"); template class TestMap1 : public Function { - public: - TestMap1 (const unsigned int n_components) : - Function (n_components) - {} +public: + TestMap1 (const unsigned int n_components) : + Function (n_components) + {} - virtual ~TestMap1 () {} + virtual ~TestMap1 () {} - virtual double value (const Point &p, - const unsigned int component = 0) const; + virtual double value (const Point &p, + const unsigned int component = 0) const; - void vector_value (const Point &p, - Vector &return_value) const; + void vector_value (const Point &p, + Vector &return_value) const; }; @@ -87,7 +87,7 @@ class TestMap1 : public Function template double TestMap1::value (const Point &/*p*/, - const unsigned int /*component*/) const + const unsigned int /*component*/) const { return (1); } @@ -95,12 +95,12 @@ TestMap1::value (const Point &/*p*/, template void TestMap1::vector_value (const Point &p, - Vector &return_value) const + Vector &return_value) const { Assert (return_value.size() == this->n_components, - ExcDimensionMismatch (return_value.size(), this->n_components)); + ExcDimensionMismatch (return_value.size(), this->n_components)); - // Parabolic inflow profile + // Parabolic inflow profile for (unsigned int iCount = 0; iCount < this->n_components; iCount++) return_value (iCount) = value (p, iCount); } @@ -110,22 +110,22 @@ void TestMap1::vector_value (const Point &p, template class TestDef1 : public Function { - private: - const double phi; +private: + const double phi; - public: - TestDef1 (const unsigned int n_components, const double ph) : - Function (n_components), - phi (ph) - {} +public: + TestDef1 (const unsigned int n_components, const double ph) : + Function (n_components), + phi (ph) + {} - virtual ~TestDef1 () {} + virtual ~TestDef1 () {} - virtual double value (const Point &p, - const unsigned int component = 0) const; + virtual double value (const Point &p, + const unsigned int component = 0) const; - void vector_value (const Point &p, - Vector &return_value) const; + void vector_value (const Point &p, + Vector &return_value) const; }; @@ -133,13 +133,13 @@ class TestDef1 : public Function template double TestDef1::value (const Point &p, - const unsigned int component) const + const unsigned int component) const { Point<2> center; center(0) = 0.5; center(1) = 0.5; double rad = p.distance (center), - phi_p = atan2 (p(0) - center(0), p(1) - center(1)); + phi_p = atan2 (p(0) - center(0), p(1) - center(1)); if (component == 0) return rad * (sin (phi + phi_p) - sin (phi_p)); @@ -150,10 +150,10 @@ TestDef1::value (const Point &p, template void TestDef1::vector_value (const Point &p, - Vector &return_value) const + Vector &return_value) const { Assert (return_value.size() == this->n_components, - ExcDimensionMismatch (return_value.size(), this->n_components)); + ExcDimensionMismatch (return_value.size(), this->n_components)); for (unsigned int iCount = 0; iCount < this->n_components; iCount++) return_value (iCount) = value (p, iCount); } @@ -165,32 +165,32 @@ void TestDef1::vector_value (const Point &p, template class TestDef2 : public Function { - private: - const double scale; +private: + const double scale; - public: - TestDef2 (const unsigned int n_components, const double sc) : - Function (n_components), - scale (sc) - {} +public: + TestDef2 (const unsigned int n_components, const double sc) : + Function (n_components), + scale (sc) + {} - virtual ~TestDef2 () {} + virtual ~TestDef2 () {} - virtual double value (const Point &p, - const unsigned int component = 0) const; + virtual double value (const Point &p, + const unsigned int component = 0) const; - void vector_value (const Point &p, - Vector &return_value) const; + void vector_value (const Point &p, + Vector &return_value) const; }; template double TestDef2::value (const Point &p, - const unsigned int component) const + const unsigned int component) const { double x = p(0), - y = p(1); + y = p(1); if (component == 0) return scale * x; @@ -201,10 +201,10 @@ TestDef2::value (const Point &p, template void TestDef2::vector_value (const Point &p, - Vector &return_value) const + Vector &return_value) const { Assert (return_value.size() == this->n_components, - ExcDimensionMismatch (return_value.size(), this->n_components)); + ExcDimensionMismatch (return_value.size(), this->n_components)); for (unsigned int iCount = 0; iCount < this->n_components; iCount++) return_value (iCount) = value (p, iCount); } @@ -217,29 +217,29 @@ void TestDef2::vector_value (const Point &p, template class TestDef3 : public Function { - private: - const double scale; +private: + const double scale; - public: - TestDef3 (const unsigned int n_components, const double sc) : - Function (n_components), - scale (sc) - {} +public: + TestDef3 (const unsigned int n_components, const double sc) : + Function (n_components), + scale (sc) + {} - virtual ~TestDef3 () {} + virtual ~TestDef3 () {} - virtual double value (const Point &p, - const unsigned int component = 0) const; + virtual double value (const Point &p, + const unsigned int component = 0) const; - void vector_value (const Point &p, - Vector &return_value) const; + void vector_value (const Point &p, + Vector &return_value) const; }; template double TestDef3::value (const Point &p, - const unsigned int component) const + const unsigned int component) const { double y = p(1); @@ -252,10 +252,10 @@ TestDef3::value (const Point &p, template void TestDef3::vector_value (const Point &p, - Vector &return_value) const + Vector &return_value) const { Assert (return_value.size() == this->n_components, - ExcDimensionMismatch (return_value.size(), this->n_components)); + ExcDimensionMismatch (return_value.size(), this->n_components)); for (unsigned int iCount = 0; iCount < this->n_components; iCount++) return_value (iCount) = value (p, iCount); } @@ -267,40 +267,40 @@ void TestDef3::vector_value (const Point &p, */ double EvaluateArea (Mapping<2> &mapping, - DoFHandler<2> *dof_handler, - Vector &solution) + DoFHandler<2> *dof_handler, + Vector &solution) { - // Use a high order quadrature. + // Use a high order quadrature. QGauss<2> quad (6); FEValues<2> fe_values (mapping, dof_handler->get_fe (), quad, - UpdateFlags(update_values | - update_q_points | - update_JxW_values)); + UpdateFlags(update_values | + update_q_points | + update_JxW_values)); const unsigned int n_q_points = quad.size(); const unsigned int n_components = dof_handler->get_fe().n_components(); - // Cell iterators + // Cell iterators DoFHandler<2>::active_cell_iterator cell = dof_handler->begin_active(), - endc = dof_handler->end(); + endc = dof_handler->end(); double result_u = 0, - result_v = 0; + result_v = 0; for (; cell!=endc; ++cell) { fe_values.reinit (cell); - // Get values from solution vector (For Trap.Rule) + // Get values from solution vector (For Trap.Rule) std::vector > this_value - (n_q_points, Vector(n_components)); + (n_q_points, Vector(n_components)); fe_values.get_function_values (solution, this_value); for (unsigned int q_point=0; q_point tria_test; DoFHandler<2> *dof_handler, - *dof_handler_def; + *dof_handler_def; Point<2> p1 (0,0), - p2 (1, 1); + p2 (1, 1); GridGenerator::hyper_rectangle (tria_test, p1, p2); tria_test.refine_global (1); - // Uncommenting the following line, demonstrates the problem - // of RT elements on distorted Quads! + // Uncommenting the following line, demonstrates the problem + // of RT elements on distorted Quads! tria_test.distort_random (0.4); - // Create a DoFHandler for the RT space + // Create a DoFHandler for the RT space FE_RaviartThomas<2> fe (2); dof_handler = new DoFHandler<2> (tria_test); dof_handler->distribute_dofs (fe); - // Create an deformation object for the Eulerian mapping + // Create an deformation object for the Eulerian mapping FESystem<2> fe_def (FE_Q<2>(1), 2); dof_handler_def = new DoFHandler<2> (tria_test); dof_handler_def->distribute_dofs (fe_def); - // Alloc some DoFs + // Alloc some DoFs Vector solution, - solution_q, - deformation; + solution_q, + deformation; solution.reinit (dof_handler->n_dofs ()); solution_q.reinit (dof_handler_def->n_dofs ()); deformation.reinit (dof_handler_def->n_dofs ()); - // Project solution onto RT FE field + // Project solution onto RT FE field ConstraintMatrix hn_constraints; hn_constraints.clear (); DoFTools::make_hanging_node_constraints (*dof_handler, - hn_constraints); + hn_constraints); hn_constraints.close (); VectorTools::project (*dof_handler, hn_constraints, - QGauss<2> (6), TestMap1<2>(2), - solution); + QGauss<2> (6), TestMap1<2>(2), + solution); - // Project reference solution onto RT FE field + // Project reference solution onto RT FE field ConstraintMatrix hn_constraints_def; hn_constraints_def.clear (); DoFTools::make_hanging_node_constraints (*dof_handler_def, - hn_constraints_def); + hn_constraints_def); hn_constraints_def.close (); VectorTools::project (*dof_handler_def, hn_constraints_def, - QGauss<2> (6), TestMap1<2>(2), - solution_q); + QGauss<2> (6), TestMap1<2>(2), + solution_q); MappingQ1Eulerian<2> *mapping_euler = new MappingQ1Eulerian<2> (deformation, *dof_handler_def); char buf[1000]; sprintf (buf, - "FE_RT Area %e FE_Q Area %e\n", - EvaluateArea (*mapping_euler, dof_handler, solution), - EvaluateArea (*mapping_euler, dof_handler_def, solution_q)); + "FE_RT Area %e FE_Q Area %e\n", + EvaluateArea (*mapping_euler, dof_handler, solution), + EvaluateArea (*mapping_euler, dof_handler_def, solution_q)); deallog << buf; unsigned int test_out = 0; - // Try rotating the elements + // Try rotating the elements for (double rotat = 0; rotat < 2 * M_PI; rotat += 0.25 * M_PI) { - // Rotate element + // Rotate element VectorTools::project (*dof_handler_def, hn_constraints_def, - QGauss<2> (6), TestDef1<2>(2, rotat), - deformation); + QGauss<2> (6), TestDef1<2>(2, rotat), + deformation); - // Project 1 function to element + // Project 1 function to element VectorTools::project (*mapping_euler, *dof_handler, hn_constraints, - QGauss<2> (6), TestMap1<2>(2), - solution); + QGauss<2> (6), TestMap1<2>(2), + solution); - // Write output files + // Write output files DataOut<2> *data_out = new DataOut<2>; data_out->attach_dof_handler (*dof_handler); data_out->add_data_vector (solution, "solution"); @@ -407,49 +407,49 @@ int main (int /*argc*/, char **/*argv*/) char buf[100]; sprintf (buf, "phi = %e FE_RT Area %e FE_Q Area %e\n", - rotat, - area_rt, area_q); + rotat, + area_rt, area_q); deallog << buf; } - // Try resizing the elements + // Try resizing the elements for (double scale = -0.75; scale < 4.0; scale += 0.25) { VectorTools::project (*dof_handler_def, hn_constraints_def, - QGauss<2> (6), TestDef2<2>(2, scale), - deformation); + QGauss<2> (6), TestDef2<2>(2, scale), + deformation); - // Project 1 function to element + // Project 1 function to element VectorTools::project (*mapping_euler, *dof_handler, hn_constraints, - QGauss<2> (6), TestMap1<2>(2), - solution); + QGauss<2> (6), TestMap1<2>(2), + solution); char buf[1000]; sprintf (buf, "Scale = %e FE_RT Area %e FE_Q Area %e\n", - scale, - EvaluateArea (*mapping_euler, dof_handler, solution), - EvaluateArea (*mapping_euler, dof_handler_def, solution_q)); + scale, + EvaluateArea (*mapping_euler, dof_handler, solution), + EvaluateArea (*mapping_euler, dof_handler_def, solution_q)); deallog << buf; } - // Try parallelograms + // Try parallelograms for (double scale = -1.0; scale < 1.0; scale += 0.25) { VectorTools::project (*dof_handler_def, hn_constraints_def, - QGauss<2> (6), TestDef3<2>(2, scale), - deformation); + QGauss<2> (6), TestDef3<2>(2, scale), + deformation); - // Project 1 function to element + // Project 1 function to element VectorTools::project (*mapping_euler, *dof_handler, hn_constraints, - QGauss<2> (6), TestMap1<2>(2), - solution); + QGauss<2> (6), TestMap1<2>(2), + solution); char buf[1000]; sprintf (buf, "Parallelogram = %e FE_RT Area %e FE_Q Area %e\n", - scale, - EvaluateArea (*mapping_euler, dof_handler, solution), - EvaluateArea (*mapping_euler, dof_handler_def, solution_q)); + scale, + EvaluateArea (*mapping_euler, dof_handler, solution), + EvaluateArea (*mapping_euler, dof_handler_def, solution_q)); deallog << buf; } diff --git a/tests/fail/rt_distorted_02.cc b/tests/fail/rt_distorted_02.cc index e26c9a75eb..06e5b0b171 100644 --- a/tests/fail/rt_distorted_02.cc +++ b/tests/fail/rt_distorted_02.cc @@ -70,18 +70,18 @@ char buf[1000]; template class TestMap1 : public Function { - public: - TestMap1 (const unsigned int n_components) : - Function (n_components) - {} - - virtual ~TestMap1 () {} - - virtual double value (const Point &p, - const unsigned int component = 0) const; - - void vector_value (const Point &p, - Vector &return_value) const; +public: + TestMap1 (const unsigned int n_components) : + Function (n_components) + {} + + virtual ~TestMap1 () {} + + virtual double value (const Point &p, + const unsigned int component = 0) const; + + void vector_value (const Point &p, + Vector &return_value) const; }; @@ -89,10 +89,10 @@ class TestMap1 : public Function template double TestMap1::value (const Point &p, - const unsigned int component) const + const unsigned int component) const { - // u = x^2, v = y^2, dudx = 2 x, dvdy = 2 y, div u = 2x + 2y - // I.e. \int div u = 2 (for unit square) + // u = x^2, v = y^2, dudx = 2 x, dvdy = 2 y, div u = 2x + 2y + // I.e. \int div u = 2 (for unit square) if (component == 0) return (p(0) * p(0)); @@ -105,12 +105,12 @@ TestMap1::value (const Point &p, template void TestMap1::vector_value (const Point &p, - Vector &return_value) const + Vector &return_value) const { Assert (return_value.size() == this->n_components, - ExcDimensionMismatch (return_value.size(), this->n_components)); - - // Just fill the vector with the appropriate components + ExcDimensionMismatch (return_value.size(), this->n_components)); + + // Just fill the vector with the appropriate components for (unsigned int iCount = 0; iCount < this->n_components; iCount++) return_value (iCount) = value (p, iCount); } @@ -122,22 +122,22 @@ void TestMap1::vector_value (const Point &p, template class TestDef1 : public Function { - private: - const double phi; - - public: - TestDef1 (const unsigned int n_components, const double ph) : - Function (n_components), - phi (ph) - {} - - virtual ~TestDef1 () {} - - virtual double value (const Point &p, - const unsigned int component = 0) const; - - void vector_value (const Point &p, - Vector &return_value) const; +private: + const double phi; + +public: + TestDef1 (const unsigned int n_components, const double ph) : + Function (n_components), + phi (ph) + {} + + virtual ~TestDef1 () {} + + virtual double value (const Point &p, + const unsigned int component = 0) const; + + void vector_value (const Point &p, + Vector &return_value) const; }; @@ -145,13 +145,13 @@ class TestDef1 : public Function template double TestDef1::value (const Point &p, - const unsigned int component) const + const unsigned int component) const { Point<2> center; center(0) = 0.5; center(1) = 0.5; double rad = p.distance (center), - phi_p = atan2 (p(0) - center(0), p(1) - center(1)); + phi_p = atan2 (p(0) - center(0), p(1) - center(1)); if (component == 0) return rad * (sin (phi + phi_p) - sin (phi_p)); @@ -162,10 +162,10 @@ TestDef1::value (const Point &p, template void TestDef1::vector_value (const Point &p, - Vector &return_value) const + Vector &return_value) const { Assert (return_value.size() == this->n_components, - ExcDimensionMismatch (return_value.size(), this->n_components)); + ExcDimensionMismatch (return_value.size(), this->n_components)); for (unsigned int iCount = 0; iCount < this->n_components; iCount++) return_value (iCount) = value (p, iCount); } @@ -177,32 +177,32 @@ void TestDef1::vector_value (const Point &p, template class TestDef2 : public Function { - private: - const double scale; - - public: - TestDef2 (const unsigned int n_components, const double sc) : - Function (n_components), - scale (sc) - {} - - virtual ~TestDef2 () {} - - virtual double value (const Point &p, - const unsigned int component = 0) const; - - void vector_value (const Point &p, - Vector &return_value) const; +private: + const double scale; + +public: + TestDef2 (const unsigned int n_components, const double sc) : + Function (n_components), + scale (sc) + {} + + virtual ~TestDef2 () {} + + virtual double value (const Point &p, + const unsigned int component = 0) const; + + void vector_value (const Point &p, + Vector &return_value) const; }; template double TestDef2::value (const Point &p, - const unsigned int component) const + const unsigned int component) const { double x = p(0), - y = p(1); + y = p(1); if (component == 0) return scale * x; @@ -213,10 +213,10 @@ TestDef2::value (const Point &p, template void TestDef2::vector_value (const Point &p, - Vector &return_value) const + Vector &return_value) const { Assert (return_value.size() == this->n_components, - ExcDimensionMismatch (return_value.size(), this->n_components)); + ExcDimensionMismatch (return_value.size(), this->n_components)); for (unsigned int iCount = 0; iCount < this->n_components; iCount++) return_value (iCount) = value (p, iCount); } @@ -229,29 +229,29 @@ void TestDef2::vector_value (const Point &p, template class TestDef3 : public Function { - private: - const double scale; - - public: - TestDef3 (const unsigned int n_components, const double sc) : - Function (n_components), - scale (sc) - {} - - virtual ~TestDef3 () {} - - virtual double value (const Point &p, - const unsigned int component = 0) const; - - void vector_value (const Point &p, - Vector &return_value) const; +private: + const double scale; + +public: + TestDef3 (const unsigned int n_components, const double sc) : + Function (n_components), + scale (sc) + {} + + virtual ~TestDef3 () {} + + virtual double value (const Point &p, + const unsigned int component = 0) const; + + void vector_value (const Point &p, + Vector &return_value) const; }; template double TestDef3::value (const Point &p, - const unsigned int component) const + const unsigned int component) const { double y = p(1); @@ -264,10 +264,10 @@ TestDef3::value (const Point &p, template void TestDef3::vector_value (const Point &p, - Vector &return_value) const + Vector &return_value) const { Assert (return_value.size() == this->n_components, - ExcDimensionMismatch (return_value.size(), this->n_components)); + ExcDimensionMismatch (return_value.size(), this->n_components)); for (unsigned int iCount = 0; iCount < this->n_components; iCount++) return_value (iCount) = value (p, iCount); } @@ -279,47 +279,47 @@ void TestDef3::vector_value (const Point &p, */ double EvaluateDiver (Mapping<2> &mapping, - DoFHandler<2> &dof_handler, - Vector &solution) + DoFHandler<2> &dof_handler, + Vector &solution) { - // Use a high order quadrature. + // Use a high order quadrature. QGauss<2> quad (6); - FEValues<2> fe_values (mapping, dof_handler.get_fe (), quad, - UpdateFlags(update_values | - update_q_points | - update_gradients | - update_JxW_values| - update_contravariant_transformation)); + FEValues<2> fe_values (mapping, dof_handler.get_fe (), quad, + UpdateFlags(update_values | + update_q_points | + update_gradients | + update_JxW_values| + update_contravariant_transformation)); const unsigned int n_q_points = quad.size(); const unsigned int n_components = dof_handler.get_fe().n_components(); - // Cell iterators + // Cell iterators DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active(), - endc = dof_handler.end(); + endc = dof_handler.end(); double result = 0; for (; cell!=endc; ++cell) { fe_values.reinit (cell); - // Get values from solution vector (For Trap.Rule) + // Get values from solution vector (For Trap.Rule) std::vector > this_value - (n_q_points, Vector(n_components)); + (n_q_points, Vector(n_components)); fe_values.get_function_values (solution, this_value); std::vector > > - grads_here (n_q_points, - std::vector > (n_components)); + grads_here (n_q_points, + std::vector > (n_components)); fe_values.get_function_grads (solution, grads_here); for (unsigned int q_point=0; q_point &mapping, int main () { logfile.precision (PRECISION); - logfile.setf(std::ios::fixed); + logfile.setf(std::ios::fixed); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); Triangulation<2> tria_test; Point<2> p1 (0,0), - p2 (1, 1); + p2 (1, 1); GridGenerator::hyper_rectangle (tria_test, p1, p2); tria_test.refine_global (1); tria_test.distort_random (0.4); - // Create a DoFHandler for the RT space + // Create a DoFHandler for the RT space FE_RaviartThomas<2> fe (2); DoFHandler<2> dof_handler (tria_test); dof_handler.distribute_dofs (fe); @@ -350,88 +350,88 @@ int main () QGauss<2> quad_temp(6); sprintf (buf,"DoFs per Quad: %i per Line %i per Vert %i\n", fe.dofs_per_quad, fe.dofs_per_line, fe.dofs_per_vertex); deallog << buf; - + sprintf (buf,"QPoints %i\n", quad_temp.size()); deallog << buf; - // Create an deformation object for the Eulerian mapping + // Create an deformation object for the Eulerian mapping FESystem<2> fe_def (FE_Q<2>(1), 2); DoFHandler<2> dof_handler_def (tria_test); dof_handler_def.distribute_dofs (fe_def); - // Alloc some DoFs + // Alloc some DoFs Vector solution, - solution_q, - deformation; + solution_q, + deformation; solution.reinit (dof_handler.n_dofs ()); solution_q.reinit (dof_handler_def.n_dofs ()); deformation.reinit (dof_handler_def.n_dofs ()); - // Project solution onto RT FE field + // Project solution onto RT FE field ConstraintMatrix hn_constraints; hn_constraints.clear (); - DoFTools::make_hanging_node_constraints (dof_handler, - hn_constraints); + DoFTools::make_hanging_node_constraints (dof_handler, + hn_constraints); hn_constraints.close (); VectorTools::project (dof_handler, hn_constraints, - QGauss<2> (6), TestMap1<2>(2), - solution); + QGauss<2> (6), TestMap1<2>(2), + solution); - // Project reference solution onto RT FE field + // Project reference solution onto RT FE field ConstraintMatrix hn_constraints_def; hn_constraints_def.clear (); - DoFTools::make_hanging_node_constraints (dof_handler_def, - hn_constraints_def); + DoFTools::make_hanging_node_constraints (dof_handler_def, + hn_constraints_def); hn_constraints_def.close (); VectorTools::project (dof_handler_def, hn_constraints_def, - QGauss<2> (6), TestMap1<2>(2), - solution_q); - + QGauss<2> (6), TestMap1<2>(2), + solution_q); + MappingQ1Eulerian<2> mapping_euler (deformation, dof_handler_def); sprintf (buf,"FE_RT Area %e FE_Q Area %e\n", - EvaluateDiver (mapping_euler, dof_handler, solution), - EvaluateDiver (mapping_euler, dof_handler_def, solution_q)); + EvaluateDiver (mapping_euler, dof_handler, solution), + EvaluateDiver (mapping_euler, dof_handler_def, solution_q)); deallog << buf; - // Try rotating the elements + // Try rotating the elements for (double rotat = 0; rotat < 2 * M_PI; rotat += 0.25 * M_PI) { - // Rotate element + // Rotate element VectorTools::project (dof_handler_def, hn_constraints_def, - QGauss<2> (6), TestDef1<2>(2, rotat), - deformation); + QGauss<2> (6), TestDef1<2>(2, rotat), + deformation); sprintf (buf,"phi = %e FE_RT Area %e FE_Q Area %e\n", - rotat, - EvaluateDiver (mapping_euler, dof_handler, solution), - EvaluateDiver (mapping_euler, dof_handler_def, solution_q)); + rotat, + EvaluateDiver (mapping_euler, dof_handler, solution), + EvaluateDiver (mapping_euler, dof_handler_def, solution_q)); deallog << buf; } - // Try resizing the elements + // Try resizing the elements for (double scale = -0.75; scale < 4.0; scale += 0.25) { VectorTools::project (dof_handler_def, hn_constraints_def, - QGauss<2> (6), TestDef2<2>(2, scale), - deformation); + QGauss<2> (6), TestDef2<2>(2, scale), + deformation); sprintf (buf,"Scale = %e FE_RT Area %e FE_Q Area %e\n", - scale, - EvaluateDiver (mapping_euler, dof_handler, solution), - EvaluateDiver (mapping_euler, dof_handler_def, solution_q)); + scale, + EvaluateDiver (mapping_euler, dof_handler, solution), + EvaluateDiver (mapping_euler, dof_handler_def, solution_q)); deallog << buf; } - // Try paralellogramming the elements + // Try paralellogramming the elements for (double scale = -1.0; scale < 1.0; scale += 0.25) { VectorTools::project (dof_handler_def, hn_constraints_def, - QGauss<2> (6), TestDef3<2>(2, scale), - deformation); + QGauss<2> (6), TestDef3<2>(2, scale), + deformation); sprintf (buf,"Scale = %e FE_RT Area %e FE_Q Area %e\n", - scale, - EvaluateDiver (mapping_euler, dof_handler, solution), - EvaluateDiver (mapping_euler, dof_handler_def, solution_q)); + scale, + EvaluateDiver (mapping_euler, dof_handler, solution), + EvaluateDiver (mapping_euler, dof_handler_def, solution_q)); deallog << buf; } diff --git a/tests/fail/vectors_boundary_rhs_hp_02.cc b/tests/fail/vectors_boundary_rhs_hp_02.cc index cbb38400bd..1483a08b2f 100644 --- a/tests/fail/vectors_boundary_rhs_hp_02.cc +++ b/tests/fail/vectors_boundary_rhs_hp_02.cc @@ -48,19 +48,21 @@ template class MySquareFunction : public Function { - public: - MySquareFunction () : Function(dim) {} - - virtual double value (const Point &p, - const unsigned int component) const - { return (component+1)*p.square(); } - - virtual void vector_value (const Point &p, - Vector &values) const - { - for (unsigned int d=0; d(dim) {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return (component+1)*p.square(); + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + for (unsigned int d=0; d void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -81,22 +83,22 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element hp::FECollection element; for (unsigned int i=1; i<7-dim; ++i) element.push_back (FE_RaviartThomas(i-1)); 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 (rand() % element.size()); - + dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here hp::MappingCollection mapping; for (unsigned int i=1; i<7-dim; ++i) mapping.push_back (MappingQ(i+1)); @@ -107,8 +109,8 @@ check () Vector rhs (dof.n_dofs()); VectorTools::create_boundary_right_hand_side (dof, quadrature, - MySquareFunction(), - rhs); + MySquareFunction(), + rhs); for (unsigned int i=0; i class MySquareFunction : public Function { - public: - MySquareFunction () : Function(dim) {} - - virtual double value (const Point &p, - const unsigned int component) const - { return (component+1)*p.square(); } - - virtual void vector_value (const Point &p, - Vector &values) const - { - for (unsigned int d=0; d(dim) {} + + virtual double value (const Point &p, + const unsigned int component) const + { + return (component+1)*p.square(); + } + + virtual void vector_value (const Point &p, + Vector &values) const + { + for (unsigned int d=0; d void check () { - Triangulation tr; + Triangulation tr; if (dim==2) GridGenerator::hyper_ball(tr, Point(), 1); else @@ -81,22 +83,22 @@ check () if (dim==1) tr.refine_global(2); - // create a system element composed - // of one Q1 and one Q2 element + // create a system element composed + // of one Q1 and one Q2 element hp::FECollection element; for (unsigned int i=1; i<7-dim; ++i) element.push_back (FE_RaviartThomas(i-1)); 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 (rand() % element.size()); - + dof.distribute_dofs(element); - // use a more complicated mapping - // of the domain and a quadrature - // formula suited to the elements - // we have here + // use a more complicated mapping + // of the domain and a quadrature + // formula suited to the elements + // we have here hp::MappingCollection mapping; for (unsigned int i=1; i<7-dim; ++i) mapping.push_back (MappingQ(i+1)); @@ -107,8 +109,8 @@ check () Vector rhs (dof.n_dofs()); VectorTools::create_right_hand_side (dof, quadrature, - MySquareFunction(), - rhs); + MySquareFunction(), + rhs); for (unsigned int i=0; i *dof_handler, - Vector &solution) + Vector &solution) { - // This quadrature rule determines the points, where the - // derivative will be evaluated. - QGauss<2> quad (3); - FEValues<2> fe_values (dof_handler->get_fe (), quad, - UpdateFlags(update_values | - update_q_points | - update_gradients | - update_JxW_values)); + // This quadrature rule determines the points, where the + // derivative will be evaluated. + QGauss<2> quad (3); + FEValues<2> fe_values (dof_handler->get_fe (), quad, + UpdateFlags(update_values | + update_q_points | + update_gradients | + update_JxW_values)); - const unsigned int n_q_points = quad.size(); - const unsigned int n_components = dof_handler->get_fe().n_components(); - const unsigned int dofs_per_cell = dof_handler->get_fe().dofs_per_cell; + const unsigned int n_q_points = quad.size(); + const unsigned int n_components = dof_handler->get_fe().n_components(); + const unsigned int dofs_per_cell = dof_handler->get_fe().dofs_per_cell; - // Cell iterators - DoFHandler<2>::active_cell_iterator cell = dof_handler->begin_active(), - endc = dof_handler->end(); + // Cell iterators + DoFHandler<2>::active_cell_iterator cell = dof_handler->begin_active(), + endc = dof_handler->end(); - double err_l2 = 0, - err_hdiv = 0; + double err_l2 = 0, + err_hdiv = 0; - std::vector local_dof_indices (dofs_per_cell); + std::vector local_dof_indices (dofs_per_cell); - for (; cell!=endc; ++cell) + for (; cell!=endc; ++cell) { cell->get_dof_indices (local_dof_indices); - fe_values.reinit (cell); - - // Get function values - std::vector > this_value(n_q_points, - Vector(n_components)); - fe_values.get_function_values (solution, this_value); - - // Get values from solution vector (For Trap.Rule) - std::vector > > - grads_here (n_q_points, std::vector > (n_components)); - fe_values.get_function_grads (solution, grads_here); - - for (unsigned int q_point=0; q_point > this_value(n_q_points, + Vector(n_components)); + fe_values.get_function_values (solution, this_value); + + // Get values from solution vector (For Trap.Rule) + std::vector > > + grads_here (n_q_points, std::vector > (n_components)); + fe_values.get_function_grads (solution, grads_here); + + for (unsigned int q_point=0; q_pointget_dof_indices (face_dof_indices); - for (unsigned int j = 0; j < dofs_per_face; ++j) - { - sign_change[f * dofs_per_face + j] = -1.0; - printf ("DoF %i\n", face_dof_indices[j]); - } - } - } - } - */ - - for (unsigned int point=0; point > val_vector (dofs_per_cell, - Vector (n_components)); - - // Precompute the component values - for (unsigned int i=0; i < dofs_per_cell; ++i) - for (unsigned int comp_i = 0; comp_i < fe.n_components (); - ++comp_i) - { - val_vector[i](comp_i) = sign_change[i] * - fe_values.shape_value_component(i,point,comp_i); - } - // Now eventually switch the sign of some of the ansatzfunctions. - // TODO - - for (unsigned int i=0; i sign_change (dofs_per_cell, 1.0); + const unsigned int dofs_per_face = fe.dofs_per_face; + std::vector face_dof_indices (dofs_per_face); + + /* This code should now be in fe_poly_tensor.cc + for (unsigned int f = 2; f < 4; ++f) + { + typename DoFHandler::active_face_iterator face = cell->face (f); + if (!face->at_boundary ()) + { + unsigned int nn = cell->neighbor_of_neighbor (f); + printf ("Face %i NeigNeig %i\n", f, nn); + if (nn < 2) + { + face->get_dof_indices (face_dof_indices); + for (unsigned int j = 0; j < dofs_per_face; ++j) + { + sign_change[f * dofs_per_face + j] = -1.0; + printf ("DoF %i\n", face_dof_indices[j]); + } + } + } + } + */ + + for (unsigned int point=0; point > val_vector (dofs_per_cell, + Vector (n_components)); + + // Precompute the component values + for (unsigned int i=0; i < dofs_per_cell; ++i) + for (unsigned int comp_i = 0; comp_i < fe.n_components (); + ++comp_i) + { + val_vector[i](comp_i) = sign_change[i] * + fe_values.shape_value_component(i,point,comp_i); + } + // Now eventually switch the sign of some of the ansatzfunctions. + // TODO + + for (unsigned int i=0; i void create_right_hand_side (const Mapping &mapping, - const DoFHandler &dof_handler, - const Quadrature &quadrature, - const Function &rhs_function, - Vector &rhs_vector) + const DoFHandler &dof_handler, + const Quadrature &quadrature, + const Function &rhs_function, + Vector &rhs_vector) { const FiniteElement &fe = dof_handler.get_fe(); Assert (fe.n_components() == rhs_function.n_components, - ExcInternalError()); + ExcInternalError()); Assert (rhs_vector.size() == dof_handler.n_dofs(), - ExcDimensionMismatch(rhs_vector.size(), dof_handler.n_dofs())); + ExcDimensionMismatch(rhs_vector.size(), dof_handler.n_dofs())); rhs_vector = 0; UpdateFlags update_flags = UpdateFlags(update_values | - update_q_points | - update_JxW_values); + update_q_points | + update_JxW_values); FEValues fe_values (mapping, fe, quadrature, update_flags); const unsigned int dofs_per_cell = fe_values.dofs_per_cell, - n_q_points = fe_values.n_quadrature_points, - n_components = fe.n_components(); + n_q_points = fe_values.n_quadrature_points, + n_components = fe.n_components(); std::vector dofs (dofs_per_cell); Vector cell_vector (dofs_per_cell); typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), - endc = dof_handler.end(); + endc = dof_handler.end(); if (n_components==1) { std::vector rhs_values(n_q_points); for (; cell!=endc; ++cell) - { - fe_values.reinit(cell); + { + fe_values.reinit(cell); - const std::vector &weights = fe_values.get_JxW_values (); - rhs_function.value_list (fe_values.get_quadrature_points(), rhs_values); + const std::vector &weights = fe_values.get_JxW_values (); + rhs_function.value_list (fe_values.get_quadrature_points(), rhs_values); - cell_vector = 0; - for (unsigned int point=0; pointget_dof_indices (dofs); + cell->get_dof_indices (dofs); - for (unsigned int i=0; i > rhs_values(n_q_points, Vector(n_components)); for (; cell!=endc; ++cell) - { - fe_values.reinit(cell); - - const std::vector &weights = fe_values.get_JxW_values (); - rhs_function.vector_value_list (fe_values.get_quadrature_points(), rhs_values); - - cell_vector = 0; - for (unsigned int point=0; pointget_dof_indices (dofs); - - for (unsigned int i=0; i &weights = fe_values.get_JxW_values (); + rhs_function.vector_value_list (fe_values.get_quadrature_points(), rhs_values); + + cell_vector = 0; + for (unsigned int point=0; pointget_dof_indices (dofs); + + for (unsigned int i=0; i &mapping, template void project (const Mapping &mapping, - const DoFHandler &dof, - const ConstraintMatrix &constraints, - const Quadrature &quadrature, - const Function &function, - Vector &vec, - const bool enforce_zero_boundary = false, - const Quadrature & = QGauss(2), - const bool project_to_boundary_first = false) + const DoFHandler &dof, + const ConstraintMatrix &constraints, + const Quadrature &quadrature, + const Function &function, + Vector &vec, + const bool enforce_zero_boundary = false, + const Quadrature & = QGauss(2), + const bool project_to_boundary_first = false) { Assert (dof.get_fe().n_components() == function.n_components, - ExcInternalError()); + ExcInternalError()); const FiniteElement &fe = dof.get_fe(); - // make up boundary values + // make up boundary values std::map boundary_values; if (enforce_zero_boundary == true) - // no need to project boundary - // values, but enforce - // homogeneous boundary values - // anyway + // no need to project boundary + // values, but enforce + // homogeneous boundary values + // anyway { - // loop over all boundary faces - // to get all dof indices of - // dofs on the boundary. note - // that in 3d there are cases - // where a face is not at the - // boundary, yet one of its - // lines is, and we should - // consider the degrees of - // freedom on it as boundary - // nodes. likewise, in 2d and - // 3d there are cases where a - // cell is only at the boundary - // by one vertex. nevertheless, - // since we do not support - // boundaries with dimension - // less or equal to dim-2, each - // such boundary dof is also - // found from some other face - // that is actually wholly on - // the boundary, not only by - // one line or one vertex + // loop over all boundary faces + // to get all dof indices of + // dofs on the boundary. note + // that in 3d there are cases + // where a face is not at the + // boundary, yet one of its + // lines is, and we should + // consider the degrees of + // freedom on it as boundary + // nodes. likewise, in 2d and + // 3d there are cases where a + // cell is only at the boundary + // by one vertex. nevertheless, + // since we do not support + // boundaries with dimension + // less or equal to dim-2, each + // such boundary dof is also + // found from some other face + // that is actually wholly on + // the boundary, not only by + // one line or one vertex typename DoFHandler::active_cell_iterator cell = dof.begin_active(), - endc = dof.end(); + endc = dof.end(); std::vector face_dof_indices (fe.dofs_per_face); for (; cell!=endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - if (cell->face(f)->at_boundary()) - { - cell->face(f)->get_dof_indices (face_dof_indices); - for (unsigned int i=0; i::faces_per_cell; ++f) + if (cell->face(f)->at_boundary()) + { + cell->face(f)->get_dof_indices (face_dof_indices); + for (unsigned int i=0; i::type boundary_functions; - for (types::boundary_id c=0; c<255; ++c) - boundary_functions[c] = &function; - project_boundary_values (dof, boundary_functions, q_boundary, - boundary_values); -*/ + /* + // set up a list of boundary functions for + // the different boundary parts. We want the + // @p{function} to hold on all parts of the + // boundary + typename FunctionMap::type boundary_functions; + for (types::boundary_id c=0; c<255; ++c) + boundary_functions[c] = &function; + project_boundary_values (dof, boundary_functions, q_boundary, + boundary_values); + */ } - // set up mass matrix and right hand side + // set up mass matrix and right hand side vec.reinit (dof.n_dofs()); SparsityPattern sparsity(dof.n_dofs(), - dof.n_dofs(), - dof.max_couplings_between_dofs()); + dof.n_dofs(), + dof.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof, sparsity); constraints.condense (sparsity); @@ -525,8 +525,8 @@ void project (const Mapping &mapping, constraints.condense (tmp); if (boundary_values.size() != 0) MatrixTools::apply_boundary_values (boundary_values, - mass_matrix, vec, tmp, - true); + mass_matrix, vec, tmp, + true); SolverControl control(1000,1e-16); PrimitiveVectorMemory<> memory; @@ -534,10 +534,10 @@ void project (const Mapping &mapping, PreconditionSSOR<> prec; prec.initialize(mass_matrix, 1.2); - // solve + // solve cg.solve (mass_matrix, vec, tmp, prec); - // distribute solution + // distribute solution constraints.distribute (vec); } @@ -556,7 +556,7 @@ int create_alternate_unitsquare (Triangulation<2> &tria) //points.push_back (Point<2> (0.0, 0.001)); - // Prepare cell data + // Prepare cell data std::vector > cells (3); cells[0].vertices[0] = 0; cells[0].vertices[1] = 1; @@ -605,7 +605,7 @@ int main (int /*argc*/, char **/*argv*/) { deallog << "Cell " << cell << std::endl; for (unsigned int v=0; v<4; ++v) - deallog << " " << cell->vertex(v) << std::endl; + deallog << " " << cell->vertex(v) << std::endl; } @@ -614,7 +614,7 @@ int main (int /*argc*/, char **/*argv*/) FE_ABF<2> fe (0); deallog << "Dofs/cell " << fe.dofs_per_cell - << "Dofs/face " << fe.dofs_per_face << std::endl; + << "Dofs/face " << fe.dofs_per_face << std::endl; DoFHandler<2> *dof_handler; dof_handler = new DoFHandler<2> (tria_test); @@ -629,12 +629,12 @@ int main (int /*argc*/, char **/*argv*/) ConstraintMatrix hn_constraints; hn_constraints.clear (); DoFTools::make_hanging_node_constraints (*dof_handler, - hn_constraints); + hn_constraints); hn_constraints.close (); MappingQ1<2> map_default; project (map_default, *dof_handler, hn_constraints, - QGauss<2> (6), ConstantFunction<2>(1., 2), - solution); + QGauss<2> (6), ConstantFunction<2>(1., 2), + solution); EvaluateDerivative (dof_handler, solution); solution.print (deallog); diff --git a/tests/fe/block_mask_02.cc b/tests/fe/block_mask_02.cc index 4239bab89f..3f17e34081 100644 --- a/tests/fe/block_mask_02.cc +++ b/tests/fe/block_mask_02.cc @@ -38,11 +38,11 @@ void test () BlockMask m(v); - // verify equality + // verify equality for (unsigned int i=0; i v(12, false); BlockMask m(12, false); - // verify equality + // verify equality for (unsigned int i=0; i &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_Q fe(1); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingQ1 mapping; deallog << "Mapping=Q1" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_02.cc b/tests/fe/cell_similarity_02.cc index 2e58bafe8b..47e45915c1 100644 --- a/tests/fe/cell_similarity_02.cc +++ b/tests/fe/cell_similarity_02.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_Q fe(2); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingQ1 mapping; deallog << "Mapping=Q1" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_03.cc b/tests/fe/cell_similarity_03.cc index 3af9d4f644..38811e0ecd 100644 --- a/tests/fe/cell_similarity_03.cc +++ b/tests/fe/cell_similarity_03.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_Q fe(1); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingQ mapping(1); deallog << "Mapping=Q1" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_04.cc b/tests/fe/cell_similarity_04.cc index 5c5b2d8b9d..bf5b118060 100644 --- a/tests/fe/cell_similarity_04.cc +++ b/tests/fe/cell_similarity_04.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_Q fe(2); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingQ mapping(1); deallog << "Mapping=Q1" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_05.cc b/tests/fe/cell_similarity_05.cc index db348dfff0..496e482ae3 100644 --- a/tests/fe/cell_similarity_05.cc +++ b/tests/fe/cell_similarity_05.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_Q fe(1); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingQ mapping(2); deallog << "Mapping=Q2" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_06.cc b/tests/fe/cell_similarity_06.cc index 8afd74be06..85b697c4bd 100644 --- a/tests/fe/cell_similarity_06.cc +++ b/tests/fe/cell_similarity_06.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_Q fe(2); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingQ mapping(2); deallog << "Mapping=Q2" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_07.cc b/tests/fe/cell_similarity_07.cc index b4fd8e2078..4a2f4367ee 100644 --- a/tests/fe/cell_similarity_07.cc +++ b/tests/fe/cell_similarity_07.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_Q fe(1); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingC1 mapping; deallog << "Mapping=C1" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_08.cc b/tests/fe/cell_similarity_08.cc index f264c64959..bc4f3db8f3 100644 --- a/tests/fe/cell_similarity_08.cc +++ b/tests/fe/cell_similarity_08.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_Q fe(2); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingC1 mapping; deallog << "Mapping=C1" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_09.cc b/tests/fe/cell_similarity_09.cc index 6e9093bd4d..3e6bb4d4ed 100644 --- a/tests/fe/cell_similarity_09.cc +++ b/tests/fe/cell_similarity_09.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_Q fe(1); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingCartesian mapping; deallog << "Mapping=Cartesian" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_10.cc b/tests/fe/cell_similarity_10.cc index ea77e782af..99ceda03ea 100644 --- a/tests/fe/cell_similarity_10.cc +++ b/tests/fe/cell_similarity_10.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_Q fe(2); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingCartesian mapping; deallog << "Mapping=Cartesian" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_dgp_monomial_01.cc b/tests/fe/cell_similarity_dgp_monomial_01.cc index ab2cefdb4c..1a6aed6f10 100644 --- a/tests/fe/cell_similarity_dgp_monomial_01.cc +++ b/tests/fe/cell_similarity_dgp_monomial_01.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_DGPMonomial fe(1); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingQ1 mapping; deallog << "Mapping=Q1" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_dgp_monomial_02.cc b/tests/fe/cell_similarity_dgp_monomial_02.cc index eee112de93..827a55c94b 100644 --- a/tests/fe/cell_similarity_dgp_monomial_02.cc +++ b/tests/fe/cell_similarity_dgp_monomial_02.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_DGPMonomial fe(2); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingQ1 mapping; deallog << "Mapping=Q1" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_dgp_monomial_03.cc b/tests/fe/cell_similarity_dgp_monomial_03.cc index 0d5eb387a6..8ee2f8377f 100644 --- a/tests/fe/cell_similarity_dgp_monomial_03.cc +++ b/tests/fe/cell_similarity_dgp_monomial_03.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_DGPMonomial fe(1); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingQ mapping(1); deallog << "Mapping=Q1" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_dgp_monomial_04.cc b/tests/fe/cell_similarity_dgp_monomial_04.cc index 9534f9163c..1d866032f2 100644 --- a/tests/fe/cell_similarity_dgp_monomial_04.cc +++ b/tests/fe/cell_similarity_dgp_monomial_04.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_DGPMonomial fe(2); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingQ mapping(1); deallog << "Mapping=Q1" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_dgp_monomial_05.cc b/tests/fe/cell_similarity_dgp_monomial_05.cc index b23357b377..1354bedaf7 100644 --- a/tests/fe/cell_similarity_dgp_monomial_05.cc +++ b/tests/fe/cell_similarity_dgp_monomial_05.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_DGPMonomial fe(1); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingQ mapping(2); deallog << "Mapping=Q2" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_dgp_monomial_06.cc b/tests/fe/cell_similarity_dgp_monomial_06.cc index 6ea5836cb1..d87f3d856b 100644 --- a/tests/fe/cell_similarity_dgp_monomial_06.cc +++ b/tests/fe/cell_similarity_dgp_monomial_06.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_DGPMonomial fe(2); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingQ mapping(2); deallog << "Mapping=Q2" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_dgp_monomial_07.cc b/tests/fe/cell_similarity_dgp_monomial_07.cc index 801feede79..ff63963354 100644 --- a/tests/fe/cell_similarity_dgp_monomial_07.cc +++ b/tests/fe/cell_similarity_dgp_monomial_07.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_DGPMonomial fe(1); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingC1 mapping; deallog << "Mapping=C1" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_dgp_monomial_08.cc b/tests/fe/cell_similarity_dgp_monomial_08.cc index 9823f2fbc5..a140e125c3 100644 --- a/tests/fe/cell_similarity_dgp_monomial_08.cc +++ b/tests/fe/cell_similarity_dgp_monomial_08.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_DGPMonomial fe(2); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingC1 mapping; deallog << "Mapping=C1" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_dgp_monomial_09.cc b/tests/fe/cell_similarity_dgp_monomial_09.cc index 1260b8719b..4a9b143273 100644 --- a/tests/fe/cell_similarity_dgp_monomial_09.cc +++ b/tests/fe/cell_similarity_dgp_monomial_09.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_DGPMonomial fe(1); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingCartesian mapping; deallog << "Mapping=Cartesian" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_dgp_monomial_10.cc b/tests/fe/cell_similarity_dgp_monomial_10.cc index 6a328158fe..39818565a8 100644 --- a/tests/fe/cell_similarity_dgp_monomial_10.cc +++ b/tests/fe/cell_similarity_dgp_monomial_10.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_DGPMonomial fe(2); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingCartesian mapping; deallog << "Mapping=Cartesian" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_dgp_nonparametric_01.cc b/tests/fe/cell_similarity_dgp_nonparametric_01.cc index f0ffd0d9eb..9e90c6733a 100644 --- a/tests/fe/cell_similarity_dgp_nonparametric_01.cc +++ b/tests/fe/cell_similarity_dgp_nonparametric_01.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_DGPNonparametric fe(1); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingQ1 mapping; deallog << "Mapping=Q1" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_dgp_nonparametric_02.cc b/tests/fe/cell_similarity_dgp_nonparametric_02.cc index ce26dba167..bc3aae1fa8 100644 --- a/tests/fe/cell_similarity_dgp_nonparametric_02.cc +++ b/tests/fe/cell_similarity_dgp_nonparametric_02.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_DGPNonparametric fe(2); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingQ1 mapping; deallog << "Mapping=Q1" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_dgp_nonparametric_03.cc b/tests/fe/cell_similarity_dgp_nonparametric_03.cc index 850b6efeb7..5f7c2f14c6 100644 --- a/tests/fe/cell_similarity_dgp_nonparametric_03.cc +++ b/tests/fe/cell_similarity_dgp_nonparametric_03.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_DGPNonparametric fe(1); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingQ mapping(1); deallog << "Mapping=Q1" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_dgp_nonparametric_04.cc b/tests/fe/cell_similarity_dgp_nonparametric_04.cc index db46fe1689..96734be13d 100644 --- a/tests/fe/cell_similarity_dgp_nonparametric_04.cc +++ b/tests/fe/cell_similarity_dgp_nonparametric_04.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_DGPNonparametric fe(2); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingQ mapping(1); deallog << "Mapping=Q1" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_dgp_nonparametric_05.cc b/tests/fe/cell_similarity_dgp_nonparametric_05.cc index 92e16ccadf..c55a0a1f5d 100644 --- a/tests/fe/cell_similarity_dgp_nonparametric_05.cc +++ b/tests/fe/cell_similarity_dgp_nonparametric_05.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_DGPNonparametric fe(1); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingQ mapping(2); deallog << "Mapping=Q2" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_dgp_nonparametric_06.cc b/tests/fe/cell_similarity_dgp_nonparametric_06.cc index 17474fd003..c0e6d25370 100644 --- a/tests/fe/cell_similarity_dgp_nonparametric_06.cc +++ b/tests/fe/cell_similarity_dgp_nonparametric_06.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_DGPNonparametric fe(2); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingQ mapping(2); deallog << "Mapping=Q2" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_dgp_nonparametric_07.cc b/tests/fe/cell_similarity_dgp_nonparametric_07.cc index 04fa5cf230..05cec04d67 100644 --- a/tests/fe/cell_similarity_dgp_nonparametric_07.cc +++ b/tests/fe/cell_similarity_dgp_nonparametric_07.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_DGPNonparametric fe(1); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingC1 mapping; deallog << "Mapping=C1" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_dgp_nonparametric_08.cc b/tests/fe/cell_similarity_dgp_nonparametric_08.cc index 80149ac399..9d16a82d83 100644 --- a/tests/fe/cell_similarity_dgp_nonparametric_08.cc +++ b/tests/fe/cell_similarity_dgp_nonparametric_08.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_DGPNonparametric fe(2); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingC1 mapping; deallog << "Mapping=C1" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_dgp_nonparametric_09.cc b/tests/fe/cell_similarity_dgp_nonparametric_09.cc index dcb82f7c88..1514a16943 100644 --- a/tests/fe/cell_similarity_dgp_nonparametric_09.cc +++ b/tests/fe/cell_similarity_dgp_nonparametric_09.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_DGPNonparametric fe(1); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingCartesian mapping; deallog << "Mapping=Cartesian" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/cell_similarity_dgp_nonparametric_10.cc b/tests/fe/cell_similarity_dgp_nonparametric_10.cc index 97601d1e43..6d9fa7b21f 100644 --- a/tests/fe/cell_similarity_dgp_nonparametric_10.cc +++ b/tests/fe/cell_similarity_dgp_nonparametric_10.cc @@ -49,21 +49,21 @@ bool equal (const FullMatrix &m1, - const FullMatrix &m2) + const FullMatrix &m2) { double d = 0, s = 0; for (unsigned int i=0; i -void test (const Triangulation& tr) +void test (const Triangulation &tr) { FE_DGPNonparametric fe(2); deallog << "FE=" << fe.get_name() << std::endl; @@ -71,14 +71,14 @@ void test (const Triangulation& tr) MappingCartesian mapping; deallog << "Mapping=Cartesian" << std::endl; - + DoFHandler dof(tr); dof.distribute_dofs(fe); const QGauss quadrature(2); FEValues fe_values (mapping, fe, quadrature, - update_values | update_gradients | - update_JxW_values); + update_values | update_gradients | + update_JxW_values); FullMatrix mass_matrix[2], laplace_matrix[2]; mass_matrix[0].reinit(fe.dofs_per_cell, fe.dofs_per_cell); @@ -87,54 +87,54 @@ void test (const Triangulation& tr) laplace_matrix[1].reinit(fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator - cell = dof.begin_active(); + cell = dof.begin_active(); cell != dof.end(); ++cell) { fe_values.reinit (cell); for (unsigned int i=0; iindex()](i,j) += fe_values.shape_value (i,q) * - fe_values.shape_value (j,q) * - fe_values.JxW(q); - laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * - fe_values.shape_grad (j,q) * - fe_values.JxW(q); - } + for (unsigned int j=0; jindex()](i,j) += fe_values.shape_value (i,q) * + fe_values.shape_value (j,q) * + fe_values.JxW(q); + laplace_matrix[cell->index()](i,j) += fe_values.shape_grad (i,q) * + fe_values.shape_grad (j,q) * + fe_values.JxW(q); + } } - // check what we expect for this mapping - // about equality or inequality of the - // matrices + // check what we expect for this mapping + // about equality or inequality of the + // matrices deallog << "Mass matrices " - << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; + << (equal (mass_matrix[0], mass_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; deallog << "Laplace matrices " - << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") - << " equal." - << std::endl; - + << (equal (laplace_matrix[0], laplace_matrix[1]) ? "are" : "are not") + << " equal." + << std::endl; + for (unsigned int cell=0; cell<2; ++cell) { deallog << "cell=" << cell << std::endl; deallog << "mass_matrix:" << std::endl; for (unsigned int i=0; i tr; Point p1 = Point(); Point p2 = (dim == 2 ? - Point(2,1) : - Point(2,1,1)); + Point(2,1) : + Point(2,1,1)); std::vector subdivisions (dim, 1); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle(tr, subdivisions, p1, p2); @@ -155,11 +155,11 @@ void test() static const HyperBallBoundary boundary(tr.begin_active()->center()); tr.set_boundary (1, boundary); - // set boundary id on cell 1 + // set boundary id on cell 1 for (unsigned int f=0; f::faces_per_cell; ++f) if (tr.begin_active()->at_boundary(f)) tr.begin_active()->face(f)->set_boundary_indicator (1); - + test(tr); } diff --git a/tests/fe/check_derivatives.cc b/tests/fe/check_derivatives.cc index 45af2f5ab3..ff87aacf57 100644 --- a/tests/fe/check_derivatives.cc +++ b/tests/fe/check_derivatives.cc @@ -40,16 +40,16 @@ const double delta_x = 1e-8; template void test (const FiniteElement &fe, - const Quadrature &quadrature) + const Quadrature &quadrature) { deallog << fe.get_name() << ' ' << fe.dofs_per_cell << ' '; - + for (unsigned int i=0; i point = quadrature.point(q); - + const Tensor<1,dim> gradient = fe.shape_grad_component (i, point, c); @@ -89,7 +89,7 @@ void check (const unsigned int min_degree, template