tk::ctr::Term struct

Term is a Moment of a quantity with a field ID to be ensemble averaged.

Internally the numbering of field IDs starts from 0, but presented to the user, e.g., in screen-output, as starting from 1.

Constructors, destructors, conversion operators

Term(char v = 0, ncomp_t f = 0, Moment m = Moment::ORDINARY) explicit
Constructor: initialize all state data.

Public functions

auto operator==(const Term& term) const -> bool
Equal operator for, e.g., finding unique elements, used by, e.g., std::unique().
auto operator<(const Term& term) const -> bool
Less-than operator for ordering, used by, e.g., std::sort().

Public variables

char var
Variable name.
ncomp_t field
Field ID.
Moment moment
Moment type: ordinary, central.

Pack/Unpack: Serialize Term object for Charm++

void pup(PUP::er& p)
void operator|(PUP::er& p, Term& t)
Pack/Unpack serialize operator|.

Function documentation

tk::ctr::Term::Term(char v = 0, ncomp_t f = 0, Moment m = Moment::ORDINARY) explicit

Constructor: initialize all state data.

Parameters
in Variable name
in Field ID
in Moment type enum: Moment::ORDINARY or Moment::CENTRAL

bool tk::ctr::Term::operator==(const Term& term) const

Equal operator for, e.g., finding unique elements, used by, e.g., std::unique().

Parameters
term in Term to compare
Returns Boolean indicating if term equals 'this'

Test on field, moment, and var

bool tk::ctr::Term::operator<(const Term& term) const

Less-than operator for ordering, used by, e.g., std::sort().

Parameters
term in Term to compare
Returns Boolean indicating if term is less than 'this'

Test on var, field, and moment.

void tk::ctr::Term::pup(PUP::er& p)

Parameters
in/out Charm++'s PUP::er serializer object reference

Pack/Unpack serialize member function

void tk::ctr::Term::operator|(PUP::er& p, Term& t)

Pack/Unpack serialize operator|.

Parameters
in/out Charm++'s PUP::er serializer object reference
in/out Term object reference