AbstractModel< Model, Components_ > Class Template Reference#

DiFfRG: DiFfRG::def::AbstractModel< Model, Components_ > Class Template Reference
DiFfRG
Discretization Framework for functional Renormalization Group flows
DiFfRG::def::AbstractModel< Model, Components_ > Class Template Reference

The abstract interface for any numerical model. Most methods have a standard implementation, which can be overwritten if needed. To see how the models are used, refer to the DiFfRG::AbstractAssembler class and the Numerical Models guide in the documentation. More...

#include <model.hh>

Public Types

using Components = Components_
 

Public Member Functions

const auto & get_components () const
 
Spatial discretization
template<int dim, typename Vector >
void initial_condition (const Point< dim > &x, Vector &u_i) const =delete
 This method implements the initial condition for the FE functions.
 
template<int dim, typename NumberType , typename Vector , typename Vector_dot , size_t n_fe_functions>
void mass (std::array< NumberType, n_fe_functions > &m_i, const Point< dim > &x, const Vector &u_i, const Vector_dot &dt_u_i) const
 The mass function \(m_i(\partial_t u_j, u_j, x)\) is implemented in this method.
 
template<int dim, typename NumberType , size_t n_fe_functions>
void mass (std::array< std::array< NumberType, n_fe_functions >, n_fe_functions > &m_ij, const Point< dim > &x) const
 If not using a DAE, the mass matrix \(m_{ij}(x)\) is implemented in this method.
 
template<int dim, typename NumberType , typename Solutions , size_t n_fe_functions>
void flux (std::array< Tensor< 1, dim, NumberType >, n_fe_functions > &F_i, const Point< dim > &x, const Solutions &sol) const
 The flux function \(F_i(u_j, \partial_x u_j, \partial_x^2 u_j, e_b, v_a, x)\) is implemented by this method.
 
template<int dim, typename NumberType , typename Solutions , size_t n_fe_functions>
void diffusion_flux (std::array< Tensor< 1, dim, NumberType >, n_fe_functions > &F_i, const Point< dim > &x, const Solutions &sol) const
 If the Kurganov Tadmor Scheme is used, this is the implementation of the diffusion (parabolic) part of the face flux. \(D_i(u_j, \partial_x u_j, \partial_x^3 u_j, x)\).
 
template<int dim, typename NumberType , typename Solutions , size_t n_fe_functions>
void source (std::array< NumberType, n_fe_functions > &s_i, const Point< dim > &x, const Solutions &sol) const
 The source function \(s_i(u_j, \partial_x u_j, \partial_x^2 u_j, e_b, v_a, x)\) is implemented by this method.
 
template<uint dim>
std::vector< bool > differential_components () const
 A method to find out which components of the mass function are differential when using a DAE.
 
template<size_t n_fe_functions>
void wave_speed_blocks (std::array< int, n_fe_functions > &blocks) const
 Which FE components share a wave speed, and which carry no hyperbolic flux at all.
 
Other variables
template<typename Vector >
void initial_condition_variables (Vector &v_a) const
 
template<typename Vector , typename Solution >
void dt_variables (Vector &r_a, const Solution &sol) const
 
Extractors
template<int dim, typename Vector , typename Solutions >
void extract (Vector &result, const Point< dim > &x, const Solutions &sol) const
 Read data off the FE solution at a single point and hand it to the Variables.
 

Protected Member Functions

auto & components ()
 

Protected Attributes

Components_ m_components
 

Private Member Functions

Model & asImp ()
 
const Model & asImp () const
 

LDG equations

static constexpr bool extract_uses_potential = true
 Whether extract() reads the reconstructed potential handed to it.
 
template<uint dependent, int dim, typename NumberType , typename Vector , size_t n_fe_functions_dep>
void ldg_flux (std::array< Tensor< 1, dim, NumberType >, n_fe_functions_dep > &F, const Point< dim > &x, const Vector &u) const
 The LDG flux function \(F^{LDG}_i(u_j, x),\,i>0\) is implemented by this method.
 
template<uint dependent, int dim, typename NumberType , typename Vector , size_t n_fe_functions_dep>
void ldg_source (std::array< NumberType, n_fe_functions_dep > &s, const Point< dim > &x, const Vector &u) const
 The LDG source function \(s^{LDG}_i(u_j, x),\,i>0\) is implemented by this method.
 
