617 *
(-2 / (this->width * this->width) *
645 *
virtual void vector_value(
const Point<dim> &p,
651 *
for (
unsigned int d = 0;
d < dim; ++
d)
653 *
v[dim] = solution.value(p);
726 *
(this->width * this->width) *
740 * <a name=
"step_51-TheHDGsolverclass"></a>
775 *
void postprocess();
776 *
void refine_grid(
const unsigned int cycle);
785 *
struct ScratchData;
804 *
ScratchData &scratch,
900 * <a name=
"step_51-TheHDGclassimplementation"></a>
906 * <a name=
"step_51-Constructor"></a>
930 * <a name=
"step_51-HDGsetup_system"></a>
942 *
dof_handler.distribute_dofs(fe);
945 *
std::cout <<
" Number of degrees of freedom: " << dof_handler.n_dofs()
948 *
solution.reinit(dof_handler.n_dofs());
954 *
constraints.
clear();
963 *
constraints.close();
976 *
sparsity_pattern.copy_from(
dsp, fe.n_dofs_per_face());
978 *
system_matrix.reinit(sparsity_pattern);
986 * <a name=
"step_51-HDGPerTaskData"></a>
1005 *
template <
int dim>
1010 *
std::vector<types::global_dof_index> dof_indices;
1016 *
, cell_vector(n_dofs)
1017 *
, dof_indices(n_dofs)
1027 * <a name=
"step_51-HDGScratchData"></a>
1028 * <
h4>HDG::ScratchData</
h4>
1043 *
template <
int dim>
1044 *
struct HDG<dim>::ScratchData
1057 *
std::vector<Tensor<1, dim>>
q_phi;
1059 *
std::vector<double>
u_phi;
1061 *
std::vector<double>
tr_phi;
1093 *
,
tr_phi(fe.n_dofs_per_cell())
1107 *
for (unsigned
int i = 0; i < fe.n_dofs_per_cell(); ++i)
1109 *
if (fe.has_support_on_face(i,
face_no))
1114 *
ScratchData(
const ScratchData &
sd)
1116 *
sd.fe_values_local.get_quadrature(),
1117 *
sd.fe_values_local.get_update_flags())
1119 *
sd.fe_face_values_local.get_quadrature(),
1120 *
sd.fe_face_values_local.get_update_flags())
1121 *
, fe_face_values(
sd.fe_face_values.get_fe(),
1122 *
sd.fe_face_values.get_quadrature(),
1123 *
sd.fe_face_values.get_update_flags())
1147 * <a name=
"step_51-HDGPostProcessScratchData"></a>
1154 *
template <
int dim>
1176 *
,
cell_matrix(fe.n_dofs_per_cell(), fe.n_dofs_per_cell())
1183 *
sd.fe_values_local.get_quadrature(),
1184 *
sd.fe_values_local.get_update_flags())
1185 *
, fe_values(
sd.fe_values.get_fe(),
1186 *
sd.fe_values.get_quadrature(),
1187 *
sd.fe_values.get_update_flags())
1201 * <a name=
"step_51-HDGassemble_system"></a>
1208 * local solution (
true).
1237 *
ScratchData scratch(fe,
1246 *
dof_handler.end(),
1259 * <a name=
"step_51-HDGassemble_system_one_cell"></a>
1266 *
template <
int dim>
1269 *
ScratchData &scratch,
1280 *
const unsigned int n_q_points =
1281 *
scratch.fe_values_local.get_quadrature().size();
1283 *
scratch.fe_face_values_local.get_quadrature().size();
1286 *
scratch.fe_values_local.get_fe().n_dofs_per_cell();
1291 *
scratch.ll_matrix = 0;
1292 *
scratch.l_rhs = 0;
1293 *
if (!task_data.trace_reconstruct)
1295 *
scratch.lf_matrix = 0;
1296 *
scratch.fl_matrix = 0;
1297 *
task_data.cell_matrix = 0;
1298 *
task_data.cell_vector = 0;
1300 *
scratch.fe_values_local.reinit(
loc_cell);
1307 * store
the values at
each quadrature point
for the basis functions,
the
1312 *
for (
unsigned int q = 0;
q < n_q_points; ++
q)
1314 *
const double rhs_value = scratch.right_hand_side.value(
1315 *
scratch.fe_values_local.quadrature_point(
q));
1317 *
scratch.fe_values_local.quadrature_point(
q));
1318 *
const double JxW = scratch.fe_values_local.JxW(
q);
1321 *
scratch.q_phi[
k] = scratch.fe_values_local[
fluxes].value(
k,
q);
1322 *
scratch.q_phi_div[
k] =
1323 *
scratch.fe_values_local[
fluxes].divergence(
k,
q);
1324 *
scratch.u_phi[
k] = scratch.fe_values_local[
scalar].value(
k,
q);
1325 *
scratch.u_phi_grad[
k] =
1326 *
scratch.fe_values_local[
scalar].gradient(
k,
q);
1331 *
scratch.ll_matrix(i,
j) +=
1332 *
(scratch.q_phi[i] * scratch.q_phi[
j] -
1333 *
scratch.q_phi_div[i] * scratch.u_phi[
j] +
1334 *
scratch.u_phi[i] * scratch.q_phi_div[
j] -
1335 *
(scratch.u_phi_grad[i] *
convection) * scratch.u_phi[
j]) *
1337 *
scratch.l_rhs(i) += scratch.u_phi[i] *
rhs_value * JxW;
1348 *
for (
const auto face_no : cell->face_indices())
1351 *
scratch.fe_face_values.reinit(cell,
face_no);
1359 *
if (task_data.trace_reconstruct)
1360 *
scratch.fe_face_values.get_function_values(solution,
1361 *
scratch.trace_values);
1365 *
const double JxW = scratch.fe_face_values.JxW(
q);
1367 *
scratch.fe_face_values.quadrature_point(
q);
1369 *
scratch.fe_face_values.normal_vector(
q);
1371 *
scratch.convection_velocity.value(quadrature_point);
1391 *
for (
unsigned int k = 0;
1392 *
k < scratch.fe_local_support_on_face[
face_no].size();
1395 *
const unsigned int kk =
1396 *
scratch.fe_local_support_on_face[
face_no][
k];
1397 *
scratch.q_phi[
k] =
1398 *
scratch.fe_face_values_local[
fluxes].value(
kk,
q);
1399 *
scratch.u_phi[
k] =
1400 *
scratch.fe_face_values_local[
scalar].value(
kk,
q);
1408 * local-local, local-face, face-local,
and face-face.
The
1414 *
if (!task_data.trace_reconstruct)
1416 *
for (
unsigned int k = 0;
1417 *
k < scratch.fe_support_on_face[
face_no].size();
1419 *
scratch.tr_phi[
k] = scratch.fe_face_values.shape_value(
1420 *
scratch.fe_support_on_face[
face_no][
k],
q);
1421 *
for (
unsigned int i = 0;
1422 *
i < scratch.fe_local_support_on_face[
face_no].size();
1424 *
for (
unsigned int j = 0;
1425 *
j < scratch.fe_support_on_face[
face_no].size();
1428 *
const unsigned int ii =
1429 *
scratch.fe_local_support_on_face[
face_no][i];
1430 *
const unsigned int jj =
1431 *
scratch.fe_support_on_face[
face_no][
j];
1432 *
scratch.lf_matrix(
ii,
jj) +=
1433 *
((scratch.q_phi[i] * normal +
1435 *
scratch.tr_phi[
j]) *
1446 *
scratch.fl_matrix(
jj,
ii) -=
1447 *
((scratch.q_phi[i] * normal +
1449 *
scratch.tr_phi[
j]) *
1453 *
for (
unsigned int i = 0;
1454 *
i < scratch.fe_support_on_face[
face_no].size();
1456 *
for (
unsigned int j = 0;
1457 *
j < scratch.fe_support_on_face[
face_no].size();
1460 *
const unsigned int ii =
1461 *
scratch.fe_support_on_face[
face_no][i];
1462 *
const unsigned int jj =
1463 *
scratch.fe_support_on_face[
face_no][
j];
1464 *
task_data.cell_matrix(
ii,
jj) +=
1466 *
scratch.tr_phi[
j]) *
1470 *
if (cell->face(
face_no)->at_boundary() &&
1471 *
(cell->face(
face_no)->boundary_id() == 1))
1474 *
-scratch.exact_solution.gradient(quadrature_point) *
1477 *
scratch.exact_solution.value(quadrature_point);
1478 *
for (
unsigned int i = 0;
1479 *
i < scratch.fe_support_on_face[
face_no].size();
1482 *
const unsigned int ii =
1483 *
scratch.fe_support_on_face[
face_no][i];
1484 *
task_data.cell_vector(
ii) +=
1497 *
for (
unsigned int i = 0;
1498 *
i < scratch.fe_local_support_on_face[
face_no].size();
1500 *
for (
unsigned int j = 0;
1501 *
j < scratch.fe_local_support_on_face[
face_no].size();
1504 *
const unsigned int ii =
1505 *
scratch.fe_local_support_on_face[
face_no][i];
1506 *
const unsigned int jj =
1507 *
scratch.fe_local_support_on_face[
face_no][
j];
1508 *
scratch.ll_matrix(
ii,
jj) +=
1509 *
tau_stab * scratch.u_phi[i] * scratch.u_phi[
j] * JxW;
1522 *
if (task_data.trace_reconstruct)
1523 *
for (
unsigned int i = 0;
1524 *
i < scratch.fe_local_support_on_face[
face_no].size();
1527 *
const unsigned int ii =
1528 *
scratch.fe_local_support_on_face[
face_no][i];
1529 *
scratch.l_rhs(
ii) -=
1530 *
(scratch.q_phi[i] * normal +
1532 *
scratch.trace_values[
q] * JxW;
1545 *
scratch.ll_matrix.gauss_jordan();
1553 *
if (task_data.trace_reconstruct ==
false)
1555 *
scratch.fl_matrix.mmult(scratch.tmp_matrix, scratch.ll_matrix);
1556 *
scratch.tmp_matrix.vmult_add(task_data.cell_vector, scratch.l_rhs);
1557 *
scratch.tmp_matrix.mmult(task_data.cell_matrix,
1558 *
scratch.lf_matrix,
1560 *
cell->get_dof_indices(task_data.dof_indices);
1571 *
scratch.ll_matrix.vmult(scratch.tmp_rhs, scratch.l_rhs);
1581 * <a name=
"step_51-HDGcopy_local_to_global"></a>
1587 *
template <
int dim>
1590 *
if (
data.trace_reconstruct ==
false)
1591 *
constraints.distribute_local_to_global(
data.cell_matrix,
1603 * <a name=
"step_51-HDGsolve"></a>
1604 * <
h4>HDG::solve</
h4>
1609 *
template <
int dim>
1617 *
std::cout <<
" Number of BiCGStab iterations: "
1618 *
<< solver_control.last_step() << std::endl;
1620 *
system_matrix.
clear();
1621 *
sparsity_pattern.reinit(0, 0, 0, 1);
1623 *
constraints.distribute(solution);
1641 * <a name=
"step_51-HDGpostprocess"></a>
1642 * <
h4>HDG::postprocess</
h4>
1688 *
unsigned int &
data) {
1689 * this->postprocess_one_cell(cell, scratch, data);
1691 *
std::function<
void(
const unsigned int &)>(),
1712 *
std::pair<unsigned int, unsigned int>(0, dim), dim + 1);
1757 * <a name=
"step_51-HDGpostprocess_one_cell"></a>
1783 *
template <
int dim>
1792 *
scratch.fe_values_local.reinit(
loc_cell);
1793 *
scratch.fe_values.reinit(cell);
1798 *
const unsigned int n_q_points = scratch.fe_values.get_quadrature().size();
1799 *
const unsigned int dofs_per_cell = scratch.fe_values.dofs_per_cell;
1802 *
scratch.u_values);
1804 *
scratch.u_gradients);
1807 *
for (
unsigned int i = 1; i < dofs_per_cell; ++i)
1809 *
for (
unsigned int j = 0;
j < dofs_per_cell; ++
j)
1812 *
for (
unsigned int q = 0;
q < n_q_points; ++
q)
1813 *
sum += (scratch.fe_values.shape_grad(i,
q) *
1814 *
scratch.fe_values.shape_grad(
j,
q)) *
1815 *
scratch.fe_values.JxW(
q);
1816 *
scratch.cell_matrix(i,
j) =
sum;
1820 *
for (
unsigned int q = 0;
q < n_q_points; ++
q)
1821 *
sum -= (scratch.fe_values.shape_grad(i,
q) * scratch.u_gradients[
q]) *
1822 *
scratch.fe_values.JxW(
q);
1823 *
scratch.cell_rhs(i) =
sum;
1825 *
for (
unsigned int j = 0;
j < dofs_per_cell; ++
j)
1828 *
for (
unsigned int q = 0;
q < n_q_points; ++
q)
1829 *
sum += scratch.fe_values.shape_value(
j,
q) * scratch.fe_values.JxW(
q);
1830 *
scratch.cell_matrix(0,
j) =
sum;
1834 *
for (
unsigned int q = 0;
q < n_q_points; ++
q)
1835 *
sum += scratch.u_values[
q] * scratch.fe_values.JxW(
q);
1836 *
scratch.cell_rhs(0) =
sum;
1847 *
scratch.cell_matrix.gauss_jordan();
1848 *
scratch.cell_matrix.vmult(scratch.cell_sol, scratch.cell_rhs);
1849 *
cell->distribute_local_to_global(scratch.cell_sol,
solution_u_post);
1857 * <a name=
"step_51-HDGoutput_results"></a>
1869 *
template <
int dim>
1901 *
std::vector<std::string> names(dim,
"gradient");
1902 *
names.emplace_back(
"solution");
1903 *
std::vector<DataComponentInterpretation::DataComponentInterpretation>
1920 *
std::vector<std::string>
post_name(1,
"u_post");
1921 *
std::vector<DataComponentInterpretation::DataComponentInterpretation>
1928 *
data_out.build_patches(fe.degree);
1929 *
data_out.write_vtk(output);
1945 *
std::vector<std::string>
face_name(1,
"u_hat");
1946 *
std::vector<DataComponentInterpretation::DataComponentInterpretation>
1961 * <a name=
"step_51-HDGrefine_grid"></a>
1962 * <
h4>HDG::refine_grid</
h4>
1971 * elements
per direction.
1980 *
template <
int dim>
2008 *
std::map<types::boundary_id, const Function<dim> *>
2043 *
if (face->at_boundary())
2044 *
if ((
std::
fabs(face->center()[0] - (-1)) < 1
e-12) ||
2045 *
(
std::
fabs(face->center()[1] - (-1)) < 1
e-12))
2046 *
face->set_boundary_id(1);
2052 * <a name=
"step_51-HDGrun"></a>
2059 *
template <
int dim>
2062 *
for (
unsigned int cycle = 0; cycle < 10; ++cycle)
2064 *
std::cout <<
"Cycle " << cycle <<
':' << std::endl;
2066 *
refine_grid(cycle);
2103 *
const unsigned int dim = 2;
2110 * @
ref step_7
"step-7".
2114 *
std::cout <<
"Solving with Q1 elements, adaptive refinement"
2116 *
<<
"============================================="
2123 *
std::cout << std::endl;
2127 *
std::cout <<
"Solving with Q1 elements, global refinement" << std::endl
2128 *
<<
"===========================================" << std::endl
2134 *
std::cout << std::endl;
2138 *
std::cout <<
"Solving with Q3 elements, global refinement" << std::endl
2139 *
<<
"===========================================" << std::endl
2145 *
std::cout << std::endl;
2148 *
catch (std::exception &exc)
2150 *
std::cerr << std::endl
2152 *
<<
"----------------------------------------------------"
2154 *
std::cerr <<
"Exception on processing: " << std::endl
2155 *
<< exc.what() << std::endl
2156 *
<<
"Aborting!" << std::endl
2157 *
<<
"----------------------------------------------------"
2163 *
std::cerr << std::endl
2165 *
<<
"----------------------------------------------------"
2167 *
std::cerr <<
"Unknown exception!" << std::endl
2168 *
<<
"Aborting!" << std::endl
2169 *
<<
"----------------------------------------------------"
2180<a name=
"step_51-Programoutput"></a><
h3>
Program output</
h3>
2212<table
align=
"center">
2214 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.sol_2.png" alt=
""></
td>
2215 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.sol_3.png" alt=
""></
td>
2218 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.sol_4.png" alt=
""></
td>
2219 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.sol_8.png" alt=
""></
td>
2230<table
align=
"center">
2232 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.post_2.png" alt=
""></
td>
2233 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.post_3.png" alt=
""></
td>
2236 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.post_4.png" alt=
""></
td>
2237 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.post_8.png" alt=
""></
td>
2247<table
align=
"center">
2249 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.sol_q3_2.png" alt=
""></
td>
2250 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.post_q3_2.png" alt=
""></
td>
2264 16 80 1.804e+01 2.207e+01 1.798e+01
2265 31 170 9.874e+00 1.322e+01 9.798e+00
2266 61 314 7.452e-01 3.793e+00 4.891e-01
2267 121 634 3.240e-01 1.511e+00 2.616e-01
2268 238 1198 8.585e-02 8.212e-01 1.808e-02
2269 454 2290 4.802e-02 5.178e-01 2.195e-02
2270 898 4378 2.561e-02 2.947e-01 4.318e-03
2271 1720 7864 1.306e-02 1.664e-01 2.978e-03
2272 3271 14638 7.025e-03 9.815e-02 1.075e-03
2273 6217 27214 4.119e-03 6.407e-02 9.975e-04
2277 16 80 1.804e+01 - 2.207e+01 - 1.798e+01 -
2278 36 168 6.125e+00 2.66 9.472e+00 2.09 6.084e+00 2.67
2279 64 288 9.785e-01 6.38 4.260e+00 2.78 7.102e-01 7.47
2280 144 624 2.730e-01 3.15 1.866e+00 2.04 6.115e-02 6.05
2281 256 1088 1.493e-01 2.10 1.046e+00 2.01 2.880e-02 2.62
2282 576 2400 6.965e-02 1.88 4.846e-01 1.90 9.204e-03 2.81
2283 1024 4224 4.018e-02 1.91 2.784e-01 1.93 4.027e-03 2.87
2284 2304 9408 1.831e-02 1.94 1.264e-01 1.95 1.236e-03 2.91
2285 4096 16640 1.043e-02 1.96 7.185e-02 1.96 5.306e-04 2.94
2286 9216 37248 4.690e-03 1.97 3.228e-02 1.97 1.599e-04 2.96
2290 16 160 3.613e-01 - 1.891e+00 - 3.020e-01 -
2291 36 336 6.411e-02 4.26 5.081e-01 3.24 3.238e-02 5.51
2292 64 576 3.480e-02 2.12 2.533e-01 2.42 5.277e-03 6.31
2293 144 1248 8.297e-03 3.54 5.924e-02 3.58 6.330e-04 5.23
2294 256 2176 2.254e-03 4.53 1.636e-02 4.47 1.403e-04 5.24
2295 576 4800 4.558e-04 3.94 3.277e-03 3.96 1.844e-05 5.01
2296 1024 8448 1.471e-04 3.93 1.052e-03 3.95 4.378e-06 5.00
2297 2304 18816 2.956e-05 3.96 2.104e-04 3.97 5.750e-07 5.01
2298 4096 33280 9.428e-06 3.97 6.697e-05 3.98 1.362e-07 5.01
2299 9216 74496 1.876e-06 3.98 1.330e-05 3.99 1.788e-08 5.01
2315variable at
fifth order.
2321 8 144 7.122e+00 1.941e+01 6.102e+00
2322 29 500 3.309e+00 1.023e+01 2.145e+00
2323 113 1792 2.204e+00 1.023e+01 1.912e+00
2324 379 5732 6.085e-01 5.008e+00 2.233e-01
2325 1317 19412 1.543e-01 1.464e+00 4.196e-02
2326 4579 64768 5.058e-02 5.611e-01 9.521e-03
2327 14596 199552 2.129e-02 3.122e-01 4.569e-03
2328 46180 611400 1.033e-02 1.622e-01 1.684e-03
2329144859 1864212 5.007e-03 8.371e-02 7.364e-04
2330451060 5684508 2.518e-03 4.562e-02 3.070e-04
2334 8 144 7.122e+00 - 1.941e+01 - 6.102e+00 -
2335 27 432 5.491e+00 0.64 2.184e+01 -0.29 4.448e+00 0.78
2336 64 960 3.646e+00 1.42 1.299e+01 1.81 3.306e+00 1.03
2337 216 3024 1.595e+00 2.04 8.550e+00 1.03 1.441e+00 2.05
2338 512 6912 6.922e-01 2.90 5.306e+00 1.66 2.511e-01 6.07
2339 1728 22464 2.915e-01 2.13 2.490e+00 1.87 8.588e-02 2.65
2340 4096 52224 1.684e-01 1.91 1.453e+00 1.87 4.055e-02 2.61
2341 13824 172800 7.972e-02 1.84 6.861e-01 1.85 1.335e-02 2.74
2342 32768 405504 4.637e-02 1.88 3.984e-01 1.89 5.932e-03 2.82
2343110592 1354752 2.133e-02 1.92 1.830e-01 1.92 1.851e-03 2.87
2347 8 576 5.670e+00 - 1.868e+01 - 5.462e+00 -
2348 27 1728 1.048e+00 4.16 6.988e+00 2.42 8.011e-01 4.73
2349 64 3840 2.831e-01 4.55 2.710e+00 3.29 1.363e-01 6.16
2350 216 12096 7.883e-02 3.15 7.721e-01 3.10 2.158e-02 4.55
2351 512 27648 3.642e-02 2.68 3.305e-01 2.95 5.231e-03 4.93
2352 1728 89856 8.546e-03 3.58 7.581e-02 3.63 7.640e-04 4.74
2353 4096 208896 2.598e-03 4.14 2.313e-02 4.13 1.783e-04 5.06
2354 13824 691200 5.314e-04 3.91 4.697e-03 3.93 2.355e-05 4.99
2355 32768 1622016 1.723e-04 3.91 1.517e-03 3.93 5.602e-06 4.99
2356110592 5419008 3.482e-05 3.94 3.055e-04 3.95 7.374e-07 5.00
2362<a name=
"step_51-Resultsfor2D"></a><
h4>
Results for 2
D</
h4>
2382<table
align=
"center">
2384 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.2d_plain.png" width=
"400" alt=
""></
td>
2385 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.2dt_plain.png" width=
"400" alt=
""></
td>
2399<table
align=
"center">
2401 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.2d_post.png" width=
"400" alt=
""></
td>
2402 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.2dt_post.png" width=
"400" alt=
""></
td>
2413<table
align=
"center">
2415 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.2d_postb.png" width=
"400" alt=
""></
td>
2416 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.2dt_postb.png" width=
"400" alt=
""></
td>
2429<a name=
"step_51-Resultsfor3D"></a><
h4>
Results for 3
D</
h4>
2447<table
align=
"center">
2449 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.3d_plain.png" width=
"400" alt=
""></
td>
2450 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.3dt_plain.png" width=
"400" alt=
""></
td>
2453 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.3d_post.png" width=
"400" alt=
""></
td>
2454 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.3dt_post.png" width=
"400" alt=
""></
td>
2457 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.3d_postb.png" width=
"400" alt=
""></
td>
2458 <
td><
img src=
"https://www.dealii.org/images/steps/developer/step-51.3dt_postb.png" width=
"400" alt=
""></
td>
2477<a name=
"step_51-Possibilitiesforimprovements"></a><
h3>Possibilities
for improvements</
h3>
2490<table
align=
"center" class=
"doxtable">
2573<a name=
"step_51-PlainProg"></a>
void mmult(FullMatrix< number2 > &C, const FullMatrix< number2 > &B, const bool adding=false) const
static void estimate(const Mapping< dim, spacedim > &mapping, const DoFHandler< dim, spacedim > &dof, const Quadrature< dim - 1 > &quadrature, const std::map< types::boundary_id, const Function< spacedim, Number > * > &neumann_bc, const ReadVector< Number > &solution, Vector< float > &error, const ComponentMask &component_mask={}, const Function< spacedim > *coefficients=nullptr, const unsigned int n_threads=numbers::invalid_unsigned_int, const types::subdomain_id subdomain_id=numbers::invalid_subdomain_id, const types::material_id material_id=numbers::invalid_material_id, const Strategy strategy=cell_diameter_over_24)
Tensor< rank, dim, Number > sum(const Tensor< rank, dim, Number > &local, const MPI_Comm mpi_communicator)
static constexpr unsigned int dimension
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
#define AssertDimension(dim1, dim2)
typename ActiveSelector::active_cell_iterator active_cell_iterator
void loop(IteratorType begin, std_cxx20::type_identity_t< IteratorType > end, DOFINFO &dinfo, INFOBOX &info, const std::function< void(std_cxx20::type_identity_t< DOFINFO > &, typename INFOBOX::CellInfo &)> &cell_worker, const std::function< void(std_cxx20::type_identity_t< DOFINFO > &, typename INFOBOX::CellInfo &)> &boundary_worker, const std::function< void(std_cxx20::type_identity_t< DOFINFO > &, std_cxx20::type_identity_t< DOFINFO > &, typename INFOBOX::CellInfo &, typename INFOBOX::CellInfo &)> &face_worker, AssemblerType &assembler, const LoopControl &lctrl=LoopControl())
void make_hanging_node_constraints(const DoFHandler< dim, spacedim > &dof_handler, AffineConstraints< number > &constraints)
void make_sparsity_pattern(const DoFHandler< dim, spacedim > &dof_handler, SparsityPatternBase &sparsity_pattern, const AffineConstraints< number > &constraints={}, const bool keep_constrained_dofs=true, const types::subdomain_id subdomain_id=numbers::invalid_subdomain_id)
@ 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
@ component_is_part_of_vector
Expression fabs(const Expression &x)
Expression sign(const Expression &x)
void subdivided_hyper_cube(Triangulation< dim, spacedim > &tria, const unsigned int repetitions, const double left=0., const double right=1., const bool colorize=false)
void refine(Triangulation< dim, spacedim > &tria, const Vector< Number > &criteria, const double threshold, const unsigned int max_to_mark=numbers::invalid_unsigned_int)
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.
@ general
No special properties.
constexpr types::blas_int zero
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.)
double norm(const FEValuesBase< dim > &fe, const ArrayView< const std::vector< Tensor< 1, dim > > > &Du)
void L2(Vector< number > &result, const FEValuesBase< dim > &fe, const std::vector< double > &input, const double factor=1.)
SymmetricTensor< 2, dim, Number > C(const Tensor< 2, dim, Number > &F)
Tensor< 2, dim, Number > w(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
SymmetricTensor< 2, dim, Number > e(const Tensor< 2, dim, Number > &F)
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
void apply(const Kokkos::TeamPolicy< MemorySpace::Default::kokkos_space::execution_space >::member_type &team_member, const Kokkos::View< Number *, MemorySpace::Default::kokkos_space > shape_data, const ViewTypeIn in, ViewTypeOut out)
constexpr ReturnType< rank, T >::value_type & extract(T &t, const ArrayType &indices)
VectorType::value_type * end(VectorType &V)
T sum(const T &t, const MPI_Comm mpi_communicator)
std::string int_to_string(const unsigned int value, const unsigned int digits=numbers::invalid_unsigned_int)
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)
void run(const std::vector< std::vector< Iterator > > &colored_iterators, Worker worker, Copier copier, const ScratchData &sample_scratch_data, const CopyData &sample_copy_data, const unsigned int queue_length=2 *MultithreadInfo::n_threads(), const unsigned int chunk_size=8)
void copy(const T *begin, const T *end, U *dest)
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)
void set_dof_values(const DoFCellAccessor< dim, spacedim, lda > &cell, const Vector< number > &local_values, OutputVector &values, const bool perform_check)
::VectorizedArray< Number, width > exp(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > pow(const ::VectorizedArray< Number, width > &, const Number p)
::VectorizedArray< Number, width > abs(const ::VectorizedArray< Number, width > &)
const ::parallel::distributed::Triangulation< dim, spacedim > * triangulation
DEAL_II_HOST constexpr SymmetricTensor< 2, dim, Number > invert(const SymmetricTensor< 2, dim, Number > &)
DEAL_II_HOST constexpr Number trace(const SymmetricTensor< 2, dim2, Number > &)