Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members  

DimensionGroup: Specifying physical characteristics


Compounds

class  DimensionGroup
class  DimensionPower

Functions

vector<DimensionPower>::iterator find_dimn ( Dimension* dimn, vector<DimensionPower>& dpwr )
vector<DimensionPower>::const_iterator find_dimn ( Dimension* dimn, const vector<DimensionPower>& dpwr )
bool areDimensionsMatched ( const vector<DimensionPower>& d1, const vector<DimensionPower>& d2 )

Detailed Description

A list of tuples of (Dimension, exponent) specify the "axes" that physical quantities are measured along. For instance, velocity is specified as "length per unit time". Using the standard abbreviations for dimensions, this is "L t^-1". The DimensionPower class represents a tuple (for our example, (L,1) would be a tuple). The DimensionGroup class stores a list of these tuples (for example, {(L,1),(t,-1)}) and information about the physical characteristic this specifies ("velocity").

Function Documentation

bool areDimensionsMatched ( const vector< DimensionPower >& d1,
const vector< DimensionPower >& d2 )
 

same (Dimension, exponent) tuples

Parameters:
d1  
d2   the sets of tuples to compare to each other

vector< DimensionPower >::const_iterator find_dimn<DimensionPower> ( Dimension * dimn,
const vector< DimensionPower >& dpwr )
 

Find a Dimension in a set of tuples of (Dimension, exponent).

Parameters:
dimn   the Dimension to find
dpwr   the list of (Dimension, exponent) tuples to search in.
Returns:
Either dpwr.end() (if no match) or a const_iterator referencing the tuple in dpwr.

vector< DimensionPower >::iterator find_dimn<DimensionPower> ( Dimension * dimn,
vector< DimensionPower >& dpwr )
 

Find a Dimension in a list of DimensionPowers.

If the Dimension is not present in the list, then dpwr.end() is returned.

This is meant for use when creating a list of DimensionPowers... rather than adding a new DimensionPower, you should check to see if there is one whose dimension already matches and just modify the exponent. That way, multiple DimensionGroups won't be created for what is really a single dimensional group.

On the other hand, it might help to have multiple DimensionGroups for equivalent DimensionPowers. Consider strain and Reynold's Number. Both are dimensionless, (i.e. dimensions of one(1)), but strain could be expressed as (L/L) and Reynold's Number as ( M/L^3 L/t L/(M/L^3/t)). The problem comes in figuring out which of the two a user's input most closely matches (e.g. what if Re=VD/nu is given rather than rhoVD/mu?).

Citrus C++ Reference Manual  20010520