template<int dim, typename NumberType , typename Solutions_s , typename Solutions_n >
void face_indicator (std::array< NumberType, 2 > &indicator, const Tensor< 1, dim > &normal, const Point< dim > &p, const Solutions_s &sol_s, const Solutions_n &sol_n) const
 
template<int dim, typename NumberType , typename Solution >
void cell_indicator (NumberType &indicator, const Point< dim > &p, const Solution &sol) const
 
template<int dim, typename Vector >
std::array< double, dim > EoM (const Point< dim > &x, const Vector &u) const
 
template<int dim, typename Vector >
std::array< double, dim > raw_potential_gradient (const Point< dim > &x, const Vector &u) const
 The unmodified gradient of the scalar potential reconstructed for readouts and extractors.
 
template<int dim, typename Vector >
Point< dim > EoM_postprocess (const Point< dim > &EoM, const Vector &) const
 Relocate the point found by the EoM search, given the solution values there.
 
template<typename FUN , typename DataOut >
void readouts_multiple (FUN &helper, DataOut &) const
 
template<int dim, typename DataOut , typename Solutions >
void readouts (DataOut &output, const Point< dim > &x, const Solutions &sol) const
 
template<typename Constraints , typename Context >
void affine_constraints (Constraints &constraints, const Context &context) const
 Add affine constraints to the FE/DG system before sparsity patterns and operators are rebuilt.
 

Detailed Description

template<typename Model, typename Components_>
class DiFfRG::def::AbstractModel< Model, Components_ >

The abstract interface for any numerical model. Most methods have a standard implementation, which can be overwritten if needed. To see how the models are used, refer to the DiFfRG::AbstractAssembler class and the Numerical Models guide in the documentation.

Template Parameters
ModelThe model which implements this interface. (CRTP)
Components_The components of the model, this must be a DiFfRG::ComponentDescriptor.

Member Typedef Documentation

◆ Components

template<typename Model , typename Components_ >
using DiFfRG::def::AbstractModel< Model, Components_ >::Components = Components_

Member Function Documentation

◆ affine_constraints()

template<typename Model , typename Components_ >
template<typename Constraints , typename Context >
void DiFfRG::def::AbstractModel< Model, Components_ >::affine_constraints ( Constraints & constraints,
const Context & context ) const
inline

Add affine constraints to the FE/DG system before sparsity patterns and operators are rebuilt.

Boundary-only constraints should use apply_boundary_affine_constraints(constraints, context) and inspect context.template boundary<"u">(). Constraints that may need interior support points should use apply_affine_constraints(constraints, context) and inspect context.template support<"u">().

The origin helpers use x[0] as their signed origin coordinate in one-dimensional domains. In multidimensional domains, models using these helpers must provide Model::OriginConstraintCoordinate<component_name>::signed_coordinate(point) to define the zero level set that should be constrained for each named component.

◆ asImp() [1/2]

template<typename Model , typename Components_ >
Model & DiFfRG::def::AbstractModel< Model, Components_ >::asImp ( )
inlineprivate

◆ asImp() [2/2]

template<typename Model , typename Components_ >
const Model & DiFfRG::def::AbstractModel< Model, Components_ >::asImp ( ) const
inlineprivate

◆ cell_indicator()

template<typename Model , typename Components_ >
template<int dim, typename NumberType , typename Solution >
void DiFfRG::def::AbstractModel< Model, Components_ >::cell_indicator ( NumberType & indicator,
const Point< dim > & p,
const Solution & sol ) const
inline

◆ components()

template<typename Model , typename Components_ >
auto & DiFfRG::def::AbstractModel< Model, Components_ >::components ( )
inlineprotected

◆ differential_components()

template<typename Model , typename Components_ >
template<uint dim>
std::vector< bool > DiFfRG::def::AbstractModel< Model, Components_ >::differential_components ( ) const
inline

A method to find out which components of the mass function are differential when using a DAE.

Note
The standard implementation of this method tests whether the mass function changes when changing the time derivative of one component slightly. For highly complicated models, this method might not be able to set all differential components correctly.
Returns
std::vector<bool> with true for differential components and false for algebraic components.

◆ diffusion_flux()

template<typename Model , typename Components_ >
template<int dim, typename NumberType , typename Solutions , size_t n_fe_functions>
void DiFfRG::def::AbstractModel< Model, Components_ >::diffusion_flux ( std::array< Tensor< 1, dim, NumberType >, n_fe_functions > & F_i,
const Point< dim > & x,
const Solutions & sol ) const
inline

