mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
cosmetics
This commit is contained in:
@ -35,17 +35,17 @@ Foam::label Foam::interpolationLookUpTable <Type>::index
|
||||
const bool lastDim
|
||||
) const
|
||||
{
|
||||
label totalindex = 0;
|
||||
label totalIndex = 0;
|
||||
|
||||
for (int i = 0; i < dim_.size() - 1; i++)
|
||||
forAll(dim_, i)
|
||||
{
|
||||
label dim = 1;
|
||||
for (int j = i + 1; j < dim_.size(); j++)
|
||||
{
|
||||
dim *=(dim_[j]+1);
|
||||
dim *= dim_[j] + 1;
|
||||
}
|
||||
|
||||
totalindex +=
|
||||
totalIndex +=
|
||||
dim
|
||||
*min
|
||||
(
|
||||
@ -57,7 +57,7 @@ Foam::label Foam::interpolationLookUpTable <Type>::index
|
||||
if (lastDim)
|
||||
{
|
||||
label iLastdim = dim_.size() - 1;
|
||||
totalindex += Foam::min
|
||||
totalIndex += Foam::min
|
||||
(
|
||||
max
|
||||
(
|
||||
@ -68,7 +68,7 @@ Foam::label Foam::interpolationLookUpTable <Type>::index
|
||||
);
|
||||
}
|
||||
|
||||
return totalindex;
|
||||
return totalIndex;
|
||||
}
|
||||
|
||||
|
||||
@ -171,7 +171,7 @@ void Foam::interpolationLookUpTable<Type>::dimensionTable()
|
||||
max_[i] = readScalar(entries_[i].lookup("max"));
|
||||
min_[i] = readScalar(entries_[i].lookup("min"));
|
||||
delta_[i] = (max_[i] - min_[i])/dim_[i];
|
||||
tableDim *= (dim_[i] + 1);
|
||||
tableDim *= dim_[i] + 1;
|
||||
fieldIndices_.insert(entries_[i].lookup("name"), index);
|
||||
entryIndices_[i] = index;
|
||||
index++;
|
||||
@ -229,8 +229,7 @@ void Foam::interpolationLookUpTable<Type>::readTable
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::interpolationLookUpTable<Type>::readTable()"
|
||||
) << "table is empty" << nl
|
||||
<< exit(FatalError);
|
||||
) << "table is empty" << nl << exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
@ -316,12 +315,11 @@ template<class Type>
|
||||
void Foam::interpolationLookUpTable<Type>::check() const
|
||||
{
|
||||
// check order in the first dimension.
|
||||
|
||||
scalar prevValue = List<scalarField>::operator[](0).operator[](0);
|
||||
label dim = 1;
|
||||
for (int j = 1; j < dim_.size(); j++)
|
||||
{
|
||||
dim *=(dim_[j]+1);
|
||||
dim *= dim_[j] + 1;
|
||||
}
|
||||
|
||||
for (label i = 1; i < dim_[0]; i++)
|
||||
@ -336,9 +334,8 @@ void Foam::interpolationLookUpTable<Type>::check() const
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::interpolationLookUpTable<Type>::checkOrder() const"
|
||||
) << "out-of-order value: "
|
||||
<< currValue << " at index " << index << nl
|
||||
<< exit(FatalError);
|
||||
) << "out-of-order value: " << currValue
|
||||
<< " at index " << index << nl << exit(FatalError);
|
||||
}
|
||||
prevValue = currValue;
|
||||
}
|
||||
@ -379,8 +376,7 @@ void Foam::interpolationLookUpTable<Type>::write
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::interpolationTable<Type>::write()"
|
||||
) << "table is empty" << nl
|
||||
<< exit(FatalError);
|
||||
) << "table is empty" << nl << exit(FatalError);
|
||||
}
|
||||
os.writeKeyword("values");
|
||||
os << *this << token::END_STATEMENT << nl;
|
||||
@ -400,28 +396,22 @@ Foam::interpolationLookUpTable<Type>::operator[](const label i)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::interpolationLookUpTable<Type>::operator[]"
|
||||
"(const label) const"
|
||||
) << "table has (" << n << ") columns" << nl
|
||||
<< exit(FatalError);
|
||||
"Foam::interpolationLookUpTable<Type>::operator[](const label)"
|
||||
) << "table has (" << n << ") columns" << nl << exit(FatalError);
|
||||
}
|
||||
else if (ii < 0)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::interpolationLookUpTable<Type>::operator[]"
|
||||
"(const label) const"
|
||||
) << "index (" << ii << ") underflow" << nl
|
||||
<< exit(FatalError);
|
||||
"Foam::interpolationLookUpTable<Type>::operator[](const label)"
|
||||
) << "index (" << ii << ") underflow" << nl << exit(FatalError);
|
||||
}
|
||||
else if (ii > n)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::interpolationLookUpTable<Type>::operator[]"
|
||||
"(const label) const"
|
||||
) << "index (" << ii << ") overflow" << nl
|
||||
<< exit(FatalError);
|
||||
"Foam::interpolationLookUpTable<Type>::operator[](const label)"
|
||||
) << "index (" << ii << ") overflow" << nl << exit(FatalError);
|
||||
}
|
||||
|
||||
return List<scalarField>::operator[](ii);
|
||||
@ -441,8 +431,7 @@ Foam::interpolationLookUpTable<Type>::operator[](const label i) const
|
||||
(
|
||||
"Foam::interpolationLookUpTable<Type>::operator[]"
|
||||
"(const label) const"
|
||||
) << "table has (" << n << ") columns" << nl
|
||||
<< exit(FatalError);
|
||||
) << "table has (" << n << ") columns" << nl << exit(FatalError);
|
||||
}
|
||||
else if (ii < 0)
|
||||
{
|
||||
@ -450,8 +439,7 @@ Foam::interpolationLookUpTable<Type>::operator[](const label i) const
|
||||
(
|
||||
"Foam::interpolationLookUpTable<Type>::operator[]"
|
||||
"(const label) const"
|
||||
) << "index (" << ii << ") underflow" << nl
|
||||
<< exit(FatalError);
|
||||
) << "index (" << ii << ") underflow" << nl << exit(FatalError);
|
||||
}
|
||||
|
||||
else if (ii > n)
|
||||
|
||||
@ -64,7 +64,7 @@ class interpolationLookUpTable
|
||||
{
|
||||
private:
|
||||
|
||||
// Private data
|
||||
// Privsate data
|
||||
|
||||
//- File name
|
||||
fileName fileName_;
|
||||
|
||||
@ -100,7 +100,7 @@ namespace radiation
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class constantAbsorptionEmission Declaration
|
||||
Class greyMeanAbsorptionEmission Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class greyMeanAbsorptionEmission
|
||||
|
||||
Reference in New Issue
Block a user