gradingDescriptor Class Reference

Handles the specification for grading within a section of a block. More...

Public Member Functions

 gradingDescriptor ()
 Default construct (1, 1, 1) More...
 
 gradingDescriptor (const scalar blockFraction, const scalar nDivFraction, const scalar expansionRatio)
 Construct from components. More...
 
 gradingDescriptor (const scalar expansionRatio)
 Construct from expansionRatio. More...
 
 gradingDescriptor (Istream &is)
 Construct from Istream. More...
 
 ~gradingDescriptor ()=default
 Destructor. More...
 
scalar blockFraction () const
 
scalar nDivFraction () const
 
scalar expansionRatio () const
 
void correct ()
 Adjust expansion ratio. More...
 
gradingDescriptor inv () const
 Return the inverse gradingDescriptor with 1/expansionRatio. More...
 
bool operator== (const gradingDescriptor &) const
 
bool operator!= (const gradingDescriptor &) const
 

Friends

class gradingDescriptors
 
Istreamoperator>> (Istream &, gradingDescriptor &)
 
Ostreamoperator<< (Ostream &, const gradingDescriptor &)
 

Detailed Description

Handles the specification for grading within a section of a block.

The grading specification is handled is controlled by three parameters:

  • blockFraction: the fraction of the block the section occupies
  • nDivFraction: the fraction of the divisions of the block allocated to the section
  • expansionRatio: the expansion ratio for the grading with the section of block defined as the ratio of end-size / start-size for the section. A negative value is trapped and treated as its inverse.
Source files

Definition at line 66 of file gradingDescriptor.H.

Constructor & Destructor Documentation

◆ gradingDescriptor() [1/4]

Default construct (1, 1, 1)

Definition at line 28 of file gradingDescriptor.C.

◆ gradingDescriptor() [2/4]

gradingDescriptor ( const scalar  blockFraction,
const scalar  nDivFraction,
const scalar  expansionRatio 
)

Construct from components.

Definition at line 37 of file gradingDescriptor.C.

References correct.

◆ gradingDescriptor() [3/4]

gradingDescriptor ( const scalar  expansionRatio)
explicit

Construct from expansionRatio.

Definition at line 52 of file gradingDescriptor.C.

References correct.

◆ gradingDescriptor() [4/4]

gradingDescriptor ( Istream is)
explicit

Construct from Istream.

Definition at line 64 of file gradingDescriptor.C.

◆ ~gradingDescriptor()

~gradingDescriptor ( )
default

Destructor.

Member Function Documentation

◆ blockFraction()

scalar blockFraction ( ) const
inline

Definition at line 117 of file gradingDescriptor.H.

◆ nDivFraction()

scalar nDivFraction ( ) const
inline

Definition at line 122 of file gradingDescriptor.H.

◆ expansionRatio()

scalar expansionRatio ( ) const
inline

Definition at line 127 of file gradingDescriptor.H.

◆ correct()

void correct ( )

Adjust expansion ratio.

Trap negative value and treat as its inverse.

Definition at line 72 of file gradingDescriptor.C.

Referenced by gradingDescriptors::correct(), gradingDescriptors::normalise(), and Foam::operator>>().

Here is the caller graph for this function:

◆ inv()

Foam::gradingDescriptor inv ( ) const

Return the inverse gradingDescriptor with 1/expansionRatio.

Definition at line 81 of file gradingDescriptor.C.

◆ operator==()

bool operator== ( const gradingDescriptor gd) const

Definition at line 94 of file gradingDescriptor.C.

References Foam::equal().

Here is the call graph for this function:

◆ operator!=()

bool operator!= ( const gradingDescriptor gd) const

Definition at line 103 of file gradingDescriptor.C.

References Foam::operator==().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ gradingDescriptors

friend class gradingDescriptors
friend

Definition at line 78 of file gradingDescriptor.H.

◆ operator>>

Istream& operator>> ( Istream ,
gradingDescriptor  
)
friend

◆ operator<<

Ostream& operator<< ( Ostream ,
const gradingDescriptor  
)
friend

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