If the Kurganov Tadmor Scheme is used, this is the implementation of the diffusion (parabolic) part of the face flux. \(D_i(u_j, \partial_x u_j, \partial_x^3 u_j, x)\).

Remarks
The assembler evaluates this callback separately for the minus and plus face traces, using the corrected gradients of the diffusion reconstructor; these are distinct from the advection face gradients handed to flux. This method is never called by the CG/DG/LDG discretizations.
Note
The standard implementation of this method simply sets \(D_i = 0\).
Sign convention: the face flux is \((H + D)\cdot n\), i.e. the advection numerical flux \(H\) (built from flux) and the diffusion flux \(D\) (from this method) are SUMMED. Both methods therefore return the physical flux with the same sign - exactly the conservation-law convention used by CG / LLFFlux. A diffusion flux \(f_{diff}\) must be a DECREASING function of the gradient ( \(\partial f_{diff} / \partial (\partial u) < 0\)) for forward diffusion, e.g. \(f_{diff} = -\nu\, \partial u\) for the heat/viscous term.
Parameters
F_ithe resulting diffusion flux \(D_i\), with \(N_f\) components. This method should fill this argument with the desired structure of the flow equation.
xa d-dimensional dealii::Point<dim> representing field coordinates.
sola std::tuple<...> which contains
  1. the array u_j
  2. the array of arrays \(\partial_x u_j\)
  3. the array of arrays of arrays \(\partial_x^3 u_j\)
  4. the array of extractors \(e_b\)
  5. the array of variables \(v_a\)
Note
Extractors are frozen w.r.t. the FE solution here too.
See also
flux.

◆ dt_variables()

template<typename Model , typename Components_ >
template<typename Vector , typename Solution >
void DiFfRG::def::AbstractModel< Model, Components_ >::dt_variables ( Vector & r_a,
const Solution & sol ) const
inline

◆ EoM()

template<typename Model , typename Components_ >
template<int dim, typename Vector >
std::array< double, dim > DiFfRG::def::AbstractModel< Model, Components_ >::EoM ( const Point< dim > & x,
const Vector & u ) const
inline

◆ EoM_postprocess()

template<typename Model , typename Components_ >
template<int dim, typename Vector >
Point< dim > DiFfRG::def::AbstractModel< Model, Components_ >::EoM_postprocess ( const Point< dim > & EoM,
const Vector &  ) const
inline

Relocate the point found by the EoM search, given the solution values there.

Pointwise, and therefore limited to decisions that can be made from the located point alone – e.g. freezing the EoM once it jumps backwards. A model that has to inspect the solution profile as a whole to decide where its extractors should be read instead defines extractor_point; see DiFfRG::HasExtractorPoint.

◆ extract()

template<typename Model , typename Components_ >
template<int dim, typename Vector , typename Solutions >
void DiFfRG::def::AbstractModel< Model, Components_ >::extract ( Vector & result,
const Point< dim > & x,
const Solutions & sol ) const
inline

Read data off the FE solution at a single point and hand it to the Variables.

This is the only bridge from the field-space (FE) sector into the Variables sector: the values stored in result are what dt_variables sees under get<"extractors">(sol).

Parameters
xThe point the extractors are evaluated at. By default this is the EoM; a model can choose otherwise by defining extractor_point (see DiFfRG::HasExtractorPoint).

◆ face_indicator()

template<typename Model , typename Components_ >
template<int dim, typename NumberType , typename Solutions_s , typename Solutions_n >
void DiFfRG::def::AbstractModel< Model, Components_ >::face_indicator ( std::array< NumberType, 2 > & indicator,
const Tensor< 1, dim > & normal,
const Point< dim > & p,
const Solutions_s & sol_s,
const Solutions_n & sol_n ) const
inline

◆ flux()

template<typename Model , typename Components_ >
template<int dim, typename NumberType , typename Solutions , size_t n_fe_functions>
void DiFfRG::def::AbstractModel< Model, Components_ >::flux ( std::array< Tensor< 1, dim, NumberType >, n_fe_functions > & F_i,
const Point< dim > & x,
const Solutions & sol ) const
inline

The flux function \(F_i(u_j, \partial_x u_j, \partial_x^2 u_j, e_b, v_a, x)\) is implemented by this method.

