namespace
ctrToolkit control, general purpose user input to internal data transfer.
Classes
- struct KeywordInfo
- Keyword information bundle.
- struct HelpKw
- Help bundle on a single keyword.
- struct Info
- Function object for filling a HelpFactory (std::map) with keywords and their associated information bundle.
- class Error
- Error options: outsource searches to base templated on enum type.
- class FieldFile
- FieldFileType options: outsource searches to base templated on enum type.
- class MKLBetaMethod
- MKLBetaMethod options: outsource searches to base templated on enum type.
- class MKLGammaMethod
- MKLGammaMethod options: outsource searches to base templated on enum type.
- class MKLGaussianMethod
- MKLGaussianMethod options: outsource searches to base templated on enum type.
- class MKLGaussianMVMethod
- MKLGaussianMVMethod options: outsource searches to base templated on enum type.
- class MKLUniformMethod
- MKLUniformMethod options: outsource searches to base templated on enum type.
- class PartitioningAlgorithm
- PartitioningAlgorithm options: outsource searches to base templated on enum type.
- class PDFCentering
- PDFCentering options: outsource searches to base templated on enum type.
- class PDFFile
- PDFFileType options: outsource searches to base templated on enum type.
- class PDFPolicy
- PDFPolicy ptions: outsource searches to base templated on enum type.
- class RNG
- RNG options: outsource searches to base templated on enum type.
- class RNGSSESeqLen
- RNGSSESeqLen options: outsource searches to base templated on enum type.
- class TxtFloatFormat
- TxtFloatFormat options: outsource searches to base templated on enum type.
- class UserTable
- UserTable options: outsource searches to base templated on enum type.
- struct Term
- Term is a Moment of a quantity with a field ID to be ensemble averaged.
- struct CaseInsensitiveCharLess
- Case-insensitive character comparison functor.
- struct PDFInfo
- PDF information bundle.
- struct ComponentVector
-
template<typename... Tags>class ncomponents
- Number of components storage.
Enums
- enum class ErrorType: uint8_t { L2 =0, LINF }
- Error types.
- enum class FieldFileType: uint8_t { EXODUSII, ROOT }
- Field output file types.
- enum class MKLBetaMethodType: uint8_t { CJA, CJA_ACCURATE }
- MKL beta random number generator method types.
- enum class MKLGammaMethodType: uint8_t { GNORM, GNORM_ACCURATE }
- MKL gamma random number generator method types.
- enum class MKLGaussianMethodType: uint8_t { BOXMULLER, BOXMULLER2, ICDF }
- MKL Gaussian random number generator method types.
- enum class MKLGaussianMVMethodType: uint8_t { BOXMULLER, BOXMULLER2, ICDF }
- MKL Gaussian random number generator method types.
- enum class MKLUniformMethodType: uint8_t { STANDARD, ACCURATE }
- MKL uniform random number generator method types.
- enum class PartitioningAlgorithmType: uint8_t { RCB, RIB, HSFC, MJ, PHG }
- Mesh partitioning algorithm types.
- enum class PDFCenteringType: uint8_t { ELEM =0, NODE }
- PDF output file types.
- enum class PDFFileType: uint8_t { TXT =0, GMSHTXT, GMSHBIN, EXODUSII }
- PDF output file types.
- enum class PDFPolicyType: uint8_t { OVERWRITE =0, MULTIPLE, EVOLUTION }
- PDF output file policy types.
- enum class RNGType: uint8_t { NO_RNG =0, RNGSSE_GM19, RNGSSE_GM29, RNGSSE_GM31, RNGSSE_GM55, RNGSSE_GM61, RNGSSE_GQ581, RNGSSE_GQ583, RNGSSE_GQ584, RNGSSE_MT19937, RNGSSE_LFSR113, RNGSSE_MRG32K3A, MKL_MCG31, MKL_R250, MKL_MRG32K3A, MKL_MCG59, MKL_WH, MKL_MT19937, MKL_MT2203, MKL_SFMT19937, MKL_SOBOL, MKL_NIEDERR, MKL_NONDETERM, R123_THREEFRY, R123_PHILOX }
- Random number generator types.
- enum class RNGLibType: uint8_t { NO_LIB =0, MKL, RNGSSE, PRAND, R123 }
- Random number generator library types.
- enum class RNGSSESeqLenType: uint8_t { SHORT, MEDIUM, LONG }
- RNGSSE sequence length options.
- enum class TxtFloatFormatType: uint8_t { DEFAULT =0, FIXED, SCIENTIFIC }
- Txt floating-point format types.
- enum class UserTableType: uint8_t { POSITION =0, VELOCITY, ACCELERATION }
- Table types types.
- enum class Moment: uint8_t { ORDINARY =0, CENTRAL }
- Moment specifies which type of moment is computed for a quantity in a Term.
Typedefs
- using HelpFactory = std::map<std::string, KeywordInfo>
- A typedef for associating a keyword-string with its associated information stored in a KeywordInfo struct.
- using RawRNGType = std::underlying_type_t<RNGType>
- Enum class underlying type shortcut.
-
using RNGSSEParam = tk::
TaggedTuple<brigand::list<tag:: seed, kw::seed::info::expect::type, tag:: seqlen, RNGSSESeqLenType>> - RNGSSE random number generator parameters storage.
- using RNGSSEParameters = std::map<RNGType, RNGSSEParam>
- RNGSSE parameters bundle associating RNG types and their parameters.
-
using RNGRandom123Param = tk::
TaggedTuple<brigand::list<tag:: seed, kw::seed::info::expect::type>> - Random123 random number generator parameters storage.
- using RNGRandom123Parameters = std::map<RNGType, RNGRandom123Param>
- Random123 parameters bundle associating RNG types and their parameters.
-
using RNGMKLParam = tk::
TaggedTuple<brigand::list<tag:: seed, kw::seed::info::expect::type, tag:: uniform_method, MKLUniformMethodType, tag:: gaussian_method, MKLGaussianMethodType, tag:: gaussianmv_method, MKLGaussianMVMethodType, tag:: beta_method, MKLBetaMethodType, tag:: gamma_method, MKLGammaMethodType>> - MKL random number generator parameters storage.
- using RNGMKLParameters = std::map<RNGType, RNGMKLParam>
- MKL RNG parameters bundle associating RNG types and their parameters.
- using Product = std::vector<Term>
- Products are arbitrary number of Terms to be multiplied and ensemble averaged.
- using Probability = std::vector<Term>
- Probability density function (vector of sample space variables)
- using ncomp_t = kw::ncomp::info::expect::type
- Inherit type of number of components from keyword 'ncomp'.
-
using OffsetMap = std::map<char, ncomp_
t, CaseInsensitiveCharLess> - Map associating offsets to dependent variables for systems.
-
using NcompMap = std::map<char, ncomp_
t, CaseInsensitiveCharLess> - Map associating number of scalar components to dependent variables for systems.
-
template<typename... T>using tagged_tuple_wrapper = typename tk::
TaggedTuple<brigand::list<T...>> - Helper for converting a brigand::list to a tagged_tuple.
-
template<typename L>using as_tagged_tuple = brigand::wrap<L, tagged_
tuple_ wrapper> - Helper for converting a brigand::list to a tagged_tuple.
Functions
- void operator|(PUP::er& p, ErrorType& e)
- Pack/Unpack ErrorType: forward overload to generic enum class packer.
- void operator|(PUP::er& p, FieldFileType& e)
- Pack/Unpack FieldFileType: forward overload to generic enum class packer.
- void operator|(PUP::er& p, MKLBetaMethodType& e)
- Pack/Unpack MKLBetaMethodType: forward overload to generic enum class packer.
- void operator|(PUP::er& p, MKLGammaMethodType& e)
- Pack/Unpack MKLGammaMethodType: forward overload to generic enum class packer.
- void operator|(PUP::er& p, MKLGaussianMethodType& e)
- Pack/Unpack MKLGaussianMethodType: forward overload to generic enum class packer.
- void operator|(PUP::er& p, MKLGaussianMVMethodType& e)
- Pack/Unpack MKLGaussianMVMethodType: forward overload to generic enum class packer.
- void operator|(PUP::er& p, MKLUniformMethodType& e)
- Pack/Unpack MKLGUniformMethodType: forward overload to generic enum class packer.
- void operator|(PUP::er& p, PartitioningAlgorithmType& e)
- Pack/Unpack PartitioningAlgorithmType: forward overload to generic enum class packer.
- void operator|(PUP::er& p, PDFCenteringType& e)
- Pack/Unpack PDFCenteringType: forward overload to generic enum class packer.
- void operator|(PUP::er& p, PDFFileType& e)
- Pack/Unpack PDFFileType: forward overload to generic enum class packer.
- void operator|(PUP::er& p, PDFPolicyType& e)
- Pack/Unpack PDFPolicyType: forward overload to generic enum class packer.
- void operator|(PUP::er& p, RNGType& e)
- Pack/Unpack RNGType: forward overload to generic enum class packer.
- auto raw(RNGType r) -> RawRNGType constexpr
- void operator|(PUP::er& p, RNGSSESeqLenType& e)
- Pack/Unpack RNGSSESeqLenType: forward overload to generic enum class packer.
- void operator|(PUP::er& p, TxtFloatFormatType& e)
- Pack/Unpack TxtFloatFormatType: forward overload to generic enum class packer.
- void operator|(PUP::er& p, UserTableType& e)
- Pack/Unpack UserTableType: forward overload to generic enum class packer.
- void pup(PUP::er& p, Term& t)
- Pack/Unpack: Namespace-scope serialize Term object for Charm++.
- static auto operator+(const std::string& lhs, const Term& term) -> std::string
- Operator + for adding Term (var+field) to a std::string.
- static auto operator+=(std::string& os, const Term& term) -> std::string&
- Operator += for adding Term (var+field) to a std::string.
- static auto operator<<(std::ostream& os, const Term& term) -> std::ostream&
- Operator << for writing Term to output streams.
- static auto operator+(const std::string& lhs, const Product& p) -> std::string
- Operator + for adding products (var+field) to a std::string.
- static auto operator<<(std::ostream& os, const Product& p) -> std::ostream&
- Operator << for writing products to output streams.
-
static auto pdf(std::ostream& os,
const std::vector<Term>& var,
const std::vector<tk::
real>& bin, const std::string& name, const std::vector<tk:: real>& ext) -> std::ostream& - Function for writing PDF sample space variables to output streams.
-
static auto ordinary(const std::vector<ctr::
Term>& vec) -> bool - Find out if a vector of Terms only contains ordinary moment terms.
-
static auto central(const std::vector<ctr::
Term>& vec) -> bool - Find out if a vector of Terms contains any central moment terms.
-
template<std::size_t D>auto pdfInfo(const std::vector<std::vector<tk::
real>>& binsizes, const std::vector<std::string>& names, const std::vector<std::vector<tk:: real>>& exts, const std::vector<Probability>& pdfs, tk:: ctr:: Moment m, std::size_t idx, std::uint64_t it, tk:: real time) -> PDFInfo - Find PDF information, see tk::
ctr:: PDFInfo. -
template<std::size_t D>auto numPDF(const std::vector<std::vector<tk::
real>>& binsizes, const std::vector<Probability>& pdfs, ctr:: Moment m) -> std::size_t -
static auto lookup(const Product& p,
const std::map<Product, tk::
real>& moments) -> tk:: real - Lookup moment in moments map based on product key.
- static auto mean(char var, kw::ncomp::info::expect::type c) -> Product
- static auto covariance(char var1, kw::ncomp::info::expect::type c1, char var2, kw::ncomp::info::expect::type c2) -> Product
- static auto variance(char var, kw::ncomp::info::expect::type c) -> Product
- static auto cen3(char var, kw::ncomp::info::expect::type c) -> Product
- static auto ord2(char var, kw::ncomp::info::expect::type c) -> Product
Enum documentation
Typedef documentation
using tk:: ctr:: Product = std::vector<Term>
Products are arbitrary number of Terms to be multiplied and ensemble averaged.
An example is the scalar flux in x direction which needs two terms for ensemble averaging: (Y-<Y>) and (U-<U>), then the central moment is <yu> = <(Y-<Y>)(U-<U>)>, another example is the third mixed central moment of three scalars which needs three terms for ensemble averaging: (Y1-<Y1>), (Y2-<Y2>), and (Y3-<Y3>), then the central moment is <y1y2y3> = <(Y1-<Y1>)(Y2-<Y2>)(Y3-<Y3>)>.
using tk:: ctr:: OffsetMap = std::map<char, ncomp_ t, CaseInsensitiveCharLess>
Map associating offsets to dependent variables for systems.
This map associates offsets of systems of differential equations in a larger data array storing dependent variables for all scalar components of a system of systems. These offsets are where a particular system starts and their field (or component) ids then can be used to access an individual scalar component based on theses offsets.
using tk:: ctr:: NcompMap = std::map<char, ncomp_ t, CaseInsensitiveCharLess>
Map associating number of scalar components to dependent variables for systems.
This map associates the number of properties (scalar components) of systems of differential equations for all scalar components of a system of systems.
Function documentation
RawRNGType tk:: ctr:: raw(RNGType r) constexpr
Parameters | |
---|---|
r in | RNG enum class value |
Returns | Enum class underlying value using static_cast |
Return underlying type
static std::string& tk:: ctr:: operator+=(std::string& os,
const Term& term)
Operator += for adding Term (var+field) to a std::string.
Parameters | |
---|---|
os in/out | std::string to add to |
term in | Term to add |
Returns | Updated std::string |
static std::ostream& tk:: ctr:: operator<<(std::ostream& os,
const Term& term)
Operator << for writing Term to output streams.
Parameters | |
---|---|
os in/out | Output stream to write to |
term in | Term to write |
Returns | Updated output stream |
static std::ostream& tk:: ctr:: operator<<(std::ostream& os,
const Product& p)
Operator << for writing products to output streams.
Parameters | |
---|---|
os in/out | Output stream to write to |
p in | Product, std::vector< Term >, to write |
Returns | Updated output stream |
static std::ostream& tk:: ctr:: pdf(std::ostream& os,
const std::vector<Term>& var,
const std::vector<tk:: real>& bin,
const std::string& name,
const std::vector<tk:: real>& ext)
Function for writing PDF sample space variables to output streams.
Parameters | |
---|---|
os in/out | Output stream to write to |
var in | Vector of Terms to write |
bin in | Vector of PDF bin sizes |
name in | Name of PDF |
ext in | Vector of sample space extents |
Returns | Updated output stream |
template<std::size_t D>
PDFInfo tk:: ctr:: pdfInfo(const std::vector<std::vector<tk:: real>>& binsizes,
const std::vector<std::string>& names,
const std::vector<std::vector<tk:: real>>& exts,
const std::vector<Probability>& pdfs,
tk:: ctr:: Moment m,
std::size_t idx,
std::uint64_t it,
tk:: real time)
Find PDF information, see tk::
Parameters | |
---|---|
binsizes in | Vector of sample space bin sizes for multiple PDFs |
names in | Vector of PDF names |
exts in | Vector of sample space extents. Note: if the user did not specify extents for a PDF, the corresponding extents vector still exists but it is empty. |
pdfs in | Vector of PDFs |
m in | ORDINARY or CENTRAL PDF we are looking for |
idx in | Index of the PDF within the list of matching (based on D and m) PDFs requested |
it in | Iteration count |
time in | Physical time |
Returns | The PDF metadata requested |
Find PDF information given the sample space dimension (template argument D), ordinary or central PDF (m), and the index within the list of matching (based on D and m) PDFs requested (idx). This function must find the PDF, if it does not, it throws an exception.
template<std::size_t D>
std::size_t tk:: ctr:: numPDF(const std::vector<std::vector<tk:: real>>& binsizes,
const std::vector<Probability>& pdfs,
ctr:: Moment m)
Parameters | |
---|---|
binsizes in | Vector of vector of bin sizes (inner vector: a different entry for each sample space dimension for potentially multi-variate PDFs, outer vector: potentially multiple PDFs) |
pdfs in | Vector of PDFs |
m in | ORDINARY or CENTRAL PDF we are looking for |
Returns | The number of PDFs matchin the criteria discussed above |
Extract number of PDFs given sample space dimension
Count number of PDFs given the sample space dimension (template argument D) and whether the PDF is ordinary or central (m)
static Product tk:: ctr:: covariance(char var1,
kw::ncomp::info::expect::type c1,
char var2,
kw::ncomp::info::expect::type c2)
Parameters | |
---|---|
var1 in | Variable 1 |
c1 in | Component number 1 |
var2 in | Variable 2 |
c2 in | Component number 2 |
Returns | Constructed vector< Term > identifying the first ordinary moment (mean) of field (component) c of variable var |
Construct covariance