/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/discretization/common/eom.hh File Reference#

DiFfRG: /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/discretization/common/eom.hh File Reference
DiFfRG
Discretization Framework for functional Renormalization Group flows
eom.hh File Reference
#include <boost/signals2/connection.hpp>
#include <Eigen/Eigenvalues>
#include <Eigen/QR>
#include <deal.II/base/point.h>
#include <deal.II/distributed/tria_base.h>
#include <deal.II/base/quadrature_lib.h>
#include <deal.II/dofs/dof_handler.h>
#include <deal.II/dofs/dof_tools.h>
#include <deal.II/fe/fe_dgq.h>
#include <deal.II/fe/fe_interface_values.h>
#include <deal.II/fe/fe_q.h>
#include <deal.II/fe/fe_values.h>
#include <deal.II/grid/grid_tools.h>
#include <deal.II/grid/grid_tools_geometry.h>
#include <deal.II/lac/affine_constraints.h>
#include <deal.II/lac/dynamic_sparsity_pattern.h>
#include <deal.II/lac/full_matrix.h>
#include <deal.II/lac/sparse_direct.h>
#include <deal.II/lac/sparse_matrix.h>
#include <deal.II/lac/sparsity_pattern.h>
#include <deal.II/lac/vector.h>
#include <deal.II/meshworker/mesh_loop.h>
#include <deal.II/numerics/fe_field_function.h>
#include <DiFfRG/discretization/common/cell_geometry.hh>
#include <DiFfRG/discretization/common/eom_config.hh>
#include <DiFfRG/discretization/common/serial_mirror.hh>
#include <DiFfRG/discretization/data/output_timings.hh>
#include <algorithm>
#include <array>
#include <cmath>
#include <deque>
#include <limits>
#include <map>
#include <memory>
#include <mutex>
#include <optional>
#include <stdexcept>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

struct  DiFfRG::internal::PotentialSolveStats
 How much of an output frame went into reconstructing potentials. More...
 
struct  DiFfRG::ReconstructedEoMPotential< dim, NumberType >
 An owning scalar potential reconstructed from a model EoM vector field. More...
 
struct  DiFfRG::RecoveredMassHessian< dim, NumberType >
 A scalar potential reconstructed from a model-provided raw gradient. More...
 
struct  DiFfRG::ReconstructedRawPotential< dim, NumberType >
 
struct  DiFfRG::ReconstructedRawPotential< 0, NumberType >
 
struct  DiFfRG::RawPotentialEvaluation< dim, NumberType >
 Reconstructed potential data and the explicitly separate Hessian used for mass extraction. More...
 
struct  DiFfRG::UnusedPotential
 Stand-in for a raw potential that a model has declared it does not read. More...
 
struct  DiFfRG::UnusedPotentialEvaluation
 Evaluating an unread potential: the same three slots, all inert. More...
 
struct  DiFfRG::ReconstructedEoMPotential< 0, NumberType >
 
struct  DiFfRG::EoMResult< dim, NumberType >
 Result of finding an EoM point, optionally including its reconstructed potential. More...
 
class  DiFfRG::internal::PotentialSystemCache< dim, NumberType >
 The mesh-dependent half of solve_potential, retained across calls. More...
 
struct  DiFfRG::internal::PotentialSystemCache< dim, NumberType >::Entry
 
struct  DiFfRG::internal::DG0GradientModel< dim, NumberType >
 
struct  DiFfRG::internal::HessianJumpCompatibility< dim >
 
struct  DiFfRG::internal::EoMSideHessianBlend< dim >
 
struct  DiFfRG::internal::PotentialAssemblyScratch< dim, NumberType >
 
struct  DiFfRG::internal::PotentialAssemblyCopy< NumberType >
 
struct  DiFfRG::internal::PotentialAssemblyCopy< NumberType >::FaceCopy
 
struct  DiFfRG::internal::PotentialMinimum< dim, NumberType >
 
struct  DiFfRG::internal::LocalPotentialEvaluation< dim >
 

Namespaces

