Commit 21e6d236 by graham

### Tidy up of comments and names. Changing back to mathematical from math.

parent 2125ba00
 ... ... @@ -172,13 +172,21 @@ void Foam::Cloud::calcConcaveCells() const // if (isConcaveCell(cellI)) // { // concaveCell[cellI] = 1; // // TODO: extend selection to include any point connected // // cell if there are conflicts between cells using the two // // different methods // } // Force all cells to be treated exactly concaveCell[cellI] = 1; // Force all cells to be treated by planes // concaveCell[cellI] = 0; } { // Write cells that are a problem to file // Write cells that are concave to file DynamicList
 ... ... @@ -121,10 +121,6 @@ bool Foam::Particle::insideCellExact if (inter.hit()) { // Pout<< "insideCellExact cell " << celli // << " face " << facei << " " // << inter.distance() << endl; if (beingOnAFaceMeansOutside) { if (inter.distance() <= 1.0) ... ... @@ -168,7 +164,7 @@ bool Foam::Particle::insideCellExact template template void Foam::Particle::trackToFaceConcave void Foam::Particle::trackToFaceExact ( scalar& trackFraction, const vector& endPosition, ... ... @@ -186,8 +182,6 @@ void Foam::Particle::trackToFaceConcave // cell to start with and enters the cell at the end of the track // to be identified. // Pout<< nl << "Outside test:" << endl; if (insideCellExact(endPosition, celli_, false)) { // Even number of face crossings, so the particle must end up ... ... @@ -198,14 +192,6 @@ void Foam::Particle::trackToFaceConcave return; } // Pout<< nl << origProc_ << " " // << origId_ << " " // << position_ << " " // << endPosition << " " // << stepFraction_ << " " // << celli_ // << endl; // The particle *must* have left the cell. // a) It may have crossed a face not yet identified by testing ... ... @@ -228,14 +214,8 @@ void Foam::Particle::trackToFaceConcave mag(mesh.cellCentres()[celli_] - position_) *deltaPosition/(mag(deltaPosition) + VSMALL); // Pout<< "Inside test:" << endl; if (insideCellExact(position_, celli_, false)) { // Pout<< "The particle starts inside the cell and ends up outside of it" // << nl << position_ << " " << position_ + deltaTrack // << endl; // The particle started inside the cell and finished outside // of it, find which face to cross ... ... @@ -265,8 +245,6 @@ void Foam::Particle::trackToFaceConcave { tmpLambda = inter.distance(); // Pout<< facei << " " << tmpLambda << endl; if ( tmpLambda <= 1.0 ... ... @@ -284,7 +262,7 @@ void Foam::Particle::trackToFaceConcave if (facei_ > -1) { if (!cloud_.internalFace(facei_)) if (cloud_.boundaryFace(facei_)) { // For a patch face, allow a small value of lambda to // ensure patch interactions occur. ... ... @@ -303,9 +281,6 @@ void Foam::Particle::trackToFaceConcave // Do not trigger a face hit and move the position // towards the cell centre // Pout<< "Hit a wall face heading the wrong way" // << endl; const point& cc = mesh.cellCentres()[celli_]; position_ += Cloud::trackingRescueTolerance ... ... @@ -324,20 +299,10 @@ void Foam::Particle::trackToFaceConcave // little without crossing the face to resolve the // ambiguity. // Pout<< "Ambiguous face crossing, correcting towards cell " // << "centre and not crossing face" << endl; // const point& cc = mesh.cellCentres()[celli_]; // position_ += // Cloud::trackingRescueTolerance // *(cc - position_); // Pout<< "Ambiguous face crossing. " << endl; facei_ = -1; } // If the face hit was not on a wall, add a small // If the face hit was not on a patch, add a small // amount to the track to move it off the face, If it // was not an ambiguous face crossing, this makes sure // the face is not ambiguous next tracking step. If ... ... @@ -351,10 +316,9 @@ void Foam::Particle::trackToFaceConcave } else { // Pout<< "Particle " << origProc_ << " " << origId_ // << " started inside cell " << celli_ << " and finished outside" // << " of it, but did not find a face to cross" // << endl; // The particle started inside of the cell and finished // outside of it, but did not find a face to cross. // Applying a rescuing correction. const point& cc = mesh.cellCentres()[celli_]; position_ += ... ... @@ -363,9 +327,8 @@ void Foam::Particle::trackToFaceConcave } else { // Pout<< "The particle started outside of the cell" << endl; // Find which cell the particle should be in. // The particle started outside of the cell. Find which cell // it should be in. const labelList& cPts = mesh.cellPoints(celli_); ... ... @@ -406,35 +369,25 @@ void Foam::Particle::trackToFaceConcave if (!found) { // Pout<< "Didn't find a new cell after searching " // << checkedCells << endl; // Didn't find a new cell after searching point connected // cells. Applying a rescuing correction. const point& cc = mesh.cellCentres()[celli_]; position_ += Cloud::trackingRescueTolerance*(cc - position_); } // else // { // Pout<< "Found new cell " << celli_ // << " by searching " << checkedCells // << endl; // } } // Pout<< facei_ << " " << celli_ << endl; if (facei_ > -1) { faceAction(trackFraction, endPosition, td); } // Pout<< facei_ << " " << celli_ << endl; } template template void Foam::Particle::trackToFaceConvex void Foam::Particle::trackToFacePlanes ( scalar& trackFraction, const vector& endPosition, ... ... @@ -497,17 +450,6 @@ void Foam::Particle::trackToFaceConvex } else if (lambdaMin <= 0.0) { // Pout<< "convex tracking recovery " // << origId_ << " " // << origProc_ << " " // << position_ << " " // << endPosition << " " // << stepFraction_ << " " // << lambdaMin << " " // << celli_ << " " // << facei_ << " " // << endl; trackFraction = Cloud::trackingRescueTolerance; position_ += trackFraction*(endPosition - position_); } ... ... @@ -538,18 +480,6 @@ void Foam::Particle::trackToFaceConvex if (trackFraction < Cloud::minValidTrackFraction) { // Pout<< "convex tracking error " // << origId_ << " " // << origProc_ << " " // << position_ << " " // << endPosition << " " // << trackFraction << " " // << stepFraction_ << " " // << lambdaMin << " " // << celli_ << " " // << facei_ << " " // << endl; const polyMesh& mesh = cloud_.pMesh(); const point& cc = mesh.cellCentres()[celli_]; ... ... @@ -583,8 +513,8 @@ void Foam::Particle::faceAction } else { FatalErrorIn("Particle::trackToFace(const vector&, TrackData&)") << "addressing failure" << nl FatalErrorIn("Particle::faceAction") << "face-cell addressing failure" << nl << abort(FatalError); } } ... ... @@ -800,18 +730,17 @@ Foam::scalar Foam::Particle::trackToFace if (cloud_.concaveCell()[celli_]) { // Use a more careful tracking algorithm if the cell is concave trackToFaceConcave(trackFraction, endPosition, td); trackToFaceExact(trackFraction, endPosition, td); } else { // Use a more careful tracking algorithm if the cell is concave trackToFaceConvex(trackFraction, endPosition, td); // Use the original tracking algorithm if the cell is convex trackToFacePlanes(trackFraction, endPosition, td); } } else { // Use the original tracking algorithm if the cell is convex trackToFaceConvex(trackFraction, endPosition, td); trackToFacePlanes(trackFraction, endPosition, td); } return trackFraction; ... ...
 ... ... @@ -185,7 +185,7 @@ protected: //- Track to cell face using face decomposition, used for // concave cells. template void trackToFaceConcave void trackToFaceExact ( scalar& trackFraction, const vector& endPosition, ... ... @@ -195,7 +195,7 @@ protected: //- Track to cell face using the infinite planes of the faces. // The cell *must* be convex. template void trackToFaceConvex void trackToFacePlanes ( scalar& trackFraction, const vector& endPosition, ... ...
 ... ... @@ -48,7 +48,7 @@ inline Foam::scalar Foam::Particle::lambda vector Cf = mesh.faceCentres()[facei]; // patch interaction if (!cloud_.internalFace(facei)) if (cloud_.boundaryFace(facei)) { label patchi = patch(facei); const polyPatch& patch = mesh.boundaryMesh()[patchi]; ... ... @@ -196,7 +196,7 @@ inline Foam::scalar Foam::Particle::lambda vector Cf = mesh.faceCentres()[facei]; // patch interaction if (!cloud_.internalFace(facei)) if (cloud_.boundaryFace(facei)) { label patchi = patch(facei); const polyPatch& patch = mesh.boundaryMesh()[patchi]; ... ...
 ... ... @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "mathConstants.H" #include "mathematicalConstants.H" using namespace Foam::constant; ... ... @@ -503,7 +503,7 @@ template inline Foam::scalar Foam::InteractingKinematicParcel::volume(const scalar d) const { return math::pi/6.0*pow3(d); return mathematical::pi/6.0*pow3(d); } ... ... @@ -533,7 +533,7 @@ template inline Foam::scalar Foam::InteractingKinematicParcel::areaS(const scalar d) const { return math::pi*d*d; return mathematical::pi*d*d; } ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!