internal Namespace Reference#

DiFfRG: DiFfRG::internal Namespace Reference
DiFfRG
Discretization Framework for functional Renormalization Group flows
DiFfRG::internal Namespace Reference

Classes

struct  _default_solver
 Maps a (matrix, vector) pair to the solver that suits it. More...
 
struct  _has_dim
 
struct  AffineConstraintMetadata
 
struct  assembler_model_of
 The model an assembler should use when the application did not name one. More...
 
struct  axis_periodic
 
struct  axis_periodic< C, i, std::void_t< typename C::template coordinate_type< i > > >
 
struct  components_of
 The component descriptor of a model, or the descriptor itself if one was passed directly. More...
 
struct  components_of< T >
 
struct  coord_periodic
 
struct  coord_periodic< T, std::void_t< decltype(T::periodic)> >
 
struct  DG0GradientModel
 
struct  EoMSideHessianBlend
 
class  FunctionFromLambda
 
struct  HessianJumpCompatibility
 
struct  LocalPotentialEvaluation
 
class  MatsubaraStorage
 A class that stores Matsubara quadrature points and weights for a given T, E. Its main purpose is to avoid recomputing the quadrature points and weights for each Matsubara integrator and provide a search algorithm to find previously computed Matsubara quadratures. More...
 
struct  model_of_descriptor
 The model a Discretization was built from, or void if it was built from a bare descriptor. More...
 
struct  model_of_descriptor< T >
 
struct  PotentialAssemblyCopy
 
struct  PotentialAssemblyScratch
 
struct  PotentialMinimum
 
struct  PotentialSolveStats
 How much of an output frame went into reconstructing potentials. More...
 
class  PotentialSystemCache
 The mesh-dependent half of solve_potential, retained across calls. More...
 
class  QuadratureStorage
 A class that stores Quadrature points and weights for a given type and order Its main purpose is to avoid recomputing the quadrature points and weights for each integrator and provide a search algorithm to find previously computed quadratures. More...
 
class  Transform_fT_p2
 
class  Transform_fT_p2_1ang
 
class  Transform_fT_p2_4D_2ang
 
class  Transform_p2
 
class  Transform_p2_1ang
 
class  Transform_p2_4D_2ang
 
class  Transform_p2_4D_3ang
 
struct  TriangulationHolder
 Holds the triangulation, constructing it the way its type requires. More...
 

Concepts

concept  IsModel
 Whether a type is a model, i.e. carries the component descriptor rather than being one.
 
concept  CarriesModel
 Whether a Discretization knows which model it belongs to.
 

Enumerations

enum class  PotentialKind : uint { eom = 0 , raw = 1 }
 Which of the two potentials a reconstruction is for; they are cached separately. More...
 

Functions

bool has_toml_extension (const std::string &filename)
 Whether a file name denotes a TOML file, i.e. ends in ".toml" or ".tml".
 
template<int dim>
void unflatten_index (std::size_t flat, const device::array< size_t, dim > &grid_size, device::array< size_t, dim > &idx)
 Turn a row-major flat index into a multi-index.
 
template<int dim>
void advance_index (const device::array< size_t, dim > &grid_size, device::array< size_t, dim > &idx)
 Advance a row-major multi-index by one (odometer increment).
 
template<int dim, typename NT , typename FUN >
NT serial_sum (const device::array< size_t, dim > &grid_size, const FUN &functor, const std::size_t begin, const std::size_t end)
 Strictly row-major serial sum of functor over the flat index range [begin, end).
 
template<typename... Args>
constexpr void validate_readout_helper_arity ()
 
template<typename Model , typename Constraints , typename Context >
void apply_model_affine_constraints (Model &model, Constraints &constraints, const Context &context)
 
template<typename Components , int dim, typename Discretization >
AffineConstraintMetadata< dim > build_affine_constraint_metadata (const Discretization &discretization)
 
template<typename CellIterator >
double face_normal_cell_width (const CellIterator &cell, const uint face_no)
 The extent of a cell along the normal of one of its faces.
 
template<typename CellIterator >
double cell_width (const CellIterator &cell)
 The smallest face-normal width over all faces of cell.
 