namespace  DiFfRG
 
namespace  DiFfRG::internal
 

Enumerations

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

Functions

PotentialSolveStats & DiFfRG::internal::potential_solve_stats ()
 
template<int dim>
UnusedPotentialEvaluation DiFfRG::evaluate_raw_potential (const UnusedPotential &, const dealii::Mapping< dim > &, const dealii::Point< dim > &)
 
template<int dim>
dealii::Point< dim > DiFfRG::internal::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 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.
 
template<int dim>
double DiFfRG::internal::l1_distance (const dealii::Point< dim > &a, const dealii::Point< dim > &b)
 
template<int dim>
double DiFfRG::internal::resolve_potential_smoothing_length (const dealii::DoFHandler< dim > &dof_handler, const double configured_length)
 
template<int dim>
Config::EoMConfig DiFfRG::internal::resolve_eom_config (const dealii::DoFHandler< dim > &dof_handler, Config::EoMConfig config)
 
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)
 
template<int dim>
std::unique_ptr< dealii::FiniteElement< dim > > DiFfRG::internal::make_eom_potential_fe ()
 
template<int dim>
std::unique_ptr< dealii::FiniteElement< dim > > DiFfRG::internal::make_raw_potential_fe (const uint order=2)
 
template<int dim>
std::unique_ptr< dealii::FiniteElement< dim > > DiFfRG::internal::make_potential_fe (const PotentialKind kind, const uint raw_order)
 
template<int dim, typename EoMValue >
dealii::Tensor< 1, dim > DiFfRG::internal::eom_to_tensor (const EoMValue &eom)
 
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)
 
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)
 
template<int dim, typename NumberType >
dealii::Tensor< 2, dim, NumberType > DiFfRG::internal::symmetric_jacobian (const DG0GradientModel< dim, NumberType > &model)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
template<int dim, typename VectorType , typename GradientFUN >
ReconstructedRawPotential< dim, typename VectorType::value_type > DiFfRG::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.
 
template<int dim, typename NumberType >
RawPotentialEvaluation< dim, NumberType > DiFfRG::evaluate_raw_potential (const ReconstructedRawPotential< dim, NumberType > &potential, const dealii::Mapping< dim > &mapping, const dealii::Point< dim > &point)
 Evaluate a reconstructed raw potential and its mass-extraction Hessian at a real-space point.
 
template<int dim, typename VectorType , typename EoMFUN , typename EoMPFUN >
EoMResult< dim, typename VectorType::value_type > DiFfRG::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 and locally refined minimum of that potential.
 
template<int dim, typename VectorType , typename EoMFUN , typename EoMPFUN >
EoMResult< dim, typename VectorType::value_type > DiFfRG::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 auto &p, [[maybe_unused]] const auto &values) { return p;}, const double EoM_abs_tol=Config::EoMConfig::default_abs_tol, const uint max_iter=Config::EoMConfig::default_max_iter, const double EoM_smoothing_length=Config::EoMConfig::default_smoothing_length, const std::optional< dealii::Point< dim > > &initial_guess=std::nullopt, internal::PotentialSystemCache< dim, typename VectorType::value_type > *cache=nullptr)
 
template<int dim, typename VectorType , typename EoMFUN , typename EoMPFUN >
dealii::Point< dim > DiFfRG::get_EoM_point (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 and locally refined minimum of that potential.
 
template<int dim, typename VectorType , typename EoMFUN , typename EoMPFUN >
dealii::Point< dim > DiFfRG::get_EoM_point (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 auto &p, [[maybe_unused]] const auto &values) { return p;}, const double EoM_abs_tol=Config::EoMConfig::default_abs_tol, const uint max_iter=Config::EoMConfig::default_max_iter, const double EoM_smoothing_length=Config::EoMConfig::default_smoothing_length, const std::optional< dealii::Point< dim > > &initial_guess=std::nullopt)
 

Variables

constexpr uint DiFfRG::internal::n_potential_kinds = 2
 
constexpr double DiFfRG::internal::minimum_rank_one_confidence = 0.5