PotentialSystemCache< dim, NumberType > Class Template Reference#

DiFfRG: DiFfRG::internal::PotentialSystemCache< dim, NumberType > Class Template Reference
DiFfRG
Discretization Framework for functional Renormalization Group flows
DiFfRG::internal::PotentialSystemCache< dim, NumberType > Class Template Reference

The mesh-dependent half of solve_potential, retained across calls. More...

#include <eom.hh>

Classes

struct  Entry
 

Public Member Functions

Entry & entry (const PotentialKind kind)
 The entry for one kind of potential, created empty on first use.
 

Private Attributes

std::array< std::unique_ptr< Entry >, n_potential_kinds > entries
 

Static Private Attributes

static constexpr int face_dim = dim > 0 ? dim - 1 : 0
 

Detailed Description

template<int dim, typename NumberType>
class DiFfRG::internal::PotentialSystemCache< dim, NumberType >

The mesh-dependent half of solve_potential, retained across calls.

The potential system is a least-squares projection of a gradient field onto a continuous element, and its matrix depends only on the mesh, that element and the smoothing length – the solution enters through the right-hand side alone. Rebuilt per call, as it was, every reconstruction distributes a fresh DoF handler, builds a flux sparsity pattern, constructs quadratures and runs a direct sparse factorisation. Every residual and jacobian evaluation of a model carrying extractors pays that twice. Cached, all of it happens once per mesh and a reconstruction costs one right-hand side assembly plus a back-substitution.

A cache is owned by the assembler that reconstructs, so it cannot outlive the mesh it describes, and is used from whichever thread drives assembly or readouts. It is not internally synchronised and must not be shared between threads that run concurrently.

Member Function Documentation

◆ entry()

template<int dim, typename NumberType >
Entry & DiFfRG::internal::PotentialSystemCache< dim, NumberType >::entry ( const PotentialKind kind)
inline

The entry for one kind of potential, created empty on first use.

Held indirectly because a SparseMatrix points at its own SparsityPattern: the entries must not move once a matrix has been attached to one.

Member Data Documentation

◆ entries

template<int dim, typename NumberType >
std::array<std::unique_ptr<Entry>, n_potential_kinds> DiFfRG::internal::PotentialSystemCache< dim, NumberType >::entries
private

◆ face_dim

template<int dim, typename NumberType >
int DiFfRG::internal::PotentialSystemCache< dim, NumberType >::face_dim = dim > 0 ? dim - 1 : 0
staticconstexprprivate

The documentation for this class was generated from the following file:
  • /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/discretization/common/eom.hh