template<int dim>
double minimum_face_normal_cell_width (const dealii::DoFHandler< dim > &dof_handler)
 The smallest face-normal width anywhere on the mesh.
 
PotentialSolveStats & potential_solve_stats ()
 
template<int dim>
dealii::Point< dim > get_origin (const dealii::DoFHandler< dim > &dof_handler, typename dealii::DoFHandler< dim >::cell_iterator &EoM_cell)
 
template<int dim>
dealii::DoFHandler< dim >::active_cell_iterator matching_dof_cell (const dealii::DoFHandler< dim > &target_dof_handler, const typename dealii::DoFHandler< dim >::active_cell_iterator &source_cell)
 The cell at the same position in another DoFHandler.
 
template<int dim>
double l1_distance (const dealii::Point< dim > &a, const dealii::Point< dim > &b)
 
template<int dim>
double resolve_potential_smoothing_length (const dealii::DoFHandler< dim > &dof_handler, const double configured_length)
 
template<int dim>
Config::EoMConfig resolve_eom_config (const dealii::DoFHandler< dim > &dof_handler, Config::EoMConfig config)
 
template<int dim, typename NumberType >
dealii::types::global_dof_index select_gauge_dof (const dealii::AffineConstraints< NumberType > &constraints, const dealii::Point< dim > &origin, const std::map< dealii::types::global_dof_index, dealii::Point< dim > > &support_points)
 
template<int dim>
std::unique_ptr< dealii::FiniteElement< dim > > make_eom_potential_fe ()
 
template<int dim>
std::unique_ptr< dealii::FiniteElement< dim > > make_raw_potential_fe (const uint order=2)
 
template<int dim>
std::unique_ptr< dealii::FiniteElement< dim > > make_potential_fe (const PotentialKind kind, const uint raw_order)
 
template<int dim, typename EoMValue >
dealii::Tensor< 1, dim > eom_to_tensor (const EoMValue &eom)
 
template<int dim, typename VectorType , typename GradientFUN >
std::vector< DG0GradientModel< dim, typename VectorType::value_type > > recover_dg0_gradient_models (const VectorType &sol, const dealii::DoFHandler< dim > &solution_dof_handler, const dealii::Mapping< dim > &mapping, const GradientFUN &get_gradient)
 
template<int dim, typename NumberType >
dealii::Tensor< 1, dim, NumberType > evaluate_dg0_gradient_model (const DG0GradientModel< dim, NumberType > &model, const dealii::Point< dim > &point)
 
template<int dim, typename NumberType >
dealii::Tensor< 2, dim, NumberType > symmetric_jacobian (const DG0GradientModel< dim, NumberType > &model)
 
template<int dim, typename NumberType >
HessianJumpCompatibility< dim > hessian_jump_compatibility (const dealii::Tensor< 2, dim, NumberType > &left, const dealii::Tensor< 2, dim, NumberType > &right, const dealii::Tensor< 1, dim > &coordinate_scale)
 
template<int dim, typename NumberType >
void prepare_eom_side_hessian_recovery (ReconstructedRawPotential< dim, NumberType > &potential, const std::vector< DG0GradientModel< dim, NumberType > > &models, const dealii::DoFHandler< dim > &solution_dof_handler, const double jump_threshold)
 
template<int dim, typename NumberType >
EoMSideHessianBlend< dim > eom_side_hessian_blend (const ReconstructedRawPotential< dim, NumberType > &potential, const uint root_cell, const dealii::Point< dim > &point)
 
template<int dim, typename NumberType >
void recover_continuous_hessian_field (ReconstructedRawPotential< dim, NumberType > &potential, const std::vector< DG0GradientModel< dim, NumberType > > &models, const dealii::DoFHandler< dim > &solution_dof_handler)
 
template<int dim, typename NumberType >
std::optional< dealii::Tensor< 2, dim, NumberType > > evaluate_eom_side_hessian (const ReconstructedRawPotential< dim, NumberType > &potential, const uint root_cell, const dealii::Point< dim > &point)
 
