From: Joscha Gedicke Date: Sun, 17 Apr 2016 12:21:35 +0000 (+0200) Subject: modified assembler_simple_mgmatrix_04 to test for FESystem(RT_0,DGP_0) X-Git-Tag: v8.5.0-rc1~1099^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4554da0e6e00e79e10507ef0e2a5055245ef256b;p=dealii.git modified assembler_simple_mgmatrix_04 to test for FESystem(RT_0,DGP_0) --- diff --git a/tests/integrators/assembler_simple_mgmatrix_04.cc b/tests/integrators/assembler_simple_mgmatrix_04.cc index 5cda6acdb4..a5124d2804 100644 --- a/tests/integrators/assembler_simple_mgmatrix_04.cc +++ b/tests/integrators/assembler_simple_mgmatrix_04.cc @@ -66,7 +66,7 @@ LaplaceMatrix::LaplaceMatrix() template void LaplaceMatrix::cell(MeshWorker::DoFInfo &dinfo, MeshWorker::IntegrationInfo &info) const { - Laplace::cell_matrix(dinfo.matrix(0,false).matrix, info.fe_values()); + Laplace::cell_matrix(dinfo.matrix(0,false).matrix, info.fe_values(0)); } @@ -74,8 +74,8 @@ template void LaplaceMatrix::boundary(MeshWorker::DoFInfo &dinfo, typename MeshWorker::IntegrationInfo &info) const { - const unsigned int deg = info.fe_values().get_fe().tensor_degree(); - Laplace::nitsche_matrix(dinfo.matrix(0,false).matrix, info.fe_values(), + const unsigned int deg = info.fe_values(0).get_fe().tensor_degree(); + Laplace::nitsche_matrix(dinfo.matrix(0,false).matrix, info.fe_values(0), Laplace::compute_penalty(dinfo, dinfo, deg, deg)); } @@ -85,21 +85,21 @@ void LaplaceMatrix::face( MeshWorker::DoFInfo &dinfo1, MeshWorker::DoFInfo &dinfo2, MeshWorker::IntegrationInfo &info1, MeshWorker::IntegrationInfo &info2) const { - if (info1.fe_values().get_fe().conforms(FiniteElementData::H1)) + if (info1.fe_values(0).get_fe().conforms(FiniteElementData::H1)) return; - const unsigned int deg = info1.fe_values().get_fe().tensor_degree(); + const unsigned int deg = info1.fe_values(0).get_fe().tensor_degree(); - if (info1.fe_values().get_fe().conforms(FiniteElementData::Hdiv) && - !info1.fe_values().get_fe().conforms(FiniteElementData::Hcurl)) + if (info1.fe_values(0).get_fe().conforms(FiniteElementData::Hdiv) && + !info1.fe_values(0).get_fe().conforms(FiniteElementData::Hcurl)) Laplace::ip_tangential_matrix(dinfo1.matrix(0,false).matrix, dinfo1.matrix(0,true).matrix, dinfo2.matrix(0,true).matrix, dinfo2.matrix(0,false).matrix, - info1.fe_values(), info2.fe_values(), + info1.fe_values(0), info2.fe_values(0), Laplace::compute_penalty(dinfo1, dinfo2, deg, deg)); else Laplace::ip_matrix(dinfo1.matrix(0,false).matrix, dinfo1.matrix(0,true).matrix, dinfo2.matrix(0,true).matrix, dinfo2.matrix(0,false).matrix, - info1.fe_values(), info2.fe_values(), + info1.fe_values(0), info2.fe_values(0), Laplace::compute_penalty(dinfo1, dinfo2, deg, deg)); } @@ -119,9 +119,9 @@ void assemble_mg_matrix(DoFHandler &dof_handler, MeshWorker::IntegrationInfoBox info_box; UpdateFlags update_flags = update_values | update_gradients | update_hessians; info_box.add_update_flags_all(update_flags); - info_box.initialize(dof_handler.get_fe(), mapping); + info_box.initialize(dof_handler.get_fe(), mapping, &dof_handler.block_info()); - MeshWorker::DoFInfo dof_info(dof_handler); + MeshWorker::DoFInfo dof_info(dof_handler.block_info()); MeshWorker::Assembler::MGMatrixSimple > assembler; assembler.initialize(mg_constraints); @@ -162,6 +162,7 @@ void test(FiniteElement &fe) DoFHandler dof(tr); dof.distribute_dofs(fe); dof.distribute_mg_dofs(fe); + dof.initialize_local_block_info(); mg::SparseMatrixCollection mg; mg.resize(0,tr.n_levels()-1); mg.reinit(dof); @@ -203,14 +204,14 @@ int main() // FESystem<2> sys1(p0, 2, p1, 1); // FESystem<2> sys2(p0, 2, rt0, 1); - // FESystem<2> sys3(rt0, 1, p0, 2); + FESystem<2> sys3(rt0, 1, p0, 1); // FESystem<2> sys4(p1, 2, q2, 2); // FESystem<2> sys5(q2, 2, p1, 2); test(rt0); test(rt1); // test(sys2); -// test(sys3); + test(sys3); // test(sys4); // test(sys5); } diff --git a/tests/integrators/assembler_simple_mgmatrix_04.output b/tests/integrators/assembler_simple_mgmatrix_04.output index 0c198c3427..4dad034ac1 100644 --- a/tests/integrators/assembler_simple_mgmatrix_04.output +++ b/tests/integrators/assembler_simple_mgmatrix_04.output @@ -260,3 +260,87 @@ DEAL::down 0. 0. 0.000000 0.000000 0. 0. 0. 0. 0. 0. 0. 0. 0.000000 0.000000 2.700000 3.637307 -3.600000 -4.849742 0.000000 -18.900000 0.000000 -25.461147 0. 0. 0.000000 0.000000 0. 0. 0. 0. 0. 0. 0.000000 0.000000 2.700000 3.637307 0.000000 -18.900000 0.000000 -25.461147 0. 0. 0.000000 0.000000 0. 0. 0. 0. 0. 0. 0. 0. 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0. 0. 0.000000 0.000000 0. 0. 0. 0. 0. 0. 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0. 0. 0.000000 0.000000 0. 0. 0. 0. 0. 0. 0. 0. 0.000000 0.000000 -4.156922 -5.400000 5.542563 7.200000 0.000000 29.098454 0.000000 37.800000 0. 0. 0.000000 0.000000 0. 0. 0. 0. 0. 0. 0.000000 0.000000 -4.156922 -5.400000 0.000000 29.098454 0.000000 37.800000 +DEAL::FESystem<2>[FE_RaviartThomas<2>(0)-FE_DGP<2>(0)] +DEAL::Level 0 +DEAL::mg +1.833333 0.166667 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.166667 1.666667 0.000000 0.000000 0.000000 0.166667 0.000000 0.000000 0.000000 +0.000000 0.000000 6.166667 2.833333 0.000000 0.000000 -2.000000 -1.000000 0.000000 +0.000000 0.000000 2.833333 6.166667 0.000000 0.000000 -1.000000 -2.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.166667 0.000000 0.000000 0.000000 1.833333 0.000000 0.000000 0.000000 +0.000000 0.000000 -2.000000 -1.000000 0.000000 0.000000 6.166667 2.833333 0.000000 +0.000000 0.000000 -1.000000 -2.000000 0.000000 0.000000 2.833333 6.166667 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1.000000 +DEAL::Level 1 +DEAL::mg +7.000000 0.500000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -0.333333 -0.166667 0.000000 0.000000 0. 0. 0. +0.500000 6.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -0.166667 -0.666667 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 22.000000 8.000000 0.000000 0.000000 -5.333333 -2.666667 0.000000 0.000000 0.000000 0.000000 0.000000 0. 0. 0. +0.000000 0.000000 8.000000 36.000000 0.000000 0.000000 -2.666667 -10.666667 0.000000 0.000000 0.000000 8.000000 0.000000 0.000000 -2.666667 0.000000 +0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0. 0. 0. +0.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0. 0.000000 0. 0. 0.000000 0.000000 0.000000 +0.000000 0.000000 -5.333333 -2.666667 0.000000 0.000000 15.333333 4.666667 0.000000 0. 0.000000 0. 0. 0.000000 0.000000 0.000000 +0.000000 0.000000 -2.666667 -10.666667 0.000000 0.000000 4.666667 22.666667 0.000000 0.000000 0.000000 -2.666667 0.000000 0.000000 4.666667 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0. 0.000000 0. 0. 0.000000 0.000000 0.000000 +-0.333333 -0.166667 0.000000 0.000000 0.000000 0. 0. 0.000000 0. 7.000000 0.500000 0.000000 0.000000 0.000000 0.000000 0.000000 +-0.166667 -0.666667 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.500000 6.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 8.000000 0.000000 0. 0. -2.666667 0. 0.000000 0.000000 22.000000 0.000000 0.000000 -5.333333 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0. 0. 0.000000 0. 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 +0. 0.000000 0. 0.000000 0. 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 +0. 0.000000 0. -2.666667 0. 0.000000 0.000000 4.666667 0.000000 0.000000 0.000000 -5.333333 0.000000 0.000000 15.333333 0.000000 +0. 0.000000 0. 0.000000 0. 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1.000000 +DEAL::in +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0. 0. 0. +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0. 0. 0. +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0. 0. 0. +0.000000 -1.666667 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0. 0.000000 0. 0. 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0. 0.000000 0. 0. 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0. 0.000000 0. 0. 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0. 0. 0.000000 0. 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0. 0. 0.000000 0. 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0. 0. 0.000000 0. 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0. 0.000000 0. 0.000000 0. 0.000000 0.000000 0.000000 0.000000 0.000000 -1.666667 0.000000 0.000000 0.000000 0.000000 0.000000 +0. 0.000000 0. 0.000000 0. 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0. 0.000000 0. 0.000000 0. 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +DEAL::out +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0. 0. 0. +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0. 0. 0. +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0. 0. 0. +0.000000 -1.666667 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0. 0.000000 0. 0. 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0. 0.000000 0. 0. 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0. 0.000000 0. 0. 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0. 0. 0.000000 0. 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0. 0. 0.000000 0. 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0. 0. 0.000000 0. 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0. 0.000000 0. 0.000000 0. 0.000000 0.000000 0.000000 0.000000 0.000000 -1.666667 0.000000 0.000000 0.000000 0.000000 0.000000 +0. 0.000000 0. 0.000000 0. 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0. 0.000000 0. 0.000000 0. 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +DEAL::up +0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. +0. 0.000000 0. 0. 0. 0.000000 0.000000 0.000000 0.000000 0. 0.000000 0. 0. 0.000000 0.000000 0.000000 +0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. +0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. +0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. +0. 0.000000 0. 0. 0. 0.000000 0.000000 0.000000 0.000000 0. 0.000000 0. 0. 0.000000 0.000000 0.000000 +0. 0.000000 0. 0. 0. 0.000000 -2.500000 -3.000000 0.000000 0. 0.000000 0. 0. 0.000000 -0.500000 0.000000 +0. 0.000000 0. 0. 0. 0.000000 -0.500000 -3.000000 0.000000 0. 0.000000 0. 0. 0.000000 -2.500000 0.000000 +0. 0.000000 0. 0. 0. 0.000000 0.000000 0.000000 0.000000 0. 0.000000 0. 0. 0.000000 0.000000 0.000000 +DEAL::down +0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. +0. 0.000000 0. 0. 0. 0.000000 0.000000 0.000000 0.000000 0. 0.000000 0. 0. 0.000000 0.000000 0.000000 +0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. +0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. +0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. +0. 0.000000 0. 0. 0. 0.000000 0.000000 0.000000 0.000000 0. 0.000000 0. 0. 0.000000 0.000000 0.000000 +0. 0.000000 0. 0. 0. 0.000000 -2.500000 -3.000000 0.000000 0. 0.000000 0. 0. 0.000000 -0.500000 0.000000 +0. 0.000000 0. 0. 0. 0.000000 -0.500000 -3.000000 0.000000 0. 0.000000 0. 0. 0.000000 -2.500000 0.000000 +0. 0.000000 0. 0. 0. 0.000000 0.000000 0.000000 0.000000 0. 0.000000 0. 0. 0.000000 0.000000 0.000000