277 *
for (
unsigned int i = 0; i <
values.size(); ++i)
287 *
const unsigned int )
const
295 *
return return_value;
313 *
virtual void value_list(
const std::vector<
Point<dim>> &points,
314 *
std::vector<double> &
values,
315 *
const unsigned int )
const override;
323 *
std::vector<double> &values,
324 *
const unsigned int )
const
327 *
for (
unsigned int i = 0; i <
values.size(); ++i)
328 *
values[i] = 8. * PI * PI *
std::sin(2. * PI * points[i][0]) *
349 *
virtual void value_list(
const std::vector<
Point<dim>> &points,
350 *
std::vector<double> &
values,
351 *
const unsigned int )
const override;
362 *
std::vector<double> &values,
363 *
const unsigned int )
const
365 *
for (
unsigned int i = 0; i <
values.size(); ++i)
366 *
values[i] = -
ref.laplacian(points[i]);
374 * <a name=
"step_74-Auxiliaryfunctions"></a>
383 *
const unsigned int degree =
std::max(1U, fe_degree);
384 *
return degree * (degree + 1.) * 0.5 *
392 * <a name=
"step_74-TheCopyData"></a>
405 *
std::array<double, 2>
values;
406 *
std::array<unsigned int, 2> cell_indices;
415 *
std::vector<types::global_dof_index> local_dof_indices;
416 *
std::vector<CopyDataFace> face_data;
421 *
template <
class Iterator>
422 *
void reinit(
const Iterator &cell,
const unsigned int dofs_per_cell)
424 *
cell_matrix.reinit(dofs_per_cell, dofs_per_cell);
426 *
local_dof_indices.resize(dofs_per_cell);
427 *
cell->get_dof_indices(local_dof_indices);
436 * <a name=
"step_74-TheSIPGLaplaceclass"></a>
456 *
void refine_grid();
464 *
const unsigned int degree;
466 *
const QGauss<dim - 1> face_quadrature;
484 * - Vectors to store error estimator square and energy norm square per
486 * - Print convergence rate and errors on the screen.
487 * - The fiffusion coefficient @f$\nu@f$ is set to 1.
488 * - Members that store information about the test case to be computed.
491 * Vector<double> estimated_error_square_per_cell;
492 * Vector<double> energy_norm_square_per_cell;
494 * ConvergenceTable convergence_table;
496 * const double diffusion_coefficient = 1.;
498 * const TestCase test_case;
499 * std::unique_ptr<const Function<dim>> exact_solution;
500 * std::unique_ptr<const Function<dim>> rhs_function;
505 * The constructor here takes the test case as input and then
506 * determines the correct solution and right-hand side classes. The
507 * remaining member variables are initialized in the obvious way.
511 * SIPGLaplace<dim>::SIPGLaplace(const TestCase &test_case)
513 * , quadrature(degree + 1)
514 * , face_quadrature(degree + 1)
515 * , quadrature_overintegration(degree + 2)
516 * , face_quadrature_overintegration(degree + 2)
519 * , dof_handler(triangulation)
520 * , test_case(test_case)
522 * if (test_case == TestCase::convergence_rate)
524 * exact_solution = std::make_unique<const SmoothSolution<dim>>();
525 * rhs_function = std::make_unique<const SmoothRightHandSide<dim>>();
528 * else if (test_case == TestCase::l_singularity)
531 * std::make_unique<const Functions::LSingularityFunction>();
532 * rhs_function = std::make_unique<const SingularRightHandSide<dim>>();
535 * AssertThrow(false, ExcNotImplemented());
541 * void SIPGLaplace<dim>::setup_system()
543 * dof_handler.distribute_dofs(fe);
544 * DynamicSparsityPattern dsp(dof_handler.n_dofs());
545 * DoFTools::make_flux_sparsity_pattern(dof_handler, dsp);
546 * sparsity_pattern.copy_from(dsp);
548 * system_matrix.reinit(sparsity_pattern);
549 * solution.reinit(dof_handler.n_dofs());
550 * system_rhs.reinit(dof_handler.n_dofs());
558 * <a name="step_74-Theassemble_systemfunction"></a>
559 * <h3>The assemble_system function</h3>
560 * The assemble function here is similar to that in @ref step_12 "step-12" and @ref step_47 "step-47".
561 * Different from assembling by hand, we just need to focus
562 * on assembling on each cell, each boundary face, and each
563 * interior face. The loops over cells and faces are handled
564 * automatically by MeshWorker::mesh_loop().
568 * The function starts by defining a local (lambda) function that is
569 * used to integrate the cell terms:
573 * void SIPGLaplace<dim>::assemble_system()
575 * const auto cell_worker =
576 * [&](const typename DoFHandler<dim>::active_cell_iterator &cell,
577 * ScratchData &scratch_data,
578 * CopyData ©_data) {
579 * const FEValues<dim> &fe_v = scratch_data.reinit(cell);
580 * const unsigned int dofs_per_cell = fe_v.dofs_per_cell;
581 * copy_data.reinit(cell, dofs_per_cell);
583 * const std::vector<Point<dim>> &q_points =
584 * scratch_data.get_quadrature_points();
585 * const unsigned int n_q_points = q_points.size();
586 * const std::vector<double> &JxW = scratch_data.get_JxW_values();
588 * std::vector<double> rhs(n_q_points);
589 * rhs_function->value_list(q_points, rhs);
591 * for (unsigned int point = 0; point < n_q_points; ++point)
592 * for (unsigned int i = 0; i < fe_v.dofs_per_cell; ++i)
594 * for (unsigned int j = 0; j < fe_v.dofs_per_cell; ++j)
595 * copy_data.cell_matrix(i, j) +=
596 * diffusion_coefficient * // nu
597 * fe_v.shape_grad(i, point) * // grad v_h
598 * fe_v.shape_grad(j, point) * // grad u_h
601 * copy_data.cell_rhs(i) += fe_v.shape_value(i, point) * // v_h
609 * Next, we need a function that assembles face integrals on the boundary:
612 * const auto boundary_worker =
613 * [&](const typename DoFHandler<dim>::active_cell_iterator &cell,
614 * const unsigned int &face_no,
615 * ScratchData &scratch_data,
616 * CopyData ©_data) {
617 * const FEFaceValuesBase<dim> &fe_fv = scratch_data.reinit(cell, face_no);
619 * const std::vector<Point<dim>> &q_points =
620 * scratch_data.get_quadrature_points();
621 * const unsigned int n_q_points = q_points.size();
622 * const unsigned int dofs_per_cell = fe_fv.dofs_per_cell;
624 * const std::vector<double> &JxW = scratch_data.get_JxW_values();
625 * const std::vector<Tensor<1, dim>> &normals =
626 * scratch_data.get_normal_vectors();
628 * std::vector<double> g(n_q_points);
629 * exact_solution->value_list(q_points, g);
631 * const double extent1 = cell->measure() / cell->face(face_no)->measure();
632 * const double penalty = get_penalty_factor(degree, extent1, extent1);
634 * for (unsigned int point = 0; point < n_q_points; ++point)
636 * for (unsigned int i = 0; i < dofs_per_cell; ++i)
637 * for (unsigned int j = 0; j < dofs_per_cell; ++j)
638 * copy_data.cell_matrix(i, j) +=
639 * (-diffusion_coefficient * // - nu
640 * fe_fv.shape_value(i, point) * // v_h
641 * (fe_fv.shape_grad(j, point) * // (grad u_h .
642 * normals[point]) // n)
644 * - diffusion_coefficient * // - nu
645 * (fe_fv.shape_grad(i, point) * // (grad v_h .
646 * normals[point]) * // n)
647 * fe_fv.shape_value(j, point) // u_h
649 * + diffusion_coefficient * penalty * // + nu sigma
650 * fe_fv.shape_value(i, point) * // v_h
651 * fe_fv.shape_value(j, point) // u_h
656 * for (unsigned int i = 0; i < dofs_per_cell; ++i)
657 * copy_data.cell_rhs(i) +=
658 * (-diffusion_coefficient * // - nu
659 * (fe_fv.shape_grad(i, point) * // (grad v_h .
660 * normals[point]) * // n)
664 * + diffusion_coefficient * penalty * // + nu sigma
665 * fe_fv.shape_value(i, point) * g[point] // v_h g
674 * Finally, a function that assembles face integrals on interior
675 * faces. To reinitialize FEInterfaceValues, we need to pass
676 * cells, face and subface indices (for adaptive refinement) to
677 * the reinit() function of FEInterfaceValues:
680 * const auto face_worker =
681 * [&](const typename DoFHandler<dim>::cell_iterator &cell,
682 * const unsigned int &f,
683 * const unsigned int &sf,
684 * const typename DoFHandler<dim>::cell_iterator &ncell,
685 * const unsigned int &nf,
686 * const unsigned int &nsf,
687 * ScratchData &scratch_data,
688 * CopyData ©_data) {
689 * const FEInterfaceValues<dim> &fe_iv =
690 * scratch_data.reinit(cell, f, sf, ncell, nf, nsf);
692 * copy_data.face_data.emplace_back();
693 * CopyDataFace ©_data_face = copy_data.face_data.back();
694 * const unsigned int n_dofs_face = fe_iv.n_current_interface_dofs();
695 * copy_data_face.joint_dof_indices = fe_iv.get_interface_dof_indices();
696 * copy_data_face.cell_matrix.reinit(n_dofs_face, n_dofs_face);
698 * const std::vector<double> &JxW = fe_iv.get_JxW_values();
699 * const std::vector<Tensor<1, dim>> &normals = fe_iv.get_normal_vectors();
701 * const double extent1 = cell->measure() / cell->face(f)->measure();
702 * const double extent2 = ncell->measure() / ncell->face(nf)->measure();
703 * const double penalty = get_penalty_factor(degree, extent1, extent2);
705 * for (const unsigned int point : fe_iv.quadrature_point_indices())
707 * for (const unsigned int i : fe_iv.dof_indices())
708 * for (const unsigned int j : fe_iv.dof_indices())
709 * copy_data_face.cell_matrix(i, j) +=
710 * (-diffusion_coefficient * // - nu
711 * fe_iv.jump_in_shape_values(i, point) * // [v_h]
712 * (fe_iv.average_of_shape_gradients(j,
713 * point) * // ({grad u_h} .
714 * normals[point]) // n)
716 * - diffusion_coefficient * // - nu
717 * (fe_iv.average_of_shape_gradients(i,
718 * point) * // (grad v_h .
719 * normals[point]) * // n)
720 * fe_iv.jump_in_shape_values(j, point) // [u_h]
722 * + diffusion_coefficient * penalty * // + nu sigma
723 * fe_iv.jump_in_shape_values(i, point) * // [v_h]
724 * fe_iv.jump_in_shape_values(j, point) // [u_h]
733 * The following lambda function will then copy data into the
734 * global matrix and right-hand side. Though there are no hanging
735 * node constraints in DG discretization, we define an empty
736 * AffineConstraints object that allows us to use the
737 * AffineConstraints::distribute_local_to_global() functionality.
740 * AffineConstraints<double> constraints;
741 * constraints.close();
742 * const auto copier = [&](const CopyData &c) {
743 * constraints.distribute_local_to_global(c.cell_matrix,
745 * c.local_dof_indices,
751 * Copy data from interior face assembly to the global matrix.
754 * for (const CopyDataFace &cdf : c.face_data)
756 * constraints.distribute_local_to_global(cdf.cell_matrix,
757 * cdf.joint_dof_indices,
765 * With the assembly functions defined, we can now create
766 * ScratchData and CopyData objects, and pass them together with
767 * the lambda functions above to MeshWorker::mesh_loop(). In
768 * addition, we need to specify that we want to assemble on
769 * interior faces exactly once.
772 * const UpdateFlags cell_flags = update_values | update_gradients |
773 * update_quadrature_points | update_JxW_values;
774 * const UpdateFlags face_flags = update_values | update_gradients |
775 * update_quadrature_points |
776 * update_normal_vectors | update_JxW_values;
778 * ScratchData scratch_data(
779 * mapping, fe, quadrature, cell_flags, face_quadrature, face_flags);
780 * CopyData copy_data;
782 * MeshWorker::mesh_loop(dof_handler.begin_active(),
788 * MeshWorker::assemble_own_cells |
789 * MeshWorker::assemble_boundary_faces |
790 * MeshWorker::assemble_own_interior_faces_once,
800 * <a name="step_74-Thesolveandoutput_resultsfunction"></a>
801 * <h3>The solve() and output_results() function</h3>
802 * The following two functions are entirely standard and without difficulty.
806 * void SIPGLaplace<dim>::solve()
808 * SparseDirectUMFPACK A_direct;
809 * A_direct.initialize(system_matrix);
810 * A_direct.vmult(solution, system_rhs);
816 * void SIPGLaplace<dim>::output_results(const unsigned int cycle) const
818 * const std::string filename = "sol_Q" + Utilities::int_to_string(degree, 1) +
819 * "-" + Utilities::int_to_string(cycle, 2) +
821 * std::ofstream output(filename);
823 * DataOut<dim> data_out;
824 * data_out.attach_dof_handler(dof_handler);
825 * data_out.add_data_vector(solution, "u", DataOut<dim>::type_dof_data);
826 * data_out.build_patches(mapping);
827 * data_out.write_vtu(output);
834 * <a name="step_74-Thecompute_error_estimatefunction"></a>
835 * <h3>The compute_error_estimate() function</h3>
836 * The assembly of the error estimator here is quite similar to
837 * that of the global matrix and right-had side and can be handled
838 * by the MeshWorker::mesh_loop() framework. To understand what
839 * each of the local (lambda) functions is doing, recall first that
840 * the local cell residual is defined as
841 * @f$h_K^2 \left\| f + \nu \Delta u_h \right\|_K^2@f$:
845 * void SIPGLaplace<dim>::compute_error_estimate()
847 * const auto cell_worker =
848 * [&](const typename DoFHandler<dim>::active_cell_iterator &cell,
849 * ScratchData &scratch_data,
850 * CopyData ©_data) {
851 * const FEValues<dim> &fe_v = scratch_data.reinit(cell);
853 * copy_data.cell_index = cell->active_cell_index();
855 * const std::vector<Point<dim>> &q_points = fe_v.get_quadrature_points();
856 * const unsigned int n_q_points = q_points.size();
857 * const std::vector<double> &JxW = fe_v.get_JxW_values();
859 * std::vector<Tensor<2, dim>> hessians(n_q_points);
860 * fe_v.get_function_hessians(solution, hessians);
862 * std::vector<double> rhs(n_q_points);
863 * rhs_function->value_list(q_points, rhs);
865 * const double hk = cell->diameter();
866 * double residual_norm_square = 0;
868 * for (unsigned int point = 0; point < n_q_points; ++point)
870 * const double residual =
871 * rhs[point] + diffusion_coefficient * trace(hessians[point]);
872 * residual_norm_square += residual * residual * JxW[point];
874 * copy_data.value = hk * hk * residual_norm_square;
879 * Next compute boundary terms @f$\sum_{f\in \partial K \cap \partial \Omega}
880 * \sigma \left\| [ u_h-g_D ] \right\|_f^2 @f$:
883 * const auto boundary_worker =
884 * [&](const typename DoFHandler<dim>::active_cell_iterator &cell,
885 * const unsigned int &face_no,
886 * ScratchData &scratch_data,
887 * CopyData ©_data) {
888 * const FEFaceValuesBase<dim> &fe_fv = scratch_data.reinit(cell, face_no);
890 * const std::vector<Point<dim>> &q_points = fe_fv.get_quadrature_points();
891 * const unsigned n_q_points = q_points.size();
893 * const std::vector<double> &JxW = fe_fv.get_JxW_values();
895 * std::vector<double> g(n_q_points);
896 * exact_solution->value_list(q_points, g);
898 * std::vector<double> sol_u(n_q_points);
899 * fe_fv.get_function_values(solution, sol_u);
901 * const double extent1 = cell->measure() / cell->face(face_no)->measure();
902 * const double penalty = get_penalty_factor(degree, extent1, extent1);
904 * double difference_norm_square = 0.;
905 * for (unsigned int point = 0; point < q_points.size(); ++point)
907 * const double diff = (g[point] - sol_u[point]);
908 * difference_norm_square += diff * diff * JxW[point];
910 * copy_data.value += penalty * difference_norm_square;
915 * And finally interior face terms @f$\sum_{f\in \partial K}\lbrace \sigma
916 * \left\| [u_h] \right\|_f^2 + h_f \left\| [\nu \nabla u_h \cdot
917 * \mathbf n ] \right\|_f^2 \rbrace@f$:
920 * const auto face_worker =
921 * [&](const typename DoFHandler<dim>::cell_iterator &cell,
922 * const unsigned int &f,
923 * const unsigned int &sf,
924 * const typename DoFHandler<dim>::cell_iterator &ncell,
925 * const unsigned int &nf,
926 * const unsigned int &nsf,
927 * ScratchData &scratch_data,
928 * CopyData ©_data) {
929 * const FEInterfaceValues<dim> &fe_iv =
930 * scratch_data.reinit(cell, f, sf, ncell, nf, nsf);
932 * copy_data.face_data.emplace_back();
933 * CopyDataFace ©_data_face = copy_data.face_data.back();
935 * copy_data_face.cell_indices[0] = cell->active_cell_index();
936 * copy_data_face.cell_indices[1] = ncell->active_cell_index();
938 * const std::vector<double> &JxW = fe_iv.get_JxW_values();
939 * const std::vector<Tensor<1, dim>> &normals = fe_iv.get_normal_vectors();
941 * const std::vector<Point<dim>> &q_points = fe_iv.get_quadrature_points();
942 * const unsigned int n_q_points = q_points.size();
944 * std::vector<double> jump(n_q_points);
945 * fe_iv.get_jump_in_function_values(solution, jump);
947 * std::vector<Tensor<1, dim>> grad_jump(n_q_points);
948 * fe_iv.get_jump_in_function_gradients(solution, grad_jump);
950 * const double h = cell->face(f)->diameter();
952 * const double extent1 = cell->measure() / cell->face(f)->measure();
953 * const double extent2 = ncell->measure() / ncell->face(nf)->measure();
954 * const double penalty = get_penalty_factor(degree, extent1, extent2);
956 * double flux_jump_square = 0;
957 * double u_jump_square = 0;
958 * for (unsigned int point = 0; point < n_q_points; ++point)
960 * u_jump_square += jump[point] * jump[point] * JxW[point];
961 * const double flux_jump = grad_jump[point] * normals[point];
962 * flux_jump_square +=
963 * diffusion_coefficient * flux_jump * flux_jump * JxW[point];
965 * copy_data_face.values[0] =
966 * 0.5 * h * (flux_jump_square + penalty * u_jump_square);
967 * copy_data_face.values[1] = copy_data_face.values[0];
972 * Having computed local contributions for each cell, we still
973 * need a way to copy these into the global vector that will hold
974 * the error estimators for all cells:
977 * const auto copier = [&](const CopyData ©_data) {
978 * if (copy_data.cell_index != numbers::invalid_unsigned_int)
979 * estimated_error_square_per_cell[copy_data.cell_index] +=
981 * for (const CopyDataFace &cdf : copy_data.face_data)
982 * for (unsigned int j = 0; j < 2; ++j)
983 * estimated_error_square_per_cell[cdf.cell_indices[j]] += cdf.values[j];
988 * After all of this set-up, let's
do the actual work:
We resize
1002 *
ScratchData scratch_data(
1003 *
mapping, fe, quadrature, cell_flags, face_quadrature, face_flags);
1005 *
CopyData copy_data;
1007 *
dof_handler.end(),
1022 * <a name=
"step_74-Thecompute_energy_norm_errorfunction"></a>
1040 *
template <
int dim>
1052 *
ScratchData &scratch_data,
1053 *
CopyData ©_data) {
1056 *
copy_data.cell_index = cell->active_cell_index();
1058 *
const std::vector<Point<dim>> &q_points =
fe_v.get_quadrature_points();
1059 *
const unsigned int n_q_points = q_points.size();
1060 *
const std::vector<double> &JxW =
fe_v.get_JxW_values();
1062 *
std::vector<Tensor<1, dim>>
grad_u(n_q_points);
1063 *
fe_v.get_function_gradients(solution,
grad_u);
1065 *
std::vector<Tensor<1, dim>>
grad_exact(n_q_points);
1069 *
for (
unsigned int point = 0;
point < n_q_points; ++
point)
1084 *
const unsigned int &
face_no,
1085 *
ScratchData &scratch_data,
1086 *
CopyData ©_data) {
1089 *
const std::vector<Point<dim>> &q_points =
fe_fv.get_quadrature_points();
1090 *
const unsigned n_q_points = q_points.size();
1092 *
const std::vector<double> &JxW =
fe_fv.get_JxW_values();
1094 *
std::vector<double>
g(n_q_points);
1097 *
std::vector<double>
sol_u(n_q_points);
1098 *
fe_fv.get_function_values(solution,
sol_u);
1100 *
const double extent1 = cell->measure() / cell->face(
face_no)->measure();
1104 *
for (
unsigned int point = 0;
point < q_points.size(); ++
point)
1119 *
const unsigned int &f,
1120 *
const unsigned int &sf,
1122 *
const unsigned int &
nf,
1123 *
const unsigned int &
nsf,
1124 *
ScratchData &scratch_data,
1125 *
CopyData ©_data) {
1127 *
scratch_data.reinit(cell, f, sf,
ncell,
nf,
nsf);
1129 *
copy_data.face_data.emplace_back();
1135 *
const std::vector<double> &JxW =
fe_iv.get_JxW_values();
1137 *
const std::vector<Point<dim>> &q_points =
fe_iv.get_quadrature_points();
1138 *
const unsigned int n_q_points = q_points.size();
1140 *
std::vector<double>
jump(n_q_points);
1141 *
fe_iv.get_jump_in_function_values(solution,
jump);
1143 *
const double extent1 = cell->measure() / cell->face(f)->measure();
1148 *
for (
unsigned int point = 0;
point < n_q_points; ++
point)
1156 *
const auto copier = [&](
const CopyData ©_data) {
1169 *
const ScratchData scratch_data(mapping,
1176 *
CopyData copy_data;
1178 *
dof_handler.end(),
1198 * <a name=
"step_74-Therefine_gridfunction"></a>
1199 * <
h3>
The refine_grid() function</
h3>
1218 * <a name=
"step_74-Thecompute_errorsfunction"></a>
1269 *
std::cout <<
" Error in the L2 norm : " <<
L2_error << std::endl
1270 *
<<
" Error in the H1 seminorm : " <<
H1_error << std::endl
1280 * <a name=
"step_74-Therunfunction"></a>
1289 *
for (
unsigned int cycle = 0; cycle <
max_cycle; ++cycle)
1291 *
std::cout <<
"Cycle " << cycle << std::endl;
1330 *
std::cout <<
" Number of active cells : "
1334 *
std::cout <<
" Number of degrees of freedom : " << dof_handler.n_dofs()
1350 *
std::cout <<
" Estimated error : "
1358 *
std::cout << std::endl;
1388 *
std::cout <<
"degree = " << degree << std::endl;
1399 * <a name=
"step_74-Themainfunction"></a>
1409 *
using namespace dealii;
1410 *
using namespace Step74;
1417 *
catch (std::exception &exc)
1419 *
std::cerr << std::endl
1421 *
<<
"----------------------------------------------------"
1423 *
std::cerr <<
"Exception on processing: " << std::endl
1424 *
<< exc.what() << std::endl
1425 *
<<
"Aborting!" << std::endl
1426 *
<<
"----------------------------------------------------"
1432 *
std::cerr << std::endl
1434 *
<<
"----------------------------------------------------"
1436 *
std::cerr <<
"Unknown exception!" << std::endl
1437 *
<<
"Aborting!" << std::endl
1438 *
<<
"----------------------------------------------------"
1476<table
align=
"center" class=
"doxtable">
1591<
img width=
"600px" src=
"https://www.dealii.org/images/steps/developer/step-74.log-log-plot.png" alt=
"">
1605<a name=
"step_74-PlainProg"></a>
numbers::NumberTraits< Number >::real_type norm() const
Number l1_norm(const Tensor< 2, dim, Number > &t)
std::conditional_t< rank_==1, std::array< Number, dim >, std::array< Tensor< rank_ - 1, dim, Number >, dim > > values
constexpr numbers::NumberTraits< Number >::real_type norm_square() const
typename ActiveSelector::cell_iterator cell_iterator
typename ActiveSelector::active_cell_iterator active_cell_iterator
void mesh_loop(const CellIteratorType &begin, const CellIteratorType &end, const CellWorkerFunctionType &cell_worker, const CopierType &copier, const ScratchData &sample_scratch_data, const CopyData &sample_copy_data, const AssembleFlags flags=assemble_own_cells, const BoundaryWorkerFunctionType &boundary_worker=BoundaryWorkerFunctionType(), const FaceWorkerFunctionType &face_worker=FaceWorkerFunctionType(), const unsigned int queue_length=2 *MultithreadInfo::n_threads(), const unsigned int chunk_size=8)
@ update_hessians
Second derivatives of shape functions.
@ update_values
Shape function values.
@ update_normal_vectors
Normal vectors.
@ update_JxW_values
Transformed quadrature weights.
@ update_gradients
Shape function gradients.
@ update_quadrature_points
Transformed quadrature points.
#define DEAL_II_NOT_IMPLEMENTED()
std::vector< index_type > data
void hyper_L(Triangulation< dim > &tria, const double left=-1., const double right=1., const bool colorize=false)
void hyper_cube(Triangulation< dim, spacedim > &tria, const double left=0., const double right=1., const bool colorize=false)
void refine_and_coarsen_fixed_number(Triangulation< dim, spacedim > &triangulation, const Vector< Number > &criteria, const double top_fraction_of_cells, const double bottom_fraction_of_cells, const unsigned int max_n_cells=std::numeric_limits< unsigned int >::max())
@ matrix
Contents is actually a matrix.
constexpr types::blas_int one
void cell_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, const FEValuesBase< dim > &fetest, const ArrayView< const std::vector< double > > &velocity, const double factor=1.)
void L2(Vector< number > &result, const FEValuesBase< dim > &fe, const std::vector< double > &input, const double factor=1.)
@ assemble_boundary_faces
@ assemble_own_interior_faces_once
Point< spacedim > point(const gp_Pnt &p, const double tolerance=1e-10)
void run(const Iterator &begin, const std_cxx20::type_identity_t< Iterator > &end, Worker worker, Copier copier, const ScratchData &sample_scratch_data, const CopyData &sample_copy_data, const unsigned int queue_length, const unsigned int chunk_size)
unsigned int n_cells(const internal::TriangulationImplementation::NumberCache< 1 > &c)
int(&) functions(const void *v1, const void *v2)
void assemble(const MeshWorker::DoFInfoBox< dim, DOFINFO > &dinfo, A *assembler)
void reinit(MatrixBlock< MatrixType > &v, const BlockSparsityPattern &p)
constexpr unsigned int invalid_unsigned_int
::VectorizedArray< Number, width > log(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > max(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > cos(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > sin(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > sqrt(const ::VectorizedArray< Number, width > &)
const ::parallel::distributed::Triangulation< dim, spacedim > * triangulation