56 for (label j = 0; j <
nBins_[i]; ++j)
67 for (label i = 0; i <
nBin_; ++i)
90 const word& fieldName = fieldNames_[fieldi];
94 const VolFieldType* fieldPtr = mesh_.findObject<VolFieldType>(fieldName);
103 writeFileHeader<Type>(filePtrs_[fieldi]);
106 const VolFieldType&
fld = *fieldPtr;
119 if (decomposePatchValues_)
125 for (
auto& binList :
data)
127 binList.setSize(nBin_,
Zero);
130 for (
const label zonei : cellZoneIDs_)
132 const cellZone& cZone = mesh_.cellZones()[zonei];
134 for (
const label celli : cZone)
136 const label bini = cellToBin_[celli];
147 const label patchi = iter();
149 const vectorField np(mesh_.boundary()[patchi].nf());
153 const label localFacei =
154 pp.
start() - mesh_.nInternalFaces() + facei;
155 const label bini = faceToBin_[localFacei];
159 const Type& v =
fld.boundaryField()[patchi][facei];
161 if (!decomposePatchValues(
data, bini, v, np[facei]))
171 writeBinnedData(
data, filePtrs_[fieldi]);
#define R(A, B, C, D, E, F, K, M)
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Generic GeometricField class.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Output to file stream, using an OSstream.
label nBin_
Total number of bins.
autoPtr< coordinateSystem > coordSysPtr_
Local coordinate system of bins.
bool decomposePatchValues_
Decompose patch values into normal and tangential components.
Database for solution data, solver performance and other reduced data.
virtual void writeTabbed(Ostream &os, const string &str) const
Write a tabbed string to stream.
void writeHeaderValue(Ostream &os, const string &property, const Type &value) const
Write a (commented) header property and value pair.
virtual void writeHeader(Ostream &os, const string &str) const
Write a commented header to stream.
virtual void writeCommented(Ostream &os, const string &str) const
Write a commented string to stream.
static constexpr direction nComponents
Number of components in bool is 1.
A patch is a list of labels that address the faces in the global face list.
label start() const
Return start label of this patch in the polyMesh face list.
const polyBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
splitCell * master() const
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
constexpr char nl
The newline '\n' character (0x0a)
constexpr char tab
The tab '\t' character(0x09)
#define forAll(list, i)
Loop across all elements in list.
#define forAllIters(container, iter)
Iterate across all elements in the container object.