template<int dim, typename VectorType , typename EoMFUN >
void assemble_potential_system (const VectorType &sol, const dealii::DoFHandler< dim > &solution_dof_handler, const dealii::DoFHandler< dim > &potential_dof_handler, const dealii::FiniteElement< dim > &potential_fe, const dealii::Mapping< dim > &mapping, const EoMFUN &get_EoM, const dealii::Quadrature< dim > &quadrature, const dealii::Quadrature< dim - 1 > &face_quadrature, const dealii::AffineConstraints< typename VectorType::value_type > &constraints, dealii::SparseMatrix< typename VectorType::value_type > &matrix, dealii::Vector< typename VectorType::value_type > &rhs, const double smoothing_length, const bool assemble_matrix)
 
template<int dim>
LocalPotentialEvaluation< dim > evaluate_local_potential (const dealii::FiniteElement< dim > &potential_fe, const std::vector< double > &local_values, const dealii::Point< dim > &point)
 
template<int dim>
bool projected_newton_direction (const dealii::Tensor< 2, dim > &hessian, const dealii::Tensor< 1, dim > &projected_gradient, const std::array< bool, dim > &fixed, dealii::Tensor< 1, dim > &direction)
 
template<int dim, typename NumberType >
PotentialMinimum< dim, NumberType > refine_cell_minimum (const typename dealii::DoFHandler< dim >::active_cell_iterator &cell, const dealii::FiniteElement< dim > &potential_fe, const dealii::Mapping< dim > &mapping, const dealii::Vector< NumberType > &potential, const dealii::Quadrature< dim > &quadrature, const Config::EoMConfig &config, const std::optional< dealii::Point< dim > > &initial_unit_point=std::nullopt)
 
template<int dim, typename NumberType >
PotentialMinimum< dim, NumberType > find_potential_minimum (const dealii::DoFHandler< dim > &potential_dof_handler, const dealii::FiniteElement< dim > &potential_fe, const dealii::Mapping< dim > &mapping, const dealii::Vector< NumberType > &potential, const dealii::Quadrature< dim > &quadrature, const Config::EoMConfig &config, const std::optional< dealii::Point< dim > > &initial_guess=std::nullopt, const std::map< dealii::types::global_dof_index, dealii::Point< dim > > *cached_support_points=nullptr)
 
template<int dim, typename VectorType , typename GradientFUN >
ReconstructedRawPotential< dim, typename VectorType::value_type > solve_potential (const VectorType &sol, const dealii::DoFHandler< dim > &solution_dof_handler, const dealii::Mapping< dim > &mapping, const GradientFUN &get_gradient, const Config::EoMConfig &config, const PotentialKind kind, PotentialSystemCache< dim, typename VectorType::value_type > *cache)
 
template<int dim, typename VectorType , typename EoMFUN >
ReconstructedEoMPotential< dim, typename VectorType::value_type > reconstruct_potential (typename dealii::DoFHandler< dim >::cell_iterator &EoM_cell, const VectorType &sol, const dealii::DoFHandler< dim > &solution_dof_handler, const dealii::Mapping< dim > &mapping, const EoMFUN &get_EoM, const Config::EoMConfig &config, const std::optional< dealii::Point< dim > > &initial_guess=std::nullopt, PotentialSystemCache< dim, typename VectorType::value_type > *cache=nullptr)
 
size_t default_quadrature_order (const std::string &name)
 Fallback quadrature order for a momentum-space direction.
 
template<int dim, typename NT = double>
std::array< size_t, dim > make_int_grid (const ConfigTree &config, const std::array< std::string, dim > &names)
 
double device_fill_threshold ()
 Kernel evaluations needed to saturate one rank's compute resource.
 
double host_fill_threshold ()
 
template<typename T >
auto KOKKOS_FORCEINLINE_FUNCTION Cosh (const T x)
 
template<typename T >
auto KOKKOS_FORCEINLINE_FUNCTION Sinh (const T x)
 
template<typename T >
auto KOKKOS_FORCEINLINE_FUNCTION Tanh (const T x)
 
template<typename T >
auto KOKKOS_FORCEINLINE_FUNCTION Coth (const T x)
 
template<typename T >
auto KOKKOS_FORCEINLINE_FUNCTION Sech (const T x)
 
template<typename T >
auto KOKKOS_FORCEINLINE_FUNCTION Csch (const T x)
 