Remarks
Note, that the precise template structure is not important, the only important thing is that the types are consistent with the rest of the model. It is however necessary to leave at least the NumberType, Vector, and Vector_dot template parameters, as these can differ between calls (e.g. when doing automatic differentiation).
Note
The standard implementation of this method simply sets \(F_i = 0\).
The meaning of this method depends on the discretization. For CG/DG/LDG it is the full flux of the conservation law. For the Kurganov Tadmor scheme it is the advection flux, i.e. the hyperbolic part which determines the numerical face flux and the wave speeds; the parabolic part is implemented separately in diffusion_flux. In the Kurganov Tadmor case the assembler evaluates this callback separately for the minus and plus face traces, and the derivatives are the face gradients produced by the active advection reconstructor; they are distinct from the corrected gradients handed to diffusion_flux.
Parameters
F_ithe resulting flux function \(F_i\), with \(N_f\) components. This method should fill this argument with the desired structure of the flow equation.
xa d-dimensional dealii::Point<dim> representing field coordinates.
sola std::tuple<...> which contains
  1. the array u_j
  2. the array of arrays \(\partial_x u_j\)
  3. the array of arrays of arrays \(\partial_x^2 u_j\) (CG/dDG only)
  4. the array of extractors \(e_b\)
  5. the array of variables \(v_a\)
Note
The extractors are those of the last extract() call, i.e. of the state the assembler is currently linearising about, and they are plain numbers rather than AD types. Their dependence on the FE solution is therefore absent from the flux jacobian – extractors are frozen within a Newton step, exactly as they are for source(). A model that solves for something at the EoM in extract() and reads it back here gets an approximate jacobian, which costs iterations rather than accuracy: the extraction is redone for every residual.

◆ get_components()

template<typename Model , typename Components_ >
const auto & DiFfRG::def::AbstractModel< Model, Components_ >::get_components ( ) const
inline

◆ initial_condition()

template<typename Model , typename Components_ >
template<int dim, typename Vector >
void DiFfRG::def::AbstractModel< Model, Components_ >::initial_condition ( const Point< dim > & x,
Vector & u_i ) const
delete

This method implements the initial condition for the FE functions.

Note
No standard implementation is given, this method has to be reimplemented whenever one uses FE functions.
Parameters
xa d-dimensional dealii::Point<dim> representing field coordinates.
u_ithe field values \(u_i(x)\) at the point x. This method should fill this argument with the desired initial condition.

◆ initial_condition_variables()

template<typename Model , typename Components_ >
template<typename Vector >
void DiFfRG::def::AbstractModel< Model, Components_ >::initial_condition_variables ( Vector & v_a) const
inline

◆ ldg_flux()

template<typename Model , typename Components_ >
template<uint dependent, int dim, typename NumberType , typename Vector , size_t n_fe_functions_dep>
void DiFfRG::def::AbstractModel< Model, Components_ >::ldg_flux ( std::array< Tensor< 1, dim, NumberType >, n_fe_functions_dep > & F,
const Point< dim > & x,
const Vector & u ) const
inline

The LDG flux function \(F^{LDG}_i(u_j, x),\,i>0\) is implemented by this method.

The assembler constructs the i-th LDG function l_i from the i-1-th level as

\[l_i = \partial_x F^{LDG}_i(l_{i-1}, x) + s^{LDG}_i(l_{i-1}, x)\]

Here, \(l_0\) is the solution itself (with all its components).

Remarks
Note, that the precise template structure is not important, the only important thing is that the types are consistent with the rest of the model.
Note
The standard implementation of this method simply sets \(F^{LDG}_i = 0\).
Template Parameters
dependentthe index \(i\) of the dependent variable \(l_i\) which is constructed from the previous level \(l_{i-1}\).
Parameters
Fthe resulting LDG flux function \(F^{LDG}_i\), with n_fe_functions_dep components. This method should fill this argument with the desired structure of the flow equation.
xa d-dimensional dealii::Point<dim> representing field coordinates.
uthe field values of \(l_j(x)\) at the point x.

◆ ldg_source()

template<typename Model , typename Components_ >
template<uint dependent, int dim, typename NumberType , typename Vector , size_t n_fe_functions_dep>
void DiFfRG::def::AbstractModel< Model, Components_ >::ldg_source ( std::array< NumberType, n_fe_functions_dep > & s,
const Point< dim > & x,
const Vector & u ) const
inline

The LDG source function \(s^{LDG}_i(u_j, x),\,i>0\) is implemented by this method.

