From 9428ccebea1ab9a39df08b0b1e357087dc0335fe Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Mon, 2 Sep 2019 10:55:06 -0400 Subject: [PATCH] update results --- examples/step-12/doc/results.dox | 92 +++++++++++++------------------- examples/step-12/step-12.cc | 25 +++++---- 2 files changed, 49 insertions(+), 68 deletions(-) diff --git a/examples/step-12/doc/results.dox b/examples/step-12/doc/results.dox index 304f447ce4..feca1a7d95 100644 --- a/examples/step-12/doc/results.dox +++ b/examples/step-12/doc/results.dox @@ -1,51 +1,44 @@

Results

-The output of this program consist of the console output, the eps -files including the grids, and the solutions given in gnuplot format. +The output of this program consist of the console output and +solutions in vtk format: @code -DEAL::Cycle 0 -DEAL::Number of active cells: 64 -DEAL::Number of degrees of freedom: 256 -DEAL:Richardson::Starting value 0.176777 -DEAL:Richardson::Convergence step 4 value 3.33123e-17 -DEAL::Writing grid to -DEAL::Writing solution to -DEAL::Cycle 1 -DEAL::Number of active cells: 112 -DEAL::Number of degrees of freedom: 448 -DEAL:Richardson::Starting value 0.153093 -DEAL:Richardson::Convergence step 9 value 3.74479e-17 -DEAL::Writing grid to -DEAL::Writing solution to -DEAL::Cycle 2 -DEAL::Number of active cells: 214 -DEAL::Number of degrees of freedom: 856 -DEAL:Richardson::Starting value 0.149870 -DEAL:Richardson::Convergence step 16 value 1.41017e-14 -DEAL::Writing grid to -DEAL::Writing solution to -DEAL::Cycle 3 -DEAL::Number of active cells: 415 -DEAL::Number of degrees of freedom: 1660 -DEAL:Richardson::Starting value 0.149053 -DEAL:Richardson::Convergence step 26 value 4.92424e-15 -DEAL::Writing grid to -DEAL::Writing solution to -DEAL::Cycle 4 -DEAL::Number of active cells: 796 -DEAL::Number of degrees of freedom: 3184 -DEAL:Richardson::Starting value 0.148848 -DEAL:Richardson::Convergence step 44 value 5.80787e-14 -DEAL::Writing grid to -DEAL::Writing solution to -DEAL::Cycle 5 -DEAL::Number of active cells: 1561 -DEAL::Number of degrees of freedom: 6244 -DEAL:Richardson::Starting value 0.131369 -DEAL:Richardson::Convergence step 81 value 2.39812e-13 -DEAL::Writing grid to -DEAL::Writing solution to +Cycle 0 + Number of active cells: 64 + Number of degrees of freedom: 256 + Solver converged in 4 iterations. + Writing solution to + L-infinity norm: 1.09057 +Cycle 1 + Number of active cells: 112 + Number of degrees of freedom: 448 + Solver converged in 9 iterations. + Writing solution to + L-infinity norm: 1.10402 +Cycle 2 + Number of active cells: 214 + Number of degrees of freedom: 856 + Solver converged in 16 iterations. + Writing solution to + L-infinity norm: 1.09813 +Cycle 3 + Number of active cells: 415 + Number of degrees of freedom: 1660 + Solver converged in 26 iterations. + Writing solution to + L-infinity norm: 1.09579 +Cycle 4 + Number of active cells: 796 + Number of degrees of freedom: 3184 + Solver converged in 44 iterations. + Writing solution to + L-infinity norm: 1.09612 +Cycle 5 + Number of active cells: 1561 + Number of degrees of freedom: 6244 + Solver converged in 81 iterations. + Writing solution to @endcode We show the solutions on the initial mesh, the mesh after two @@ -55,17 +48,6 @@ and after five adaptive refinement steps. - -Then we show the final grid (after 5 refinement steps) and the solution again, -this time with a nicer 3d rendering (obtained using the DataOutBase::write_vtk -function and the VTK-based VisIt visualization program) that better shows the -sharpness of the jump on the refined mesh and the over- and undershoots of the -solution along the interface: - - - - - And finally we show a plot of a 3d computation. diff --git a/examples/step-12/step-12.cc b/examples/step-12/step-12.cc index 5ee053decd..e3d17c2600 100644 --- a/examples/step-12/step-12.cc +++ b/examples/step-12/step-12.cc @@ -341,7 +341,7 @@ namespace Step12 CopyData & copy_data) { scratch_data.fe_interface_values.reinit(cell, face_no); const FEFaceValuesBase &fe_face = - scratch_data.fe_interface_values.get_fe_values(); + scratch_data.fe_interface_values.get_fe_face_values(0); const auto &q_points = fe_face.get_quadrature_points(); @@ -386,21 +386,20 @@ namespace Step12 const unsigned int &nsf, ScratchData & scratch_data, CopyData & copy_data) { - FEInterfaceValues &fe_facet = scratch_data.fe_interface_values; - fe_facet.reinit(cell, f, sf, ncell, nf, nsf); - const auto &q_points = fe_facet.get_quadrature_points(); + FEInterfaceValues &fe_iv = scratch_data.fe_interface_values; + fe_iv.reinit(cell, f, sf, ncell, nf, nsf); + const auto &q_points = fe_iv.get_quadrature_points(); copy_data.face_data.emplace_back(); CopyDataFace ©_data_face = copy_data.face_data.back(); - const unsigned int n_dofs = fe_facet.n_interface_dofs(); - copy_data_face.joint_dof_indices = fe_facet.get_interface_dof_indices(); + const unsigned int n_dofs = fe_iv.n_current_interface_dofs(); + copy_data_face.joint_dof_indices = fe_iv.get_interface_dof_indices(); copy_data_face.cell_matrix.reinit(n_dofs, n_dofs); - const std::vector & JxW = fe_facet.get_JxW_values(); - const std::vector> &normals = - fe_facet.get_normal_vectors(); + const std::vector & JxW = fe_iv.get_JxW_values(); + const std::vector> &normals = fe_iv.get_normal_vectors(); for (unsigned int qpoint = 0; qpoint < q_points.size(); ++qpoint) { @@ -408,10 +407,10 @@ namespace Step12 for (unsigned int i = 0; i < n_dofs; ++i) for (unsigned int j = 0; j < n_dofs; ++j) copy_data_face.cell_matrix(i, j) += - fe_facet.jump(i, qpoint) // [\phi_i] - * fe_facet.shape_value((beta_n > 0), j, qpoint) // phi_j^{UP} - * beta_n // (\beta . n) - * JxW[qpoint]; // dx + fe_iv.jump(i, qpoint) // [\phi_i] + * fe_iv.shape_value((beta_n > 0), j, qpoint) // phi_j^{UP} + * beta_n // (\beta . n) + * JxW[qpoint]; // dx } }; -- 2.39.5