template<typename MatrixType >
std::pair< std::size_t, std::size_t > owned_row_range (const MatrixType &matrix)
 The global rows this rank may read.
 
template<typename MatrixType >
bool is_distributed_matrix (const MatrixType &)
 
template<typename MatrixType , typename Visitor >
void visit_matrix_row (const MatrixType &matrix, const std::size_t row, Visitor &&visitor)
 
template<typename MatrixType >
double matrix_one_norm (const MatrixType &matrix)
 
template<typename VectorType , typename Solve , typename SolveTranspose >
double estimate_inverse_one_norm (const std::size_t n, Solve &&solve, SolveTranspose &&solve_transpose, const unsigned int max_iterations=5)
 
template<typename MatrixType >
void build_maximum_equilibration (const MatrixType &matrix, std::vector< double > &row_scale, std::vector< double > &column_scale, double &scaled_one_norm)
 

Variables

constexpr std::size_t reduction_serial_cutoff = 4096
 Number of grid points below which a reduction is carried out serially.
 
constexpr std::size_t reduction_grainsize = 256
 Leaf size of the deterministic reduction tree.
 
template<typename >
constexpr bool accepts_affine_constraint_context = false
 
constexpr uint n_potential_kinds = 2
 
constexpr double minimum_rank_one_confidence = 0.5
 
template<typename >
constexpr bool data_output_removed = false
 
template<typename... >
constexpr bool output_frame_api_removed = false
 
constexpr bool has_device_backend = !std::is_same_v<typename GPU_exec::memory_space, CPU_memory>
 Whether the default execution space is a real device.
 
constexpr double host_grain = 1024.
 
constexpr double launch_threshold = 1024.
 Evaluations below which a slice cannot pay for the launch that computes it.
 
template<typename T , int dim>
constexpr bool has_dim = _has_dim<T, dim>::value
 

Enumeration Type Documentation

◆ PotentialKind

Which of the two potentials a reconstruction is for; they are cached separately.

Enumerator
eom 
raw 

Function Documentation

◆ advance_index()

template<int dim>
void DiFfRG::internal::advance_index ( const device::array< size_t, dim > & grid_size,
device::array< size_t, dim > & idx )

Advance a row-major multi-index by one (odometer increment).

◆ apply_model_affine_constraints()

template<typename Model , typename Constraints , typename Context >
void DiFfRG::internal::apply_model_affine_constraints ( Model & model,
Constraints & constraints,
const Context & context )

◆ assemble_potential_system()

template<int dim, typename VectorType , typename EoMFUN >
void DiFfRG::internal::assemble_potential_system ( const VectorType & sol,
const dealii::DoFHandler< dim > & solution_dof_handler,
const dealii::DoFHandler< dim > & potential_dof_handler,
const dealii::FiniteElement< dim > & potential_fe,
const dealii::Mapping< dim > & mapping,
const EoMFUN & get_EoM,
const dealii::Quadrature< dim > & quadrature,
const dealii::Quadrature< dim - 1 > & face_quadrature,
const dealii::AffineConstraints< typename VectorType::value_type > & constraints,
dealii::SparseMatrix< typename VectorType::value_type > & matrix,
dealii::Vector< typename VectorType::value_type > & rhs,
const double smoothing_length,
const bool assemble_matrix )

◆ build_affine_constraint_metadata()

template<typename Components , int dim, typename Discretization >
AffineConstraintMetadata< dim > DiFfRG::internal::build_affine_constraint_metadata ( const Discretization & discretization)

◆ build_maximum_equilibration()

template<typename MatrixType >
void DiFfRG::internal::build_maximum_equilibration ( const MatrixType & matrix,
std::vector< double > & row_scale,
std::vector< double > & column_scale,
double & scaled_one_norm )

◆ cell_width()

template<typename CellIterator >
double DiFfRG::internal::cell_width ( const CellIterator & cell)

The smallest face-normal width over all faces of cell.

Templated on the iterator rather than on the dimension: the only thing needed of a cell is that it can measure itself and its faces, and the assemblers hand out several different accessor types.

◆ Cosh()

template<typename T >
auto KOKKOS_FORCEINLINE_FUNCTION DiFfRG::internal::Cosh ( const T x)

◆ Coth()

