primitives/direction: Changed from "char" to "int8_t" and added IO operators

to avoid problems when writing "nComponents"
This commit is contained in:
Henry Weller
2016-05-06 17:40:49 +01:00
parent 28c753f52e
commit b72b9dcf88
10 changed files with 129 additions and 41 deletions

View File

@ -38,7 +38,7 @@ void Foam::patchWriter::write
{
const GeometricField<Type, fvPatchField, volMesh>& fld = flds[fieldi];
os_ << fld.name() << ' ' << int(pTraits<Type>::nComponents) << ' '
os_ << fld.name() << ' ' << pTraits<Type>::nComponents << ' '
<< nFaces_ << " float" << std::endl;
DynamicList<floatScalar> fField(pTraits<Type>::nComponents*nFaces_);
@ -74,7 +74,7 @@ void Foam::patchWriter::write
const GeometricField<Type, pointPatchField, pointMesh>& fld =
flds[fieldi];
os_ << fld.name() << ' ' << int(pTraits<Type>::nComponents) << ' '
os_ << fld.name() << ' ' << pTraits<Type>::nComponents << ' '
<< nPoints_ << " float" << std::endl;
DynamicList<floatScalar> fField(pTraits<Type>::nComponents*nPoints_);
@ -103,7 +103,7 @@ void Foam::patchWriter::write
{
const GeometricField<Type, fvPatchField, volMesh>& fld = flds[fieldi];
os_ << fld.name() << ' ' << int(pTraits<Type>::nComponents) << ' '
os_ << fld.name() << ' ' << pTraits<Type>::nComponents << ' '
<< nPoints_ << " float" << std::endl;
DynamicList<floatScalar> fField(pTraits<Type>::nComponents*nPoints_);

View File

@ -74,7 +74,7 @@ void Foam::writeFuns::write
label nValues = mesh.nCells() + superCells.size();
os << vvf.name() << ' ' << int(pTraits<Type>::nComponents) << ' '
os << vvf.name() << ' ' << pTraits<Type>::nComponents << ' '
<< nValues << " float" << std::endl;
DynamicList<floatScalar> fField(pTraits<Type>::nComponents*nValues);
@ -106,7 +106,7 @@ void Foam::writeFuns::write
const labelList& addPointCellLabels = topo.addPointCellLabels();
const label nTotPoints = mesh.nPoints() + addPointCellLabels.size();
os << pvf.name() << ' ' << int(pTraits<Type>::nComponents) << ' '
os << pvf.name() << ' ' << pTraits<Type>::nComponents << ' '
<< nTotPoints << " float" << std::endl;
DynamicList<floatScalar> fField(pTraits<Type>::nComponents*nTotPoints);
@ -139,7 +139,7 @@ void Foam::writeFuns::write
const labelList& addPointCellLabels = topo.addPointCellLabels();
const label nTotPoints = mesh.nPoints() + addPointCellLabels.size();
os << vvf.name() << ' ' << int(pTraits<Type>::nComponents) << ' '
os << vvf.name() << ' ' << pTraits<Type>::nComponents << ' '
<< nTotPoints << " float" << std::endl;
DynamicList<floatScalar> fField(pTraits<Type>::nComponents*nTotPoints);