The assembler constructs the i-th LDG function l_i from the i-1-th level as

\[l_i = \partial_x F^{LDG}_i(l_{i-1}, x) + s^{LDG}_i(l_{i-1}, x)\]

Here, \(l_0\) is the solution itself (with all its components).

Remarks
Note, that the precise template structure is not important, the only important thing is that the types are consistent with the rest of the model.
Note
The standard implementation of this method simply sets \(s^{LDG}_i = 0\).
Template Parameters
dependentthe index \(i\) of the dependent variable \(l_i\) which is constructed from the previous level \(l_{i-1}\).
Parameters
sthe resulting LDG source function \(s^{LDG}_i\), with n_fe_functions_dep components. This method should fill this argument with the desired structure of the flow equation.
xa d-dimensional dealii::Point<dim> representing field coordinates.
uthe field values of \(l_j(x)\) at the point x.

◆ mass() [1/2]

template<typename Model , typename Components_ >
template<int dim, typename NumberType , typename Vector , typename Vector_dot , size_t n_fe_functions>
void DiFfRG::def::AbstractModel< Model, Components_ >::mass ( std::array< NumberType, n_fe_functions > & m_i,
const Point< dim > & x,
const Vector & u_i,
const Vector_dot & dt_u_i ) const
inline

The mass function \(m_i(\partial_t u_j, u_j, x)\) is implemented in this method.

Remarks
Note, that the precise template structure is not important, the only important thing is that the types are consistent with the rest of the model. It is however necessary to leave at least the NumberType, Vector, and Vector_dot template parameters, as these can differ between calls (e.g. when doing automatic differentiation).
Note
The standard implementation of this method simply sets \(m_i = \partial_t u_i\).
Parameters
m_ithe resulting mass function \(m_i\), with \(N_f\) components. This method should fill this argument with the desired structure of the flow equation.
xa d-dimensional dealii::Point<dim> representing field coordinates.
u_ithe field values \(u_i(x)\) at the point x.
dt_u_ithe time derivative of the field values \(\partial_t u_i(x)\) at the point x.

◆ mass() [2/2]

template<typename Model , typename Components_ >
template<int dim, typename NumberType , size_t n_fe_functions>
void DiFfRG::def::AbstractModel< Model, Components_ >::mass ( std::array< std::array< NumberType, n_fe_functions >, n_fe_functions > & m_ij,
const Point< dim > & x ) const
inline

If not using a DAE, the mass matrix \(m_{ij}(x)\) is implemented in this method.

Remarks
Note, that the precise template structure is not important, the only important thing is that the types are consistent with the rest of the model. It is however necessary to leave at least the NumberType, Vector, and Vector_dot template parameters, as these can differ between calls (e.g. when doing automatic differentiation).
Note
The standard implementation of this method simply sets \(m_{ij} = \delta_{ij}\).
Parameters
m_ijthe resulting mass matrix \(m_{ij}\), with \(N_f\) components in each dimension. This method should fill this argument with the desired structure of the flow equation.
xa d-dimensional dealii::Point<dim> representing field coordinates.

◆ raw_potential_gradient()

template<typename Model , typename Components_ >
template<int dim, typename Vector >
std::array< double, dim > DiFfRG::def::AbstractModel< Model, Components_ >::raw_potential_gradient ( const Point< dim > & x,
const Vector & u ) const
inline

The unmodified gradient of the scalar potential reconstructed for readouts and extractors.

This is deliberately separate from the EoM callback supplied by readouts_multiple(): a physical EoM may contain explicit-breaking or other terms which are not part of the raw potential. By default, the first dim solution components are interpreted as the raw potential gradient; missing components are zero-filled. Models with a different component layout should override this method.

◆ readouts()

template<typename Model , typename Components_ >
template<int dim, typename DataOut , typename Solutions >
void DiFfRG::def::AbstractModel< Model, Components_ >::readouts ( DataOut & output,
const Point< dim > & x,
const Solutions & sol ) const
inline

◆ readouts_multiple()

template<typename Model , typename Components_ >
template<typename FUN , typename DataOut >
void DiFfRG::def::AbstractModel< Model, Components_ >::readouts_multiple ( FUN & helper,
DataOut &  ) const
inline

◆ source()

template<typename Model , typename Components_ >
template<int dim, typename NumberType , typename Solutions , size_t n_fe_functions>
void DiFfRG::def::AbstractModel< Model, Components_ >::source ( std::array< NumberType, n_fe_functions > & s_i,
const Point< dim > & x,
const Solutions & sol ) const
inline