template<typename T >
auto KOKKOS_FORCEINLINE_FUNCTION DiFfRG::internal::Coth ( const T x)

◆ Csch()

template<typename T >
auto KOKKOS_FORCEINLINE_FUNCTION DiFfRG::internal::Csch ( const T x)

◆ default_quadrature_order()

size_t DiFfRG::internal::default_quadrature_order ( const std::string & name)
inline

Fallback quadrature order for a momentum-space direction.

Radial directions need far more points than angular ones, so the guess depends on the name. Both are only guesses - make_int_grid() warns when either is taken.

◆ device_fill_threshold()

double DiFfRG::internal::device_fill_threshold ( )

Kernel evaluations needed to saturate one rank's compute resource.

Both are derived from Kokkos::…::concurrency() and cached on first use, so the split width adapts to the hardware instead of being a constant tuned on one machine. That matters: the measured fill threshold on the development GPU (5e4) is within 10% of its resident-thread capacity (55 296 = 36 SMs x 1536), and an A100 has four times that. A hardcoded constant would over-split by 4x on the very cluster this feature exists for.

The two differ in more than magnitude. On the device concurrency() counts resident threads and each thread evaluates the kernel once, so the fill threshold is the concurrency itself. On the host it counts workers, each of which loops over many evaluations, so the threshold is workers x a grain large enough that one parallel_for spawn (order 10 us) disappears into the work it dispatches.

◆ eom_side_hessian_blend()

template<int dim, typename NumberType >
EoMSideHessianBlend< dim > DiFfRG::internal::eom_side_hessian_blend ( const ReconstructedRawPotential< dim, NumberType > & potential,
const uint root_cell,
const dealii::Point< dim > & point )

Smoothly localize the one-sided recovery to the detected non-analytic faces.

◆ eom_to_tensor()

template<int dim, typename EoMValue >
dealii::Tensor< 1, dim > DiFfRG::internal::eom_to_tensor ( const EoMValue & eom)

◆ estimate_inverse_one_norm()

template<typename VectorType , typename Solve , typename SolveTranspose >
double DiFfRG::internal::estimate_inverse_one_norm ( const std::size_t n,
Solve && solve,
SolveTranspose && solve_transpose,
const unsigned int max_iterations = 5 )

◆ evaluate_dg0_gradient_model()

template<int dim, typename NumberType >
dealii::Tensor< 1, dim, NumberType > DiFfRG::internal::evaluate_dg0_gradient_model ( const DG0GradientModel< dim, NumberType > & model,
const dealii::Point< dim > & point )

◆ evaluate_eom_side_hessian()

template<int dim, typename NumberType >
std::optional< dealii::Tensor< 2, dim, NumberType > > DiFfRG::internal::evaluate_eom_side_hessian ( const ReconstructedRawPotential< dim, NumberType > & potential,
const uint root_cell,
const dealii::Point< dim > & point )

Average a symmetric Hessian over the face-connected smooth component containing the evaluation point.

◆ evaluate_local_potential()

template<int dim>
LocalPotentialEvaluation< dim > DiFfRG::internal::evaluate_local_potential ( const dealii::FiniteElement< dim > & potential_fe,
const std::vector< double > & local_values,
const dealii::Point< dim > & point )

◆ face_normal_cell_width()

template<typename CellIterator >
double DiFfRG::internal::face_normal_cell_width ( const CellIterator & cell,
const uint face_no )

The extent of a cell along the normal of one of its faces.

Volume over face area, which is the width of the cell in the direction that face looks in. Cheaper and better behaved than the diameter for anisotropic cells: on a long thin cell the diameter is dominated by the long direction, while this reports the short one when asked about the face that spans it.

◆ find_potential_minimum()

template<int dim, typename NumberType >
PotentialMinimum< dim, NumberType > DiFfRG::internal::find_potential_minimum ( const dealii::DoFHandler< dim > & potential_dof_handler,
const dealii::FiniteElement< dim > & potential_fe,
const dealii::Mapping< dim > & mapping,
const dealii::Vector< NumberType > & potential,
const dealii::Quadrature< dim > & quadrature,
const Config::EoMConfig & config,
const std::optional< dealii::Point< dim > > & initial_guess = std::nullopt,
const std::map< dealii::types::global_dof_index, dealii::Point< dim > > * cached_support_points = nullptr )

