diff --git a/src/OpenFOAM/containers/Lists/CompactListList/CompactListListI.H b/src/OpenFOAM/containers/Lists/CompactListList/CompactListListI.H index c7b57a3f595b50330371562b4cdb4d3ad5050917..e74ef023184e4b82f1918bb75b8ea54be803dd56 100644 --- a/src/OpenFOAM/containers/Lists/CompactListList/CompactListListI.H +++ b/src/OpenFOAM/containers/Lists/CompactListList/CompactListListI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -223,7 +223,11 @@ inline Foam::UList<T> Foam::CompactListList<T, Container>::operator[] ) { label start = offsets_[i]; - return UList<T>((m_.size() ? &m_[start] : NULL), offsets_[i+1] - start); + return UList<T> + ( + (m_.size() ? m_.begin() + start : NULL), + offsets_[i+1] - start + ); } @@ -237,7 +241,7 @@ Foam::CompactListList<T, Container>::operator[] label start = offsets_[i]; return UList<T> ( - (m_.size() ? const_cast<T*>(&m_[start]) : NULL), + (m_.size() ? const_cast<T*>(m_.begin() + start) : NULL), offsets_[i+1] - start ); } diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C index 10bb48d887b9c4e6583f7e3069bb453379ae0e35..128750c3a6bb6df7cfd71e13d5771bc7fcbf897e 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C @@ -266,11 +266,10 @@ template<class CloudType> Foam::label Foam::ParticleCollector<CloudType>::collectParcelPolygon ( const point& position, - const vector& U + const vector& U, + const scalar dt ) const { - scalar dt = this->owner().db().time().deltaTValue(); - point end(position + dt*U); label dummyNearType = -1; @@ -322,13 +321,12 @@ template<class CloudType> Foam::label Foam::ParticleCollector<CloudType>::collectParcelConcentricCircles ( const point& position, - const vector& U + const vector& U, + const scalar dt ) const { label secI = -1; - scalar dt = this->owner().db().time().deltaTValue(); - point end(position + dt*U); const scalar d1 = normal_ & (position - coordSys_.origin()); @@ -636,12 +634,12 @@ void Foam::ParticleCollector<CloudType>::postMove { case mtPolygon: { - faceI = collectParcelPolygon(p.position(), p.U()); + faceI = collectParcelPolygon(p.position(), p.U(), dt); break; } case mtConcentricCircle: { - faceI = collectParcelConcentricCircles(p.position(), p.U()); + faceI = collectParcelConcentricCircles(p.position(), p.U(), dt); break; } default: diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.H index 29bb8ff95bda3c0d86a187305f563359b1f9c803..71e65fe6c709dabf9636efa83ffc697c6656e5c5 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.H +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -170,14 +170,16 @@ private: label collectParcelPolygon ( const point& position, - const vector& U + const vector& U, + const scalar dt ) const; //- Collect parcels in concentric circle collectors label collectParcelConcentricCircles ( const point& position, - const vector& U + const vector& U, + const scalar dt ) const; diff --git a/tutorials/Alltest b/tutorials/Alltest index 7b4fe867f7cdaf8a8ed0659a02ac248b6cb0a7f6..9a80b425e3f39018adccbe94df0e47072f5591a7 100755 --- a/tutorials/Alltest +++ b/tutorials/Alltest @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -74,7 +74,7 @@ do usage "unknown option: '$*'" ;; *) - break + usage "unknown option/argument: '$*'" ;; esac shift diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/forceCoeffs b/tutorials/incompressible/simpleFoam/motorBike/system/forceCoeffs index 3012c35b321d732b92bda85c408192a951682c42..1d62bff73acde8efe3df7bf8ef5b448bfd7aa775 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/forceCoeffs +++ b/tutorials/incompressible/simpleFoam/motorBike/system/forceCoeffs @@ -12,7 +12,8 @@ forceCoeffs1 functionObjectLibs ( "libforces.so" ); - outputControl outputTime; + outputControl timeStep; + timeInterval 1; log yes; @@ -30,15 +31,12 @@ forceCoeffs1 lRef 1.42; // Wheelbase length Aref 0.75; // Estimated -/* - Uncomment to have forceCoeffs calculated in 20 bins binData { nBin 20; // output data into 20 bins direction (1 0 0); // bin direction - format gnuplot; cumulative yes; } -*/ }