The source function \(s_i(u_j, \partial_x u_j, \partial_x^2 u_j, e_b, v_a, x)\) is implemented by this method.

Remarks
Note, that the precise template structure is not important, the only important thing is that the types are consistent with the rest of the model. It is however necessary to leave at least the NumberType, Vector, and Vector_dot template parameters, as these can differ between calls (e.g. when doing automatic differentiation).
Note
The standard implementation of this method simply sets \(s_i = 0\).
Parameters
s_ithe resulting source function \(s_i\), with \(N_f\) components. This method should fill this argument with the desired structure of the flow equation.
xa d-dimensional dealii::Point<dim> representing field coordinates.
sola named tuple; which entries it carries depends on the assembler:
  • CG and dDG: "fe_functions" \(u_j\), "fe_derivatives" \(\partial_x u_j\), "fe_hessians" \(\partial_x^2 u_j\), "extractors" \(e_b\), "variables" \(v_a\)
  • DG: "fe_functions", "extractors", "variables"
  • KT-FV: "fe_functions", "fe_derivatives", "extractors", "variables" – no hessians, and the derivatives are the scheme's reconstructed cell gradient

Access the entries by name (get<"fe_derivatives">(sol)); a model that reads an entry its assembler does not provide fails to compile.

◆ wave_speed_blocks()

template<typename Model , typename Components_ >
template<size_t n_fe_functions>
void DiFfRG::def::AbstractModel< Model, Components_ >::wave_speed_blocks ( std::array< int, n_fe_functions > & blocks) const
inline

Which FE components share a wave speed, and which carry no hyperbolic flux at all.

Only the Kurganov-Tadmor assembler consults this. KT adds a dissipation term -a/2 (u^+ - u^-) to the numerical flux of every component, with a a wave speed read off the flux jacobian. Which jacobian, and whether a component is dissipated at all, is what this declares: components sharing a block id share one speed, computed as the spectral radius of the flux jacobian restricted to that block, and a component marked no_wave_speed is not dissipated.

Two things go wrong when the whole system shares one speed, and a model that mixes a conservation law with constraints needs both fixed.

A component whose flux is identically zero is dissipated all the same. For a differential component that is harmless: its diagonal carries c_j * JxW, which swamps the dissipation. An algebraic component has no such term, so the dissipation becomes the leading entry of its row – and drags the reconstruction's slope limiter into the newton jacobian with it, where a limiter kink stalls the iteration outright. no_wave_speed drops the dissipation instead, leaving the row exactly as the model wrote it.

A component that does carry a flux, but a much slower one than the fastest in the system, is over-dissipated by the ratio of the two speeds. That is worse than inaccurate when the row is algebraic. Its own terms are integrated over the cell and so carry a factor of the cell width, while the dissipation is a face quantity and does not; the row's diagonal dominance is then O(dx) and the row degenerates under refinement, so the scheme fails when the grid is made finer. Giving such a component its own block restores the balance: both the diagonal and the off-diagonal scale as a/dx and their difference stays finite.

Blocking is a statement that the cross-couplings between blocks do not carry characteristics – true when the off-block rows are constraints rather than conservation laws, which is the case this exists for. It is not a licence to split a genuinely hyperbolic system, where the full spectral radius is the safe choice and is what one block gives.

This is a structural property of the model, not a function of the state: it is queried per face, and blocks that varied with the solution would be both a cost and a discontinuity.

The default puts every component in one block, i.e. the scheme as it was before this hook existed.

Member Data Documentation

◆ extract_uses_potential

template<typename Model , typename Components_ >
bool DiFfRG::def::AbstractModel< Model, Components_ >::extract_uses_potential = true
staticconstexpr

Whether extract() reads the reconstructed potential handed to it.

The potential slots of the tuple passed to extract() are filled by reconstructing a scalar potential from raw_potential_gradient() over the whole mesh – a direct solve, run on every residual and jacobian evaluation, and wasted on the many models whose extractors need only the solution. A model that never reads those slots should set this to false; the slots are then filled with a type that has no operations, so reading one is a compile error rather than a silent zero. Readouts are unaffected: the potential is written to the output there regardless.

◆ m_components

template<typename Model , typename Components_ >
Components_ DiFfRG::def::AbstractModel< Model, Components_ >::m_components
protected

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