mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: minor comments added to ensightSurfaceReader
This commit is contained in:
@ -212,14 +212,14 @@ void Foam::ensightSurfaceReader::readCase(IFstream& is)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Start reading time information
|
// Start reading time information
|
||||||
readLine(is, buffer); // time set: 1
|
readLine(is, buffer); // time set: <int>
|
||||||
|
|
||||||
readLine(is, buffer);
|
readLine(is, buffer);
|
||||||
readFromLine(3, buffer, nTimeSteps_);
|
readFromLine(3, buffer, nTimeSteps_); // number of steps: <int>
|
||||||
readLine(is, buffer);
|
readLine(is, buffer);
|
||||||
readFromLine(3, buffer, timeStartIndex_);
|
readFromLine(3, buffer, timeStartIndex_); // filename start number: <int>
|
||||||
readLine(is, buffer);
|
readLine(is, buffer);
|
||||||
readFromLine(2, buffer, timeIncrement_);
|
readFromLine(2, buffer, timeIncrement_); // filename increment: <int>
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
@ -369,7 +369,7 @@ const Foam::meshedSurface& Foam::ensightSurfaceReader::geometry()
|
|||||||
|
|
||||||
// Read faces - may be a mix of tris, quads and polys
|
// Read faces - may be a mix of tris, quads and polys
|
||||||
DynamicList<face> faces(ceil(nPoints/3));
|
DynamicList<face> faces(ceil(nPoints/3));
|
||||||
DynamicList<Tuple2<string, label> > schema(faces.size());
|
DynamicList<Tuple2<string, label>> schema(faces.size());
|
||||||
string faceType = "";
|
string faceType = "";
|
||||||
label nFace = 0;
|
label nFace = 0;
|
||||||
while (is.good()) // (is.peek() != EOF)
|
while (is.good()) // (is.peek() != EOF)
|
||||||
@ -494,7 +494,7 @@ Foam::wordList Foam::ensightSurfaceReader::fieldNames
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::Field<Foam::scalar> > Foam::ensightSurfaceReader::field
|
Foam::tmp<Foam::Field<Foam::scalar>> Foam::ensightSurfaceReader::field
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
const label fieldIndex,
|
const label fieldIndex,
|
||||||
@ -505,7 +505,7 @@ Foam::tmp<Foam::Field<Foam::scalar> > Foam::ensightSurfaceReader::field
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::Field<Foam::vector> > Foam::ensightSurfaceReader::field
|
Foam::tmp<Foam::Field<Foam::vector>> Foam::ensightSurfaceReader::field
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
const label fieldIndex,
|
const label fieldIndex,
|
||||||
@ -516,7 +516,7 @@ Foam::tmp<Foam::Field<Foam::vector> > Foam::ensightSurfaceReader::field
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::Field<Foam::sphericalTensor> >
|
Foam::tmp<Foam::Field<Foam::sphericalTensor>>
|
||||||
Foam::ensightSurfaceReader::field
|
Foam::ensightSurfaceReader::field
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
@ -528,7 +528,7 @@ Foam::ensightSurfaceReader::field
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::Field<Foam::symmTensor> > Foam::ensightSurfaceReader::field
|
Foam::tmp<Foam::Field<Foam::symmTensor>> Foam::ensightSurfaceReader::field
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
const label fieldIndex,
|
const label fieldIndex,
|
||||||
@ -539,7 +539,7 @@ Foam::tmp<Foam::Field<Foam::symmTensor> > Foam::ensightSurfaceReader::field
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::Field<Foam::tensor> > Foam::ensightSurfaceReader::field
|
Foam::tmp<Foam::Field<Foam::tensor>> Foam::ensightSurfaceReader::field
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
const label fieldIndex,
|
const label fieldIndex,
|
||||||
|
|||||||
@ -86,7 +86,7 @@ protected:
|
|||||||
//- Pointer to the surface
|
//- Pointer to the surface
|
||||||
autoPtr<meshedSurface> surfPtr_;
|
autoPtr<meshedSurface> surfPtr_;
|
||||||
|
|
||||||
List<Tuple2<string, label> > schema_;
|
List<Tuple2<string, label>> schema_;
|
||||||
|
|
||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
@ -126,7 +126,7 @@ protected:
|
|||||||
|
|
||||||
//- Helper function to return a field
|
//- Helper function to return a field
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > readField
|
tmp<Field<Type>> readField
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
const label fieldIndex
|
const label fieldIndex
|
||||||
@ -160,7 +160,7 @@ public:
|
|||||||
virtual wordList fieldNames(const label timeIndex) const;
|
virtual wordList fieldNames(const label timeIndex) const;
|
||||||
|
|
||||||
//- Return a scalar field at a given time
|
//- Return a scalar field at a given time
|
||||||
virtual tmp<Field<scalar> > field
|
virtual tmp<Field<scalar>> field
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
const label fieldIndex,
|
const label fieldIndex,
|
||||||
@ -168,7 +168,7 @@ public:
|
|||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return a scalar field at a given time
|
//- Return a scalar field at a given time
|
||||||
virtual tmp<Field<vector> > field
|
virtual tmp<Field<vector>> field
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
const label fieldIndex,
|
const label fieldIndex,
|
||||||
@ -176,7 +176,7 @@ public:
|
|||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return a sphericalTensor field at a given time
|
//- Return a sphericalTensor field at a given time
|
||||||
virtual tmp<Field<sphericalTensor> > field
|
virtual tmp<Field<sphericalTensor>> field
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
const label fieldIndex,
|
const label fieldIndex,
|
||||||
@ -184,7 +184,7 @@ public:
|
|||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return a symmTensor field at a given time
|
//- Return a symmTensor field at a given time
|
||||||
virtual tmp<Field<symmTensor> > field
|
virtual tmp<Field<symmTensor>> field
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
const label fieldIndex,
|
const label fieldIndex,
|
||||||
@ -192,7 +192,7 @@ public:
|
|||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return a tensor field at a given time
|
//- Return a tensor field at a given time
|
||||||
virtual tmp<Field<tensor> > field
|
virtual tmp<Field<tensor>> field
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
const label fieldIndex,
|
const label fieldIndex,
|
||||||
|
|||||||
@ -57,7 +57,7 @@ void Foam::ensightSurfaceReader::readFromLine
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::tmp<Foam::Field<Type> > Foam::ensightSurfaceReader::readField
|
Foam::tmp<Foam::Field<Type>> Foam::ensightSurfaceReader::readField
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
const label fieldIndex
|
const label fieldIndex
|
||||||
@ -126,7 +126,7 @@ Foam::tmp<Foam::Field<Type> > Foam::ensightSurfaceReader::readField
|
|||||||
is.read(iValue);
|
is.read(iValue);
|
||||||
|
|
||||||
// Allocate storage for data as a list per component
|
// Allocate storage for data as a list per component
|
||||||
List<DynamicList<scalar> > values(pTraits<Type>::nComponents);
|
List<DynamicList<scalar>> values(pTraits<Type>::nComponents);
|
||||||
label n = surfPtr_->size();
|
label n = surfPtr_->size();
|
||||||
forAll(values, cmptI)
|
forAll(values, cmptI)
|
||||||
{
|
{
|
||||||
@ -164,7 +164,7 @@ Foam::tmp<Foam::Field<Type> > Foam::ensightSurfaceReader::readField
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp<Field<Type> > tField(new Field<Type>(n, pTraits<Type>::zero));
|
tmp<Field<Type>> tField(new Field<Type>(n, pTraits<Type>::zero));
|
||||||
Field<Type>& field = tField.ref();
|
Field<Type>& field = tField.ref();
|
||||||
|
|
||||||
for
|
for
|
||||||
|
|||||||
Reference in New Issue
Block a user