◆ get_origin()

template<int dim>
dealii::Point< dim > DiFfRG::internal::get_origin ( const dealii::DoFHandler< dim > & dof_handler,
typename dealii::DoFHandler< dim >::cell_iterator & EoM_cell )

◆ has_toml_extension()

bool DiFfRG::internal::has_toml_extension ( const std::string & filename)

Whether a file name denotes a TOML file, i.e. ends in ".toml" or ".tml".

The comparison is case-insensitive. Everything else is treated as JSON.

◆ hessian_jump_compatibility()

template<int dim, typename NumberType >
HessianJumpCompatibility< dim > DiFfRG::internal::hessian_jump_compatibility ( const dealii::Tensor< 2, dim, NumberType > & left,
const dealii::Tensor< 2, dim, NumberType > & right,
const dealii::Tensor< 1, dim > & coordinate_scale )

Measure whether a Hessian jump is compatible with a C1 scalar potential across a smooth interface.

◆ host_fill_threshold()

double DiFfRG::internal::host_fill_threshold ( )

◆ is_distributed_matrix()

template<typename MatrixType >
bool DiFfRG::internal::is_distributed_matrix ( const MatrixType & )

◆ l1_distance()

template<int dim>
double DiFfRG::internal::l1_distance ( const dealii::Point< dim > & a,
const dealii::Point< dim > & b )

◆ make_eom_potential_fe()

template<int dim>
std::unique_ptr< dealii::FiniteElement< dim > > DiFfRG::internal::make_eom_potential_fe ( )

◆ make_int_grid()

template<int dim, typename NT = double>
std::array< size_t, dim > DiFfRG::internal::make_int_grid ( const ConfigTree & config,
const std::array< std::string, dim > & names )

◆ make_potential_fe()

template<int dim>
std::unique_ptr< dealii::FiniteElement< dim > > DiFfRG::internal::make_potential_fe ( const PotentialKind kind,
const uint raw_order )

◆ make_raw_potential_fe()

template<int dim>
std::unique_ptr< dealii::FiniteElement< dim > > DiFfRG::internal::make_raw_potential_fe ( const uint order = 2)

◆ matching_dof_cell()

template<int dim>
dealii::DoFHandler< dim >::active_cell_iterator DiFfRG::internal::matching_dof_cell ( const dealii::DoFHandler< dim > & target_dof_handler,
const typename dealii::DoFHandler< dim >::active_cell_iterator & source_cell )

The cell at the same position in another DoFHandler.

Addressed by (level, index) rather than by copying the source accessor. TriaAccessorBase::copy_from also copies the triangulation pointer, which is silently wrong as soon as the two DoFHandlers sit on different – though structurally identical – triangulations, which is exactly what the distributed policy does in solve_potential.

◆ matrix_one_norm()

template<typename MatrixType >
double DiFfRG::internal::matrix_one_norm ( const MatrixType & matrix)

◆ minimum_face_normal_cell_width()

template<int dim>
double DiFfRG::internal::minimum_face_normal_cell_width ( const dealii::DoFHandler< dim > & dof_handler)

The smallest face-normal width anywhere on the mesh.

◆ owned_row_range()

template<typename MatrixType >
std::pair< std::size_t, std::size_t > DiFfRG::internal::owned_row_range ( const MatrixType & matrix)

The global rows this rank may read.

PETSc's MatGetRow works only for locally owned rows – reading someone else's row is an error, not a slow path – so a diagnostic that walks 0..n unconditionally aborts every rank but the one owning row 0. Distributed matrices expose local_range(); serial ones do not, and for them the whole matrix is local.

◆ potential_solve_stats()

PotentialSolveStats & DiFfRG::internal::potential_solve_stats ( )
inline

◆ prepare_eom_side_hessian_recovery()

template<int dim, typename NumberType >
void DiFfRG::internal::prepare_eom_side_hessian_recovery ( ReconstructedRawPotential< dim, NumberType > & potential,
const std::vector< DG0GradientModel< dim, NumberType > > & models,
const dealii::DoFHandler< dim > & solution_dof_handler,
const double jump_threshold )

