void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) { Info<< "\tdomain volume = " << gSum(mesh.V()) << endl; const cellZoneMesh& cellZones = mesh.cellZones(); scalar cellZoneVolTotal(0); if (cellZones.size()) { Info << "cellZones:" << endl; forAll(cellZones, i) { const cellZone& zone = mesh.cellZones()[i]; const cellZoneMesh& zoneMesh = zone.zoneMesh(); const labelList& cellsZone = zoneMesh[i]; scalar cellZoneVol(0); //float cellZoneVol=0.0; forAll(cellsZone, cI) { cellZoneVol += mesh.V()[cellsZone[cI]]; } Info << '\t' << zone.name() << " volume = " << cellZoneVol << endl; cellZoneVolTotal += cellZoneVol; } }
Foam::actuationDiskSource::actuationDiskSource ( const word& name, const dictionary& dict, const fvMesh& mesh ) : basicSource(name, dict, mesh), cellZoneID_(mesh.cellZones().findZoneID(this->cellSetName())), dict_(dict.subDict(typeName + "Coeffs")), diskDir_(dict_.lookup("diskDir")), Cp_(readScalar(dict_.lookup("Cp"))), Ct_(readScalar(dict_.lookup("Ct"))), diskArea_(readScalar(dict_.lookup("diskArea"))) { Info<< " - creating actuation disk zone: " << this->name() << endl; bool foundZone = (cellZoneID_ != -1); reduce(foundZone, orOp<bool>()); if (!foundZone && Pstream::master()) { FatalErrorIn ( "Foam::actuationDiskSource::actuationDiskSource" "(const word&, const dictionary&, const fvMesh&)" ) << "cannot find porous cellZone " << this->name() << exit(FatalError); } checkData(); }