diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/createFields.H b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/createFields.H deleted file mode 100644 index 4671347b66..0000000000 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/createFields.H +++ /dev/null @@ -1,59 +0,0 @@ -Info<< "Reading thermophysical properties\n" << endl; - -autoPtr pThermo -( - fluidThermo::New(mesh) -); -fluidThermo& thermo = pThermo(); -thermo.validate(args.executable(), "h", "e"); - -volScalarField rho -( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::READ_IF_PRESENT, - IOobject::AUTO_WRITE - ), - thermo.rho() -); - -volScalarField& p = thermo.p(); - -Info<< "Reading field U\n" << endl; -volVectorField U -( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh -); - -#include "compressibleCreatePhi.H" - -pressureControl pressureControl(p, rho, simple.dict()); - -mesh.setFluxRequired(p.name()); - -Info<< "Creating turbulence model\n" << endl; -autoPtr turbulence -( - compressible::turbulenceModel::New - ( - rho, - U, - phi, - thermo - ) -); - -dimensionedScalar initialMass = fvc::domainIntegrate(rho); - -#include "createMRF.H" diff --git a/src/Allwmake b/src/Allwmake index 624257ff37..501f286305 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -81,6 +81,7 @@ wmake $targetType rigidBodyDynamics wmake $targetType rigidBodyMeshMotion # Needs access to Turbulence -wmake $targetType thermophysicalModels/properties/liquidPropertiesFvPatchFields + +wmake $targetType thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties #------------------------------------------------------------------------------ diff --git a/src/combustionModels/FSD/FSD.C b/src/combustionModels/FSD/FSD.C index 25ed498fce..1bc995bef7 100644 --- a/src/combustionModels/FSD/FSD.C +++ b/src/combustionModels/FSD/FSD.C @@ -58,7 +58,7 @@ FSD::FSD ( this->coeffs(), this->mesh(), - *this + *this ) ), ft_ @@ -190,14 +190,18 @@ void FSD::calculateSourceNorm() volScalarField& omegaFuelBar = tomegaFuel.ref(); // Calculation of the mixture fraction variance (ftVar) - // TODO: generalize delta for RAS and LES. - const volScalarField& delta = - refCast(this->turbulence()).delta(); + const compressible::LESModel& lesModel = + YO2.db().lookupObject + ( + turbulenceModel::propertiesName + ); + const volScalarField& delta = lesModel.delta(); const volScalarField ftVar(Cv_*sqr(delta)*sqr(mgft)); // Thickened flame (average flame thickness for counterflow configuration // is 1.5 mm) + volScalarField deltaF ( delta/dimensionedScalar("flame", dimLength, 1.5e-3) diff --git a/src/combustionModels/Make/files b/src/combustionModels/Make/files index 09844f061e..760bb324a4 100644 --- a/src/combustionModels/Make/files +++ b/src/combustionModels/Make/files @@ -19,16 +19,17 @@ eddyDissipationDiffusionModel/eddyDissipationDiffusionModels.C laminar/laminars.C -/* + FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C FSD/reactionRateFlameAreaModels/relaxation/relaxation.C FSD/FSDs.C -*/ + diffusionMulticomponent/diffusionMulticomponents.C + zoneCombustion/zoneCombustions.C noCombustion/noCombustions.C diff --git a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C index aa2bfdb754..aa4893c078 100644 --- a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C +++ b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C @@ -369,8 +369,10 @@ diffusionMulticomponent::correct() template Foam::tmp -Foam::combustionModels::diffusionMulticomponent:: -R(volScalarField& Y) const +Foam::combustionModels::diffusionMulticomponent::R +( + volScalarField& Y +) const { tmp tSu(new fvScalarMatrix(Y, dimMass/dimTime)); @@ -378,7 +380,7 @@ R(volScalarField& Y) const if (this->active()) { - const label specieI = this->thermo().composition().species()[Y.name()]; + const label specieI = this->thermo().composition().species()[Y.member()]; Su += this->chemistryPtr_->RR(specieI); } @@ -389,15 +391,15 @@ R(volScalarField& Y) const template Foam::tmp Foam::combustionModels::diffusionMulticomponent:: -dQ() const +Qdot() const { - tmp tdQ + tmp tQdot ( new volScalarField ( IOobject ( - "dQ", + "Qdot", this->mesh().time().timeName(), this->mesh(), IOobject::NO_READ, @@ -412,45 +414,11 @@ dQ() const if (this->active()) { - volScalarField& dQ = tdQ.ref(); - dQ = this->chemistryPtr_->dQ(); + volScalarField& Qdot = tQdot.ref(); + Qdot = this->chemistryPtr_->Qdot(); } - return tdQ; -} - - -template -Foam::tmp -Foam::combustionModels::diffusionMulticomponent:: -Sh() const -{ - tmp tSh - ( - new volScalarField - ( - IOobject - ( - "Sh", - this->mesh().time().timeName(), - this->mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh(), - dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0), - zeroGradientFvPatchScalarField::typeName - ) - ); - - if (this->active()) - { - scalarField& Sh = tSh.ref(); - Sh = this->chemistryPtr_->Sh(); - } - - return tSh; + return tQdot; } diff --git a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.H b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.H index 48af00efd9..b1f7f40ba0 100644 --- a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.H +++ b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.H @@ -191,10 +191,7 @@ public: virtual tmp R(volScalarField& Y) const; //- Heat release rate calculated from fuel consumption rate matrix - virtual tmp dQ() const; - - //- Return source for enthalpy equation [kg/m/s3] - virtual tmp Sh() const; + virtual tmp Qdot() const; // IO diff --git a/src/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C b/src/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C index b9dc72d92b..95389d0151 100644 --- a/src/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C +++ b/src/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C @@ -196,10 +196,12 @@ void Foam::functionObjects::fieldMinMax::calcMinMaxFields label mini = findMin(minVs); scalar minValue = minVs[mini]; + const label minCell = minCells[mini]; const vector& minC = minCs[mini]; label maxi = findMax(maxVs); scalar maxValue = maxVs[maxi]; + const label maxCell = minCells[maxi]; const vector& maxC = maxCs[maxi]; output diff --git a/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C b/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C index f8abf91d1a..5d5bb380d7 100644 --- a/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C +++ b/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C @@ -986,11 +986,14 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::write() { if (validField(weightFieldName_)) { - scalarField weightField = getFieldValues + scalarField weightField ( - weightFieldName_, - true, - orientWeightField_ + getFieldValues + ( + weightFieldName_, + true, + orientWeightField_ + ) ); // Process the fields @@ -998,11 +1001,14 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::write() } else if (validField(weightFieldName_)) { - vectorField weightField = getFieldValues + vectorField weightField ( - weightFieldName_, - true, - orientWeightField_ + getFieldValues + ( + weightFieldName_, + true, + orientWeightField_ + ) ); // Process the fields diff --git a/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValueTemplates.C b/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValueTemplates.C index 4d8611e77c..6f434ed82c 100644 --- a/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValueTemplates.C +++ b/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValueTemplates.C @@ -147,17 +147,6 @@ processSameTypeValues break; } case opWeightedSum: - { - if (weightField.size()) - { - result = sum(weightField*values); - } - else - { - result = sum(values); - } - break; - } { if (returnReduce(weightField.empty(), andOp())) { @@ -165,7 +154,7 @@ processSameTypeValues } else { - tmp weight = weightingFactor(weightField); + tmp weight(weightingFactor(weightField)); result = gSum(weight*values); } @@ -202,7 +191,7 @@ processSameTypeValues } else { - const scalarField factor = weightingFactor(weightField); + const scalarField factor(weightingFactor(weightField)); result = gSum(factor*values)/(gSum(factor) + ROOTVSMALL); } @@ -217,7 +206,7 @@ processSameTypeValues } case opWeightedAreaAverage: { - const scalarField factor = weightingFactor(weightField, Sf); + const scalarField factor(weightingFactor(weightField, Sf)); result = gSum(factor*values)/gSum(factor + ROOTVSMALL); break; @@ -231,25 +220,11 @@ processSameTypeValues } case opWeightedAreaIntegrate: { - const scalarField factor = weightingFactor(weightField, Sf); + const scalarField factor(weightingFactor(weightField, Sf)); result = gSum(factor*values); break; } - case opWeightedAreaIntegrate: - { - const scalarField magSf(mag(Sf)); - - if (weightField.size()) - { - result = sum(weightField*magSf*values); - } - else - { - result = sum(magSf*values); - } - break; - } case opMin: { result = gMin(values); diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C index c3bbff871b..3cba483747 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C @@ -379,6 +379,7 @@ void Foam::ParticleCollector::collectParcelConcentricCircles scalar(nSector_)*theta/constant::mathematical::twoPi ); } + } if (secI != -1) { diff --git a/src/meshTools/searchableSurface/triSurfaceMesh.C b/src/meshTools/searchableSurface/triSurfaceMesh.C index a2adcd29fa..617243c138 100644 --- a/src/meshTools/searchableSurface/triSurfaceMesh.C +++ b/src/meshTools/searchableSurface/triSurfaceMesh.C @@ -42,9 +42,18 @@ namespace Foam // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -Foam::fileName Foam::triSurfaceMesh::checkFile(const IOobject& io) +Foam::fileName Foam::triSurfaceMesh::checkFile +( + const IOobject& io, + const bool isGlobal +) { - const fileName fName(io.filePath()); + const fileName fName + ( + isGlobal + ? io.globalFilePath() + : io.localFilePath() + ); if (fName.empty()) { FatalErrorInFunction @@ -59,7 +68,8 @@ Foam::fileName Foam::triSurfaceMesh::checkFile(const IOobject& io) Foam::fileName Foam::triSurfaceMesh::checkFile ( const IOobject& io, - const dictionary& dict + const dictionary& dict, + const bool isGlobal ) { fileName fName; @@ -79,7 +89,8 @@ Foam::fileName Foam::triSurfaceMesh::checkFile } else { - fName = io.filePath(); + fName = (isGlobal ? io.globalFilePath() : io.localFilePath()); + if (!exists(fName)) { FatalErrorInFunction @@ -240,7 +251,7 @@ Foam::triSurfaceMesh::triSurfaceMesh(const IOobject& io) false // searchableSurface already registered under name ) ), - triSurface(checkFile(static_cast(*this))), + triSurface(checkFile(static_cast(*this), true)), triSurfaceRegionSearch(static_cast(*this)), minQuality_(-1), surfaceClosed_(-1), @@ -273,7 +284,10 @@ Foam::triSurfaceMesh::triSurfaceMesh false // searchableSurface already registered under name ) ), - triSurface(checkFile(static_cast(*this), dict)), + triSurface + ( + checkFile(static_cast(*this), dict, true) + ), triSurfaceRegionSearch(static_cast(*this), dict), minQuality_(-1), surfaceClosed_(-1), @@ -307,6 +321,97 @@ Foam::triSurfaceMesh::triSurfaceMesh } +Foam::triSurfaceMesh::triSurfaceMesh(const IOobject& io, const bool isGlobal) +: + // Find instance for triSurfaceMesh + searchableSurface(io), + // Reused found instance in objectRegistry + objectRegistry + ( + IOobject + ( + io.name(), + searchableSurface::instance(), + io.local(), + io.db(), + io.readOpt(), + io.writeOpt(), + false // searchableSurface already registered under name + ) + ), + triSurface + ( + checkFile(static_cast(*this), isGlobal) + ), + triSurfaceRegionSearch(static_cast(*this)), + minQuality_(-1), + surfaceClosed_(-1), + outsideVolType_(volumeType::UNKNOWN) +{ + const pointField& pts = triSurface::points(); + + bounds() = boundBox(pts, isGlobal); +} + + +Foam::triSurfaceMesh::triSurfaceMesh +( + const IOobject& io, + const dictionary& dict, + const bool isGlobal +) +: + searchableSurface(io), + // Reused found instance in objectRegistry + objectRegistry + ( + IOobject + ( + io.name(), + searchableSurface::instance(), + io.local(), + io.db(), + io.readOpt(), + io.writeOpt(), + false // searchableSurface already registered under name + ) + ), + triSurface + ( + checkFile(static_cast(*this), dict, isGlobal) + ), + triSurfaceRegionSearch(static_cast(*this), dict), + minQuality_(-1), + surfaceClosed_(-1), + outsideVolType_(volumeType::UNKNOWN) +{ + // Reading from supplied file name instead of objectPath/filePath + dict.readIfPresent("file", fName_, false, false); + + scalar scaleFactor = 0; + + // Allow rescaling of the surface points + // eg, CAD geometries are often done in millimeters + if (dict.readIfPresent("scale", scaleFactor) && scaleFactor > 0) + { + Info<< searchableSurface::name() << " : using scale " << scaleFactor + << endl; + triSurface::scalePoints(scaleFactor); + } + + const pointField& pts = triSurface::points(); + + bounds() = boundBox(pts, isGlobal); + + // Have optional minimum quality for normal calculation + if (dict.readIfPresent("minQuality", minQuality_) && minQuality_ > 0) + { + Info<< searchableSurface::name() + << " : ignoring triangles with quality < " + << minQuality_ << " for normals calculation." << endl; + } +} + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::triSurfaceMesh::~triSurfaceMesh() diff --git a/src/meshTools/searchableSurface/triSurfaceMesh.H b/src/meshTools/searchableSurface/triSurfaceMesh.H index 5b5b347e45..d1691dba18 100644 --- a/src/meshTools/searchableSurface/triSurfaceMesh.H +++ b/src/meshTools/searchableSurface/triSurfaceMesh.H @@ -93,10 +93,15 @@ class triSurfaceMesh // Private Member Functions //- Return fileName to load IOobject from - static fileName checkFile(const IOobject& io); + static fileName checkFile(const IOobject& io, const bool isGlobal); //- Return fileName to load IOobject from. Optional override of fileName - static fileName checkFile(const IOobject&, const dictionary&); + static fileName checkFile + ( + const IOobject&, + const dictionary&, + const bool isGlobal + ); //- Helper function for isSurfaceClosed static bool addFaceToEdge @@ -141,7 +146,7 @@ public: //- Construct from triSurface triSurfaceMesh(const IOobject&, const triSurface&); - //- Construct read. + //- Construct read triSurfaceMesh(const IOobject& io); //- Construct from IO and dictionary (used by searchableSurface). @@ -153,6 +158,19 @@ public: ); + // Special constructors for use by distributedTriSurface. File search + // status (local/global) supplied. + + triSurfaceMesh(const IOobject& io, const bool isGlobal); + + triSurfaceMesh + ( + const IOobject& io, + const dictionary& dict, + const bool isGlobal + ); + + //- Destructor virtual ~triSurfaceMesh(); @@ -285,9 +303,30 @@ public: IOstream::versionNumber ver, IOstream::compressionType cmp ) const; + + //- Is object global + virtual bool global() const + { + return true; + } + + //- Return complete path + object name if the file exists + // either in the case/processor or case otherwise null + virtual fileName filePath() const + { + return searchableSurface::globalFilePath(); + } }; +//- Template function for obtaining global status +template<> +inline bool typeGlobal() +{ + return true; +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C index 0f18e2a0b0..ae6f0b8c7a 100644 --- a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C +++ b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C @@ -100,9 +100,9 @@ bool Foam::distributedTriSurfaceMesh::isLocal const point& end ) { - forAll(myBbs, bbI) + forAll(myBbs, bbi) { - if (myBbs[bbI].contains(start) && myBbs[bbI].contains(end)) + if (myBbs[bbi].contains(start) && myBbs[bbi].contains(end)) { return true; } @@ -113,7 +113,7 @@ bool Foam::distributedTriSurfaceMesh::isLocal //void Foam::distributedTriSurfaceMesh::splitSegment //( -// const label segmentI, +// const label segmenti, // const point& start, // const point& end, // const treeBoundBox& bb, @@ -135,8 +135,8 @@ bool Foam::distributedTriSurfaceMesh::isLocal // { // // segment from start to clippedStart passes // // through proc. -// sendMap[procI].append(allSegments.size()); -// allSegmentMap.append(segmentI); +// sendMap[proci].append(allSegments.size()); +// allSegmentMap.append(segmenti); // allSegments.append(segment(start, clipPt0)); // } // } @@ -147,8 +147,8 @@ bool Foam::distributedTriSurfaceMesh::isLocal // // if (clipped) // { -// sendMap[procI].append(allSegments.size()); -// allSegmentMap.append(segmentI); +// sendMap[proci].append(allSegments.size()); +// allSegmentMap.append(segmenti); // allSegments.append(segment(clipPt0, end)); // } // } @@ -164,8 +164,8 @@ bool Foam::distributedTriSurfaceMesh::isLocal // if (clippedEnd) // { // // middle part of segment passes through proc. -// sendMap[procI].append(allSegments.size()); -// allSegmentMap.append(segmentI); +// sendMap[proci].append(allSegments.size()); +// allSegmentMap.append(segmenti); // allSegments.append(segment(clipPt0, clipPt1)); // } // } @@ -175,7 +175,7 @@ bool Foam::distributedTriSurfaceMesh::isLocal void Foam::distributedTriSurfaceMesh::distributeSegment ( - const label segmentI, + const label segmenti, const point& start, const point& end, @@ -194,16 +194,16 @@ void Foam::distributedTriSurfaceMesh::distributeSegment // 2. If fully inside one other processor, then only need to send // to that one processor even if it intersects another. Rare occurrence // but cheap to test. - forAll(procBb_, procI) + forAll(procBb_, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - const List& bbs = procBb_[procI]; + const List& bbs = procBb_[proci]; if (isLocal(bbs, start, end)) { - sendMap[procI].append(allSegments.size()); - allSegmentMap.append(segmentI); + sendMap[proci].append(allSegments.size()); + allSegmentMap.append(segmenti); allSegments.append(segment(start, end)); return; } @@ -213,13 +213,13 @@ void Foam::distributedTriSurfaceMesh::distributeSegment // 3. If not contained in single processor send to all intersecting // processors. - forAll(procBb_, procI) + forAll(procBb_, proci) { - const List& bbs = procBb_[procI]; + const List& bbs = procBb_[proci]; - forAll(bbs, bbI) + forAll(bbs, bbi) { - const treeBoundBox& bb = bbs[bbI]; + const treeBoundBox& bb = bbs[bbi]; // Scheme a: any processor that intersects the segment gets // the segment. @@ -229,8 +229,8 @@ void Foam::distributedTriSurfaceMesh::distributeSegment if (bb.intersects(start, end, clipPt)) { - sendMap[procI].append(allSegments.size()); - allSegmentMap.append(segmentI); + sendMap[proci].append(allSegments.size()); + allSegmentMap.append(segmenti); allSegments.append(segment(start, end)); } @@ -239,14 +239,14 @@ void Foam::distributedTriSurfaceMesh::distributeSegment // truncation errors. //splitSegment //( - // segmentI, + // segmenti, // start, // end, // bb, // // allSegments, // allSegmentMap, - // sendMap[procI] + // sendMap[proci] //); } } @@ -280,13 +280,13 @@ Foam::distributedTriSurfaceMesh::distributeSegments // Per processor indices into allSegments to send List> dynSendMap(Pstream::nProcs()); - forAll(start, segmentI) + forAll(start, segmenti) { distributeSegment ( - segmentI, - start[segmentI], - end[segmentI], + segmenti, + start[segmenti], + end[segmenti], dynAllSegments, dynAllSegmentMap, @@ -296,10 +296,10 @@ Foam::distributedTriSurfaceMesh::distributeSegments // Convert dynamicList to labelList sendMap.setSize(Pstream::nProcs()); - forAll(sendMap, procI) + forAll(sendMap, proci) { - dynSendMap[procI].shrink(); - sendMap[procI].transfer(dynSendMap[procI]); + dynSendMap[proci].shrink(); + sendMap[proci].transfer(dynSendMap[proci]); } allSegments.transfer(dynAllSegments.shrink()); @@ -307,12 +307,12 @@ Foam::distributedTriSurfaceMesh::distributeSegments } - // Send over how many I need to receive. + // Send over how many i need to receive. labelListList sendSizes(Pstream::nProcs()); sendSizes[Pstream::myProcNo()].setSize(Pstream::nProcs()); - forAll(sendMap, procI) + forAll(sendMap, proci) { - sendSizes[Pstream::myProcNo()][procI] = sendMap[procI].size(); + sendSizes[Pstream::myProcNo()][proci] = sendMap[proci].size(); } Pstream::gatherList(sendSizes); Pstream::scatterList(sendSizes); @@ -327,18 +327,18 @@ Foam::distributedTriSurfaceMesh::distributeSegments sendMap[Pstream::myProcNo()].size() ); - label segmentI = constructMap[Pstream::myProcNo()].size(); - forAll(constructMap, procI) + label segmenti = constructMap[Pstream::myProcNo()].size(); + forAll(constructMap, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - // What I need to receive is what other processor is sending to me. - label nRecv = sendSizes[procI][Pstream::myProcNo()]; - constructMap[procI].setSize(nRecv); + // What i need to receive is what other processor is sending to me. + label nRecv = sendSizes[proci][Pstream::myProcNo()]; + constructMap[proci].setSize(nRecv); for (label i = 0; i < nRecv; i++) { - constructMap[procI][i] = segmentI++; + constructMap[proci][i] = segmenti++; } } } @@ -347,7 +347,7 @@ Foam::distributedTriSurfaceMesh::distributeSegments ( new mapDistribute ( - segmentI, // size after construction + segmenti, // size after construction sendMap.xfer(), constructMap.xfer() ) @@ -458,7 +458,7 @@ void Foam::distributedTriSurfaceMesh::findLine map.distribute(allSegments); - // Do tests I need to do + // Do tests i need to do // ~~~~~~~~~~~~~~~~~~~~~ // Intersections @@ -506,8 +506,8 @@ void Foam::distributedTriSurfaceMesh::findLine forAll(intersections, i) { const pointIndexHit& allInfo = intersections[i]; - label segmentI = allSegmentMap[i]; - pointIndexHit& hitInfo = info[segmentI]; + label segmenti = allSegmentMap[i]; + pointIndexHit& hitInfo = info[segmenti]; if (allInfo.hit()) { @@ -521,8 +521,8 @@ void Foam::distributedTriSurfaceMesh::findLine // Nearest intersection if ( - magSqr(allInfo.hitPoint()-start[segmentI]) - < magSqr(hitInfo.hitPoint()-start[segmentI]) + magSqr(allInfo.hitPoint()-start[segmenti]) + < magSqr(hitInfo.hitPoint()-start[segmenti]) ) { hitInfo = allInfo; @@ -563,17 +563,17 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries { if (info[i].hit()) { - label procI = triIndexer.whichProcID(info[i].index()); - nSend[procI]++; + label proci = triIndexer.whichProcID(info[i].index()); + nSend[proci]++; } } // 2. Size sendMap labelListList sendMap(Pstream::nProcs()); - forAll(nSend, procI) + forAll(nSend, proci) { - sendMap[procI].setSize(nSend[procI]); - nSend[procI] = 0; + sendMap[proci].setSize(nSend[proci]); + nSend[proci] = 0; } // 3. Fill sendMap @@ -581,9 +581,9 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries { if (info[i].hit()) { - label procI = triIndexer.whichProcID(info[i].index()); - triangleIndex[i] = triIndexer.toLocal(procI, info[i].index()); - sendMap[procI][nSend[procI]++] = i; + label proci = triIndexer.whichProcID(info[i].index()); + triangleIndex[i] = triIndexer.toLocal(proci, info[i].index()); + sendMap[proci][nSend[proci]++] = i; } else { @@ -592,14 +592,14 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries } - // Send over how many I need to receive + // Send over how many i need to receive // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ labelListList sendSizes(Pstream::nProcs()); sendSizes[Pstream::myProcNo()].setSize(Pstream::nProcs()); - forAll(sendMap, procI) + forAll(sendMap, proci) { - sendSizes[Pstream::myProcNo()][procI] = sendMap[procI].size(); + sendSizes[Pstream::myProcNo()][proci] = sendMap[proci].size(); } Pstream::gatherList(sendSizes); Pstream::scatterList(sendSizes); @@ -616,18 +616,18 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries sendMap[Pstream::myProcNo()].size() ); - label segmentI = constructMap[Pstream::myProcNo()].size(); - forAll(constructMap, procI) + label segmenti = constructMap[Pstream::myProcNo()].size(); + forAll(constructMap, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - // What I need to receive is what other processor is sending to me. - label nRecv = sendSizes[procI][Pstream::myProcNo()]; - constructMap[procI].setSize(nRecv); + // What i need to receive is what other processor is sending to me. + label nRecv = sendSizes[proci][Pstream::myProcNo()]; + constructMap[proci].setSize(nRecv); for (label i = 0; i < nRecv; i++) { - constructMap[procI][i] = segmentI++; + constructMap[proci][i] = segmenti++; } } } @@ -640,7 +640,7 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries ( new mapDistribute ( - segmentI, // size after construction + segmenti, // size after construction sendMap.xfer(), constructMap.xfer() ) @@ -668,15 +668,15 @@ Foam::label Foam::distributedTriSurfaceMesh::calcOverlappingProcs overlaps = false; label nOverlaps = 0; - forAll(procBb_, procI) + forAll(procBb_, proci) { - const List& bbs = procBb_[procI]; + const List& bbs = procBb_[proci]; - forAll(bbs, bbI) + forAll(bbs, bbi) { - if (bbs[bbI].overlaps(centre, radiusSqr)) + if (bbs[bbi].overlaps(centre, radiusSqr)) { - overlaps[procI] = true; + overlaps[proci] = true; nOverlaps++; break; } @@ -717,34 +717,34 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries // Work array - whether processor bb overlaps the bounding sphere. boolList procBbOverlaps(Pstream::nProcs()); - forAll(centres, centreI) + forAll(centres, centrei) { // Find the processor this sample+radius overlaps. calcOverlappingProcs ( - centres[centreI], - radiusSqr[centreI], + centres[centrei], + radiusSqr[centrei], procBbOverlaps ); - forAll(procBbOverlaps, procI) + forAll(procBbOverlaps, proci) { - if (procI != Pstream::myProcNo() && procBbOverlaps[procI]) + if (proci != Pstream::myProcNo() && procBbOverlaps[proci]) { - dynSendMap[procI].append(dynAllCentres.size()); - dynAllSegmentMap.append(centreI); - dynAllCentres.append(centres[centreI]); - dynAllRadiusSqr.append(radiusSqr[centreI]); + dynSendMap[proci].append(dynAllCentres.size()); + dynAllSegmentMap.append(centrei); + dynAllCentres.append(centres[centrei]); + dynAllRadiusSqr.append(radiusSqr[centrei]); } } } // Convert dynamicList to labelList sendMap.setSize(Pstream::nProcs()); - forAll(sendMap, procI) + forAll(sendMap, proci) { - dynSendMap[procI].shrink(); - sendMap[procI].transfer(dynSendMap[procI]); + dynSendMap[proci].shrink(); + sendMap[proci].transfer(dynSendMap[proci]); } allCentres.transfer(dynAllCentres.shrink()); @@ -753,12 +753,12 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries } - // Send over how many I need to receive. + // Send over how many i need to receive. labelListList sendSizes(Pstream::nProcs()); sendSizes[Pstream::myProcNo()].setSize(Pstream::nProcs()); - forAll(sendMap, procI) + forAll(sendMap, proci) { - sendSizes[Pstream::myProcNo()][procI] = sendMap[procI].size(); + sendSizes[Pstream::myProcNo()][proci] = sendMap[proci].size(); } Pstream::gatherList(sendSizes); Pstream::scatterList(sendSizes); @@ -773,18 +773,18 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries sendMap[Pstream::myProcNo()].size() ); - label segmentI = constructMap[Pstream::myProcNo()].size(); - forAll(constructMap, procI) + label segmenti = constructMap[Pstream::myProcNo()].size(); + forAll(constructMap, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - // What I need to receive is what other processor is sending to me. - label nRecv = sendSizes[procI][Pstream::myProcNo()]; - constructMap[procI].setSize(nRecv); + // What i need to receive is what other processor is sending to me. + label nRecv = sendSizes[proci][Pstream::myProcNo()]; + constructMap[proci].setSize(nRecv); for (label i = 0; i < nRecv; i++) { - constructMap[procI][i] = segmentI++; + constructMap[proci][i] = segmenti++; } } } @@ -793,7 +793,7 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries ( new mapDistribute ( - segmentI, // size after construction + segmenti, // size after construction sendMap.xfer(), constructMap.xfer() ) @@ -878,9 +878,9 @@ Foam::distributedTriSurfaceMesh::independentlyDistributedBbs // Do decomposition according to triangle centre pointField triCentres(s.size()); - forAll(s, triI) + forAll(s, trii) { - triCentres[triI] = s[triI].centre(s.points()); + triCentres[trii] = s[trii].centre(s.points()); } @@ -893,24 +893,24 @@ Foam::distributedTriSurfaceMesh::independentlyDistributedBbs // Initialise to inverted box List> bbs(Pstream::nProcs()); - forAll(bbs, procI) + forAll(bbs, proci) { - bbs[procI].setSize(1, treeBoundBox(boundBox::invertedBox)); + bbs[proci].setSize(1, treeBoundBox(boundBox::invertedBox)); } - forAll(s, triI) + forAll(s, trii) { - const triSurface::FaceType& f = s[triI]; + const triSurface::FaceType& f = s[trii]; - treeBoundBox& bb = bbs[distribution[triI]][0]; + treeBoundBox& bb = bbs[distribution[trii]][0]; bb.add(s.points(), f); } // Now combine for all processors and convert to correct format. - forAll(bbs, procI) + forAll(bbs, proci) { - Pstream::listCombineGather(bbs[procI], plusEqOp()); - Pstream::listCombineScatter(bbs[procI]); + Pstream::listCombineGather(bbs[proci], plusEqOp()); + Pstream::listCombineScatter(bbs[proci]); } return bbs; @@ -930,9 +930,9 @@ bool Foam::distributedTriSurfaceMesh::overlaps triBb.add(p1); triBb.add(p2); - forAll(bbs, bbI) + forAll(bbs, bbi) { - const treeBoundBox& bb = bbs[bbI]; + const treeBoundBox& bb = bbs[bbi]; // Exact test of triangle intersecting bb @@ -977,32 +977,32 @@ void Foam::distributedTriSurfaceMesh::subsetMeshMap oldToNewPoints.setSize(s.points().size()); oldToNewPoints = -1; { - label faceI = 0; - label pointI = 0; + label facei = 0; + label pointi = 0; forAll(include, oldFacei) { if (include[oldFacei]) { // Store new faces compact - newToOldFaces[faceI++] = oldFacei; + newToOldFaces[facei++] = oldFacei; // Renumber labels for face const triSurface::FaceType& f = s[oldFacei]; forAll(f, fp) { - label oldPointI = f[fp]; + label oldPointi = f[fp]; - if (oldToNewPoints[oldPointI] == -1) + if (oldToNewPoints[oldPointi] == -1) { - oldToNewPoints[oldPointI] = pointI; - newToOldPoints[pointI++] = oldPointI; + oldToNewPoints[oldPointi] = pointi; + newToOldPoints[pointi++] = oldPointi; } } } } - newToOldPoints.setSize(pointI); + newToOldPoints.setSize(pointi); } } @@ -1100,7 +1100,7 @@ Foam::triSurface Foam::distributedTriSurfaceMesh::subsetMesh newToOldPoints.setSize(s.points().size()); labelList oldToNewPoints(s.points().size(), -1); { - label pointI = 0; + label pointi = 0; forAll(include, oldFacei) { @@ -1111,17 +1111,17 @@ Foam::triSurface Foam::distributedTriSurfaceMesh::subsetMesh forAll(f, fp) { - label oldPointI = f[fp]; + label oldPointi = f[fp]; - if (oldToNewPoints[oldPointI] == -1) + if (oldToNewPoints[oldPointi] == -1) { - oldToNewPoints[oldPointI] = pointI; - newToOldPoints[pointI++] = oldPointI; + oldToNewPoints[oldPointi] = pointi; + newToOldPoints[pointi++] = oldPointi; } } } } - newToOldPoints.setSize(pointI); + newToOldPoints.setSize(pointi); } return subsetMesh @@ -1196,24 +1196,24 @@ void Foam::distributedTriSurfaceMesh::merge // Add all unmatched points // ~~~~~~~~~~~~~~~~~~~~~~~~ - label allPointI = nOldAllPoints; - forAll(pointConstructMap, pointI) + label allPointi = nOldAllPoints; + forAll(pointConstructMap, pointi) { - if (pointConstructMap[pointI] == -1) + if (pointConstructMap[pointi] == -1) { - pointConstructMap[pointI] = allPointI++; + pointConstructMap[pointi] = allPointi++; } } - if (allPointI > nOldAllPoints) + if (allPointi > nOldAllPoints) { - allPoints.setSize(allPointI); + allPoints.setSize(allPointi); - forAll(pointConstructMap, pointI) + forAll(pointConstructMap, pointi) { - if (pointConstructMap[pointI] >= nOldAllPoints) + if (pointConstructMap[pointi] >= nOldAllPoints) { - allPoints[pointConstructMap[pointI]] = subPoints[pointI]; + allPoints[pointConstructMap[pointi]] = subPoints[pointi]; } } } @@ -1227,14 +1227,14 @@ void Foam::distributedTriSurfaceMesh::merge // Add all unmatched triangles // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - label allTriI = allTris.size(); - allTris.setSize(allTriI + subTris.size()); + label allTrii = allTris.size(); + allTris.setSize(allTrii + subTris.size()); faceConstructMap.setSize(subTris.size()); - forAll(subTris, triI) + forAll(subTris, trii) { - const labelledTri& subTri = subTris[triI]; + const labelledTri& subTri = subTris[trii]; // Get triangle in new numbering labelledTri mappedTri @@ -1272,24 +1272,24 @@ void Foam::distributedTriSurfaceMesh::merge if (i == -1) { // Add - faceConstructMap[triI] = allTriI; - allTris[allTriI] = mappedTri; - allTriI++; + faceConstructMap[trii] = allTrii; + allTris[allTrii] = mappedTri; + allTrii++; } else { - faceConstructMap[triI] = i; + faceConstructMap[trii] = i; } } else { // Add - faceConstructMap[triI] = allTriI; - allTris[allTriI] = mappedTri; - allTriI++; + faceConstructMap[trii] = allTrii; + allTris[allTrii] = mappedTri; + allTrii++; } } - allTris.setSize(allTriI); + allTris.setSize(allTrii); } @@ -1333,10 +1333,10 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh Pstream::scatterList(nTris); Info<< endl<< "\tproc\ttris\tbb" << endl; - forAll(nTris, procI) + forAll(nTris, proci) { - Info<< '\t' << procI << '\t' << nTris[procI] - << '\t' << procBb_[procI] << endl; + Info<< '\t' << proci << '\t' << nTris[proci] + << '\t' << procBb_[proci] << endl; } Info<< endl; } @@ -1345,7 +1345,6 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh(const IOobject& io) : - //triSurfaceMesh(io), triSurfaceMesh ( IOobject @@ -1357,7 +1356,8 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh(const IOobject& io) io.readOpt(), io.writeOpt(), io.registerObject() - ) + ), + false ), dict_ ( @@ -1389,10 +1389,10 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh(const IOobject& io) Pstream::scatterList(nTris); Info<< endl<< "\tproc\ttris\tbb" << endl; - forAll(nTris, procI) + forAll(nTris, proci) { - Info<< '\t' << procI << '\t' << nTris[procI] - << '\t' << procBb_[procI] << endl; + Info<< '\t' << proci << '\t' << nTris[proci] + << '\t' << procBb_[proci] << endl; } Info<< endl; } @@ -1405,7 +1405,6 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh const dictionary& dict ) : - //triSurfaceMesh(io, dict), triSurfaceMesh ( IOobject @@ -1418,7 +1417,8 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh io.writeOpt(), io.registerObject() ), - dict + dict, + false ), dict_ ( @@ -1450,10 +1450,10 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh Pstream::scatterList(nTris); Info<< endl<< "\tproc\ttris\tbb" << endl; - forAll(nTris, procI) + forAll(nTris, proci) { - Info<< '\t' << procI << '\t' << nTris[procI] - << '\t' << procBb_[procI] << endl; + Info<< '\t' << proci << '\t' << nTris[proci] + << '\t' << procBb_[proci] << endl; } Info<< endl; } @@ -1619,23 +1619,23 @@ void Foam::distributedTriSurfaceMesh::findNearest { if (allInfo[i].hit()) { - label pointI = allSegmentMap[i]; + label pointi = allSegmentMap[i]; - if (!info[pointI].hit()) + if (!info[pointi].hit()) { // No intersection yet so take this one - info[pointI] = allInfo[i]; + info[pointi] = allInfo[i]; } else { // Nearest intersection if ( - magSqr(allInfo[i].hitPoint()-samples[pointI]) - < magSqr(info[pointI].hitPoint()-samples[pointI]) + magSqr(allInfo[i].hitPoint()-samples[pointi]) + < magSqr(info[pointi].hitPoint()-samples[pointi]) ) { - info[pointI] = allInfo[i]; + info[pointi] = allInfo[i]; } } } @@ -1719,35 +1719,35 @@ void Foam::distributedTriSurfaceMesh::findLineAll labelList pointMap(start.size()); pointField e0(start.size()); pointField e1(start.size()); - label compactI = 0; + label compacti = 0; info.setSize(hitInfo.size()); - forAll(hitInfo, pointI) + forAll(hitInfo, pointi) { - if (hitInfo[pointI].hit()) + if (hitInfo[pointi].hit()) { - info[pointI].setSize(1); - info[pointI][0] = hitInfo[pointI]; + info[pointi].setSize(1); + info[pointi][0] = hitInfo[pointi]; - point pt = hitInfo[pointI].hitPoint() + smallVec[pointI]; + point pt = hitInfo[pointi].hitPoint() + smallVec[pointi]; - if (((pt-start[pointI])&dirVec[pointI]) <= magSqrDirVec[pointI]) + if (((pt-start[pointi])&dirVec[pointi]) <= magSqrDirVec[pointi]) { - e0[compactI] = pt; - e1[compactI] = end[pointI]; - pointMap[compactI] = pointI; - compactI++; + e0[compacti] = pt; + e1[compacti] = end[pointi]; + pointMap[compacti] = pointi; + compacti++; } } else { - info[pointI].clear(); + info[pointi].clear(); } } - e0.setSize(compactI); - e1.setSize(compactI); - pointMap.setSize(compactI); + e0.setSize(compacti); + e1.setSize(compacti); + pointMap.setSize(compacti); label iter = 0; @@ -1763,38 +1763,38 @@ void Foam::distributedTriSurfaceMesh::findLineAll // Extract - label compactI = 0; + label compacti = 0; forAll(hitInfo, i) { if (hitInfo[i].hit()) { - label pointI = pointMap[i]; + label pointi = pointMap[i]; - label sz = info[pointI].size(); - info[pointI].setSize(sz+1); - info[pointI][sz] = hitInfo[i]; + label sz = info[pointi].size(); + info[pointi].setSize(sz+1); + info[pointi][sz] = hitInfo[i]; - point pt = hitInfo[i].hitPoint() + smallVec[pointI]; + point pt = hitInfo[i].hitPoint() + smallVec[pointi]; // Check current coordinate along ray - scalar d = ((pt-start[pointI])&dirVec[pointI]); + scalar d = ((pt-start[pointi])&dirVec[pointi]); // Note check for d>0. Very occasionally the octree will find // an intersection to the left of the ray due to tolerances. - if (d > 0 && d <= magSqrDirVec[pointI]) + if (d > 0 && d <= magSqrDirVec[pointi]) { - e0[compactI] = pt; - e1[compactI] = end[pointI]; - pointMap[compactI] = pointI; - compactI++; + e0[compacti] = pt; + e1[compacti] = end[pointi]; + pointMap[compacti] = pointi; + compacti++; } } } // Trim - e0.setSize(compactI); - e1.setSize(compactI); - pointMap.setSize(compactI); + e0.setSize(compacti); + e1.setSize(compacti); + pointMap.setSize(compacti); iter++; @@ -1862,8 +1862,8 @@ void Foam::distributedTriSurfaceMesh::getRegion forAll(triangleIndex, i) { - label triI = triangleIndex[i]; - region[i] = s[triI].region(); + label trii = triangleIndex[i]; + region[i] = s[trii].region(); } @@ -1911,8 +1911,8 @@ void Foam::distributedTriSurfaceMesh::getNormal forAll(triangleIndex, i) { - label triI = triangleIndex[i]; - normal[i] = s[triI].normal(s.points()); + label trii = triangleIndex[i]; + normal[i] = s[trii].normal(s.points()); normal[i] /= mag(normal[i]) + VSMALL; } @@ -1966,8 +1966,8 @@ void Foam::distributedTriSurfaceMesh::getField forAll(triangleIndex, i) { - label triI = triangleIndex[i]; - values[i] = fld[triI]; + label trii = triangleIndex[i]; + values[i] = fld[trii]; } @@ -2016,16 +2016,16 @@ Foam::triSurface Foam::distributedTriSurfaceMesh::overlappingSurface bbsX[i].max() = mid + halfSpan; } - forAll(s, triI) + forAll(s, trii) { - const labelledTri& f = s[triI]; + const labelledTri& f = s[trii]; const point& p0 = s.points()[f[0]]; const point& p1 = s.points()[f[1]]; const point& p2 = s.points()[f[2]]; if (overlaps(bbsX, p0, p1, p2)) { - includedFace[triI] = true; + includedFace[trii] = true; } } @@ -2096,9 +2096,9 @@ void Foam::distributedTriSurfaceMesh::distribute InfoInFunction << "before distribution:" << endl << "\tproc\ttris" << endl; - forAll(nTris, procI) + forAll(nTris, proci) { - Info<< '\t' << procI << '\t' << nTris[procI] << endl; + Info<< '\t' << proci << '\t' << nTris[proci] << endl; } Info<< endl; } @@ -2110,21 +2110,21 @@ void Foam::distributedTriSurfaceMesh::distribute labelListList faceSendMap(Pstream::nProcs()); labelListList pointSendMap(Pstream::nProcs()); - forAll(procBb_, procI) + forAll(procBb_, proci) { overlappingSurface ( *this, - procBb_[procI], - pointSendMap[procI], - faceSendMap[procI] + procBb_[proci], + pointSendMap[proci], + faceSendMap[proci] ); if (debug) { - //Pout<< "Overlapping with proc " << procI - // << " faces:" << faceSendMap[procI].size() - // << " points:" << pointSendMap[procI].size() << endl << endl; + //Pout<< "Overlapping with proc " << proci + // << " faces:" << faceSendMap[proci].size() + // << " points:" << pointSendMap[proci].size() << endl << endl; } } @@ -2137,13 +2137,13 @@ void Foam::distributedTriSurfaceMesh::distribute boolList includedFace(s.size(), true); - forAll(faceSendMap, procI) + forAll(faceSendMap, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - forAll(faceSendMap[procI], i) + forAll(faceSendMap[proci], i) { - includedFace[faceSendMap[procI][i]] = false; + includedFace[faceSendMap[proci][i]] = false; } } } @@ -2166,14 +2166,14 @@ void Foam::distributedTriSurfaceMesh::distribute } - // Send over how many faces/points I need to receive + // Send over how many faces/points i need to receive // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ labelListList faceSendSizes(Pstream::nProcs()); faceSendSizes[Pstream::myProcNo()].setSize(Pstream::nProcs()); - forAll(faceSendMap, procI) + forAll(faceSendMap, proci) { - faceSendSizes[Pstream::myProcNo()][procI] = faceSendMap[procI].size(); + faceSendSizes[Pstream::myProcNo()][proci] = faceSendMap[proci].size(); } Pstream::gatherList(faceSendSizes); Pstream::scatterList(faceSendSizes); @@ -2226,13 +2226,13 @@ void Foam::distributedTriSurfaceMesh::distribute PstreamBuffers pBufs(Pstream::defaultCommsType); - forAll(faceSendSizes, procI) + forAll(faceSendSizes, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - if (faceSendSizes[Pstream::myProcNo()][procI] > 0) + if (faceSendSizes[Pstream::myProcNo()][proci] > 0) { - UOPstream str(procI, pBufs); + UOPstream str(proci, pBufs); labelList pointMap; triSurface subSurface @@ -2240,15 +2240,15 @@ void Foam::distributedTriSurfaceMesh::distribute subsetMesh ( *this, - faceSendMap[procI], + faceSendMap[proci], pointMap ) ); //if (debug) //{ - // Pout<< "Sending to " << procI - // << " faces:" << faceSendMap[procI].size() + // Pout<< "Sending to " << proci + // << " faces:" << faceSendMap[proci].size() // << " points:" << subSurface.points().size() << endl // << endl; //} @@ -2264,20 +2264,20 @@ void Foam::distributedTriSurfaceMesh::distribute // Receive and merge all // ~~~~~~~~~~~~~~~~~~~~~ - forAll(faceSendSizes, procI) + forAll(faceSendSizes, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - if (faceSendSizes[procI][Pstream::myProcNo()] > 0) + if (faceSendSizes[proci][Pstream::myProcNo()] > 0) { - UIPstream str(procI, pBufs); + UIPstream str(proci, pBufs); // Receive triSurface subSurface(str); //if (debug) //{ - // Pout<< "Received from " << procI + // Pout<< "Received from " << proci // << " faces:" << subSurface.size() // << " points:" << subSurface.points().size() << endl // << endl; @@ -2292,8 +2292,8 @@ void Foam::distributedTriSurfaceMesh::distribute allTris, allPoints, - faceConstructMap[procI], - pointConstructMap[procI] + faceConstructMap[proci], + pointConstructMap[proci] ); //if (debug) @@ -2354,9 +2354,9 @@ void Foam::distributedTriSurfaceMesh::distribute InfoInFunction << "after distribution:" << endl << "\tproc\ttris" << endl; - forAll(nTris, procI) + forAll(nTris, proci) { - Info<< '\t' << procI << '\t' << nTris[procI] << endl; + Info<< '\t' << proci << '\t' << nTris[proci] << endl; } Info<< endl; @@ -2367,9 +2367,9 @@ void Foam::distributedTriSurfaceMesh::distribute { pointField pts(myBbs[i].points()); const edgeList& es = treeBoundBox::edges; - forAll(es, eI) + forAll(es, ei) { - const edge& e = es[eI]; + const edge& e = es[ei]; str.write(linePointRef(pts[e[0]], pts[e[1]])); } } diff --git a/src/thermophysicalModels/properties/liquidPropertiesFvPatchFields/Make/files b/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/Make/files similarity index 100% rename from src/thermophysicalModels/properties/liquidPropertiesFvPatchFields/Make/files rename to src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/Make/files diff --git a/src/thermophysicalModels/properties/liquidPropertiesFvPatchFields/Make/options b/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/Make/options similarity index 74% rename from src/thermophysicalModels/properties/liquidPropertiesFvPatchFields/Make/options rename to src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/Make/options index 3718ff0ca0..f4e9dc8257 100644 --- a/src/thermophysicalModels/properties/liquidPropertiesFvPatchFields/Make/options +++ b/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/Make/options @@ -3,9 +3,9 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude + -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude LIB_LIBS = \ -lfiniteVolume \ -lcompressibleTurbulenceModels \ - -lliquidProperties + -lthermophysicalProperties diff --git a/src/thermophysicalModels/properties/liquidPropertiesFvPatchFields/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C b/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C similarity index 100% rename from src/thermophysicalModels/properties/liquidPropertiesFvPatchFields/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C rename to src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C diff --git a/src/thermophysicalModels/properties/liquidPropertiesFvPatchFields/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.H b/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.H similarity index 100% rename from src/thermophysicalModels/properties/liquidPropertiesFvPatchFields/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.H rename to src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.H