◆ projected_newton_direction()

template<int dim>
bool DiFfRG::internal::projected_newton_direction ( const dealii::Tensor< 2, dim > & hessian,
const dealii::Tensor< 1, dim > & projected_gradient,
const std::array< bool, dim > & fixed,
dealii::Tensor< 1, dim > & direction )

◆ reconstruct_potential()

template<int dim, typename VectorType , typename EoMFUN >
ReconstructedEoMPotential< dim, typename VectorType::value_type > DiFfRG::internal::reconstruct_potential ( typename dealii::DoFHandler< dim >::cell_iterator & EoM_cell,
const VectorType & sol,
const dealii::DoFHandler< dim > & solution_dof_handler,
const dealii::Mapping< dim > & mapping,
const EoMFUN & get_EoM,
const Config::EoMConfig & config,
const std::optional< dealii::Point< dim > > & initial_guess = std::nullopt,
PotentialSystemCache< dim, typename VectorType::value_type > * cache = nullptr )

◆ recover_continuous_hessian_field()

template<int dim, typename NumberType >
void DiFfRG::internal::recover_continuous_hessian_field ( ReconstructedRawPotential< dim, NumberType > & potential,
const std::vector< DG0GradientModel< dim, NumberType > > & models,
const dealii::DoFHandler< dim > & solution_dof_handler )

Recover the cellwise FV Hessians into a continuous Q1 tensor field.

Each vertex receives the unbiased mean of all incident-cell Hessians. This removes cell-face resets without introducing a preferred coordinate direction.

◆ recover_dg0_gradient_models()

template<int dim, typename VectorType , typename GradientFUN >
std::vector< DG0GradientModel< dim, typename VectorType::value_type > > DiFfRG::internal::recover_dg0_gradient_models ( const VectorType & sol,
const dealii::DoFHandler< dim > & solution_dof_handler,
const dealii::Mapping< dim > & mapping,
const GradientFUN & get_gradient )

◆ refine_cell_minimum()

template<int dim, typename NumberType >
PotentialMinimum< dim, NumberType > DiFfRG::internal::refine_cell_minimum ( const typename dealii::DoFHandler< dim >::active_cell_iterator & cell,
const dealii::FiniteElement< dim > & potential_fe,
const dealii::Mapping< dim > & mapping,
const dealii::Vector< NumberType > & potential,
const dealii::Quadrature< dim > & quadrature,
const Config::EoMConfig & config,
const std::optional< dealii::Point< dim > > & initial_unit_point = std::nullopt )

◆ resolve_eom_config()

template<int dim>
Config::EoMConfig DiFfRG::internal::resolve_eom_config ( const dealii::DoFHandler< dim > & dof_handler,
Config::EoMConfig config )

◆ resolve_potential_smoothing_length()

template<int dim>
double DiFfRG::internal::resolve_potential_smoothing_length ( const dealii::DoFHandler< dim > & dof_handler,
const double configured_length )

◆ Sech()

template<typename T >
auto KOKKOS_FORCEINLINE_FUNCTION DiFfRG::internal::Sech ( const T x)

◆ select_gauge_dof()

template<int dim, typename NumberType >
dealii::types::global_dof_index DiFfRG::internal::select_gauge_dof ( const dealii::AffineConstraints< NumberType > & constraints,
const dealii::Point< dim > & origin,
const std::map< dealii::types::global_dof_index, dealii::Point< dim > > & support_points )

◆ serial_sum()

template<int dim, typename NT , typename FUN >
NT DiFfRG::internal::serial_sum ( const device::array< size_t, dim > & grid_size,
const FUN & functor,
const std::size_t begin,
const std::size_t end )

Strictly row-major serial sum of functor over the flat index range [begin, end).

◆ Sinh()

template<typename T >
auto KOKKOS_FORCEINLINE_FUNCTION DiFfRG::internal::Sinh ( const T x)

◆ solve_potential()

template<int dim, typename VectorType , typename GradientFUN >
ReconstructedRawPotential< dim, typename VectorType::value_type > DiFfRG::internal::solve_potential ( const VectorType & sol,
const dealii::DoFHandler< dim > & solution_dof_handler,
const dealii::Mapping< dim > & mapping,
const GradientFUN & get_gradient,
const Config::EoMConfig & config,
const PotentialKind kind,
PotentialSystemCache< dim, typename VectorType::value_type > * cache )

