/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/discretization/FV/assembler/KurganovTadmor.hh Source File#
|
DiFfRG
Discretization Framework for functional Renormalization Group flows
|
KurganovTadmor.hh
Go to the documentation of this file.
76 : cell_dof_indices(n_components), ncell_dof_indices(n_components), solution_values(quadrature.size()),
94 std::array<std::vector<ReconstructionDerivativeData<dim, NumberType, n_components>>, 2> diffusion_derivatives;
278 template <typename WaveSpeedStrategy, typename Model, typename NumberType, int dim, size_t n_components,
281 const std::array<NumberType, n_components> &u_plus, const std::array<NumberType, n_components> &u_minus,
312 model.flux(F_AD_plus, x_q, flux_tie(u_plus_AD, grad_u_plus_AD, extractors, variables, cell_width_plus));
313 model.flux(F_AD_minus, x_q, flux_tie(u_minus_AD, grad_u_minus_AD, extractors, variables, cell_width_minus));
339 const auto a = per_block<n_components, std::array<NumberType, dim>>(blocks, [&](const int block) {
361 template <typename WaveSpeedStrategy, typename Model, typename NumberType, int dim, size_t n_components,
364 const std::array<NumberType, n_components> &u_plus, const std::array<NumberType, n_components> &u_minus,
369 return compute_kt_flux_and_speeds<WaveSpeedStrategy>(u_plus, u_minus, zero_grad, zero_grad, x_q,
376 compute_numerical_flux(const std::array<dealii::Tensor<1, dim, NumberType>, n_components> &F_plus,
398 template <typename WaveSpeedStrategy, typename Model, typename NumberType, int dim, size_t n_components,
401 const std::array<NumberType, n_components> &u_plus, const std::array<NumberType, n_components> &u_minus,
407 // 1. Compute the physical flux, its value/gradient Jacobians, and the second derivatives needed for da.
420 const auto a = per_block<n_components, std::array<NumberType, dim>>(blocks, [&](const int block) {
430 return WaveSpeedStrategy::template compute_selected_speed_derivatives<NumberType, dim, n_components>(
448 j_numflux.u[0](i, c)[d] = NumberType(0.5) * minus.J[d][i][c] + NumberType(0.5) * a[i][d] * delta_ic -
452 j_numflux.u[1](i, c)[d] = NumberType(0.5) * plus.J[d][i][c] - NumberType(0.5) * a[i][d] * delta_ic -
486 template <typename Model, typename NumberType, int dim, size_t n_components, typename ExtractorArray,
489 const std::array<NumberType, n_components> &u_minus, const std::array<NumberType, n_components> &u_plus,
505 diffusion_flux_tie(u_plus, grad_u_plus, third_derivatives_plus, extractors, variables, cell_width_plus));
513 std::array<SimpleMatrix<dealii::Tensor<1, dim, dealii::Tensor<1, dim, NumberType>>, n_components>, 2> grad{};
518 template <typename Model, typename NumberType, int dim, size_t n_components, typename ExtractorArray,
521 const std::array<NumberType, n_components> &u_minus, const std::array<NumberType, n_components> &u_plus,
647 // Placeholder for the "extractors" slot of e_tie() when the extractors are being computed and so cannot
693 static_assert(Reconstructor::dim == dim, "Reconstructor dimension must match the discretization dimension.");
738 diagnose_flux_conditioning(config.get_bool("/discretization/diagnose_flux_conditioning", false))
750 reinit_la_vector(vec, discretization.get_locally_owned_dofs(), discretization.get_communicator());
755 reinit_la_matrix(matrix, get_sparsity_pattern_jacobian(), discretization.get_locally_owned_dofs(),
759 virtual MPI_Comm get_communicator() const override { return discretization.get_communicator(); }
763 view.reinit(discretization.get_locally_owned_dofs(), discretization.get_locally_relevant_dofs(),
775 virtual void attach_data_output(OutputFrame<dim, VectorType> &data_out, const VectorType &solution,
799 const auto metadata = DiFfRG::internal::build_affine_constraint_metadata<Components, dim>(discretization);
811 DoFTools::make_sparsity_pattern(dof_handler, dsp, constraints, /*keep_constrained_dofs = */ true);
812 finalize_la_sparsity<SparseMatrixType>(dsp, sparsity_pattern_mass, discretization.get_locally_owned_dofs(),
849 virtual const get_type::SparsityPattern<SparseMatrixType> &get_sparsity_pattern_jacobian() const override
886 [&](const auto &p, const auto &values) { return model.raw_potential_gradient(p, values); }, EoM_config,
949 std::pair<Point, Iterator> resolve_extractor_point(const Point &EoM_point, const Iterator &EoM_cell_,
973 ReadoutSolution reconstruct_readout_solution(const Iterator &cell, const VectorType &solution_global,
989 // with s measured from the cell centre and u(s) = u_C + a s + b s^2 through (dx_1, u_1), (0, u_C),
991 // one-sided slopes of compute_gradient. Being a quadratic fit, u'' is constant over the cell, so
994 // Deliberately UNLIMITED: the limiter exists to keep the reconstructed *slope* monotone for the
995 // scheme, and applying it to a curvature would bias it toward zero exactly where the potential is
999 // Only the diagonal d^2/dx_d^2 entries are filled: the 2*dim stencil has no corner neighbours, so
1043 [&](const auto &p, const auto &values) { return model.raw_potential_gradient(p, values); }, EoM_config,
1049 void extract(std::array<NumberType, Components::count_extractors()> &data, const VectorType &solution_global,
1058 [&](const auto &p, const auto &values) { return postprocess ? model.EoM_postprocess(p, values) : p; },
1069 auto solution = reconstruct_readout_solution(cell, solution_global, x, /*with_hessians=*/true);
1077 virtual void mass(VectorType &mass, const VectorType &solution_global, const VectorType &solution_global_dot,
1086 const auto cell_worker = [&](const Iterator &cell, Scratch &scratch_data, CopyData ©_data) {
1103 weight * cell_geometry.jxw[q_index] * mass_values[component_i]; // +phi_i(x_q) * mass(x_q, u_q)
1117 MeshWorker::mesh_loop(locally_owned_cells(dof_handler), cell_worker, copier, scratch_data, copy_data, flags,
1131 using FaceReconstructionState = internal::FaceReconstructionState<dim, NumberType, n_components>;
1132 using SolutionReconstructionCache = internal::SolutionReconstructionCache<dim, NumberType, n_components>;
1133 template <typename NT> using CellStencilDataT = internal::CellStencilData<dim, NT, n_components>;
1153 FaceRange(dof_handler.begin_active(), dof_handler.end(), cache, AssemblyFaceGeometryProvider{}),
1186 static void fill_cell_stencil(const Iterator &cell, const VectorType &solution_global, const Model &model,
1210 ExcMessage("KT boundary stencil was rejected while populating a boundary-adjacent cell stencil."));
1214 stencil.neighbors.dof_indices[face_index] = boundary_stencil.dof_indices[boundary_stencil.ghost_center];
1289 void fill_cell_data_from_topology(const CellGeometryDofs &topology, const VectorType &solution_global,
1292 internal::fill_cell_data_from_topology<dim, NumberType, n_components>(topology, solution_global, data);
1297 build_boundary_stencil_from_cache_impl(const Iterator &cell, const unsigned int boundary_face_no,
1316 build_boundary_reconstruction_stencil_from_cache(const Iterator &cell, const unsigned int boundary_face_no,
1324 void fill_cell_stencil(const Iterator &cell, const VectorType &solution_global, CellStencilData &stencil) const
1334 auto tagged_stencil = internal::tag_cell_stencil_dofs<dim, NumberType, n_components>(cell_stencil, dof_j);
1343 internal::populate_boundary_neighbor_from_model_stencil(tagged_boundary_stencil, tagged_stencil, face_index,
1411 if (cache.face_reconstructions.size() != n_active_cells) cache.face_reconstructions.resize(n_active_cells);
1417 void initialize_solution_reconstruction_cache_topology(SolutionReconstructionCache &cache) const
1424 void initialize_cell_stencil_topology(const unsigned int cell_index, CellStencilData &stencil) const
1442 void refresh_cell_stencil_values(const unsigned int cell_index, const VectorType &solution_global,
1458 auto boundary_stencil = internal::fill_boundary_stencil_from_topology<NumberType, dim, n_components>(
1496 const FaceReconstructionState &get_cached_face_reconstruction(const SolutionReconstructionCache &cache,
1508 auto compute_interior_face_reconstruction_from_cache(const Iterator &cell, const Iterator &ncell,
1514 return internal::compute_interior_face_reconstruction_state<Reconstructor>(scratch_data.cell_stencil,
1518 auto compute_boundary_face_reconstruction_from_cache(const Iterator &cell, const unsigned int face_no,
1525 return internal::compute_boundary_face_reconstruction_state<Reconstructor>(boundary_stencil, cell_stencil,
1529 auto compute_interior_jacobian_face_reconstruction_from_cache(const Iterator &cell, const Iterator &ncell,
1539 auto compute_boundary_jacobian_face_reconstruction_from_cache(const Iterator &cell, const unsigned int face_no,
1547 return internal::compute_boundary_face_reconstruction_state<JacobianReconstructor>(boundary_stencil,
1571 void probe_diffusion_flux_conditioning(const SolutionReconstructionCache &reconstruction_cache,
1597 u_scale = std::max(u_scale, std::abs(static_cast<double>(reconstruction.diffusion_u_minus[c])));
1604 const NumberType probe_gradient = static_cast<NumberType>(std::max(u_scale, 1.0) / domain_size);
1644 "across faces leaves a relative round-off of {:.1e} in the residual, which caps the accuracy any "
1685 compute_neighbor_gradients(const Iterator &cell, const VectorType &solution_global, const Model &model,
1721 virtual void residual(VectorType &residual, const VectorType &solution_global, NumberType weight,
1728 // Find the EoM and extract whatever data is needed for the model, as the FEM assemblers do. Beyond
1729 // filling `extracted_data` this is what gives a model the chance to refresh whatever internal state its
1730 // flux depends on (interpolators, self-consistently solved anomalous dimensions, ...) before the fluxes
1740 rebuild_solution_reconstruction_cache<Reconstructor>(solution_global, residual_reconstruction_cache);
1753 const auto cell_worker = [&](const Iterator &cell, Scratch &scratch_data, CopyData ©_data) {
1767 model.mass(mass, x_q, scratch_data.solution_values[q_index], scratch_data.solution_dot_values[q_index]);
1787 [[maybe_unused]] const int q_face_index = 0; // only one quadrature point per face for FV (constant FE)
1805 const auto [F_plus, F_minus, a_half] = internal::compute_kt_flux_and_speeds<WaveSpeedStrategy>(
1807 reconstruction.face_grad_minus, x_q, width_plus, width_minus, __extracted_data, variables, model);
1808 const auto H = internal::compute_numerical_flux(F_plus, F_minus, a_half, reconstruction.u_plus,
1811 reconstruction.diffusion_u_minus, reconstruction.diffusion_u_plus, reconstruction.diffusion_grad_minus,
1813 reconstruction.third_derivatives_plus, x_q, width_minus, width_plus, __extracted_data, variables,
1825 copy_data_face.joint_dof_indices[n_components + component_i] = ncell_data.dof_indices[component_i];
1827 weight * JxW * (scalar_product(H[component_i], n_face) + scalar_product(D[component_i], n_face));
1845 const auto &reconstruction = get_cached_face_reconstruction(reconstruction_cache, cell, face_no);
1851 const auto [F_plus, F_minus, a_half] = internal::compute_kt_flux_and_speeds<WaveSpeedStrategy>(
1853 reconstruction.face_grad_minus, x_q, width_plus, width_minus, __extracted_data, variables, model);
1854 const auto H = internal::compute_numerical_flux(F_plus, F_minus, a_half, reconstruction.u_plus,
1858 reconstruction.diffusion_u_minus, reconstruction.diffusion_u_plus, reconstruction.diffusion_grad_minus,
1860 reconstruction.third_derivatives_plus, x_q, width_minus, width_plus, __extracted_data, variables,
1866 weight * JxW * (scalar_product(H[component_i], n_bnd) + scalar_product(D_bnd[component_i], n_bnd));
1875 constraints.distribute_local_to_global(face_data.cell_residual, face_data.joint_dof_indices, residual);
1879 MeshWorker::AssembleFlags flags = MeshWorker::assemble_own_cells | MeshWorker::assemble_boundary_faces |
1886 MeshWorker::mesh_loop(locally_owned_cells(dof_handler), cell_worker, copier, scratch_data, copy_data, flags,
1904 const auto cell_worker = [&](const Iterator &cell, Scratch &scratch_data, CopyData ©_data) {
1944 MeshWorker::mesh_loop(locally_owned_cells(dof_handler), cell_worker, copier, scratch_data, copy_data, flags,
1954 virtual void jacobian(SparseMatrixType &jacobian, const VectorType &solution_global, NumberType weight,
1962 // See residual(): keep the model's extractor-driven state consistent with the point the jacobian is
1964 // extractor_cell_jacobian blocks remain unused), so extractors are treated as frozen w.r.t. the FE
1965 // solution within a Newton step -- fine for the IDA/explicit split where Variables are stepped
1971 rebuild_solution_reconstruction_cache<JacobianReconstructor>(solution_global, jacobian_reconstruction_cache);
1976 const auto cell_worker = [&](const Iterator &cell, Scratch &scratch_data, CopyData ©_data) {
2002 const auto source_tie = fv_tie(scratch_data.solution_values[q_index], gradients, __extracted_data,
2029 tag_cell_stencil_dofs_from_cache(cell, stencil, solution_global, copy_data_source.from_dofs[j]);
2114 internal::make_interior_third_derivative_stencil(cell_stencil_tagged, ncell_stencil_tagged, x_q);
2125 internal::extract_diffusion_face_derivatives<dim, NumberType, n_components>(diffusion_face_ad);
2134 internal::compute_kt_numflux_jacobian<WaveSpeedStrategy, Model, NumberType, dim, n_components>(
2136 reconstruction.face_grad_minus, x_q, width_plus, width_minus, __extracted_data, variables, model);
2137 const auto j_diffusion = internal::compute_diffusion_flux_jacobian<Model, NumberType, dim, n_components>(
2138 reconstruction.diffusion_u_minus, reconstruction.diffusion_u_plus, reconstruction.diffusion_grad_minus,
2140 reconstruction.third_derivatives_plus, x_q, width_minus, width_plus, __extracted_data, variables,
2156 advection_contribution += j_numflux.grad[face_no](component_i, c)[d_out][d_in] * n_face[d_out] *
2187 const auto boundary_worker = [&](const Iterator &cell, const unsigned int &face_no, Scratch &scratch_data,
2201 const auto &reconstruction = get_cached_face_reconstruction(reconstruction_cache, cell, face_no);
2219 internal::tag_boundary_reconstruction_stencil_dofs<dim, NumberType, n_components>(boundary_stencil,
2221 const auto cell_stencil_ad = tag_cell_stencil_dofs_from_cache(cell, cell_stencil, solution_global, dof_j);
2223 internal::make_model_boundary_reconstruction_side_stencils(boundary_stencil_ad, cell_stencil_ad, x_q,
2244 internal::apply_boundary_reconstruction_stencil(third_derivative_boundary_stencil_ad, cell_stencil_ad,
2258 internal::extract_diffusion_face_derivatives<dim, NumberType, n_components>(diffusion_face_ad);
2268 internal::compute_kt_numflux_jacobian<WaveSpeedStrategy, Model, NumberType, dim, n_components>(
2270 reconstruction.face_grad_minus, x_q, width_plus, width_minus, __extracted_data, variables, model);
2271 const auto j_diffusion = internal::compute_diffusion_flux_jacobian<Model, NumberType, dim, n_components>(
2272 reconstruction.diffusion_u_minus, reconstruction.diffusion_u_plus, reconstruction.diffusion_grad_minus,
2274 reconstruction.third_derivatives_plus, x_q, width_minus, width_plus, __extracted_data, variables,
2289 advection_contribution += j_numflux.grad[face_no](component_i, c)[d_out][d_in] * n_face[d_out] *
2325 constraints.distribute_local_to_global(face_data.cell_jacobian, face_data.to_dofs, face_data.from_dofs,
2332 MeshWorker::AssembleFlags flags = MeshWorker::assemble_own_cells | MeshWorker::assemble_boundary_faces |
2339 MeshWorker::mesh_loop(locally_owned_cells(dof_handler), cell_worker, copier, scratch_data, copy_data, flags,
2355 static void append_dofs(std::vector<types::global_dof_index> &target, const DoFContainer &source)
2361 static void append_valid_dofs(std::vector<types::global_dof_index> &target, const DoFContainer &source)
2378 const auto append_recursive = [&](const auto &self, const Iterator &cell, const unsigned int depth) -> void {
2426 append_boundary_reconstruction_dofs(dependencies.from_dofs, cell->active_cell_index(), face_index);
2453 append_boundary_reconstruction_dofs(dependencies.from_dofs, cell->active_cell_index(), face_index);
2497 from_dofs.insert(std::end(from_dofs), std::begin(tmp), std::end(tmp)); // Let's wait for C++23 :(
2512 // throw std::runtime_error("Extractor dofs are not yet supported in the Kurganov-Tadmor assembler.");
2513 finalize_la_sparsity<SparseMatrixType>(dsp, sparsity_pattern, discretization.get_locally_owned_dofs(),
2518 void build_cached_jacobian_sparsity(get_type::SparsityPattern<SparseMatrixType> &sparsity_pattern) const
2531 if (row != numbers::invalid_dof_index && column != numbers::invalid_dof_index) dsp.add(row, column);
2538 finalize_la_sparsity<SparseMatrixType>(dsp, sparsity_pattern, discretization.get_locally_owned_dofs(),
2543 void fill_boundary_topology(internal::BoundaryStencilTopologyData<dim, n_components> &boundary_topology,
2553 boundary_topology.ghost_right = boundary_topology.lower_boundary ? physical_cell : upper_outer;
2595 FEValues<dim> fe_values(mapping, fe, quadrature, update_quadrature_points | update_JxW_values);
2640 fill_boundary_topology(boundary_reconstruction_topology.primary, cell, face_index, dof_indices);
2749 return make_assembly_schedule(n_owned_cells, DiFfRG::n_threads(), cost_ns, schedule_overrides);
2763 report_port.info("FV: Assembling {} cells on {} threads -- {}x{} workers/cells for a cheap cell loop, "
This is the general assembler interface for any kind of discretization. An assembler is responsible f...
Definition abstract_assembler.hh:54
Definition affine_constraint_metadata.hh:24
A hierarchical configuration tree, readable from JSON and TOML files.
Definition config_tree.hh:32
typename DiFfRG::internal::components_of< ModelOrComponents_ >::type Components
Definition discretization.hh:50
SparseMatrixType_ SparseMatrixType
Definition discretization.hh:53
Definition KurganovTadmor.hh:645
static bool is_physical_boundary_face(const Iterator &cell, const unsigned int face_index)
Definition KurganovTadmor.hh:1176
unsigned int find_neighbor_face(const Iterator &cell, const Iterator &neighbor) const
Definition KurganovTadmor.hh:1350
virtual void attach_data_output(OutputFrame< dim, VectorType > &data_out, const VectorType &solution, const VectorType &variables, const VectorType &dt_solution=VectorType(), const VectorType &residual=VectorType()) override
Definition KurganovTadmor.hh:775
static void fill_cell_data(const Iterator &cell, const VectorType &solution_global, std::vector< types::global_dof_index > &scratch_dof_indices, CellData &data)
Definition KurganovTadmor.hh:1165
void build_face_jacobian_dependency_cache(const Iterator &cell, const unsigned int face_index, FaceJacobianDependencyCacheEntry &dependencies) const
Definition KurganovTadmor.hh:2414
virtual void reinit() override
Reinitialize the assembler. This is necessary if the mesh has changed, e.g. after a mesh refinement.
Definition KurganovTadmor.hh:795
virtual void reinit_matrix(SparseMatrixType &matrix) const override
Definition KurganovTadmor.hh:753
Discretization & discretization
Definition KurganovTadmor.hh:2738
void build_cached_jacobian_sparsity(get_type::SparsityPattern< SparseMatrixType > &sparsity_pattern) const
Definition KurganovTadmor.hh:2518
std::optional< Point > EoM_minimum_guess
Definition KurganovTadmor.hh:2777
std::vector< CellTopologyCacheEntry > cell_topology_cache
Definition KurganovTadmor.hh:2792
auto compute_interior_face_reconstruction_from_cache(const Iterator &cell, const Iterator &ncell, const VectorType &solution_global, const Point &x_q, Scratch &scratch_data) const
Definition KurganovTadmor.hh:1508
uint num_reinits() const
Definition KurganovTadmor.hh:2715
const QGauss< dim - 1 > quadrature_face
Definition KurganovTadmor.hh:2782
static constexpr int nothing
Definition KurganovTadmor.hh:649
WaveSpeedStrategy_ WaveSpeedStrategy
Definition KurganovTadmor.hh:685
virtual void refinement_indicator(Vector< double > &indicator, const VectorType &solution_global)
Definition KurganovTadmor.hh:2349
auto fv_tie(T &&...t)
The named tuple handed to model.source(), the FV counterpart of CG's fe_tie().
Definition KurganovTadmor.hh:662
JacobianReconstructor_ JacobianReconstructor
Definition KurganovTadmor.hh:686
void fill_cell_stencil(const Iterator &cell, const VectorType &solution_global, CellStencilData &stencil) const
Definition KurganovTadmor.hh:1324
auto compute_boundary_jacobian_face_reconstruction_from_cache(const Iterator &cell, const unsigned int face_no, const VectorType &solution_global, const Point &x_q) const
Definition KurganovTadmor.hh:1539
virtual void jacobian(SparseMatrixType &jacobian, const VectorType &solution_global, NumberType weight, const VectorType &solution_global_dot, NumberType alpha, NumberType beta, const VectorType &variables=VectorType()) override
Definition KurganovTadmor.hh:1954
get_type::SparsityPattern< SparseMatrixType > sparsity_pattern_mass
Definition KurganovTadmor.hh:2784
static constexpr unsigned int flux_conditioning_max_samples
Definition KurganovTadmor.hh:2802
std::vector< double > timings_jacobian
Definition KurganovTadmor.hh:2790
virtual const SparseMatrixType & get_mass_matrix() const override
Obtain the mass matrix.
Definition KurganovTadmor.hh:853
get_type::SparsityPattern< SparseMatrixType > sparsity_pattern_jacobian
Definition KurganovTadmor.hh:2785
const AssemblyScheduleOverrides schedule_overrides
Definition KurganovTadmor.hh:2771
SolutionReconstructionCache residual_reconstruction_cache
Definition KurganovTadmor.hh:2794
ReportPort report_port
Definition KurganovTadmor.hh:2740
double average_time_reinit() const
Definition KurganovTadmor.hh:2707
void fill_boundary_topology(internal::BoundaryStencilTopologyData< dim, n_components > &boundary_topology, const Iterator &cell, const unsigned int boundary_face_no, std::vector< types::global_dof_index > &dof_indices) const
Definition KurganovTadmor.hh:2543
typename Discretization::Components Components
Definition KurganovTadmor.hh:691
void initialize_solution_reconstruction_cache_topology(SolutionReconstructionCache &cache) const
Definition KurganovTadmor.hh:1417
void refresh_solution_reconstruction_cache_values(const VectorType &solution_global, SolutionReconstructionCache &cache) const
Definition KurganovTadmor.hh:1435
double average_time_residual_assembly() const
Definition KurganovTadmor.hh:2717
static void append_dofs(std::vector< types::global_dof_index > &target, const DoFContainer &source)
Definition KurganovTadmor.hh:2355
static void sort_unique_dofs(std::vector< types::global_dof_index > &dofs)
Definition KurganovTadmor.hh:2367
void build_sparsity(get_type::SparsityPattern< SparseMatrixType > &sparsity_pattern, const DoFHandler< dim > &to_dofh, const DoFHandler< dim > &from_dofh, const int stencil=2, bool add_extractor_dofs=false) const
Definition KurganovTadmor.hh:2460
SummaryEvent summary() const override
Definition KurganovTadmor.hh:2698
virtual IndexSet get_differential_indices() const override
Obtain the dofs which contain time derivatives.
Definition KurganovTadmor.hh:767
Reconstructor_ Reconstructor
Definition KurganovTadmor.hh:684
auto compute_interior_jacobian_face_reconstruction_from_cache(const Iterator &cell, const Iterator &ncell, const VectorType &solution_global, const Point &x_q, Scratch &scratch_data) const
Definition KurganovTadmor.hh:1529
std::vector< double > timings_reinit
Definition KurganovTadmor.hh:2788
static constexpr double flux_conditioning_warn_threshold
Definition KurganovTadmor.hh:2801
static Tensor< 1, dim > face_normal_from_cell(const Iterator &cell, const unsigned int face_no)
Definition KurganovTadmor.hh:1705
void run_fv_kt_pre_assembly_hook(const AssemblyStage stage, const Context &context)
Definition KurganovTadmor.hh:1160
void append_reconstruction_neighbor_dofs(std::vector< types::global_dof_index > &from_dofs, const Iterator &root_cell) const
Definition KurganovTadmor.hh:2373
void fill_constant_quadrature_values(const Iterator &cell, const VectorType &solution_global, const VectorType &solution_global_dot, Scratch &scratch_data) const
Definition KurganovTadmor.hh:1653
typename DoFHandler< Discretization::dim >::active_cell_iterator Iterator
Definition KurganovTadmor.hh:701
const FaceReconstructionState & get_cached_face_reconstruction(const SolutionReconstructionCache &cache, const Iterator &cell, const unsigned int face_index) const
Definition KurganovTadmor.hh:1496
static constexpr auto v_tie(T &&...t)
Definition KurganovTadmor.hh:669
internal::BoundaryReconstructionStencilData< dim, BoundaryNumberType, n_components > build_boundary_reconstruction_stencil_from_cache(const Iterator &cell, const unsigned int boundary_face_no, const VectorType &solution_global) const
Definition KurganovTadmor.hh:1316
void rebuild_face_reconstruction_descriptors()
Definition KurganovTadmor.hh:1465
virtual void jacobian_variables(FullMatrix< NumberType > &jacobian, const VectorType &variables, const VectorType &) override
Definition KurganovTadmor.hh:868
bool flux_conditioning_probed
Definition KurganovTadmor.hh:2812
std::vector< FaceReconstructionDescriptor > face_reconstruction_descriptors
Definition KurganovTadmor.hh:2793
internal::BoundaryStencilData< boundary_dim, BoundaryNumberType, n_components > build_boundary_stencil_from_cache_impl(const Iterator &cell, const unsigned int boundary_face_no, const VectorType &solution_global) const
Definition KurganovTadmor.hh:1297
void update_assembly_schedules()
Definition KurganovTadmor.hh:2753
virtual void residual_variables(VectorType &residual, const VectorType &variables, const VectorType &spatial_solution) override
Definition KurganovTadmor.hh:855
typename Discretization::SparseMatrixType SparseMatrixType
Definition KurganovTadmor.hh:689
virtual void reinit_vector(VectorType &vec) const override
Definition KurganovTadmor.hh:748
CellStencilDataT< autodiff::Real< 1, NumberType > > tag_cell_stencil_dofs_from_cache(const Iterator &cell, const CellStencilData &cell_stencil, const VectorType &solution_global, const types::global_dof_index dof_j) const
Definition KurganovTadmor.hh:1331
uint num_jacobians() const
Definition KurganovTadmor.hh:2735
virtual void set_time(double t) override
Set the current time. The assembler should usually just forward this to the numerical model.
Definition KurganovTadmor.hh:847
virtual MPI_Comm get_communicator() const override
The communicator this assembler's linear algebra lives on.
Definition KurganovTadmor.hh:759
virtual void mass(VectorType &mass, const VectorType &solution_global, const VectorType &solution_global_dot, NumberType weight) override
Definition KurganovTadmor.hh:1077
void rebuild_solution_reconstruction_cache(const VectorType &solution_global, SolutionReconstructionCache &cache) const
Definition KurganovTadmor.hh:1361
static constexpr uint n_faces
Definition KurganovTadmor.hh:697
void fill_cell_data_from_topology(const CellGeometryDofs &topology, const VectorType &solution_global, CellData &data) const
Definition KurganovTadmor.hh:1289
const DoFHandler< dim > & dof_handler
Definition KurganovTadmor.hh:2741
const QGauss< dim > quadrature
Definition KurganovTadmor.hh:2781
internal::ThirdDerivativeType< dim, NumberType, n_components > ThirdDerivativeType
Definition KurganovTadmor.hh:700
static constexpr uint n_components
Definition KurganovTadmor.hh:696
auto make_assembly_context_view(const SolutionReconstructionCache &cache) const
Definition KurganovTadmor.hh:1147
uint n_owned_cells
Definition KurganovTadmor.hh:2770
static GradientType source_gradient(const CellStencilData &stencil, const Point &x_q)
The "fe_derivatives" slot of fv_tie(), i.e. the gradient model.source() sees at x_q.
Definition KurganovTadmor.hh:1678
const FiniteElement< dim > & fe
Definition KurganovTadmor.hh:2744
SparseMatrixType mass_matrix
Definition KurganovTadmor.hh:2786
void readouts(OutputFrame< dim, VectorType > &data_out, const VectorType &solution_global, const VectorType &variables) const
Definition KurganovTadmor.hh:881
virtual void residual(VectorType &residual, const VectorType &solution_global, NumberType weight, const VectorType &solution_global_dot, NumberType weight_mass, const VectorType &variables=VectorType()) override
Definition KurganovTadmor.hh:1721
auto extractor_raw_potential(const VectorType &solution_global) const
Evaluate the model's extractors at the EoM point.
Definition KurganovTadmor.hh:1038
void probe_diffusion_flux_conditioning(const SolutionReconstructionCache &reconstruction_cache, const ExtractorArray &extractors, const VectorType &variables) const
One-shot conditioning check on the model's diffusion flux.
Definition KurganovTadmor.hh:1571
const Mapping< dim > & mapping
Definition KurganovTadmor.hh:2742
virtual const get_type::SparsityPattern< SparseMatrixType > & get_sparsity_pattern_jacobian() const override
Obtain the sparsity pattern of the jacobian matrix.
Definition KurganovTadmor.hh:849
void initialize_cell_stencil_topology(const unsigned int cell_index, CellStencilData &stencil) const
Definition KurganovTadmor.hh:1424
std::pair< Point, Iterator > resolve_extractor_point(const Point &EoM_point, const Iterator &EoM_cell_, const VectorType &solution_global) const
Where the model wants its extractors evaluated, and the cell holding that point.
Definition KurganovTadmor.hh:949
static void append_valid_dofs(std::vector< types::global_dof_index > &target, const DoFContainer &source)
Definition KurganovTadmor.hh:2361
const Triangulation< dim > & triangulation
Definition KurganovTadmor.hh:2743
virtual void reinit_solution_view(SolutionView< VectorType > &view) const override
Definition KurganovTadmor.hh:761
void rebuild_cell_topology_cache()
Definition KurganovTadmor.hh:2593
std::vector< double > timings_residual
Definition KurganovTadmor.hh:2789
SolutionReconstructionCache jacobian_reconstruction_cache
Definition KurganovTadmor.hh:2795
dealii::Point< dim > Point
Definition KurganovTadmor.hh:702
double domain_diameter
Definition KurganovTadmor.hh:2804
internal::BoundaryStencilData< dim, BoundaryNumberType, n_components > build_boundary_stencil_from_cache(const Iterator &cell, const unsigned int boundary_face_no, const VectorType &solution_global) const
Definition KurganovTadmor.hh:1307
typename Discretization::NumberType NumberType
Definition KurganovTadmor.hh:687
void build_source_jacobian_dependency_cache(const Iterator &cell, FaceJacobianDependencyCacheEntry &dependencies) const
The dofs the nonlocal part of the source jacobian writes to and reads from.
Definition KurganovTadmor.hh:2442
void ensure_solution_reconstruction_cache_shape(SolutionReconstructionCache &cache) const
Definition KurganovTadmor.hh:1404
void append_boundary_reconstruction_dofs(std::vector< types::global_dof_index > &from_dofs, const unsigned int cell_index, const unsigned int face_index) const
Definition KurganovTadmor.hh:2393
void refresh_cell_stencil_values(const unsigned int cell_index, const VectorType &solution_global, CellStencilData &stencil) const
Definition KurganovTadmor.hh:1442
typename Discretization::VectorType VectorType
Definition KurganovTadmor.hh:688
virtual void jacobian_mass(SparseMatrixType &jacobian, const VectorType &solution_global, const VectorType &solution_global_dot, NumberType alpha=1., NumberType beta=1.) override
Definition KurganovTadmor.hh:1896
internal::GradientType< dim, NumberType, n_components > GradientType
Definition KurganovTadmor.hh:699
DiFfRG::internal::PotentialSystemCache< dim, NumberType > potential_cache
Mesh-dependent half of the potential reconstructions, built once and reused; see PotentialSystemCache...
Definition KurganovTadmor.hh:2779
auto make_assembly_context_view(SolutionReconstructionCache &&cache) const =delete
static double face_jxw(const Iterator &cell, const unsigned int face_no)
Definition KurganovTadmor.hh:1713
AssemblySchedule schedule_for(const double cost_ns) const
Definition KurganovTadmor.hh:2747
const bool diagnose_flux_conditioning
Definition KurganovTadmor.hh:2811
Discretization_ Discretization
Definition KurganovTadmor.hh:682
static constexpr auto e_tie(T &&...t)
Definition KurganovTadmor.hh:674
void extract(std::array< NumberType, Components::count_extractors()> &data, const VectorType &solution_global, const VectorType &variables, bool search_EoM, bool set_EoM, bool postprocess) const
Definition KurganovTadmor.hh:1049
double average_time_jacobian_assembly() const
Definition KurganovTadmor.hh:2727
ReadoutSolution reconstruct_readout_solution(const Iterator &cell, const VectorType &solution_global, const Point &x, bool with_hessians=false) const
Definition KurganovTadmor.hh:973
auto compute_boundary_face_reconstruction_from_cache(const Iterator &cell, const unsigned int face_no, const VectorType &solution_global, const Point &x_q) const
Definition KurganovTadmor.hh:1518
static void fill_cell_stencil(const Iterator &cell, const VectorType &solution_global, const Model &model, std::vector< types::global_dof_index > &scratch_dof_indices, CellStencilData &stencil)
Definition KurganovTadmor.hh:1186
static Iterator face_neighbor(const Iterator &cell, const unsigned int face_index)
Definition KurganovTadmor.hh:1181
static internal::BoundaryStencilData< dim, BoundaryNumberType, n_components > build_boundary_stencil(const Iterator &cell, const unsigned int boundary_face_no, const VectorType &solution_global, std::vector< types::global_dof_index > &scratch_dof_indices)
Definition KurganovTadmor.hh:1231
std::array< unsigned int, n_components > local_component_of_dof
Definition KurganovTadmor.hh:2791
static std::array< internal::GradientType< dim, NumberType, n_components >, n_faces > compute_neighbor_gradients(const Iterator &cell, const VectorType &solution_global, const Model &model, std::vector< types::global_dof_index > &scratch_dof_indices, CellStencilData &temporary_stencil)
Definition KurganovTadmor.hh:1685
Assembler(Discretization &discretization, Model &model, const ConfigTree &config)
Definition KurganovTadmor.hh:728
const Config::EoMConfig EoM_config
Definition KurganovTadmor.hh:2776
const CellTopologyCacheEntry & get_cell_topology(const Iterator &cell) const
Definition KurganovTadmor.hh:2692
internal::CellStencilData< dim, NT, n_components > CellStencilDataT
Definition KurganovTadmor.hh:1133
Iterator old_EoM_cell
Definition KurganovTadmor.hh:2775
uint num_residuals() const
Definition KurganovTadmor.hh:2725
Definition assembly_context.hh:395
Definition assembly_context.hh:269
Definition assembly_context.hh:123
Decides, without any user input, which rank computes which part of each map().
Definition map_scheduler.hh:195
void attach(const DoFHandler< dim > &dof_handler, const VectorType &solution, const std::string &name)
Definition output_session.hh:47
Definition output_session.hh:42
void attach_raw_potential(ReconstructedRawPotential< dim, typename VectorType::value_type > potential)
Definition output_session.hh:141
void register_readout(const std::string &id)
Definition output_session.hh:154
void attach_eom_potential(EoMResult< dim, typename VectorType::value_type > result)
Definition output_session.hh:136
Definition run_reporter.hh:96
void warn(spdlog::format_string_t< Args... > format, Args &&...args) const
Definition run_reporter.hh:107
void info(spdlog::format_string_t< Args... > format, Args &&...args) const
Definition run_reporter.hh:103
A simple NxM-matrix class, which is used for cell-wise Jacobians.
Definition tuples.hh:170
A read-only, fully-replicated view of the solution.
Definition solution_view.hh:48
void reinit(const dealii::IndexSet &, const dealii::IndexSet &, MPI_Comm)
Establish the layout. No-op for the serial policy.
Definition solution_view.hh:58
TVD gradient reconstructor parameterised by a slope limiter.
Definition tvd_reconstructor.hh:46
The mesh-dependent half of solve_potential, retained across calls.
Definition eom.hh:315
Whether Model chooses its own point at which the extractors are evaluated.
Definition solution_sample.hh:137
Definition types.hh:9
Concept that any gradient-reconstruction strategy must satisfy.
Definition abstract_reconstructor.hh:22
Concept that any wave-speed strategy must satisfy.
Definition abstract_wave_speed.hh:45
All compile-time knowledge about which linear algebra types DiFfRG uses.
FaceReconstructionState< 1, NumberType, n_components > compute_boundary_face_reconstruction_state(BoundaryStencilData< 1, NumberType, n_components > boundary_stencil, const CellStencilData< 1, NumberType, n_components > &physical_cell_stencil, const dealii::Point< 1 > &x_q, const Model &model)
Definition reconstruction_cache.hh:768
def::GradientType< dim, NumberType, n_components > GradientType
Definition reconstruction_cache.hh:31
std::array< JacobianMatrix< NumberType, n_components >, dim > restrict_jacobian_to_block(const std::array< JacobianMatrix< NumberType, n_components >, dim > &J, const std::array< int, n_components > &blocks, const int block)
Copy of J with every row and column outside block zeroed.
Definition KurganovTadmor.hh:207
BoundaryStencilData< dim, autodiff::Real< 1, NumberType >, n_components > tag_boundary_stencil_dofs(const BoundaryStencilData< dim, NumberType, n_components > &boundary_stencil, dealii::types::global_dof_index dof_j)
Definition reconstruction_cache.hh:859
std::pair< CellStencilData< 1, NumberType, n_components >, CellStencilData< 1, NumberType, n_components > > make_model_boundary_reconstruction_side_stencils(BoundaryStencilData< 1, NumberType, n_components > boundary_stencil, const CellStencilData< 1, NumberType, n_components > &physical_cell_stencil, const dealii::Point< 1 > &x_q, const Model &model)
Definition reconstruction_cache.hh:710
std::array< dealii::Tensor< 1, dim, NumberType >, n_components > compute_diffusion_flux(const std::array< NumberType, n_components > &u_minus, const std::array< NumberType, n_components > &u_plus, const GradientType< dim, NumberType, n_components > &grad_u_minus, const GradientType< dim, NumberType, n_components > &grad_u_plus, const ThirdDerivativeType< dim, NumberType, n_components > &third_derivatives_minus, const ThirdDerivativeType< dim, NumberType, n_components > &third_derivatives_plus, const dealii::Point< dim > &x_q, const double cell_width_minus, const double cell_width_plus, const ExtractorArray &extractors, const VariableVector &variables, const Model &model)
Definition KurganovTadmor.hh:488
std::array< dealii::Tensor< 1, dim, NumberType >, n_components > compute_numerical_flux(const std::array< dealii::Tensor< 1, dim, NumberType >, n_components > &F_plus, const std::array< dealii::Tensor< 1, dim, NumberType >, n_components > &F_minus, const std::array< dealii::Tensor< 1, dim, NumberType >, n_components > &a_half, const std::array< NumberType, n_components > &u_plus, const std::array< NumberType, n_components > &u_minus)
Definition KurganovTadmor.hh:376
auto flux_tie(T &&...t)
The named tuple handed to model.flux().
Definition flux_ties.hh:36
auto diffusion_flux_tie(T &&...t)
The named tuple handed to model.diffusion_flux().
Definition flux_ties.hh:44
std::array< ReconstructionDerivativeData< dim, NumberType, n_components >, 2 > extract_diffusion_face_derivatives(const DiffusionFaceState< dim, autodiff::Real< 1, NumberType >, n_components > &state)
Definition reconstruction_cache.hh:243
FaceReconstructionState< dim, NumberType, n_components > compute_interior_face_reconstruction_state(const CellStencilData< dim, NumberType, n_components > &minus_stencil, const CellStencilData< dim, NumberType, n_components > &plus_stencil, const dealii::Point< dim > &x_q)
Definition reconstruction_cache.hh:265
BoundaryReconstructionStencilData< dim, autodiff::Real< 1, NumberType >, n_components > tag_boundary_reconstruction_stencil_dofs(const BoundaryReconstructionStencilData< dim, NumberType, n_components > &boundary_reconstruction_stencil, dealii::types::global_dof_index dof_j)
Definition reconstruction_cache.hh:883
void apply_boundary_reconstruction_stencil(BoundaryStencilData< dim, NumberType, n_components > &boundary_stencil, const CellStencilData< dim, NumberType, n_components > &cell_stencil, const Model &model)
Definition reconstruction_cache.hh:504
FluxDerivativeData< NumberType, dim, n_components > compute_flux_derivatives_ad(const std::array< NumberType, n_components > &u, const std::array< dealii::Tensor< 1, dim, NumberType >, n_components > &grad_u, const dealii::Point< dim > &x_q, const double cell_width, const ExtractorArray &extractors, const VariableVector &variables, const Model &model)
Compute F, dF/du, d2F/du2, dF/dgrad(u), and d2F/(du dgrad(u)) with second-order forward AD.
Definition flux_jacobian_hessian.hh:56
BoundaryStencilData< dim, BoundaryNumberType, n_components > fill_boundary_stencil_from_topology(const BoundaryStencilTopologyData< dim, n_components > &topology, const VectorType &solution_global)
Definition reconstruction_cache.hh:371
KTFluxData< dim, NumberType, n_components > compute_kt_flux_and_speeds(const std::array< NumberType, n_components > &u_plus, const std::array< NumberType, n_components > &u_minus, const GradientType< dim, NumberType, n_components > &grad_u_plus, const GradientType< dim, NumberType, n_components > &grad_u_minus, const dealii::Point< dim > &x_q, const double cell_width_plus, const double cell_width_minus, const ExtractorArray &extractors, const VariableVector &variables, const Model &model)
Definition KurganovTadmor.hh:280
CellStencilData< dim, autodiff::Real< 1, NumberType >, n_components > tag_cell_stencil_dofs(const CellStencilData< dim, NumberType, n_components > &cell_stencil, dealii::types::global_dof_index dof_j)
Definition reconstruction_cache.hh:846
FourPointStencil< dim, NumberType, n_components > make_boundary_third_derivative_stencil(const BoundaryStencilData< dim, NumberType, n_components > &boundary_stencil)
Definition reconstruction_cache.hh:205
KTNumFluxJacobianData< dim, NumberType, n_components > compute_kt_numflux_jacobian(const std::array< NumberType, n_components > &u_plus, const std::array< NumberType, n_components > &u_minus, const GradientType< dim, NumberType, n_components > &grad_u_plus, const GradientType< dim, NumberType, n_components > &grad_u_minus, const dealii::Point< dim > &x_q, const double cell_width_plus, const double cell_width_minus, const ExtractorArray &extractors, const VariableVector &variables, const Model &model)
Definition KurganovTadmor.hh:400
void populate_boundary_neighbor_from_model_stencil(BoundaryStencilData< 1, NumberType, n_components > &boundary_stencil, CellStencilData< 1, NumberType, n_components > &cell_stencil, const unsigned int face_index, const dealii::Point< 1 > &x_q, const Model &model)
Definition reconstruction_cache.hh:672
def::ThirdDerivativeType< dim, NumberType, n_components > ThirdDerivativeType
Definition reconstruction_cache.hh:34
std::array< std::array< std::array< std::array< NumberType, n_components >, n_components >, n_components >, dim > HessianTensor
Definition flux_jacobian_hessian.hh:24
FaceReconstructionState< dim, NumberType, n_components > reverse_face_reconstruction(const FaceReconstructionState< dim, NumberType, n_components > &state)
Definition reconstruction_cache.hh:74
std::array< std::array< NumberType, n_components >, n_components > JacobianMatrix
Definition flux_jacobian_hessian.hh:21
FourPointStencil< dim, NumberType, n_components > make_interior_third_derivative_stencil(const CellStencilData< dim, NumberType, n_components > &minus_stencil, const CellStencilData< dim, NumberType, n_components > &plus_stencil, const dealii::Point< dim > &x_q)
Definition reconstruction_cache.hh:183
DiffusionFaceState< dim, NumberType, n_components > compute_diffusion_face_state(const CellStencilData< dim, NumberType, n_components > &minus_stencil, const CellStencilData< dim, NumberType, n_components > &plus_stencil)
Definition reconstruction_cache.hh:232
DiffusionFluxJacobianData< dim, NumberType, n_components > compute_diffusion_flux_jacobian(const std::array< NumberType, n_components > &u_minus, const std::array< NumberType, n_components > &u_plus, const GradientType< dim, NumberType, n_components > &grad_u_minus, const GradientType< dim, NumberType, n_components > &grad_u_plus, const ThirdDerivativeType< dim, NumberType, n_components > &third_derivatives_minus, const ThirdDerivativeType< dim, NumberType, n_components > &third_derivatives_plus, const dealii::Point< dim > &x_q, const double cell_width_minus, const double cell_width_plus, const ExtractorArray &extractors, const VariableVector &variables, const Model &model)
Definition KurganovTadmor.hh:520
std::array< NumberType, n_components > reconstruct_u(const std::array< NumberType, n_components > &u_center, const dealii::Point< dim > ¢er, const dealii::Point< dim > &x, const GradientType< dim, NumberType, n_components > &u_grad)
Definition reconstruction_cache.hh:144
void fill_cell_data_from_topology(const CellGeometryDofs< dim, n_components > &topology, const VectorType &solution_global, CellData< dim, NumberType, n_components > &data)
Definition reconstruction_cache.hh:252
BoundaryReconstructionStencilData< dim, BoundaryNumberType, n_components > fill_boundary_reconstruction_stencil_from_topology(const BoundaryReconstructionStencilTopologyData< dim, n_components > &topology, const VectorType &solution_global)
Definition reconstruction_cache.hh:396
std::array< NumberType, n_components > reconstruct_u_derivative(const std::array< autodiff::Real< 1, NumberType >, n_components > &u_center, const dealii::Point< dim > ¢er, const dealii::Point< dim > &x, const std::array< dealii::Point< dim >, 2 *dim > &x_n, const std::array< std::array< autodiff::Real< 1, NumberType >, n_components >, 2 *dim > &u_n)
Definition reconstruction_cache.hh:300
HessianTensor< NumberType, dim, n_components > restrict_hessian_to_block(const HessianTensor< NumberType, dim, n_components > &H, const std::array< int, n_components > &blocks, const int block)
Copy of H with the two jacobian indices restricted to block.
Definition KurganovTadmor.hh:228
std::array< Result, n_components > per_block(const std::array< int, n_components > &blocks, const ComputeFUN &compute)
Run compute once per distinct block and hand each component its block's result.
Definition KurganovTadmor.hh:252
void dispatch_fv_kt_pre_assembly(Model &model, const AssemblyStage stage, const Context &context)
Definition assembly_context.hh:448
constexpr double local_fe
Local FE work only: mass matrices, refinement indicators. ~0.2-0.3 us/cell for CG p=3.
Definition assembly_schedule.hh:48
constexpr double momentum_integral
Definition assembly_schedule.hh:53
typename internal::_SparsityPattern< SparseMatrixType >::value SparsityPattern
Definition linear_algebra.hh:155
AffineConstraintMetadata< dim > build_affine_constraint_metadata(const Discretization &discretization)
Definition affine_constraint_metadata.hh:99
double cell_width(const CellIterator &cell)
The smallest face-normal width over all faces of cell.
Definition cell_geometry.hh:42
void apply_model_affine_constraints(Model &model, Constraints &constraints, const Context &context)
Definition affine_constraint_metadata.hh:79
constexpr void validate_readout_helper_arity()
Definition abstract_assembler.hh:17
Definition complex_math.hh:10
auto locally_owned_cells(const dealii::DoFHandler< dim > &dof_handler)
The cells this rank assembles.
Definition assembly_schedule.hh:154
ReconstructedRawPotential< dim, typename VectorType::value_type > reconstruct_raw_potential(const VectorType &sol, const dealii::DoFHandler< dim > &dof_handler, const dealii::Mapping< dim > &mapping, const GradientFUN &get_gradient, const Config::EoMConfig &config, internal::PotentialSystemCache< dim, typename VectorType::value_type > *cache=nullptr)
Reconstruct a scalar raw potential without locating its minimum.
Definition eom.hh:1411
AssemblySchedule make_assembly_schedule(const uint n_local_cells, const uint thread_budget, const double cost_ns, const AssemblyScheduleOverrides &overrides={})
Derive one mesh_loop schedule from the cost of a cell.
Definition assembly_schedule.hh:114
uint n_locally_owned_cells(const Discretization &discretization)
How many cells locally_owned_cells() yields.
Definition assembly_schedule.hh:167
dealii::IndexSet restrict_to_owned(const dealii::IndexSet &global_set, const dealii::IndexSet &locally_owned)
Restrict a global index set to what this rank may write.
Definition la_policy.hh:114
UnusedPotentialEvaluation evaluate_raw_potential(const UnusedPotential &, const dealii::Mapping< dim > &, const dealii::Point< dim > &)
Definition eom.hh:149
void reinit_la_matrix(SparseMatrixType &matrix, const get_type::SparsityPattern< SparseMatrixType > &pattern, const dealii::IndexSet &locally_owned, MPI_Comm comm)
Size a matrix from a finalized sparsity pattern.
Definition la_policy.hh:92
void reinit_la_vector(VectorType &vec, const dealii::IndexSet &locally_owned, MPI_Comm comm)
Size a vector to the rank's share of the rows.
Definition la_policy.hh:27
EoMResult< dim, typename VectorType::value_type > get_EoM_point_with_potential(typename dealii::DoFHandler< dim >::cell_iterator &EoM_cell, const VectorType &sol, const dealii::DoFHandler< dim > &dof_handler, const dealii::Mapping< dim > &mapping, const EoMFUN &get_EoM, const EoMPFUN &EoM_postprocess, const Config::EoMConfig &config, const std::optional< dealii::Point< dim > > &initial_guess=std::nullopt, internal::PotentialSystemCache< dim, typename VectorType::value_type > *cache=nullptr)
Reconstruct a potential whose gradient approximates the model EoM vector field and return a sampled a...
Definition eom.hh:1486
SolutionSample< dim, NumberType > make_solution_sample(const dealii::DoFHandler< dim > &dof_handler, const dealii::Mapping< dim > &mapping, const uint n_components, const FillFUN &fill)
Build a SolutionSample, taking values and gradients from a callback.
Definition solution_sample.hh:154
void finalize_la_sparsity(dealii::DynamicSparsityPattern &dsp, get_type::SparsityPattern< SparseMatrixType > &pattern, const dealii::IndexSet &locally_owned, const dealii::IndexSet &locally_relevant, MPI_Comm comm)
Turn a freshly built DynamicSparsityPattern into the pattern type the matrix wants.
Definition la_policy.hh:50
Overrides, if really wanted by the user: /discretization/{mesh_workers,batch_size}...
Definition assembly_schedule.hh:82
The two trailing arguments of dealii::MeshWorker::mesh_loop.
Definition assembly_schedule.hh:30
Definition eom_config.hh:10
Definition KurganovTadmor.hh:1135
dealii::Tensor< 1, dim > normal(const Iterator &cell, const unsigned int face_index) const
Definition KurganovTadmor.hh:1136
double jxw(const Iterator &cell, const unsigned int face_index) const
Definition KurganovTadmor.hh:1141
Definition KurganovTadmor.hh:716
FaceJacobianDependencyCacheEntry source_jacobian_dependencies
Definition KurganovTadmor.hh:721
double cell_width
Definition KurganovTadmor.hh:726
std::array< internal::BoundaryReconstructionStencilTopologyData< dim, n_components >, n_faces > boundary_stencils
Definition KurganovTadmor.hh:719
std::array< FaceJacobianDependencyCacheEntry, n_faces > face_jacobian_dependencies
Definition KurganovTadmor.hh:720
internal::CellStencilTopologyData< dim, n_components > stencil
Definition KurganovTadmor.hh:717
std::vector< NumberType > jxw
Definition KurganovTadmor.hh:723
std::vector< Point > quadrature_points
Definition KurganovTadmor.hh:722
Definition KurganovTadmor.hh:704
std::vector< types::global_dof_index > from_dofs
Definition KurganovTadmor.hh:706
std::vector< types::global_dof_index > to_dofs
Definition KurganovTadmor.hh:705
Definition KurganovTadmor.hh:708
bool boundary
Definition KurganovTadmor.hh:711
unsigned int cell_index
Definition KurganovTadmor.hh:709
Point face_center
Definition KurganovTadmor.hh:714
std::optional< unsigned int > neighbor_index
Definition KurganovTadmor.hh:712
unsigned int face_index
Definition KurganovTadmor.hh:710
std::optional< unsigned int > neighbor_face_index
Definition KurganovTadmor.hh:713
Definition KurganovTadmor.hh:875
GradientType gradients
Definition KurganovTadmor.hh:877
std::array< Tensor< 2, dim, NumberType >, n_components > hessians
Definition KurganovTadmor.hh:878
std::array< NumberType, n_components > values
Definition KurganovTadmor.hh:876
Definition reconstruction_cache.hh:350
Definition reconstruction_cache.hh:325
bool lower_boundary
Definition reconstruction_cache.hh:330
Definition reconstruction_cache.hh:43
Definition reconstruction_cache.hh:338
bool lower_boundary
Definition reconstruction_cache.hh:342
std::array< std::array< dealii::types::global_dof_index, n_components >, stencil_size > dof_indices
Definition reconstruction_cache.hh:341
std::array< dealii::Point< dim >, stencil_size > x
Definition reconstruction_cache.hh:340
size_t ghost_center
Definition reconstruction_cache.hh:345
unsigned int cell_face
Definition reconstruction_cache.hh:343
size_t ghost_left
Definition reconstruction_cache.hh:346
dealii::Point< dim > face_center
Definition reconstruction_cache.hh:344
size_t ghost_right
Definition reconstruction_cache.hh:347
Definition reconstruction_cache.hh:94
std::array< NumberType, n_components > u
Definition reconstruction_cache.hh:96
std::array< dealii::types::global_dof_index, n_components > dof_indices
Definition reconstruction_cache.hh:97
dealii::Point< dim > x
Definition reconstruction_cache.hh:95
Definition reconstruction_cache.hh:100
Definition reconstruction_cache.hh:118
NeighborData< dim, NumberType, n_components > neighbors
Definition reconstruction_cache.hh:121
CellData< dim, NumberType, n_components > cell
Definition reconstruction_cache.hh:120
std::array< dealii::types::boundary_id, n_faces > boundary_ids
Definition reconstruction_cache.hh:122
std::array< dealii::Point< dim >, n_faces > face_centers
Definition reconstruction_cache.hh:123
Definition reconstruction_cache.hh:135
Definition KurganovTadmor.hh:187
std::array< double, 2 > values
Definition KurganovTadmor.hh:189
std::array< uint, 2 > cell_indices
Definition KurganovTadmor.hh:188
Definition KurganovTadmor.hh:186
std::vector< CopyFaceData_I > face_data
Definition KurganovTadmor.hh:191
uint cell_index
Definition KurganovTadmor.hh:193
Definition KurganovTadmor.hh:143
std::vector< types::global_dof_index > from_dofs
Definition KurganovTadmor.hh:149
std::vector< types::global_dof_index > to_dofs
Definition KurganovTadmor.hh:148
FullMatrix< NumberType > cell_jacobian
Definition KurganovTadmor.hh:146
void reinit(const std::vector< types::global_dof_index > &cached_to_dofs, const std::vector< types::global_dof_index > &cached_from_dofs)
Definition KurganovTadmor.hh:151
FullMatrix< NumberType > extractor_cell_jacobian
Definition KurganovTadmor.hh:147
Definition KurganovTadmor.hh:140
FullMatrix< NumberType > extractor_cell_jacobian
Definition KurganovTadmor.hh:161
FullMatrix< NumberType > cell_mass_jacobian
Definition KurganovTadmor.hh:162
typename DoFHandler< dim >::active_cell_iterator Iterator
Definition KurganovTadmor.hh:141
CopyDataFace_J & next_face_data()
Definition KurganovTadmor.hh:179
void reinit(const Iterator &cell, uint dofs_per_cell, uint n_extractors)
Definition KurganovTadmor.hh:167
std::vector< CopyDataFace_J > face_data
Definition KurganovTadmor.hh:164
unsigned int active_face_count
Definition KurganovTadmor.hh:165
std::vector< types::global_dof_index > local_dof_indices
Definition KurganovTadmor.hh:163
FullMatrix< NumberType > cell_jacobian
Definition KurganovTadmor.hh:160
Definition KurganovTadmor.hh:105
Vector< NumberType > cell_residual
Definition KurganovTadmor.hh:106
void reinit(const unsigned int n_face_dofs)
Definition KurganovTadmor.hh:109
std::vector< types::global_dof_index > joint_dof_indices
Definition KurganovTadmor.hh:107
Definition KurganovTadmor.hh:104
CopyDataFace_R & next_face_data()
Definition KurganovTadmor.hh:132
void reinit(const Iterator &cell, uint dofs_per_cell)
Definition KurganovTadmor.hh:122
Vector< NumberType > cell_mass
Definition KurganovTadmor.hh:117
unsigned int active_face_count
Definition KurganovTadmor.hh:120
std::vector< CopyDataFace_R > face_data
Definition KurganovTadmor.hh:119
std::vector< types::global_dof_index > local_dof_indices
Definition KurganovTadmor.hh:118
Vector< NumberType > cell_residual
Definition KurganovTadmor.hh:116
Definition KurganovTadmor.hh:511
std::array< SimpleMatrix< dealii::Tensor< 1, dim, dealii::Tensor< 3, dim, NumberType > >, n_components >, 2 > third_derivatives
Definition KurganovTadmor.hh:515
std::array< SimpleMatrix< dealii::Tensor< 1, dim, NumberType >, n_components >, 2 > u
Definition KurganovTadmor.hh:512
std::array< SimpleMatrix< dealii::Tensor< 1, dim, dealii::Tensor< 1, dim, NumberType > >, n_components >, 2 > grad
Definition KurganovTadmor.hh:513
Definition reconstruction_cache.hh:55
Result struct for compute_kt_flux_and_speeds.
Definition KurganovTadmor.hh:272
std::array< dealii::Tensor< 1, dim, NumberType >, n_components > F_minus
Definition KurganovTadmor.hh:274
std::array< dealii::Tensor< 1, dim, NumberType >, n_components > a_half
Definition KurganovTadmor.hh:275
std::array< dealii::Tensor< 1, dim, NumberType >, n_components > F_plus
Definition KurganovTadmor.hh:273
Definition KurganovTadmor.hh:393
std::array< SimpleMatrix< dealii::Tensor< 1, dim, NumberType >, n_components >, 2 > u
Definition KurganovTadmor.hh:394
std::array< SimpleMatrix< dealii::Tensor< 1, dim, dealii::Tensor< 1, dim, NumberType > >, n_components >, 2 > grad
Definition KurganovTadmor.hh:395
Definition reconstruction_cache.hh:105
Class to hold data for each assembly thread, i.e. FEValues for cells, interfaces, as well as pre-allo...
Definition KurganovTadmor.hh:72
CellStencilData< dim, NumberType, n_components > temporary_stencil
Definition KurganovTadmor.hh:100
std::vector< types::global_dof_index > ncell_dof_indices
Definition KurganovTadmor.hh:89
std::array< NumberType, n_components > QuadratureValue
Definition KurganovTadmor.hh:73
std::vector< QuadratureValue > solution_values
Definition KurganovTadmor.hh:90
std::array< std::vector< ReconstructionDerivativeData< dim, NumberType, n_components > >, 2 > diffusion_derivatives
Definition KurganovTadmor.hh:94
ScratchData(const dealii::Quadrature< dim > &quadrature)
Definition KurganovTadmor.hh:75
CellStencilData< dim, NumberType, n_components > cell_stencil
Definition KurganovTadmor.hh:98
ScratchData(const ScratchData< dim, NumberType, n_components > &scratch_data)
Definition KurganovTadmor.hh:81
CellStencilData< dim, NumberType, n_components > ncell_stencil
Definition KurganovTadmor.hh:99
std::vector< types::global_dof_index > cell_dof_indices
Definition KurganovTadmor.hh:88
std::vector< QuadratureValue > solution_dot_values
Definition KurganovTadmor.hh:91
std::vector< GradientType< dim, NumberType, n_components > > source_gradient_derivatives
Definition KurganovTadmor.hh:97
std::array< std::vector< ReconstructionDerivativeData< dim, NumberType, n_components > >, 2 > reconstructed_derivatives
Definition KurganovTadmor.hh:93
Definition reconstruction_cache.hh:126
std::vector< std::array< bool, n_faces > > face_reconstruction_valid
Definition reconstruction_cache.hh:131
std::vector< CellStencilData< dim, NumberType, n_components > > cell_stencils
Definition reconstruction_cache.hh:128
bool topology_initialized
Definition reconstruction_cache.hh:132
std::vector< std::array< FaceReconstructionState< dim, NumberType, n_components >, n_faces > > face_reconstructions
Definition reconstruction_cache.hh:130
Definition tuples.hh:34
Definition run_reporter.hh:73
SummaryEvent & timing(const std::string_view name, const double average_ms, const std::size_t calls)
Definition run_reporter.hh:78
Stand-in for a raw potential that a model has declared it does not read.
Definition eom.hh:140
std::conditional_t< CarriesModel< D >, typename D::Model, D > type
Definition types.hh:63
A class to store a tuple with elements that can be accessed by name. The names are stored as FixedStr...
Definition tuples.hh:56
Generated by