924 * <a name=
"Equationdata"></a>
945 *
const unsigned int component = 0)
const override;
977 *
const unsigned int component)
const
979 *
const double t = this->
get_time();
985 *
Assert(dim == 2, ExcNotImplemented());
986 *
const double beta = 5;
991 *
(
x -
x0).norm_square() - 2. * (
x[0] -
x0[0]) * t + t * t;
992 *
const double factor =
995 *
std::abs(1. - (gamma - 1.) / gamma * 0.25 * factor * factor));
997 *
const double u = 1. - factor * (
x[1] -
x0[1]);
998 *
const double v = factor * (
x[0] - t -
x0[0]);
1000 *
if (component == 0)
1002 *
else if (component == 1)
1004 *
else if (component == 2)
1009 *
std::exp2(
density_log * (gamma / (gamma - 1.)));
1017 *
if (component == 0)
1019 *
else if (component == 1)
1021 *
else if (component == dim + 1)
1022 *
return 3.097857142857143;
1028 *
Assert(
false, ExcNotImplemented());
1038 * <a name=
"LowstorageexplicitRungeKuttatimeintegrators"></a>
1158 *
unsigned int n_stages()
const
1187 *
template <
typename VectorType,
typename Operator>
1189 *
const double current_time,
1191 *
VectorType & solution,
1193 *
VectorType &
vec_ki)
const
1221 *
std::vector<double>
bi;
1222 *
std::vector<double>
ai;
1223 *
std::vector<double> ci;
1231 * <a name=
"ImplementationofpointwiseoperationsoftheEulerequations"></a>
1250 *
href=
"https://en.wikipedia.org/wiki/Inline_function">
inline</a>
to where
1259 * context in code that comes after the place where the function was called.
1260 * (We note that compilers are generally quite good at figuring out which
1261 * functions to inline by themselves. Here is a place where compilers may or
1262 * may not have figured it out by themselves but where we know for sure that
1263 * inlining is a win.)
1267 * Another trick we apply is a separate variable for the inverse density
1268 * @f$\frac{1}{\rho}@f$. This enables the compiler to only perform a single
1269 * division for the flux, despite the division being used at several
1270 * places. As divisions are around ten to twenty times as expensive as
1271 * multiplications or additions, avoiding redundant divisions is crucial for
1272 * performance. We note that taking the inverse first and later multiplying
1273 * with it is not equivalent to a division in floating point arithmetic due
1274 * to roundoff effects, so the compiler is not allowed to exchange one way by
1275 * the other with standard optimization flags. However, it is also not
1276 * particularly difficult to write the code in the right way.
1280 * To summarize, the chosen strategy of always inlining and careful
1281 * definition of expensive arithmetic operations allows us to write compact
1282 * code without passing all intermediate results around, despite making sure
1283 * that the code maps to excellent machine code.
1286 * template <int dim, typename Number>
1287 * inline DEAL_II_ALWAYS_INLINE
1288 * Tensor<1, dim, Number>
1289 * euler_velocity(const Tensor<1, dim + 2, Number> &conserved_variables)
1291 * const Number inverse_density = Number(1.) / conserved_variables[0];
1293 * Tensor<1, dim, Number> velocity;
1294 * for (unsigned int d = 0; d < dim; ++d)
1295 * velocity[d] = conserved_variables[1 + d] * inverse_density;
1302 * The next function computes the pressure from the vector of conserved
1303 * variables, using the formula @f$p = (\gamma - 1) \left(E - \frac 12 \rho
1304 * \mathbf{u}\cdot \mathbf{u}\right)@f$. As explained above, we use the
1305 * velocity from the `euler_velocity()` function. Note that we need to
1306 * specify the first template argument `dim` here because the compiler is
1307 * not able to deduce it from the arguments of the tensor, whereas the
1308 * second argument (number type) can be automatically deduced.
1311 * template <int dim, typename Number>
1312 * inline DEAL_II_ALWAYS_INLINE
1314 * euler_pressure(const Tensor<1, dim + 2, Number> &conserved_variables)
1316 * const Tensor<1, dim, Number> velocity =
1317 * euler_velocity<dim>(conserved_variables);
1319 * Number rho_u_dot_u = conserved_variables[1] * velocity[0];
1320 * for (unsigned int d = 1; d < dim; ++d)
1321 * rho_u_dot_u += conserved_variables[1 + d] * velocity[d];
1323 * return (gamma - 1.) * (conserved_variables[dim + 1] - 0.5 * rho_u_dot_u);
1328 * Here is the definition of the Euler flux function, i.e., the definition
1329 * of the actual equation. Given the velocity and pressure (that the
1330 * compiler optimization will make sure are done only once), this is
1331 * straight-forward given the equation stated in the introduction.
1334 * template <int dim, typename Number>
1335 * inline DEAL_II_ALWAYS_INLINE
1336 * Tensor<1, dim + 2, Tensor<1, dim, Number>>
1337 * euler_flux(const Tensor<1, dim + 2, Number> &conserved_variables)
1339 * const Tensor<1, dim, Number> velocity =
1340 * euler_velocity<dim>(conserved_variables);
1341 * const Number pressure = euler_pressure<dim>(conserved_variables);
1343 * Tensor<1, dim + 2, Tensor<1, dim, Number>> flux;
1344 * for (unsigned int d = 0; d < dim; ++d)
1346 * flux[0][d] = conserved_variables[1 + d];
1347 * for (unsigned int e = 0; e < dim; ++e)
1348 * flux[e + 1][d] = conserved_variables[e + 1] * velocity[d];
1349 * flux[d + 1][d] += pressure;
1350 * flux[dim + 1][d] =
1351 * velocity[d] * (conserved_variables[dim + 1] + pressure);
1359 * This next function is a helper to simplify the implementation of the
1360 * numerical flux, implementing the action of a tensor of tensors (with
1361 * non-standard outer dimension of size `dim + 2`, so the standard overloads
1373 *
for (
unsigned int d = 0;
d < n_components; ++
d)
1374 *
result[d] = matrix[d] * vector;
1434 *
DG schemes in
that case.
1458 * at a neighbor cell.
1461 *
template <
int dim,
typename Number>
1488 *
0.5 * lambda * (
u_m -
u_p);
1498 *
const Number
s_pos =
1500 *
const Number
s_neg =
1530 *
template <
int dim,
typename Number>
1534 *
const unsigned int component)
1540 *
for (
unsigned int d = 0;
d < dim; ++
d)
1542 *
result[v] = function.value(p, component);
1548 *
template <
int dim,
typename Number,
int n_components = dim + 2>
1558 *
for (
unsigned int d = 0;
d < dim; ++
d)
1560 *
for (
unsigned int d = 0;
d < n_components; ++
d)
1561 *
result[d][v] = function.value(p, d);
1571 * <a name=
"TheEulerOperationclass"></a>
1601 *
template <
int dim,
int degree,
int n_po
ints_1d>
1623 *
void apply(
const double current_time,
1654 *
std::map<types::boundary_id, std::unique_ptr<Function<dim>>>
1656 *
std::map<types::boundary_id, std::unique_ptr<Function<dim>>>
1665 *
const std::pair<unsigned int, unsigned int> &
cell_range)
const;
1667 *
void local_apply_cell(
1671 *
const std::pair<unsigned int, unsigned int> &
cell_range)
const;
1677 *
const std::pair<unsigned int, unsigned int> &
face_range)
const;
1683 *
const std::pair<unsigned int, unsigned int> &
face_range)
const;
1688 *
template <
int dim,
int degree,
int n_po
ints_1d>
1722 *
const std::vector<const DoFHandler<dim> *> dof_handlers = {&dof_handler};
1724 *
const std::vector<const AffineConstraints<double> *> constraints = {&
dummy};
1729 *
additional_data.mapping_update_flags =
1732 *
additional_data.mapping_update_flags_inner_faces =
1735 *
additional_data.mapping_update_flags_boundary_faces =
1738 *
additional_data.tasks_parallel_scheme =
1742 *
mapping, dof_handlers, constraints,
quadratures, additional_data);
1747 *
template <
int dim,
int degree,
int n_po
ints_1d>
1751 *
data.initialize_dof_vector(vector);
1783 *
template <
int dim,
int degree,
int n_po
ints_1d>
1791 *
ExcMessage(
"You already set the boundary with id " +
1792 *
std::to_string(
static_cast<int>(boundary_id)) +
1793 *
" to another type of boundary before now setting " +
1796 *
ExcMessage(
"Expected function with dim+2 components"));
1802 *
template <
int dim,
int degree,
int n_po
ints_1d>
1810 *
ExcMessage(
"You already set the boundary with id " +
1811 *
std::to_string(
static_cast<int>(boundary_id)) +
1812 *
" to another type of boundary before now setting " +
1813 *
"it as subsonic outflow"));
1815 *
ExcMessage(
"Expected function with dim+2 components"));
1821 *
template <
int dim,
int degree,
int n_po
ints_1d>
1829 *
ExcMessage(
"You already set the boundary with id " +
1830 *
std::to_string(
static_cast<int>(boundary_id)) +
1831 *
" to another type of boundary before now setting " +
1832 *
"it as wall boundary"));
1838 *
template <
int dim,
int degree,
int n_po
ints_1d>
1852 * <a name=
"Localevaluators"></a>
1863 * affine element shapes),
we now
set the number quadrature points
as a
1911 * quadrature point
data.
1966 *
for (
unsigned int q = 0;
q <
phi.n_q_points; ++
q)
1968 *
const auto w_q =
phi.get_value(
q);
1978 *
for (
unsigned int d = 0;
d < dim; ++
d)
1980 *
for (
unsigned int d = 0;
d < dim; ++
d)
2048 *
const std::pair<unsigned int, unsigned int> &
face_range)
const
2063 *
for (
unsigned int q = 0;
q <
phi_m.n_q_points; ++
q)
2068 *
phi_m.normal_vector(
q));
2101 * direction
of the normal vector.
2143 *
template <
int dim,
int degree,
int n_po
ints_1d>
2148 *
const std::pair<unsigned int, unsigned int> &
face_range)
const
2157 *
for (
unsigned int q = 0;
q <
phi.n_q_points; ++
q)
2159 *
const auto w_m =
phi.get_value(
q);
2160 *
const auto normal =
phi.normal_vector(
q);
2163 *
for (
unsigned int d = 1;
d < dim; ++
d)
2173 *
for (
unsigned int d = 0;
d < dim; ++
d)
2175 *
w_p[dim + 1] =
w_m[dim + 1];
2181 *
phi.quadrature_point(
q));
2188 *
phi.quadrature_point(
q),
2195 *
"you set a boundary condition for "
2196 *
"this part of the domain boundary?"));
2204 *
for (
unsigned int d = 0;
d < dim; ++
d)
2205 *
flux[d + 1][v] = 0.;
2251 *
template <
int dim,
int degree,
int n_po
ints_1d>
2256 *
const std::pair<unsigned int, unsigned int> &
cell_range)
const
2265 *
phi.read_dof_values(src);
2267 *
inverse.apply(
phi.begin_dof_values(),
phi.begin_dof_values());
2269 *
phi.set_dof_values(dst);
2278 * <a name=
"Theapplyandrelatedfunctions"></a>
2323 *
const double current_time,
2331 *
i.
second->set_time(current_time);
2333 *
i.
second->set_time(current_time);
2335 *
data.loop(&EulerOperator::local_apply_cell,
2407 *
const Number current_time,
2419 *
i.
second->set_time(current_time);
2421 *
i.
second->set_time(current_time);
2423 *
data.loop(&EulerOperator::local_apply_cell,
2442 *
std::function<
void(
const unsigned int,
const unsigned int)>(),
2446 *
if (
ai == Number())
2451 *
const Number
k_i =
next_ri.local_element(i);
2452 *
const Number
sol_i = solution.local_element(i);
2453 *
solution.local_element(i) =
sol_i +
bi *
k_i;
2461 *
const Number
k_i =
next_ri.local_element(i);
2462 *
const Number
sol_i = solution.local_element(i);
2463 *
solution.local_element(i) =
sol_i +
bi *
k_i;
2506 *
\left(J^K\right)^{-1} S^{-1} S J^
K
2531 *
solution.zero_out_ghost_values();
2535 *
for (
unsigned int q = 0;
q <
phi.n_q_points; ++
q)
2537 *
phi.quadrature_point(
q)),
2539 *
inverse.transform_from_q_points_to_basis(dim + 2,
2540 *
phi.begin_dof_values(),
2541 *
phi.begin_dof_values());
2542 *
phi.set_dof_values(solution);
2584 *
for (
unsigned int cell = 0; cell < data.n_cell_batches(); ++cell)
2589 *
for (
unsigned int q = 0;
q <
phi.n_q_points; ++
q)
2591 *
const auto error =
2594 *
const auto JxW =
phi.JxW(
q);
2597 *
for (
unsigned int d = 0;
d < dim; ++
d)
2601 *
for (
unsigned int v = 0; v < data.n_active_entries_per_cell_batch(cell);
2603 *
for (
unsigned int d = 0;
d < 3; ++
d)
2609 *
std::array<double, 3>
errors;
2610 *
for (
unsigned int d = 0;
d < 3; ++
d)
2666 *
template <
int dim,
int degree,
int n_po
ints_1d>
2674 *
for (
unsigned int cell = 0; cell <
data.n_cell_batches(); ++cell)
2679 *
for (
unsigned int q = 0;
q <
phi.n_q_points; ++
q)
2681 *
const auto solution =
phi.get_value(
q);
2685 *
const auto inverse_jacobian =
phi.inverse_jacobian(
q);
2688 *
for (
unsigned int d = 0;
d < dim; ++
d)
2696 *
for (
unsigned int d = 0;
d < dim; ++
d)
2698 *
for (
unsigned int i = 0; i < 5; ++i)
2703 *
for (
unsigned int d = 0;
d < dim; ++
d)
2709 *
const auto max_eigenvalue =
std::sqrt(
2722 *
for (
unsigned int v = 0; v <
data.n_active_entries_per_cell_batch(cell);
2724 *
for (
unsigned int d = 0;
d < 3; ++
d)
2738 * <a name=
"TheEulerProblemclass"></a>
2808 *
virtual void evaluate_vector_field(
2812 *
virtual std::vector<std::string> get_names()
const override;
2814 *
virtual std::vector<
2816 *
get_data_component_interpretation()
const override;
2818 *
virtual UpdateFlags get_needed_update_flags()
const override;
2827 *
template <
int dim>
2848 *
template <
int dim>
2857 *
ExcInternalError());
2860 *
ExcInternalError());
2864 *
ExcInternalError());
2869 *
for (
unsigned int d = 0;
d < dim + 2; ++
d)
2870 *
solution[d] =
inputs.solution_values[p](d);
2872 *
const double density = solution[0];
2876 *
for (
unsigned int d = 0;
d < dim; ++
d)
2883 *
inputs.solution_gradients[p][0] *
inputs.solution_gradients[p][0];
2889 *
template <
int dim>
2892 *
std::vector<std::string> names;
2893 *
for (
unsigned int d = 0;
d < dim; ++
d)
2894 *
names.emplace_back(
"velocity");
2895 *
names.emplace_back(
"pressure");
2896 *
names.emplace_back(
"speed_of_sound");
2899 *
names.emplace_back(
"schlieren_plot");
2913 *
template <
int dim>
2914 *
std::vector<DataComponentInterpretation::DataComponentInterpretation>
2917 *
std::vector<DataComponentInterpretation::DataComponentInterpretation>
2919 *
for (
unsigned int d = 0;
d < dim; ++
d)
2941 *
template <
int dim>
2963 *
:
pcout(std::cout, Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
2967 *
, fe(FE_DGQ<dim>(fe_degree), dim + 2)
2968 *
, mapping(fe_degree)
2969 *
, dof_handler(triangulation)
2970 *
, timer(pcout, TimerOutput::never, TimerOutput::wall_times)
3000 *
template <
int dim>
3008 *
for (
unsigned int d = 1;
d < dim; ++
d)
3013 *
for (
unsigned int d = 1;
d < dim; ++
d)
3043 *
std::vector<double>({0., 0., -0.2})));
3049 *
Assert(
false, ExcNotImplemented());
3054 *
dof_handler.distribute_dofs(fe);
3069 *
std::locale s =
pcout.get_stream().getloc();
3070 *
pcout.get_stream().imbue(std::locale(
""));
3071 *
pcout <<
"Number of degrees of freedom: " << dof_handler.n_dofs()
3072 *
<<
" ( = " << (dim + 2) <<
" [vars] x "
3076 *
pcout.get_stream().imbue(s);
3104 * tutorial programs. A particularly nice feature of the
3105 * `write_vtu_in_parallel()` function is the fact that it can combine output
3106 * from all MPI ranks into a single file, making it unnecessary to have a
3107 * central record of all such files (namely, the "pvtu" file).
3111 * For parallel programs, it is often instructive to look at the partitioning
3112 * of cells among processors. To this end, one can pass a vector of numbers
3113 * to DataOut::add_data_vector() that contains as many entries as the
3114 * current processor has active cells; these numbers should then be the
3115 * rank of the processor that owns each of these cells. Such a vector
3116 * could, for example, be obtained from
3117 * GridTools::get_subdomain_association(). On the other hand, on each MPI
3118 * process, DataOut will only read those entries that correspond to locally
3119 * owned cells, and these of course all have the same value: namely, the rank
3120 * of the current process. What is in the remaining entries of the vector
3139 *
template <
int dim>
3142 *
const std::array<double, 3>
errors =
3146 *
pcout <<
"Time:" << std::setw(8) << std::setprecision(3) << time
3147 *
<<
", dt: " << std::setw(8) << std::setprecision(2) <<
time_step
3148 *
<<
", " <<
quantity_name <<
" rho: " << std::setprecision(4)
3149 *
<< std::setw(10) <<
errors[0] <<
", rho * u: " << std::setprecision(4)
3150 *
<< std::setw(10) <<
errors[1] <<
", energy:" << std::setprecision(4)
3151 *
<< std::setw(10) <<
errors[2] << std::endl;
3160 *
flags.write_higher_order_cells =
true;
3161 *
data_out.set_flags(flags);
3163 *
data_out.attach_dof_handler(dof_handler);
3165 *
std::vector<std::string> names;
3166 *
names.emplace_back(
"density");
3167 *
for (
unsigned int d = 0;
d < dim; ++
d)
3168 *
names.emplace_back(
"momentum");
3169 *
names.emplace_back(
"energy");
3171 *
std::vector<DataComponentInterpretation::DataComponentInterpretation>
3175 *
for (
unsigned int d = 0;
d < dim; ++
d)
3181 *
data_out.add_data_vector(dof_handler, solution, names,
interpretation);
3183 *
data_out.add_data_vector(solution, postprocessor);
3188 *
reference.
reinit(solution);
3190 *
reference.sadd(-1., 1, solution);
3191 *
std::vector<std::string> names;
3192 *
names.emplace_back(
"error_density");
3193 *
for (
unsigned int d = 0;
d < dim; ++
d)
3194 *
names.emplace_back(
"error_momentum");
3195 *
names.emplace_back(
"error_energy");
3197 *
std::vector<DataComponentInterpretation::DataComponentInterpretation>
3201 *
for (
unsigned int d = 0;
d < dim; ++
d)
3207 *
data_out.add_data_vector(dof_handler,
3215 *
data_out.add_data_vector(
mpi_owner,
"owner");
3217 *
data_out.build_patches(mapping,
3246 *
template <
int dim>
3253 *
pcout <<
"Running with "
3255 *
<<
" MPI processes" << std::endl;
3257 *
<< (std::is_same<Number, double>::value ?
"doubles" :
"floats")
3275 *
for (
const auto &cell :
triangulation.active_cell_iterators())
3276 *
if (cell->is_locally_owned())
3286 *
<<
", initial transport scaling: "
3314 *
while (time < final_time - 1e-12)
3337 *
time >= final_time - 1e-12)
3339 *
static_cast<unsigned int>(std::round(time /
output_tick)));
3343 *
pcout << std::endl;
3362 *
using namespace dealii;
3373 *
catch (std::exception &exc)
3375 *
std::cerr << std::endl
3377 *
<<
"----------------------------------------------------"
3379 *
std::cerr <<
"Exception on processing: " << std::endl
3380 *
<< exc.what() << std::endl
3381 *
<<
"Aborting!" << std::endl
3382 *
<<
"----------------------------------------------------"
3389 *
std::cerr << std::endl
3391 *
<<
"----------------------------------------------------"
3393 *
std::cerr <<
"Unknown exception!" << std::endl
3394 *
<<
"Aborting!" << std::endl
3395 *
<<
"----------------------------------------------------"
3406<a name=
"Programoutput"></a><
h3>
Program output</
h3>
3414Number
of degrees
of freedom: 147,456 ( = 4 [vars]
x 1,024 [cells]
x 36 [dofs/cell/
var] )
3429+-------------------------------------------+------------------+------------+------------------+
3433+-------------------------------------------+------------------+------------+------------------+
3434| compute
errors | 11 | 0.008066s 13 | 0.00952s | 0.01041s 20 |
3435| compute
transport speed | 258 | 0.01012s 13 | 0.05392s | 0.08574s 25 |
3436| output | 11 | 0.9597s 13 | 0.9613s | 0.9623s 6 |
3440+-------------------------------------------+------------------+------------+------------------+
3478+-------------------------------------------+------------------+------------+------------------+
3482+-------------------------------------------+------------------+------------+------------------+
3483| compute
errors | 11 | 0.4239s 12 | 0.4318s | 0.4408s 9 |
3484| compute
transport speed | 2053 | 3.962s 12 | 6.727s | 10.12s 7 |
3485| output | 11 | 30.35s 12 | 30.36s | 30.37s 9 |
3489+-------------------------------------------+------------------+------------+------------------+
3663<table
align=
"center" class=
"doxtable">
3811 constexpr unsigned int testcase = 1;
3889Number
of degrees
of freedom: 3,686,400 ( = 4 [vars]
x 25,600 [cells]
x 36 [dofs/cell/
var] )
3892Time: 0,
dt: 7.4e-05, norm
rho: 4.17e-16,
rho *
u: 1.629e-16, energy: 1.381e-15
3893Time: 0.05,
dt: 6.3e-05, norm
rho: 0.02075,
rho *
u: 0.03801, energy: 0.08772
3894Time: 0.1,
dt: 5.9e-05, norm
rho: 0.02211,
rho *
u: 0.04515, energy: 0.08953
3895Time: 0.15,
dt: 5.7e-05, norm
rho: 0.02261,
rho *
u: 0.04592, energy: 0.08967
3896Time: 0.2,
dt: 5.8e-05, norm
rho: 0.02058,
rho *
u: 0.04361, energy: 0.08222
3897Time: 0.25,
dt: 5.9e-05, norm
rho: 0.01695,
rho *
u: 0.04203, energy: 0.06873
3898Time: 0.3,
dt: 5.9e-05, norm
rho: 0.01653,
rho *
u: 0.0401, energy: 0.06604
3899Time: 0.35,
dt: 5.7e-05, norm
rho: 0.01774,
rho *
u: 0.04264, energy: 0.0706
3903Time: 1.95,
dt: 5.8e-05, norm
rho: 0.01488,
rho *
u: 0.03923, energy: 0.05185
3904Time: 2,
dt: 5.7e-05, norm
rho: 0.01432,
rho *
u: 0.03969, energy: 0.04889
3906+-------------------------------------------+------------------+------------+------------------+
3909| Section |
no.
calls | min time rank | avg time | max time rank |
3910+-------------------------------------------+------------------+------------+------------------+
3911| compute
errors | 41 | 0.01112s 35 | 0.0672s | 0.1337s 0 |
3912| compute
transport speed | 6914 | 5.422s 35 | 15.96s | 29.99s 1 |
3913| output | 41 | 37.24s 35 | 37.3s | 37.37s 0 |
3917+-------------------------------------------+------------------+------------+------------------+
3933Number
of degrees
of freedom: 14,745,600 ( = 4 [vars]
x 102,400 [cells]
x 36 [dofs/cell/
var] )
3937+-------------------------------------------+------------------+------------+------------------+
3940| Section |
no.
calls | min time rank | avg time | max time rank |
3941+-------------------------------------------+------------------+------------+------------------+
3942| compute
errors | 41 | 0.04537s 32 | 0.173s | 0.3489s 0 |
3943| compute
transport speed | 13858 | 40.75s 32 | 85.99s | 149.8s 0 |
3944| output | 41 | 153.8s 32 | 153.9s | 154.1s 0 |
3948+-------------------------------------------+------------------+------------+------------------+
3985Number
of degrees
of freedom: 58,982,400 ( = 4 [vars]
x 409,600 [cells]
x 36 [dofs/cell/
var] )
3989Time: 1.95,
dt: 1.4e-05, norm
rho: 0.01488,
rho *
u: 0.03923, energy: 0.05183
3990Time: 2,
dt: 1.4e-05, norm
rho: 0.01431,
rho *
u: 0.03969, energy: 0.04887
3992+-------------------------------------------+------------------+------------+------------------+
3995| Section |
no.
calls | min time rank | avg time | max time rank |
3996+-------------------------------------------+------------------+------------+------------------+
3997| compute
errors | 41 | 0.1758s 30 | 0.672s | 1.376s 1 |
3998| compute
transport speed | 27748 | 321.3s 34 | 678.8s | 1202s 1 |
3999| output | 41 | 616.3s 32 | 616.4s | 616.4s 34 |
4000|
rk time
stepping total | 138733 | 1.983e+04s 1 | 2.036e+04s | 2.072e+04s 34 |
4003+-------------------------------------------+------------------+------------+------------------+
4020Number
of degrees
of freedom: 221,184,000 ( = 5 [vars]
x 204,800 [cells]
x 216 [dofs/cell/
var] )
4024Time: 1.95,
dt: 0.00011, norm
rho: 0.01131,
rho *
u: 0.03056, energy: 0.04091
4025Time: 2,
dt: 0.00011, norm
rho: 0.0119,
rho *
u: 0.03142, energy: 0.04425
4027+-------------------------------------------+------------------+------------+------------------+
4030| Section |
no.
calls | min time rank | avg time | max time rank |
4031+-------------------------------------------+------------------+------------+------------------+
4032| compute
errors | 41 | 0.6551s 34 | 3.216s | 7.281s 0 |
4034| output | 41 | 1350s 34 | 1353s | 1357s 0 |
4035|
rk time
stepping total | 17723 | 1.519e+04s 0 | 1.558e+04s | 1.582e+04s 34 |
4038+-------------------------------------------+------------------+------------+------------------+
4067Number
of degrees
of freedom: 1,769,472,000 ( = 5 [vars]
x 1,638,400 [cells]
x 216 [dofs/cell/
var] )
4074+-------------------------------------------+------------------+------------+------------------+
4078+-------------------------------------------+------------------+------------+------------------+
4079| compute
errors | 41 | 2.632s 178 | 7.221s | 16.56s 0 |
4081| output | 41 | 8065s 176 | 8070s | 8079s 0 |
4082|
rk time
stepping total | 35350 | 4.25e+04s 0 | 4.43e+04s | 4.515e+04s 193 |
4085+-------------------------------------------+------------------+------------+------------------+
4218href=
"https://en.wikipedia.org/wiki/Perfectly_matched_layer">
perfectly
4251<a name=
"PlainProg"></a>
value_type * data() const noexcept
void reinit(value_type *starting_element, const std::size_t n_elements)
void write_vtu_in_parallel(const std::string &filename, const MPI_Comm comm) const
void add_data_vector(const VectorType &data, const std::vector< std::string > &names, const DataVectorType type=type_automatic, const std::vector< DataComponentInterpretation::DataComponentInterpretation > &data_component_interpretation={})
void set_dof_values(VectorType &dst, const unsigned int first_index=0, const std::bitset< VectorizedArrayType::size()> &mask=std::bitset< VectorizedArrayType::size()>().flip()) const
value_type get_value(const unsigned int q_point) const
const ShapeInfoType * data
Tensor< 2, dim, VectorizedArrayType > inverse_jacobian(const unsigned int q_point) const
const unsigned int n_q_points
void gather_evaluate(const VectorType &input_vector, const EvaluationFlags::EvaluationFlags evaluation_flag)
void evaluate(const EvaluationFlags::EvaluationFlags evaluation_flag)
unsigned int depth_console(const unsigned int n)
Abstract base class for mapping classes.
void transform_from_q_points_to_basis(const unsigned int n_actual_components, const VectorizedArrayType *in_array, VectorizedArrayType *out_array) const
void loop(const std::function< void(const MatrixFree< dim, Number, VectorizedArrayType > &, OutVector &, const InVector &, const std::pair< unsigned int, unsigned int > &)> &cell_operation, const std::function< void(const MatrixFree< dim, Number, VectorizedArrayType > &, OutVector &, const InVector &, const std::pair< unsigned int, unsigned int > &)> &face_operation, const std::function< void(const MatrixFree< dim, Number, VectorizedArrayType > &, OutVector &, const InVector &, const std::pair< unsigned int, unsigned int > &)> &boundary_operation, OutVector &dst, const InVector &src, const bool zero_dst_vector=false, const DataAccessOnFaces dst_vector_face_access=DataAccessOnFaces::unspecified, const DataAccessOnFaces src_vector_face_access=DataAccessOnFaces::unspecified) const
unsigned int n_active_entries_per_cell_batch(const unsigned int cell_batch_index) const
void cell_loop(const std::function< void(const MatrixFree< dim, Number, VectorizedArrayType > &, OutVector &, const InVector &, const std::pair< unsigned int, unsigned int > &)> &cell_operation, OutVector &dst, const InVector &src, const bool zero_dst_vector=false) const
void print_wall_time_statistics(const MPI_Comm mpi_comm, const double print_quantile=0.) const
static constexpr std::size_t size()
#define DEAL_II_ALWAYS_INLINE
#define DEAL_II_OPENMP_SIMD_PRAGMA
#define DEAL_II_WITH_P4EST
__global__ void set(Number *val, const Number s, const size_type N)
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
void loop(ITERATOR begin, std_cxx20::type_identity_t< ITERATOR > end, DOFINFO &dinfo, INFOBOX &info, const std::function< void(DOFINFO &, typename INFOBOX::CellInfo &)> &cell_worker, const std::function< void(DOFINFO &, typename INFOBOX::CellInfo &)> &boundary_worker, const std::function< void(DOFINFO &, DOFINFO &, typename INFOBOX::CellInfo &, typename INFOBOX::CellInfo &)> &face_worker, ASSEMBLER &assembler, const LoopControl &lctrl=LoopControl())
@ 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.
CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt K
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)
DataComponentInterpretation
@ component_is_part_of_vector
void approximate(SynchronousIterators< std::tuple< typename DoFHandler< dim, spacedim >::active_cell_iterator, Vector< float >::iterator > > const &cell, const Mapping< dim, spacedim > &mapping, const DoFHandler< dim, spacedim > &dof_handler, const InputVector &solution, const unsigned int component)
The namespace for the EvaluationFlags enum.
void hyper_rectangle(Triangulation< dim, spacedim > &tria, const Point< dim > &p1, const Point< dim > &p2, const bool colorize=false)
void cylinder(Triangulation< dim > &tria, const double radius=1., const double half_length=1.)
void channel_with_cylinder(Triangulation< dim > &tria, const double shell_region_width=0.03, const unsigned int n_shells=2, const double skewness=2.0, const bool colorize=false)
@ valid
Iterator points to a valid object.
@ matrix
Contents is actually a matrix.
@ symmetric
Matrix is symmetric.
@ diagonal
Matrix is diagonal.
@ general
No special properties.
double norm(const FEValuesBase< dim > &fe, const ArrayView< const std::vector< Tensor< 1, dim > > > &Du)
Point< spacedim > point(const gp_Pnt &p, const double tolerance=1e-10)
SymmetricTensor< 2, dim, Number > E(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)
Tensor< 2, dim, Number > F(const Tensor< 2, dim, Number > &Grad_u)
void call(const std::function< RT()> &function, internal::return_value< RT > &ret_val)
@ LOW_STORAGE_RK_STAGE9_ORDER5
@ LOW_STORAGE_RK_STAGE3_ORDER3
@ LOW_STORAGE_RK_STAGE7_ORDER4
@ LOW_STORAGE_RK_STAGE5_ORDER4
VectorType::value_type * end(VectorType &V)
VectorType::value_type * begin(VectorType &V)
T sum(const T &t, const MPI_Comm mpi_communicator)
unsigned int n_mpi_processes(const MPI_Comm mpi_communicator)
T max(const T &t, const MPI_Comm mpi_communicator)
T min(const T &t, const MPI_Comm mpi_communicator)
unsigned int this_mpi_process(const MPI_Comm mpi_communicator)
const std::string get_current_vectorization_level()
constexpr T pow(const T base, const int iexp)
Number truncate_to_n_digits(const Number number, const unsigned int n_digits)
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)
bool check(const ConstraintKinds kind_in, const unsigned int dim)
long double gamma(const unsigned int n)
DEAL_II_HOST constexpr TableIndices< 2 > merge(const TableIndices< 2 > &previous_indices, const unsigned int new_index, const unsigned int position)
unsigned int n_cells(const internal::TriangulationImplementation::NumberCache< 1 > &c)
int(&) functions(const void *v1, const void *v2)
static constexpr double PI
::VectorizedArray< Number, width > exp(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > min(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > max(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > sqrt(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 Number determinant(const SymmetricTensor< 2, dim, Number > &)
std::array< Number, 1 > eigenvalues(const SymmetricTensor< 2, 1, Number > &T)
const TriangulationDescription::Settings settings