Class TempLat::CouplingsManagerContainer
template <typename FloatType, int NMatter, int NGauge, bool... Bools>
ClassList > TempLat > CouplingsManagerContainer
A class which stores statically an array of booleans; useful to manage what couples to what. More...
#include <couplingsmanager.h>
Public Static Attributes
| Type | Name |
|---|---|
| constexpr bool | active = true |
| constexpr int | nGauge = NGauge |
Public Functions
| Type | Name |
|---|---|
| CouplingsManagerContainer () = default |
|
| CouplingsManagerContainer (const std::vector< T > & charges, const std::vector< T > & couplings) In addition to simply knowing what couples to what, we also store the gauge field coupling g and the effective charge g*Q (Q being the matter charge). |
|
| void | _setEffectiveCharges (const std::vector< T > & charges, const std::vector< T > & couplings) Stores the effective charges, but only between fields that actually are coupled. |
| auto | coupling (Tag< ng >) const Access the gauge field coupling g for a specific gauge field. |
| auto | operator() (Tag< nmat >, Tag< ng >) const Access the effective charge g*Q for a specific matter and gauge field. |
| void | setEffectiveCharges (const std::vector< double > & charges, const std::vector< double > & couplings) |
| void | setEffectiveCharges (const std::vector< float > & charges, const std::vector< float > & couplings) |
Public Static Functions
| Type | Name |
|---|---|
| constexpr bool | couples (Tag< nmat >, Tag< ng >) Accessible at compile time function which tells whether or not a given matter field and a given gauge field couples or not. |
| constexpr size_t | howManyCouples () This function, accessible at compile time, tells how many fields are coupled in this CouplingManager. |
Detailed Description
This class stores in its type an arbitrary number of booleans, which are used to define which field couple to which other field. The best way to understand how this class work is to see how it is used in the GaugeDerivatives and MatterCurrent classes.
Unit test: ctest -R test-couplingsmanager
Public Static Attributes Documentation
variable active
variable nGauge
Public Functions Documentation
function CouplingsManagerContainer [1/2]
function CouplingsManagerContainer [2/2]
In addition to simply knowing what couples to what, we also store the gauge field coupling g and the effective charge g*Q (Q being the matter charge).
template<typename T>
inline TempLat::CouplingsManagerContainer::CouplingsManagerContainer (
const std::vector< T > & charges,
const std::vector< T > & couplings
)
Parameters:
chargesThe charges Q, for each matter field that couples to at least one gauge field. The order of the charges should be the same as the order of the non-trivial doesCouples in the template parameters.couplingsThe gauge field couplings g, for each gauge field. The order of the couplings should be the same as the order of the gauge fields in the model.
function _setEffectiveCharges
Stores the effective charges, but only between fields that actually are coupled.
template<typename T>
inline void TempLat::CouplingsManagerContainer::_setEffectiveCharges (
const std::vector< T > & charges,
const std::vector< T > & couplings
)
Parameters:
chargesThe charges Q, for each matter field that couples to at least one gauge field. The order of the charges should be the same as the order of the non-trivial doesCouples in the template parameters.couplingsThe gauge field couplings g, for each gauge field. The order of the couplings should be the same as the order of the gauge fields in the model.
function coupling
Access the gauge field coupling g for a specific gauge field.
Template parameters:
ngThe gauge field index.
function operator()
Access the effective charge g*Q for a specific matter and gauge field.
template<int nmat, int ng>
inline auto TempLat::CouplingsManagerContainer::operator() (
Tag < nmat >,
Tag < ng >
) const
Template parameters:
nmatThe matter field index.ngThe gauge field index.
function setEffectiveCharges [1/2]
inline void TempLat::CouplingsManagerContainer::setEffectiveCharges (
const std::vector< double > & charges,
const std::vector< double > & couplings
)
function setEffectiveCharges [2/2]
inline void TempLat::CouplingsManagerContainer::setEffectiveCharges (
const std::vector< float > & charges,
const std::vector< float > & couplings
)
Public Static Functions Documentation
function couples
Accessible at compile time function which tells whether or not a given matter field and a given gauge field couples or not.
template<int nmat, int ng>
static inline constexpr bool TempLat::CouplingsManagerContainer::couples (
Tag < nmat >,
Tag < ng >
)
Template parameters:
nmatThe matter field index.ngThe gauge field index.
function howManyCouples
This function, accessible at compile time, tells how many fields are coupled in this CouplingManager.
The documentation for this class was generated from the following file cosmolatticeweb/tmp/code_source/cosmolattice/include/CosmoInterface/couplingsmanager.h