◆ symmetric_jacobian()

template<int dim, typename NumberType >
dealii::Tensor< 2, dim, NumberType > DiFfRG::internal::symmetric_jacobian ( const DG0GradientModel< dim, NumberType > & model)

◆ Tanh()

template<typename T >
auto KOKKOS_FORCEINLINE_FUNCTION DiFfRG::internal::Tanh ( const T x)

◆ unflatten_index()

template<int dim>
void DiFfRG::internal::unflatten_index ( std::size_t flat,
const device::array< size_t, dim > & grid_size,
device::array< size_t, dim > & idx )

Turn a row-major flat index into a multi-index.

◆ validate_readout_helper_arity()

template<typename... Args>
void DiFfRG::internal::validate_readout_helper_arity ( )
constexpr

◆ visit_matrix_row()

template<typename MatrixType , typename Visitor >
void DiFfRG::internal::visit_matrix_row ( const MatrixType & matrix,
const std::size_t row,
Visitor && visitor )

Variable Documentation

◆ accepts_affine_constraint_context

template<typename >
bool DiFfRG::internal::accepts_affine_constraint_context = false
inlineconstexpr

◆ data_output_removed

template<typename >
bool DiFfRG::internal::data_output_removed = false
inlineconstexpr

◆ has_device_backend

bool DiFfRG::internal::has_device_backend = !std::is_same_v<typename GPU_exec::memory_space, CPU_memory>
inlineconstexpr

Whether the default execution space is a real device.

Only then is there anything for a deferred host map to overlap with. In a CUDA-less build every map runs on the host anyway, so queuing them would be pure bookkeeping for no gain – and the queue is therefore compiled out entirely rather than merely skipped.

◆ has_dim

template<typename T , int dim>
bool DiFfRG::internal::has_dim = _has_dim<T, dim>::value
constexpr

◆ host_grain

double DiFfRG::internal::host_grain = 1024.
inlineconstexpr

Evaluations per worker the host backend needs to amortize a parallel_for spawn. A judgement, not a measurement – see the note in documentation/multi_gpu.md.

◆ launch_threshold

double DiFfRG::internal::launch_threshold = 1024.
inlineconstexpr

Evaluations below which a slice cannot pay for the launch that computes it.

This is the threshold the fill thresholds above deliberately are not: for a map inside a batch, splitting past the fill threshold buys nothing, because the ranks it would leave out are about to be filled by the other maps in the batch. For a map that is flushed on return there are no other maps, so those ranks are provably idle and the only reason left not to split is that a slice must still cover its own launch (order 10 us). See MapScheduler::schedule().

◆ minimum_rank_one_confidence

double DiFfRG::internal::minimum_rank_one_confidence = 0.5
inlineconstexpr

◆ n_potential_kinds

uint DiFfRG::internal::n_potential_kinds = 2
inlineconstexpr

◆ output_frame_api_removed

template<typename... >
bool DiFfRG::internal::output_frame_api_removed = false
inlineconstexpr

◆ reduction_grainsize

std::size_t DiFfRG::internal::reduction_grainsize = 256
inlineconstexpr

Leaf size of the deterministic reduction tree.

blocked_range + simple_partitioner splits at the midpoint until a chunk is <= grainsize, so the shape of the tree - and hence the order of the floating point additions - is a pure function of (number of points, grainsize).

◆ reduction_serial_cutoff

std::size_t DiFfRG::internal::reduction_serial_cutoff = 4096
inlineconstexpr

Number of grid points below which a reduction is carried out serially.

Momentum grids in DiFfRG are small - a radial 1D integral typically has 32 Gauss-Legendre nodes - and TBBReduction is almost always called from inside an already parallel region: a deal.II MeshWorker::mesh_loop cell worker, or the outer tbb::parallel_for of Integrator::map. Spawning a task tree for such a reduction is pure overhead; measured on a 32-node O(N) kernel it costs a factor 16 when called serially and a factor 5 when nested.

Deliberately a compile-time constant and not derived from the available concurrency: the summation order must not depend on the thread count.