SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::discretization::quadrature::RuleSet Class Reference

The RuleSet class is used to determine the appropriate order and other relevant information for the integration rule based on a given quadrature query. It contains a set of form rules and role controls, as well as a fallback control. More...

#include <rules.hpp>

Collaboration diagram for serif::discretization::quadrature::RuleSet:
[legend]

Public Member Functions

template<forms::Form FormT>
void set_form_control (const RuleControl control)
 Sets the rule control for a given form type. This allows for specifying a fixed order or boost for a specific form.
 
void set_form_control (const forms::FormDescriptor &form, const RuleControl control)
 Sets the rule control for a given form descriptor. This allows for specifying a fixed order or boost for a specific form.
 
const RuleControl * find_form_control (const forms::FormDescriptor &form) const noexcept
 Finds the rule control for a given form descriptor. This allows for retrieving the fixed order or boost for a specific form.
 
void set_role_control (const QuadratureRole role, const RuleControl control) noexcept
 Sets the rule control for a given quadrature role. This allows for specifying a fixed order or boost for a specific role.
 
const RuleControl & role_control (const QuadratureRole role) const noexcept
 Get the rule control for a given quadrature role. This allows for retrieving the fixed order or boost for a specific role.
 
void set_fallback_control (const RuleControl control) noexcept
 Set the fallback rule control for the RuleSet. This is used when no specific form or role control is found.
 
const RuleControl & fallback_control () const noexcept
 Get the fallback rule control for the RuleSet. This is used when no specific form or role control is found.
 
auto begin ()
 Get the begin iterator for the form rules in the RuleSet.
 
auto end ()
 Get the end iterator for the form rules in the RuleSet.
 
auto begin () const
 Get the const begin iterator for the form rules in the RuleSet.
 
auto end () const
 Get the const end iterator for the form rules in the RuleSet.
 

Private Attributes

std::vector< FormRule > m_formRules
 The form rules in the RuleSet. Each form rule contains a form descriptor and a rule control.
 
RuleControl m_discretizationControl
 The rule control for the discretization role.
 
RuleControl m_preconditionerControl
 The rule control for the preconditioner role.
 
RuleControl m_diagnosticControl
 The rule control for the diagnostic role.
 
RuleControl m_projectionControl
 The rule control for the projection role.
 
RuleControl m_fallbackControl
 The fallback rule control for the RuleSet. This is used when no specific form or role control is found.
 

Detailed Description

The RuleSet class is used to determine the appropriate order and other relevant information for the integration rule based on a given quadrature query. It contains a set of form rules and role controls, as well as a fallback control.

Member Function Documentation

◆ begin() [1/2]

auto serif::discretization::quadrature::RuleSet::begin ( )
inline

Get the begin iterator for the form rules in the RuleSet.

Returns
An iterator to the beginning of the form rules in the RuleSet.

◆ begin() [2/2]

auto serif::discretization::quadrature::RuleSet::begin ( ) const
inline

Get the const begin iterator for the form rules in the RuleSet.

Returns
An iterator to the beginning of the form rules in the RuleSet.

◆ end() [1/2]

auto serif::discretization::quadrature::RuleSet::end ( )
inline

Get the end iterator for the form rules in the RuleSet.

Returns
An iterator to the end of the form rules in the RuleSet.

◆ end() [2/2]

auto serif::discretization::quadrature::RuleSet::end ( ) const
inline

Get the const end iterator for the form rules in the RuleSet.

Returns
An iterator to the end of the form rules in the RuleSet.

◆ fallback_control()

const RuleControl & serif::discretization::quadrature::RuleSet::fallback_control ( ) const
inlinenodiscardnoexcept

Get the fallback rule control for the RuleSet. This is used when no specific form or role control is found.

Returns
The fallback rule control for the RuleSet.

◆ find_form_control()

const RuleControl * serif::discretization::quadrature::RuleSet::find_form_control ( const forms::FormDescriptor & form) const
inlinenodiscardnoexcept

Finds the rule control for a given form descriptor. This allows for retrieving the fixed order or boost for a specific form.

Parameters
formThe form descriptor for which to find the rule control.
Returns
A pointer to the rule control for the given form descriptor, or nullptr if no rule control is found.

This works by searching through all the form rules in the Rule set and comparing their runtime descriptors. If the correct form is found then a pointer to its rule control is returned. If the form is not found then nullptr is returned.

◆ role_control()

const RuleControl & serif::discretization::quadrature::RuleSet::role_control ( const QuadratureRole role) const
inlinenodiscardnoexcept

Get the rule control for a given quadrature role. This allows for retrieving the fixed order or boost for a specific role.

Parameters
roleThe quadrature role for which to get the rule control.
Returns
The rule control for the given quadrature role.

◆ set_fallback_control()

void serif::discretization::quadrature::RuleSet::set_fallback_control ( const RuleControl control)
inlinenoexcept

Set the fallback rule control for the RuleSet. This is used when no specific form or role control is found.

Parameters
controlThe fallback rule control to set.

◆ set_form_control() [1/2]

void serif::discretization::quadrature::RuleSet::set_form_control ( const forms::FormDescriptor & form,
const RuleControl control )
inline

Sets the rule control for a given form descriptor. This allows for specifying a fixed order or boost for a specific form.

Parameters
formThe form descriptor for which to set the rule control.
controlThe rule control to set for the given form descriptor.

This works by searching through all the form rules in the Rule set and comparing their runtime descriptors. If the correct form is found then the control is updated. If the form is not found then a new form rule is added to the RuleSet.

◆ set_form_control() [2/2]

template<forms::Form FormT>
void serif::discretization::quadrature::RuleSet::set_form_control ( const RuleControl control)
inline

Sets the rule control for a given form type. This allows for specifying a fixed order or boost for a specific form.

Template Parameters
FormTThe form type for which to set the rule control.
Parameters
controlThe rule control to set for the given form type.

◆ set_role_control()

void serif::discretization::quadrature::RuleSet::set_role_control ( const QuadratureRole role,
const RuleControl control )
inlinenoexcept

Sets the rule control for a given quadrature role. This allows for specifying a fixed order or boost for a specific role.

Parameters
roleThe quadrature role for which to set the rule control.
controlThe rule control to set for the given quadrature role.

Member Data Documentation

◆ m_diagnosticControl

RuleControl serif::discretization::quadrature::RuleSet::m_diagnosticControl
private

The rule control for the diagnostic role.

◆ m_discretizationControl

RuleControl serif::discretization::quadrature::RuleSet::m_discretizationControl
private

The rule control for the discretization role.

◆ m_fallbackControl

RuleControl serif::discretization::quadrature::RuleSet::m_fallbackControl
private

The fallback rule control for the RuleSet. This is used when no specific form or role control is found.

◆ m_formRules

std::vector<FormRule> serif::discretization::quadrature::RuleSet::m_formRules
private

The form rules in the RuleSet. Each form rule contains a form descriptor and a rule control.

◆ m_preconditionerControl

RuleControl serif::discretization::quadrature::RuleSet::m_preconditionerControl
private

The rule control for the preconditioner role.

◆ m_projectionControl

RuleControl serif::discretization::quadrature::RuleSet::m_projectionControl
private

The rule control for the projection role.


The documentation for this class was generated from the following file: