From 406bc0951616b30d598f6315790c2a2eb046576d Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 7 Feb 2011 16:48:06 +0000 Subject: [PATCH 01/21] ENH: Consolidated ConeInjection and ConeInjectionMP into a single model --- .../include/makeParcelInjectionModels.H | 9 +- ...eReactingMultiphaseParcelInjectionModels.H | 9 +- .../makeReactingParcelInjectionModels.H | 9 +- .../ConeInjection/ConeInjection.C | 118 ++++--- .../ConeInjection/ConeInjection.H | 50 +-- .../ConeInjectionMP/ConeInjectionMP.C | 292 ------------------ .../ConeInjectionMP/ConeInjectionMP.H | 218 ------------- .../hotBoxes/constant/reactingCloud1Axes | 21 -- .../hotBoxes/constant/reactingCloud1Positions | 21 -- .../constant/reactingCloud1Properties | 7 +- .../multipleBoxes/constant/reactingCloud1Axes | 21 -- .../constant/reactingCloud1Positions | 21 -- .../constant/reactingCloud1Properties | 7 +- 13 files changed, 108 insertions(+), 695 deletions(-) delete mode 100644 src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.C delete mode 100644 src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.H delete mode 100644 tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/reactingCloud1Axes delete mode 100644 tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/reactingCloud1Positions delete mode 100644 tutorials/lagrangian/reactingParcelFilmFoam/multipleBoxes/constant/reactingCloud1Axes delete mode 100644 tutorials/lagrangian/reactingParcelFilmFoam/multipleBoxes/constant/reactingCloud1Positions diff --git a/src/lagrangian/intermediate/parcels/include/makeParcelInjectionModels.H b/src/lagrangian/intermediate/parcels/include/makeParcelInjectionModels.H index b673d3d84c..e235a96aaa 100644 --- a/src/lagrangian/intermediate/parcels/include/makeParcelInjectionModels.H +++ b/src/lagrangian/intermediate/parcels/include/makeParcelInjectionModels.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,7 +31,6 @@ License #include "KinematicCloud.H" #include "ConeInjection.H" -#include "ConeInjectionMP.H" #include "FieldActivatedInjection.H" #include "InflationInjection.H" #include "KinematicLookupTableInjection.H" @@ -53,12 +52,6 @@ License ParcelType \ ); \ makeInjectionModelType \ - ( \ - ConeInjectionMP, \ - KinematicCloud, \ - ParcelType \ - ); \ - makeInjectionModelType \ ( \ FieldActivatedInjection, \ KinematicCloud, \ diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelInjectionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelInjectionModels.H index 6bdc55f3bc..b0042f5e44 100644 --- a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelInjectionModels.H +++ b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelInjectionModels.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,6 @@ License #include "KinematicCloud.H" #include "ConeInjection.H" -#include "ConeInjectionMP.H" #include "FieldActivatedInjection.H" #include "ManualInjection.H" #include "NoInjection.H" @@ -52,12 +51,6 @@ License ParcelType \ ); \ makeInjectionModelType \ - ( \ - ConeInjectionMP, \ - KinematicCloud, \ - ParcelType \ - ); \ - makeInjectionModelType \ ( \ FieldActivatedInjection, \ KinematicCloud, \ diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelInjectionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelInjectionModels.H index c68403914c..88ff47a40c 100644 --- a/src/lagrangian/intermediate/parcels/include/makeReactingParcelInjectionModels.H +++ b/src/lagrangian/intermediate/parcels/include/makeReactingParcelInjectionModels.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,7 +31,6 @@ License #include "KinematicCloud.H" #include "ConeInjection.H" -#include "ConeInjectionMP.H" #include "FieldActivatedInjection.H" #include "ManualInjection.H" #include "NoInjection.H" @@ -51,12 +50,6 @@ License ParcelType \ ); \ makeInjectionModelType \ - ( \ - ConeInjectionMP, \ - KinematicCloud, \ - ParcelType \ - ); \ - makeInjectionModelType \ ( \ FieldActivatedInjection, \ KinematicCloud, \ diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C index 711c41e87b..439989e88b 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -41,7 +41,16 @@ Foam::label Foam::ConeInjection::parcelsToInject { if ((time0 >= 0.0) && (time0 < duration_)) { - return round((time1 - time0)*parcelsPerSecond_); + const scalar targetVolume = flowRateProfile_().integrate(0, time1); + + const label targetParcels = + parcelsPerInjector_*targetVolume/this->volumeTotal_; + + const label nToInject = targetParcels - nInjected_; + + nInjected_ += nToInject; + + return positionAxis_.size()*nToInject; } else { @@ -78,15 +87,14 @@ Foam::ConeInjection::ConeInjection ) : InjectionModel(dict, owner, typeName), + positionAxis_(this->coeffDict().lookup("positionAxis")), + injectorCells_(positionAxis_.size()), + injectorTetFaces_(positionAxis_.size()), + injectorTetPts_(positionAxis_.size()), duration_(readScalar(this->coeffDict().lookup("duration"))), - position_(this->coeffDict().lookup("position")), - injectorCell_(-1), - injectorTetFace_(-1), - injectorTetPt_(-1), - direction_(this->coeffDict().lookup("direction")), - parcelsPerSecond_ + parcelsPerInjector_ ( - readScalar(this->coeffDict().lookup("parcelsPerSecond")) + readScalar(this->coeffDict().lookup("parcelsPerInjector")) ), flowRateProfile_ ( @@ -102,39 +110,48 @@ Foam::ConeInjection::ConeInjection this->coeffDict().subDict("sizeDistribution"), owner.rndGen() ) ), - tanVec1_(vector::zero), - tanVec2_(vector::zero) + nInjected_(this->parcelsAddedTotal()), + tanVec1_(positionAxis_.size()), + tanVec2_(positionAxis_.size()) { - // Normalise direction vector - direction_ /= mag(direction_); - - // Determine direction vectors tangential to direction - vector tangent = vector::zero; - scalar magTangent = 0.0; - - cachedRandom& rnd = this->owner().rndGen(); - while (magTangent < SMALL) + // Normalise direction vector and determine direction vectors + // tangential to injector axis direction + forAll(positionAxis_, i) { - vector v = rnd.sample01(); + vector& axis = positionAxis_[i].second(); - tangent = v - (v & direction_)*direction_; - magTangent = mag(tangent); + axis /= mag(axis); + + vector tangent = vector::zero; + scalar magTangent = 0.0; + + cachedRandom& rnd = this->owner().rndGen(); + while (magTangent < SMALL) + { + vector v = rnd.sample01(); + + tangent = v - (v & axis)*axis; + magTangent = mag(tangent); + } + + tanVec1_[i] = tangent/magTangent; + tanVec2_[i] = axis^tanVec1_[i]; } - tanVec1_ = tangent/magTangent; - tanVec2_ = direction_^tanVec1_; - // Set total volume to inject this->volumeTotal_ = flowRateProfile_().integrate(0.0, duration_); - // Set/cache the injector cell - this->findCellAtPosition - ( - injectorCell_, - injectorTetFace_, - injectorTetPt_, - position_ - ); + // Set/cache the injector cells + forAll(positionAxis_, i) + { + this->findCellAtPosition + ( + injectorCells_[i], + injectorTetFaces_[i], + injectorTetPts_[i], + positionAxis_[i].first() + ); + } } @@ -145,18 +162,18 @@ Foam::ConeInjection::ConeInjection ) : InjectionModel(im), + positionAxis_(im.positionAxis_), + injectorCells_(im.injectorCells_), + injectorTetFaces_(im.injectorTetFaces_), + injectorTetPts_(im.injectorTetPts_), duration_(im.duration_), - position_(im.position_), - injectorCell_(im.injectorCell_), - injectorTetFace_(im.injectorTetFace_), - injectorTetPt_(im.injectorTetPt_), - direction_(im.direction_), - parcelsPerSecond_(im.parcelsPerSecond_), + parcelsPerInjector_(im.parcelsPerInjector_), flowRateProfile_(im.flowRateProfile_().clone().ptr()), Umag_(im.Umag_().clone().ptr()), thetaInner_(im.thetaInner_().clone().ptr()), thetaOuter_(im.thetaOuter_().clone().ptr()), sizeDistribution_(im.sizeDistribution_().clone().ptr()), + nInjected_(im.nInjected_), tanVec1_(im.tanVec1_), tanVec2_(im.tanVec2_) {} @@ -181,7 +198,7 @@ Foam::scalar Foam::ConeInjection::timeEnd() const template void Foam::ConeInjection::setPositionAndCell ( - const label, + const label parcelI, const label, const scalar, vector& position, @@ -190,17 +207,19 @@ void Foam::ConeInjection::setPositionAndCell label& tetPtI ) { - position = position_; - cellOwner = injectorCell_; - tetFaceI = injectorTetFace_; - tetPtI = injectorTetPt_; + const label i = parcelI % positionAxis_.size(); + + position = positionAxis_[i].first(); + cellOwner = injectorCells_[i]; + tetFaceI = injectorTetFaces_[i]; + tetPtI = injectorTetPts_[i]; } template void Foam::ConeInjection::setProperties ( - const label, + const label parcelI, const label, const scalar time, typename CloudType::parcelType& parcel @@ -208,6 +227,9 @@ void Foam::ConeInjection::setProperties { cachedRandom& rnd = this->owner().rndGen(); + // set particle velocity + const label i = parcelI % positionAxis_.size(); + scalar t = time - this->SOI_; scalar ti = thetaInner_().value(t); scalar to = thetaOuter_().value(t); @@ -217,8 +239,8 @@ void Foam::ConeInjection::setProperties scalar dcorr = cos(coneAngle); scalar beta = twoPi*rnd.sample01(); - vector normal = alpha*(tanVec1_*cos(beta) + tanVec2_*sin(beta)); - vector dirVec = dcorr*direction_; + vector normal = alpha*(tanVec1_[i]*cos(beta) + tanVec2_[i]*sin(beta)); + vector dirVec = dcorr*positionAxis_[i].second(); dirVec += normal; dirVec /= mag(dirVec); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H index 278b2a1bdd..9733658b92 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,14 +25,13 @@ Class Foam::ConeInjection Description - Cone injection + Multi-point cone injection model - User specifies - time of start of injection - - injector position - - direction (along injection axis) - - parcel flow rate - - parcel velocity + - list of injector positions and directions (along injection axes) + - number of parcels to inject per injector + - parcel velocities - inner and outer cone angles - Parcel diameters obtained by distribution model model @@ -46,6 +45,7 @@ SourceFiles #include "InjectionModel.H" #include "distributionModel.H" +#include "vectorList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -68,26 +68,23 @@ class ConeInjection { // Private data + //- List of position and axis for each injector + List > positionAxis_; + + //- List of cell labels corresponding to injector positions + labelList injectorCells_; + + //- List of tetFace labels corresponding to injector positions + labelList injectorTetFaces_; + + //- List of tetPt labels corresponding to injector positions + labelList injectorTetPts_; + //- Injection duration [s] const scalar duration_; - //- Injector position [m] - vector position_; - - //- Cell containing injector position [] - label injectorCell_; - - //- tetFace of tet containing injector position [] - label injectorTetFace_; - - //- tetPt of tet containing injector position [] - label injectorTetPt_; - - //- Injector direction [] - vector direction_; - - //- Number of parcels to introduce per second [] - const label parcelsPerSecond_; + //- Number of parcels to introduce per injector + const label parcelsPerInjector_; //- Flow rate profile relative to SOI [] const autoPtr > flowRateProfile_; @@ -104,14 +101,17 @@ class ConeInjection //- Parcel size distribution model model const autoPtr sizeDistribution_; + //- Number of parcels per injector already injected + mutable label nInjected_; + // Tangential vectors to the direction vector //- First tangential vector - vector tanVec1_; + vectorList tanVec1_; //- Second tangential vector - vector tanVec2_; + vectorList tanVec2_; protected: diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.C deleted file mode 100644 index a7645b0bc2..0000000000 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.C +++ /dev/null @@ -1,292 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "ConeInjectionMP.H" -#include "DataEntry.H" -#include "mathematicalConstants.H" -#include "unitConversion.H" - -using namespace Foam::constant::mathematical; - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -template -Foam::label Foam::ConeInjectionMP::parcelsToInject -( - const scalar time0, - const scalar time1 -) -{ - if ((time0 >= 0.0) && (time0 < duration_)) - { - const scalar targetVolume = flowRateProfile_().integrate(0, time1); - - const label targetParcels = - parcelsPerInjector_*targetVolume/this->volumeTotal_; - - const label nToInject = targetParcels - nInjected_; - - nInjected_ += nToInject; - - return positions_.size()*nToInject; - } - else - { - return 0; - } -} - - -template -Foam::scalar Foam::ConeInjectionMP::volumeToInject -( - const scalar time0, - const scalar time1 -) -{ - if ((time0 >= 0.0) && (time0 < duration_)) - { - return flowRateProfile_().integrate(time0, time1); - } - else - { - return 0.0; - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -Foam::ConeInjectionMP::ConeInjectionMP -( - const dictionary& dict, - CloudType& owner -) -: - InjectionModel(dict, owner, typeName), - positionsFile_(this->coeffDict().lookup("positionsFile")), - positions_ - ( - IOobject - ( - positionsFile_, - owner.db().time().constant(), - owner.mesh(), - IOobject::MUST_READ, - IOobject::NO_WRITE - ) - ), - injectorCells_(positions_.size()), - injectorTetFaces_(positions_.size()), - injectorTetPts_(positions_.size()), - axesFile_(this->coeffDict().lookup("axesFile")), - axes_ - ( - IOobject - ( - axesFile_, - owner.db().time().constant(), - owner.mesh(), - IOobject::MUST_READ, - IOobject::NO_WRITE - ) - ), - duration_(readScalar(this->coeffDict().lookup("duration"))), - parcelsPerInjector_ - ( - readScalar(this->coeffDict().lookup("parcelsPerInjector")) - ), - flowRateProfile_ - ( - DataEntry::New("flowRateProfile", this->coeffDict()) - ), - Umag_(DataEntry::New("Umag", this->coeffDict())), - thetaInner_(DataEntry::New("thetaInner", this->coeffDict())), - thetaOuter_(DataEntry::New("thetaOuter", this->coeffDict())), - sizeDistribution_ - ( - distributionModels::distributionModel::New - ( - this->coeffDict().subDict("sizeDistribution"), owner.rndGen() - ) - ), - nInjected_(this->parcelsAddedTotal()), - tanVec1_(positions_.size()), - tanVec2_(positions_.size()) -{ - // Normalise direction vector and determine direction vectors - // tangential to direction - forAll(axes_, i) - { - axes_[i] /= mag(axes_[i]); - - vector tangent = vector::zero; - scalar magTangent = 0.0; - - cachedRandom& rnd = this->owner().rndGen(); - while (magTangent < SMALL) - { - vector v = rnd.sample01(); - - tangent = v - (v & axes_[i])*axes_[i]; - magTangent = mag(tangent); - } - - tanVec1_[i] = tangent/magTangent; - tanVec2_[i] = axes_[i]^tanVec1_[i]; - } - - // Set total volume to inject - this->volumeTotal_ = flowRateProfile_().integrate(0.0, duration_); - - // Set/cache the injector cells - forAll(positions_, i) - { - this->findCellAtPosition - ( - injectorCells_[i], - injectorTetFaces_[i], - injectorTetPts_[i], - positions_[i] - ); - } -} - - -template -Foam::ConeInjectionMP::ConeInjectionMP -( - const ConeInjectionMP& im -) -: - InjectionModel(im), - positionsFile_(im.positionsFile_), - positions_(im.positions_), - injectorCells_(im.injectorCells_), - injectorTetFaces_(im.injectorTetFaces_), - injectorTetPts_(im.injectorTetPts_), - axesFile_(im.axesFile_), - axes_(im.axes_), - duration_(im.duration_), - parcelsPerInjector_(im.parcelsPerInjector_), - flowRateProfile_(im.flowRateProfile_().clone().ptr()), - Umag_(im.Umag_().clone().ptr()), - thetaInner_(im.thetaInner_().clone().ptr()), - thetaOuter_(im.thetaOuter_().clone().ptr()), - sizeDistribution_(im.sizeDistribution_().clone().ptr()), - nInjected_(im.nInjected_), - tanVec1_(im.tanVec1_), - tanVec2_(im.tanVec2_) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -Foam::ConeInjectionMP::~ConeInjectionMP() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template -Foam::scalar Foam::ConeInjectionMP::timeEnd() const -{ - return this->SOI_ + duration_; -} - - -template -void Foam::ConeInjectionMP::setPositionAndCell -( - const label parcelI, - const label, - const scalar, - vector& position, - label& cellOwner, - label& tetFaceI, - label& tetPtI -) -{ - const label i = parcelI % positions_.size(); - - position = positions_[i]; - cellOwner = injectorCells_[i]; - tetFaceI = injectorTetFaces_[i]; - tetPtI = injectorTetPts_[i]; -} - - -template -void Foam::ConeInjectionMP::setProperties -( - const label parcelI, - const label, - const scalar time, - typename CloudType::parcelType& parcel -) -{ - cachedRandom& rnd = this->owner().rndGen(); - - // set particle velocity - const label i = parcelI%positions_.size(); - - scalar t = time - this->SOI_; - scalar ti = thetaInner_().value(t); - scalar to = thetaOuter_().value(t); - scalar coneAngle = degToRad(rnd.position(ti, to)); - - scalar alpha = sin(coneAngle); - scalar dcorr = cos(coneAngle); - scalar beta = twoPi*rnd.sample01(); - - vector normal = alpha*(tanVec1_[i]*cos(beta) + tanVec2_[i]*sin(beta)); - vector dirVec = dcorr*axes_[i]; - dirVec += normal; - dirVec /= mag(dirVec); - - parcel.U() = Umag_().value(t)*dirVec; - - // set particle diameter - parcel.d() = sizeDistribution_().sample(); -} - - -template -bool Foam::ConeInjectionMP::fullyDescribed() const -{ - return false; -} - - -template -bool Foam::ConeInjectionMP::validInjection(const label) -{ - return true; -} - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.H deleted file mode 100644 index 806799bb7e..0000000000 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.H +++ /dev/null @@ -1,218 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::ConeInjectionMP - -Description - Cone injection multi-point - - - User specifies - - time of start of injection - - injector positions - - directions (along injection axes) - - parcel flow rate - - parcel velocities - - inner and outer cone angles - - Parcel diameters obtained by distribution model model - -SourceFiles - ConeInjectionMP.C - -\*---------------------------------------------------------------------------*/ - -#ifndef ConeInjectionMP_H -#define ConeInjectionMP_H - -#include "InjectionModel.H" -#include "distributionModel.H" -#include "vectorList.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// Forward declaration of classes - -template -class DataEntry; - -/*---------------------------------------------------------------------------*\ - Class ConeInjectionMP Declaration -\*---------------------------------------------------------------------------*/ - -template -class ConeInjectionMP -: - public InjectionModel -{ - // Private data - - //- Name of file containing positions data - const word positionsFile_; - - //- Field of injector positions - vectorIOField positions_; - - //- List of cell labels corresponding to injector positions - labelList injectorCells_; - - //- List of tetFace labels corresponding to injector positions - labelList injectorTetFaces_; - - //- List of tetPt labels corresponding to injector positions - labelList injectorTetPts_; - - //- Name of file containing axes data - const word axesFile_; - - //- Field of injector positions - vectorIOField axes_; - - //- Injection duration [s] - const scalar duration_; - - //- Number of parcels to introduce per injector - const label parcelsPerInjector_; - - //- Flow rate profile relative to SOI [] - const autoPtr > flowRateProfile_; - - //- Parcel velocity magnitude relative to SOI [m/s] - const autoPtr > Umag_; - - //- Inner cone angle relative to SOI [deg] - const autoPtr > thetaInner_; - - //- Outer cone angle relative to SOI [deg] - const autoPtr > thetaOuter_; - - //- Parcel size distribution model model - const autoPtr sizeDistribution_; - - //- Number of parcels per injector already injected - mutable label nInjected_; - - - // Tangential vectors to the direction vector - - //- First tangential vector - vectorList tanVec1_; - - //- Second tangential vector - vectorList tanVec2_; - - -protected: - - // Protected Member Functions - - //- Number of parcels to introduce over the time step relative to SOI - virtual label parcelsToInject(const scalar time0, const scalar time1); - - //- Volume of parcels to introduce over the time step relative to SOI - virtual scalar volumeToInject(const scalar time0, const scalar time1); - - -public: - - //- Runtime type information - TypeName("ConeInjectionMP"); - - - // Constructors - - //- Construct from dictionary - ConeInjectionMP(const dictionary& dict, CloudType& owner); - - //- Construct copy - ConeInjectionMP(const ConeInjectionMP& im); - - //- Construct and return a clone - virtual autoPtr > clone() const - { - return autoPtr > - ( - new ConeInjectionMP(*this) - ); - } - - - //- Destructor - virtual ~ConeInjectionMP(); - - - // Member Functions - - //- Return the end-of-injection time - scalar timeEnd() const; - - - // Injection geometry - - //- Set the injection position and owner cell, tetFace and tetPt - virtual void setPositionAndCell - ( - const label parcelI, - const label nParcels, - const scalar time, - vector& position, - label& cellOwner, - label& tetFaceI, - label& tetPtI - ); - - //- Set the parcel properties - virtual void setProperties - ( - const label parcelI, - const label nParcels, - const scalar time, - typename CloudType::parcelType& parcel - ); - - //- Flag to identify whether model fully describes the parcel - virtual bool fullyDescribed() const; - - //- Return flag to identify whether or not injection of parcelI is - // permitted - virtual bool validInjection(const label parcelI); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository -# include "ConeInjectionMP.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/reactingCloud1Axes b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/reactingCloud1Axes deleted file mode 100644 index a254f7f2b4..0000000000 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/reactingCloud1Axes +++ /dev/null @@ -1,21 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class vectorField; - location "constant"; - object reactingCloud1Axes; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -( - (0 0 -1) - (0 0 -1) -) -// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/reactingCloud1Positions b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/reactingCloud1Positions deleted file mode 100644 index af3a75c15b..0000000000 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/reactingCloud1Positions +++ /dev/null @@ -1,21 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class vectorField; - location "constant"; - object reactingCloud1Positions; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -( - (0.3 0.35 1.45) - (0.6 0.35 1.45) -) -// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/reactingCloud1Properties b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/reactingCloud1Properties index ff99c3fba9..b17b2b0c55 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/reactingCloud1Properties @@ -120,8 +120,11 @@ subModels { SOI 0.000; duration 20.000; - positionsFile "reactingCloud1Positions"; - axesFile "reactingCloud1Axes"; + positionAxis + ( + (0.3 0.35 1.45) (0 0 -1) + (0.6 0.35 1.45) (0 0 -1) + ); massTotal 10; parcelsPerInjector 20000; parcelsPerSecond 500; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/multipleBoxes/constant/reactingCloud1Axes b/tutorials/lagrangian/reactingParcelFilmFoam/multipleBoxes/constant/reactingCloud1Axes deleted file mode 100644 index d85dd70dbc..0000000000 --- a/tutorials/lagrangian/reactingParcelFilmFoam/multipleBoxes/constant/reactingCloud1Axes +++ /dev/null @@ -1,21 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class vectorField; - location "constant"; - object reactingCloud1Axes; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -( - (0 0 -1) - (0 0 -1) -) -// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/multipleBoxes/constant/reactingCloud1Positions b/tutorials/lagrangian/reactingParcelFilmFoam/multipleBoxes/constant/reactingCloud1Positions deleted file mode 100644 index 79f7d3a454..0000000000 --- a/tutorials/lagrangian/reactingParcelFilmFoam/multipleBoxes/constant/reactingCloud1Positions +++ /dev/null @@ -1,21 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class vectorField; - location "constant"; - object reactingCloud1Positions; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -( - (0.3 0.35 1.45) - (0.6 0.35 1.45) -) -// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/multipleBoxes/constant/reactingCloud1Properties b/tutorials/lagrangian/reactingParcelFilmFoam/multipleBoxes/constant/reactingCloud1Properties index 2b4877e8d1..a7fd06ba49 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/multipleBoxes/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/multipleBoxes/constant/reactingCloud1Properties @@ -120,8 +120,11 @@ subModels { SOI 0.000; duration 20.000; - positionsFile "reactingCloud1Positions"; - axesFile "reactingCloud1Axes"; + positionAxis + ( + (0.3 0.35 1.45) (0 0 -1) + (0.6 0.35 1.45) (0 0 -1) + ); massTotal 10; parcelsPerInjector 20000; parcelsPerSecond 500; From 9c9e092f522c8674c81f31bd9af6d15276d734c5 Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 7 Feb 2011 22:44:05 +0000 Subject: [PATCH 02/21] simpleFoam/motorBike tutorial: Upgraded to 1.7.x --- .../simpleFoam/motorBike/{0 => 0.org}/U | 0 .../motorBike/{0 => 0.org}/include/fixedInlet | 0 .../include/frontBackUpperPatches | 0 .../{0 => 0.org}/include/initialConditions | 0 .../simpleFoam/motorBike/{0 => 0.org}/k | 0 .../simpleFoam/motorBike/{0 => 0.org}/nut | 0 .../simpleFoam/motorBike/{0 => 0.org}/omega | 0 .../simpleFoam/motorBike/{0 => 0.org}/p | 0 .../simpleFoam/motorBike/Allclean | 9 + .../simpleFoam/motorBike/Allrun | 12 +- .../motorBike/constant/polyMesh/boundary | 454 ++++++++++++++++++ .../simpleFoam/motorBike/system/controlDict | 2 +- .../simpleFoam/motorBike/system/fvSchemes | 8 +- .../system/{fvSolution => fvSolution.org} | 0 14 files changed, 475 insertions(+), 10 deletions(-) rename tutorials/incompressible/simpleFoam/motorBike/{0 => 0.org}/U (100%) rename tutorials/incompressible/simpleFoam/motorBike/{0 => 0.org}/include/fixedInlet (100%) rename tutorials/incompressible/simpleFoam/motorBike/{0 => 0.org}/include/frontBackUpperPatches (100%) rename tutorials/incompressible/simpleFoam/motorBike/{0 => 0.org}/include/initialConditions (100%) rename tutorials/incompressible/simpleFoam/motorBike/{0 => 0.org}/k (100%) rename tutorials/incompressible/simpleFoam/motorBike/{0 => 0.org}/nut (100%) rename tutorials/incompressible/simpleFoam/motorBike/{0 => 0.org}/omega (100%) rename tutorials/incompressible/simpleFoam/motorBike/{0 => 0.org}/p (100%) create mode 100755 tutorials/incompressible/simpleFoam/motorBike/Allclean create mode 100644 tutorials/incompressible/simpleFoam/motorBike/constant/polyMesh/boundary rename tutorials/incompressible/simpleFoam/motorBike/system/{fvSolution => fvSolution.org} (100%) diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/U b/tutorials/incompressible/simpleFoam/motorBike/0.org/U similarity index 100% rename from tutorials/incompressible/simpleFoam/motorBike/0/U rename to tutorials/incompressible/simpleFoam/motorBike/0.org/U diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/include/fixedInlet b/tutorials/incompressible/simpleFoam/motorBike/0.org/include/fixedInlet similarity index 100% rename from tutorials/incompressible/simpleFoam/motorBike/0/include/fixedInlet rename to tutorials/incompressible/simpleFoam/motorBike/0.org/include/fixedInlet diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/include/frontBackUpperPatches b/tutorials/incompressible/simpleFoam/motorBike/0.org/include/frontBackUpperPatches similarity index 100% rename from tutorials/incompressible/simpleFoam/motorBike/0/include/frontBackUpperPatches rename to tutorials/incompressible/simpleFoam/motorBike/0.org/include/frontBackUpperPatches diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/include/initialConditions b/tutorials/incompressible/simpleFoam/motorBike/0.org/include/initialConditions similarity index 100% rename from tutorials/incompressible/simpleFoam/motorBike/0/include/initialConditions rename to tutorials/incompressible/simpleFoam/motorBike/0.org/include/initialConditions diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/k b/tutorials/incompressible/simpleFoam/motorBike/0.org/k similarity index 100% rename from tutorials/incompressible/simpleFoam/motorBike/0/k rename to tutorials/incompressible/simpleFoam/motorBike/0.org/k diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/nut b/tutorials/incompressible/simpleFoam/motorBike/0.org/nut similarity index 100% rename from tutorials/incompressible/simpleFoam/motorBike/0/nut rename to tutorials/incompressible/simpleFoam/motorBike/0.org/nut diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/omega b/tutorials/incompressible/simpleFoam/motorBike/0.org/omega similarity index 100% rename from tutorials/incompressible/simpleFoam/motorBike/0/omega rename to tutorials/incompressible/simpleFoam/motorBike/0.org/omega diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/p b/tutorials/incompressible/simpleFoam/motorBike/0.org/p similarity index 100% rename from tutorials/incompressible/simpleFoam/motorBike/0/p rename to tutorials/incompressible/simpleFoam/motorBike/0.org/p diff --git a/tutorials/incompressible/simpleFoam/motorBike/Allclean b/tutorials/incompressible/simpleFoam/motorBike/Allclean new file mode 100755 index 0000000000..5e817aa533 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/motorBike/Allclean @@ -0,0 +1,9 @@ +#!/bin/sh + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +rm -f system/fvSolution +rm -rf 0 > /dev/null 2>&1 + +cleanCase diff --git a/tutorials/incompressible/simpleFoam/motorBike/Allrun b/tutorials/incompressible/simpleFoam/motorBike/Allrun index 802112d8b8..ea47b0746d 100755 --- a/tutorials/incompressible/simpleFoam/motorBike/Allrun +++ b/tutorials/incompressible/simpleFoam/motorBike/Allrun @@ -1,11 +1,15 @@ #!/bin/sh -cd ${0%/*} || exit 1 # run from this directory - # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions +cp system/fvSolution.org system/fvSolution +cp -r 0.org 0 > /dev/null 2>&1 + runApplication blockMesh runApplication snappyHexMesh -overwrite -runApplication simpleFoam -# ----------------------------------------------------------------- end-of-file +sed -i 's/\(nNonOrthogonalCorrectors\).*;/\1 10;/g' system/fvSolution +runApplication potentialFoam -writep +sed -i 's/\(nNonOrthogonalCorrectors\).*;/\1 0;/g' system/fvSolution + +runApplication simpleFoam diff --git a/tutorials/incompressible/simpleFoam/motorBike/constant/polyMesh/boundary b/tutorials/incompressible/simpleFoam/motorBike/constant/polyMesh/boundary new file mode 100644 index 0000000000..359b377f0a --- /dev/null +++ b/tutorials/incompressible/simpleFoam/motorBike/constant/polyMesh/boundary @@ -0,0 +1,454 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +72 +( + frontAndBack + { + type patch; + nFaces 320; + startFace 1028304; + } + inlet + { + type patch; + nFaces 64; + startFace 1028624; + } + outlet + { + type patch; + nFaces 64; + startFace 1028688; + } + lowerWall + { + type wall; + nFaces 5330; + startFace 1028752; + } + upperWall + { + type patch; + nFaces 160; + startFace 1034082; + } + motorBike_frt-fairing:001%1 + { + type wall; + nFaces 5427; + startFace 1034242; + } + motorBike_windshield:002%2 + { + type wall; + nFaces 50; + startFace 1039669; + } + motorBike_rr-wh-rim:005%5 + { + type wall; + nFaces 136; + startFace 1039719; + } + motorBike_rr-wh-rim:010%10 + { + type wall; + nFaces 340; + startFace 1039855; + } + motorBike_fr-wh-rim:011%11 + { + type wall; + nFaces 473; + startFace 1040195; + } + motorBike_fr-wh-brake-disk:012%12 + { + type wall; + nFaces 54; + startFace 1040668; + } + motorBike_frame:016-shadow%13 + { + type wall; + nFaces 97; + startFace 1040722; + } + motorBike_rear-susp:014%14 + { + type wall; + nFaces 839; + startFace 1040819; + } + motorBike_rear-susp:014-shadow%15 + { + type wall; + nFaces 469; + startFace 1041658; + } + motorBike_frame:016%16 + { + type wall; + nFaces 68; + startFace 1042127; + } + motorBike_rr-wh-rim:005-shadow%17 + { + type wall; + nFaces 71; + startFace 1042195; + } + motorBike_rr-wh-chain-hub:022%22 + { + type wall; + nFaces 141; + startFace 1042266; + } + motorBike_rearseat%24 + { + type wall; + nFaces 430; + startFace 1042407; + } + motorBike_frt-fairing%25 + { + type wall; + nFaces 626; + startFace 1042837; + } + motorBike_windshield%26 + { + type wall; + nFaces 378; + startFace 1043463; + } + motorBike_headlights%27 + { + type wall; + nFaces 161; + startFace 1043841; + } + motorBike_driversseat%28 + { + type wall; + nFaces 368; + startFace 1044002; + } + motorBike_rear-body%29 + { + type wall; + nFaces 2077; + startFace 1044370; + } + motorBike_fuel-tank%30 + { + type wall; + nFaces 912; + startFace 1046447; + } + motorBike_exhaust%31 + { + type wall; + nFaces 2392; + startFace 1047359; + } + motorBike_rr-wh-rim%32 + { + type wall; + nFaces 1430; + startFace 1049751; + } + motorBike_fr-mud-guard%33 + { + type wall; + nFaces 639; + startFace 1051181; + } + motorBike_fr-wh-rim%34 + { + type wall; + nFaces 591; + startFace 1051820; + } + motorBike_fr-wh-brake-disk%35 + { + type wall; + nFaces 431; + startFace 1052411; + } + motorBike_fr-brake-caliper%36 + { + type wall; + nFaces 164; + startFace 1052842; + } + motorBike_fr-wh-tyre%37 + { + type wall; + nFaces 1116; + startFace 1053006; + } + motorBike_hbars%38 + { + type wall; + nFaces 535; + startFace 1054122; + } + motorBike_fr-forks%39 + { + type wall; + nFaces 1140; + startFace 1054657; + } + motorBike_chain%40 + { + type wall; + nFaces 474; + startFace 1055797; + } + motorBike_rr-wh-tyre%41 + { + type wall; + nFaces 1787; + startFace 1056271; + } + motorBike_square-dial%42 + { + type wall; + nFaces 6; + startFace 1058058; + } + motorBike_round-dial%43 + { + type wall; + nFaces 17; + startFace 1058064; + } + motorBike_dial-holder%44 + { + type wall; + nFaces 87; + startFace 1058081; + } + motorBike_rear-susp%45 + { + type wall; + nFaces 1786; + startFace 1058168; + } + motorBike_rear-brake-lights%46 + { + type wall; + nFaces 53; + startFace 1059954; + } + motorBike_rear-light-bracket%47 + { + type wall; + nFaces 163; + startFace 1060007; + } + motorBike_frame%48 + { + type wall; + nFaces 2040; + startFace 1060170; + } + motorBike_rear-mud-guard%49 + { + type wall; + nFaces 663; + startFace 1062210; + } + motorBike_rear-susp-spring-damp%50 + { + type wall; + nFaces 107; + startFace 1062873; + } + motorBike_fairing-inner-plate%51 + { + type wall; + nFaces 445; + startFace 1062980; + } + motorBike_clutch-housing%52 + { + type wall; + nFaces 970; + startFace 1063425; + } + motorBike_radiator%53 + { + type wall; + nFaces 40; + startFace 1064395; + } + motorBike_water-pipe%54 + { + type wall; + nFaces 104; + startFace 1064435; + } + motorBike_water-pump%55 + { + type wall; + nFaces 74; + startFace 1064539; + } + motorBike_engine%56 + { + type wall; + nFaces 2389; + startFace 1064613; + } + motorBike_rear-shock-link%57 + { + type wall; + nFaces 25; + startFace 1067002; + } + motorBike_rear-brake-fluid-pot-bracket%58 + { + type wall; + nFaces 44; + startFace 1067027; + } + motorBike_rear-brake-fluid-pot%59 + { + type wall; + nFaces 53; + startFace 1067071; + } + motorBike_footpeg%60 + { + type wall; + nFaces 86; + startFace 1067124; + } + motorBike_rr-wh-chain-hub%61 + { + type wall; + nFaces 122; + startFace 1067210; + } + motorBike_rear-brake-caliper%62 + { + type wall; + nFaces 142; + startFace 1067332; + } + motorBike_rider-helmet%65 + { + type wall; + nFaces 583; + startFace 1067474; + } + motorBike_rider-visor%66 + { + type wall; + nFaces 95; + startFace 1068057; + } + motorBike_rider-boots%67 + { + type wall; + nFaces 1025; + startFace 1068152; + } + motorBike_rider-gloves%68 + { + type wall; + nFaces 319; + startFace 1069177; + } + motorBike_rider-body%69 + { + type wall; + nFaces 4555; + startFace 1069496; + } + motorBike_frame:0%70 + { + type wall; + nFaces 37; + startFace 1074051; + } + motorBike_frt-fairing:001-shadow%74 + { + type wall; + nFaces 3306; + startFace 1074088; + } + motorBike_windshield-shadow%75 + { + type wall; + nFaces 239; + startFace 1077394; + } + motorBike_fr-mud-guard-shadow%81 + { + type wall; + nFaces 332; + startFace 1077633; + } + motorBike_fr-wh-brake-disk-shadow%83 + { + type wall; + nFaces 182; + startFace 1077965; + } + motorBike_rear-mud-guard-shadow%84 + { + type wall; + nFaces 387; + startFace 1078147; + } + motorBike_rear-susp-spring-damp-shadow%85 + { + type wall; + nFaces 41; + startFace 1078534; + } + motorBike_radiator-shadow%86 + { + type wall; + nFaces 21; + startFace 1078575; + } + motorBike_rear-shock-link-shadow%87 + { + type wall; + nFaces 10; + startFace 1078596; + } + motorBike_rear-brake-fluid-pot-bracket-shadow%88 + { + type wall; + nFaces 22; + startFace 1078606; + } + motorBike_rr-wh-chain-hub-shadow%89 + { + type wall; + nFaces 53; + startFace 1078628; + } +) + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/controlDict b/tutorials/incompressible/simpleFoam/motorBike/system/controlDict index 8d62c2cd94..376080efff 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/controlDict +++ b/tutorials/incompressible/simpleFoam/motorBike/system/controlDict @@ -22,7 +22,7 @@ startTime 0; stopAt endTime; -endTime 1000; +endTime 500; deltaT 1; diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/fvSchemes b/tutorials/incompressible/simpleFoam/motorBike/system/fvSchemes index 79fd21bad2..d0475c2bdd 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/motorBike/system/fvSchemes @@ -16,14 +16,12 @@ FoamFile ddtSchemes { - default steadyState; + default steadyState; } gradSchemes { default Gauss linear; - grad(p) Gauss linear; - grad(U) Gauss linear; } divSchemes @@ -37,7 +35,7 @@ divSchemes laplacianSchemes { - default Gauss linear limited 0.333; + default Gauss linear corrected; } interpolationSchemes @@ -47,7 +45,7 @@ interpolationSchemes snGradSchemes { - default limited 0.333; + default corrected; } fluxRequired diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/fvSolution b/tutorials/incompressible/simpleFoam/motorBike/system/fvSolution.org similarity index 100% rename from tutorials/incompressible/simpleFoam/motorBike/system/fvSolution rename to tutorials/incompressible/simpleFoam/motorBike/system/fvSolution.org From b3cde56f278ccd3833a09f12de0b4d3b704e8f13 Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 7 Feb 2011 22:50:49 +0000 Subject: [PATCH 03/21] Doxygen docs: Corrected doxyFilter to preserve line numbers Also corrected many formatting errors in the comments in C and H files --- .../phaseChangeTwoPhaseMixtures/Kunz/Kunz.H | 4 +- .../Merkle/Merkle.H | 4 +- .../SchnerrSauer/SchnerrSauer.H | 4 +- .../extrudeToRegionMesh/extrudeToRegionMesh.C | 8 +- bin/tools/doxyFilter | 4 +- bin/tools/doxyFilter.awk | 6 +- bin/tools/doxyFilter.sed | 113 ++++++++---------- doc/Doxygen/Doxyfile | 6 +- doc/doxygen/Doxyfile | 5 +- src/OSspecific/POSIX/fileMonitor.C | 24 ++-- .../addToGlobalFunctionSelectionTable.H | 9 +- .../globalFunctionSelectionTables.H | 7 +- .../addToStaticMemberFunctionSelectionTable.H | 6 +- .../staticMemberFunctionSelectionTables.H | 7 +- .../interpolationTable/interpolationTable.H | 4 +- .../matrices/DiagonalMatrix/DiagonalMatrix.H | 4 +- .../functions/DataEntry/Constant/Constant.H | 2 +- .../functions/DataEntry/Table/Table.H | 2 +- .../DataEntry/polynomial/polynomial.H | 2 +- .../primitives/hashes/Hasher/HasherInt.H | 10 +- .../general/porousMedia/PorousZones.H | 4 +- src/finiteVolume/fvMesh/fvMesh.H | 14 ++- .../surfaceInterpolation/surfaceInterpolate.H | 6 +- src/lagrangian/basic/Cloud/Cloud.H | 2 +- .../basic/addSubtract/addSubtract.H | 10 +- .../mutkRoughWallFunctionFvPatchScalarField.H | 4 +- .../LES/SpalartAllmaras/SpalartAllmaras.H | 4 +- .../SpalartAllmarasDDES/SpalartAllmarasDDES.H | 4 +- .../SpalartAllmarasIDDES.H | 4 +- .../LES/kOmegaSSTSAS/kOmegaSSTSAS.H | 4 +- 30 files changed, 143 insertions(+), 144 deletions(-) diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.H b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.H index 03652fd9a7..2bb0db8e24 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,7 +39,7 @@ Description to Cavitation Prediction,” Computers and Fluids, 29(8):849-875, 2000. - @verbatim + @endverbatim SourceFiles Kunz.C diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.H b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.H index d77447d540..68e9c2871d 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.H @@ -2,7 +2,7 @@ ========Merkle= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,7 +33,7 @@ Description "Computational modeling of the dynamics of sheet cavitation", in Proceedings Third International Symposium on Cavitation Grenoble, France 1998. - @verbatim + @endverbatim SourceFiles Merkle.C diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.H b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.H index 87ac7e232d..98d5d69a2c 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,7 +33,7 @@ Description "Physical and Numerical Modeling of Unsteady Cavitation Dynamics", Proc. 4th International Conference on Multiphase Flow, New Orleans, U.S.A., 2001. - @verbatim + @endverbatim SourceFiles SchnerrSauer.C diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C index bd068c5b48..e0f86f3f91 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,9 +30,9 @@ Description - create baffles in original mesh with directMappedWall patches - if extruding boundary faces: - convert boundary faces to directMappedWall patches - - extrude edges of faceZone as a _sidePatch + - extrude edges of faceZone as a \_sidePatch - extrude edges inbetween different faceZones as a - (nonuniformTransform)cyclic _ + (nonuniformTransform)cyclic \_\ - extrudes into master direction (i.e. away from the owner cell if flipMap is false) - not parallel @@ -106,7 +106,7 @@ becomes Usage - - extrudeToRegionMesh + - extrudeToRegionMesh \ \ \ @param \ \n Name of mesh to create. diff --git a/bin/tools/doxyFilter b/bin/tools/doxyFilter index af122f9c87..4b1e35223e 100755 --- a/bin/tools/doxyFilter +++ b/bin/tools/doxyFilter @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------- # License @@ -52,7 +52,7 @@ then # */applications/solvers/*.H | */applications/utilities/*.H ) # awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilter-ignore.awk # ;; - esac + esac awk -f $awkScript $1 | \ sed -f $WM_PROJECT_DIR/bin/tools/doxyFilter.sed \ diff --git a/bin/tools/doxyFilter.awk b/bin/tools/doxyFilter.awk index 85e57c75ec..aebfbbaf31 100644 --- a/bin/tools/doxyFilter.awk +++ b/bin/tools/doxyFilter.awk @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. # \\/ M anipulation | # ----------------------------------------------------------------------------- # License @@ -57,7 +57,7 @@ BEGIN { # start comment block if (state == 1) { - printf "/*!\n" + printf "/*! " state = 2 } @@ -79,7 +79,7 @@ BEGIN { # end comment block if (state == 2) { - printf "*/\n" + printf "*/ " } state = 0 print diff --git a/bin/tools/doxyFilter.sed b/bin/tools/doxyFilter.sed index 45a15019e1..681929a904 100644 --- a/bin/tools/doxyFilter.sed +++ b/bin/tools/doxyFilter.sed @@ -11,34 +11,20 @@ /^License/,/\*\//{ /^License/,\%http://www.gnu.org/licenses%{ s?^License.*?\*\/\ -\/\*! @file %filePath%\ +\/\*! \\file %filePath%\ Original source file %fileName%\ +\ +\ +\ +\ +\ +\ +\ +\ ? /^ /d } -# old FSF address -/^License/,/MA 0211.-130. USA/{ -s?^License.*?\*\/\ -\/\*! @file %filePath%\ -Original source file %fileName%\ -? -/^ /d -} - -# remove entry -/^Primitive *$/{ -N -N -d -} - -# remove entry -/^Implementation *$/{ -N -N -d -} # remove entry /^Application *$/{ @@ -47,12 +33,6 @@ N d } -# remove entry -/^Type *$/{ -N -N -d -} # remove entry /^Global *$/{ @@ -62,96 +42,109 @@ d } +# Primitive +# typename +# => +# \\relates typename +# +/^Primitive *$/,/^[^ ]/{ +s/^Primitive *$// +s/^ /\\relates / +} + + # Class # Foam::className # => -# @class Foam::className +# \\class Foam::className # /^Class *$/,/^[^ ]/{ -/^Class/d -s/^ /@class / +s/^Class *$// +s/^ /\\class / } # Namespace # namespaceName # => -# @namespace namespaceName +# \namespace namespaceName # /^Namespace *$/,/^[^ ]/{ -/^Namespace/d -s/^ /@namespace / +s/^Namespace// +s/^ /\\namespace / } # Typedef # Foam::def # => -# @class Foam::def -# This is not strictly correct, but makes it easier to find the typedefs +# \typedef Foam::def /^Typedef *$/,/^[^ ]/{ -/^Typedef/d -s/^ /@class / +s/^Typedef// +s/^ /\\typedef / } -# add anchor and use @brief +# add anchor and use \brief # the first paragraph will be 'brief' and the others 'detail' /^Description *$/,/^[^ ]/{ /^Description/c\ -\ -@brief + \\brief s/^ // } /^Usage *$/,/^[^ ]/{ /^Usage/c\ -@par Usage +\\par Usage s/^ // } /^See *Also *$/,/^[^ ]/{ /^See *Also/c\ -@see -s/^ // -} - -/^Author *$/,/^[^ ]/{ -/^Author/c\ -@author +\\see s/^ // } /^Note *$/,/^[^ ]/{ /^Note/c\ -@note +\\note s/^ // } # remove ToDo paragraph to avoid them showing on related pages -/^To[Dd]o *$/,/^ *$/d +/^To[Dd]o *$/,/^[^ ]/{ +s/^To[Dd]o *$// +s/^ .*// +} /^Warning *$/,/^[^ ]/{ /^Warning/c\ -@warning +\\warning s/^ // } + /^Deprecated *$/,/^[^ ]/{ /^Deprecated/c\ -@deprecated +\\deprecated s/^ // } -/SourceFiles/,/^[ ]*$/{ -s?SourceFiles?@par Source files\ -\ -? + +/^SourceFiles *$/,/^$/{ +s?SourceFiles?\\par Source files\ +? +} + +/fileName%<\/a><\/li>$/{ +N +s?\n$??g +s/<\/li>\n/<\/li> / s? *\([a-zA-Z0-9]*\.[a-zA-Z]*\)?
  • \1
  • ? } diff --git a/doc/Doxygen/Doxyfile b/doc/Doxygen/Doxyfile index 79bc3b71cf..3ef243ee83 100644 --- a/doc/Doxygen/Doxyfile +++ b/doc/Doxygen/Doxyfile @@ -1104,7 +1104,7 @@ TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. -GENERATE_TAGFILE = +GENERATE_TAGFILE = DTAGS # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes @@ -1254,7 +1254,7 @@ DOTFILE_DIRS = # MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. -DOT_GRAPH_MAX_NODES = 50 +DOT_GRAPH_MAX_NODES = 10 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable @@ -1264,7 +1264,7 @@ DOT_GRAPH_MAX_NODES = 50 # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. -MAX_DOT_GRAPH_DEPTH = 3 +MAX_DOT_GRAPH_DEPTH = 1 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, which results in a white background. diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile index a1c4e6a5fc..0c076b4fc2 100644 --- a/doc/doxygen/Doxyfile +++ b/doc/doxygen/Doxyfile @@ -581,7 +581,8 @@ WARN_LOGFILE = # limit input for testing purposes INPUT = $(WM_PROJECT_DIR)/src/OpenFOAM/global \ $(WM_PROJECT_DIR)/src/OpenFOAM/containers \ - $(WM_PROJECT_DIR)/src/OpenFOAM/primitives + $(WM_PROJECT_DIR)/src/OpenFOAM/primitives \ + $(WM_PROJECT_DIR)/src/finiteVolume/fvMesh # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is @@ -1353,7 +1354,7 @@ TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. -GENERATE_TAGFILE = +GENERATE_TAGFILE = DTAGS # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes diff --git a/src/OSspecific/POSIX/fileMonitor.C b/src/OSspecific/POSIX/fileMonitor.C index 8abbf768ea..cb0e8be4d7 100644 --- a/src/OSspecific/POSIX/fileMonitor.C +++ b/src/OSspecific/POSIX/fileMonitor.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -109,8 +109,7 @@ namespace Foam - //! @cond internalClass - //- Internal tracking via stat(3p) or inotify(7) + //- Internal tracking via stat(3p) or inotify(7) class fileMonitorWatcher { public: @@ -140,7 +139,7 @@ namespace Foam { if (useInotify_) { -#ifdef FOAM_USE_INOTIFY + #ifdef FOAM_USE_INOTIFY inotifyFd_ = inotify_init(); dirWatches_.setCapacity(sz); dirFiles_.setCapacity(sz); @@ -167,13 +166,13 @@ namespace Foam << endl; } } -#else + #else FatalErrorIn("fileMonitorWatcher(const bool, const label)") << "You selected inotify but this file was compiled" << " without FOAM_USE_INOTIFY" << "Please select another fileModification test method" << exit(FatalError); -#endif + #endif } else { @@ -184,7 +183,7 @@ namespace Foam //- remove all watches inline ~fileMonitorWatcher() { -#ifdef FOAM_USE_INOTIFY + #ifdef FOAM_USE_INOTIFY if (useInotify_ && inotifyFd_ >= 0) { forAll(dirWatches_, i) @@ -200,7 +199,7 @@ namespace Foam } } } -#endif + #endif } inline bool addWatch(const label watchFd, const fileName& fName) @@ -212,7 +211,7 @@ namespace Foam return false; } -#ifdef FOAM_USE_INOTIFY + #ifdef FOAM_USE_INOTIFY // Add/retrieve watch on directory containing file. // Note that fName might be non-existing in special situations // (master-only reading for IODictionaries) @@ -250,7 +249,7 @@ namespace Foam dirWatches_(watchFd) = dirWatchID; dirFiles_(watchFd) = fName.name(); -#endif + #endif } else { @@ -288,7 +287,6 @@ namespace Foam } }; - //! @endcond } @@ -298,7 +296,7 @@ void Foam::fileMonitor::checkFiles() const { if (useInotify_) { -#ifdef FOAM_USE_INOTIFY + #ifdef FOAM_USE_INOTIFY // Large buffer for lots of events char buffer[EVENT_BUF_LEN]; @@ -392,7 +390,7 @@ void Foam::fileMonitor::checkFiles() const return; } } -#endif + #endif } else { diff --git a/src/OpenFOAM/db/runTimeSelection/globalFunctions/addToGlobalFunctionSelectionTable.H b/src/OpenFOAM/db/runTimeSelection/globalFunctions/addToGlobalFunctionSelectionTable.H index e5c676b8be..827723fe5c 100644 --- a/src/OpenFOAM/db/runTimeSelection/globalFunctions/addToGlobalFunctionSelectionTable.H +++ b/src/OpenFOAM/db/runTimeSelection/globalFunctions/addToGlobalFunctionSelectionTable.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -21,7 +21,8 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . -@file Foam::addToGlobalFunctionSelectionTable +Global + Foam::addToGlobalFunctionSelectionTable Description Macros for easy insertion into global function selection tables @@ -33,20 +34,18 @@ Description // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - // add to hash-table of functions with 'lookup' as the key #define addNamedToGlobalFunctionSelectionTable\ (memberFunction,argNames,lookup,functionPtr) \ \ /* Add to the table, find by lookup name */ \ add##memberFunction##argNames##GlobalMemberFunctionToTable \ - add_##lookup##_##memberFunction##argNames##GlobalMemberFunctionTo##Table_\ + add_##lookup##_##memberFunction##argNames##GlobalMemberFunctionTo##Table_ \ (#lookup, functionPtr) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - #endif // ************************************************************************* // diff --git a/src/OpenFOAM/db/runTimeSelection/globalFunctions/globalFunctionSelectionTables.H b/src/OpenFOAM/db/runTimeSelection/globalFunctions/globalFunctionSelectionTables.H index 581d2cb8f5..76481db279 100644 --- a/src/OpenFOAM/db/runTimeSelection/globalFunctions/globalFunctionSelectionTables.H +++ b/src/OpenFOAM/db/runTimeSelection/globalFunctions/globalFunctionSelectionTables.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -21,7 +21,8 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . -@file Foam::globalFunctionSelectionTables +Global + Foam::globalFunctionSelectionTables Description Macros to enable the easy declaration of global function selection tables. @@ -35,7 +36,6 @@ Description // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - // external use: // ~~~~~~~~~~~~~ // declare a run-time selection: @@ -138,7 +138,6 @@ Description // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - #endif // ************************************************************************* // diff --git a/src/OpenFOAM/db/runTimeSelection/staticMemberFunctions/addToStaticMemberFunctionSelectionTable.H b/src/OpenFOAM/db/runTimeSelection/staticMemberFunctions/addToStaticMemberFunctionSelectionTable.H index 24550d4641..171ee131f6 100644 --- a/src/OpenFOAM/db/runTimeSelection/staticMemberFunctions/addToStaticMemberFunctionSelectionTable.H +++ b/src/OpenFOAM/db/runTimeSelection/staticMemberFunctions/addToStaticMemberFunctionSelectionTable.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -21,7 +21,8 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . -@file Foam::addToStaticMemberFunctionSelectionTable +Global + Foam::addToStaticMemberFunctionSelectionTable Description Macros for easy insertion into member function selection tables @@ -47,7 +48,6 @@ Description // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - #endif // ************************************************************************* // diff --git a/src/OpenFOAM/db/runTimeSelection/staticMemberFunctions/staticMemberFunctionSelectionTables.H b/src/OpenFOAM/db/runTimeSelection/staticMemberFunctions/staticMemberFunctionSelectionTables.H index b3bcee84c2..392250477b 100644 --- a/src/OpenFOAM/db/runTimeSelection/staticMemberFunctions/staticMemberFunctionSelectionTables.H +++ b/src/OpenFOAM/db/runTimeSelection/staticMemberFunctions/staticMemberFunctionSelectionTables.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -21,7 +21,8 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . -@file Foam::staticMemberFunctionSelectionTables +Global + Foam::staticMemberFunctionSelectionTables Description Macros to enable the easy declaration of member function selection tables. @@ -35,7 +36,6 @@ Description // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - // external use: // ~~~~~~~~~~~~~ // declare a run-time selection: @@ -140,7 +140,6 @@ Description // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - #endif // ************************************************************************* // diff --git a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H index a409f01c79..405fb69ecf 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H +++ b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,7 @@ Class Foam::interpolationTable Description - An interpolation/look-up table of scalar vs values. + An interpolation/look-up table of scalar vs \ values. The reference scalar values must be monotonically increasing. The handling of out-of-bounds values depends on the current setting diff --git a/src/OpenFOAM/matrices/DiagonalMatrix/DiagonalMatrix.H b/src/OpenFOAM/matrices/DiagonalMatrix/DiagonalMatrix.H index b038452515..af8f693f0a 100644 --- a/src/OpenFOAM/matrices/DiagonalMatrix/DiagonalMatrix.H +++ b/src/OpenFOAM/matrices/DiagonalMatrix/DiagonalMatrix.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Class - Foam::DiagonalMatrix + Foam::DiagonalMatrix Description DiagonalMatrix is a 2D diagonal matrix of objects diff --git a/src/OpenFOAM/primitives/functions/DataEntry/Constant/Constant.H b/src/OpenFOAM/primitives/functions/DataEntry/Constant/Constant.H index f7a1bb902e..ffa5f71173 100644 --- a/src/OpenFOAM/primitives/functions/DataEntry/Constant/Constant.H +++ b/src/OpenFOAM/primitives/functions/DataEntry/Constant/Constant.H @@ -27,7 +27,7 @@ Class Description Templated basic entry that holds a constant value. - Usage - for entry having the value : + Usage - for entry \ having the value : @verbatim constant @endverbatim diff --git a/src/OpenFOAM/primitives/functions/DataEntry/Table/Table.H b/src/OpenFOAM/primitives/functions/DataEntry/Table/Table.H index 5fe73deccb..31fedafbbe 100644 --- a/src/OpenFOAM/primitives/functions/DataEntry/Table/Table.H +++ b/src/OpenFOAM/primitives/functions/DataEntry/Table/Table.H @@ -27,7 +27,7 @@ Class Description Templated table container data entry. Items are stored in a list of Tuple2's. First column is always stored as scalar entries. Data is read - in the form, e.g. for an entry that is (scalar, vector): + in the form, e.g. for an entry \ that is (scalar, vector): @verbatim table diff --git a/src/OpenFOAM/primitives/functions/DataEntry/polynomial/polynomial.H b/src/OpenFOAM/primitives/functions/DataEntry/polynomial/polynomial.H index e336068020..33d3adcc5e 100644 --- a/src/OpenFOAM/primitives/functions/DataEntry/polynomial/polynomial.H +++ b/src/OpenFOAM/primitives/functions/DataEntry/polynomial/polynomial.H @@ -26,7 +26,7 @@ Class Description Polynomial container data entry for scalars. Items are stored in a list of - Tuple2's. Data is input in the form, e.g. for an entry that + Tuple2's. Data is input in the form, e.g. for an entry \ that describes y = x^2 + 2x^3 @verbatim diff --git a/src/OpenFOAM/primitives/hashes/Hasher/HasherInt.H b/src/OpenFOAM/primitives/hashes/Hasher/HasherInt.H index f5a1e8b3ff..11f68e5c17 100644 --- a/src/OpenFOAM/primitives/hashes/Hasher/HasherInt.H +++ b/src/OpenFOAM/primitives/hashes/Hasher/HasherInt.H @@ -49,21 +49,21 @@ namespace Foam //- An optimized version of Hasher // @param[in] data - an array of uint32_t values - // @param[in] len - the number of values (not bytes) + // @param[in] length - the number of values (not bytes) // @param[in] seed - the previous hash, or an arbitrary value - unsigned HasherInt(const uint32_t*, size_t length, unsigned seed = 0); + unsigned HasherInt(const uint32_t* data, size_t length, unsigned seed = 0); //- An optimized version of Hasher, returning dual hash values // @param[in] data - an array of uint32_t values - // @param[in] len - the number of values (not bytes) + // @param[in] length - the number of values (not bytes) // @param[in] hash1 - the previous hash, or an arbitrary value // on output, the primary hash value // @param[in] hash1 - the previous hash, or an arbitrary value // on output, the secondary hash value unsigned HasherDual ( - const uint32_t*, - size_t len, + const uint32_t* data, + size_t length, unsigned& hash1, unsigned& hash2 ); diff --git a/src/finiteVolume/cfdTools/general/porousMedia/PorousZones.H b/src/finiteVolume/cfdTools/general/porousMedia/PorousZones.H index c34b60c143..b918eda99a 100644 --- a/src/finiteVolume/cfdTools/general/porousMedia/PorousZones.H +++ b/src/finiteVolume/cfdTools/general/porousMedia/PorousZones.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Class - Foam::PorousZones + Foam::PorousZones Description A centralized ZoneType collection. diff --git a/src/finiteVolume/fvMesh/fvMesh.H b/src/finiteVolume/fvMesh/fvMesh.H index 2a5c81fcc2..6a98e07ed2 100644 --- a/src/finiteVolume/fvMesh/fvMesh.H +++ b/src/finiteVolume/fvMesh/fvMesh.H @@ -1,8 +1,8 @@ /*---------------------------------------------------------------------------*\ ========= | - \\ / F ield | OpenFOAM: The Open So + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,6 +42,16 @@ SourceFiles fvMesh.C fvMeshGeometry.C +See Also + hmm + +Usage + oeuoeuoeu + +ToDo + oeuoeuoeu + oeueouoeu + \*---------------------------------------------------------------------------*/ #ifndef fvMesh_H diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.H b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.H index 7bda1c5686..207a19dcb1 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -156,14 +156,14 @@ namespace fvc ); - //- Interpolate tmp field onto faces using 'interpolate()' + //- Interpolate tmp field onto faces using 'interpolate(\)' template static tmp > interpolate ( const tmp >& tvf ); - //- Interpolate tmp field onto faces using 'interpolate()' + //- Interpolate tmp field onto faces using 'interpolate(\)' template static tmp > interpolate ( diff --git a/src/lagrangian/basic/Cloud/Cloud.H b/src/lagrangian/basic/Cloud/Cloud.H index e82907d76b..3715bcb75c 100644 --- a/src/lagrangian/basic/Cloud/Cloud.H +++ b/src/lagrangian/basic/Cloud/Cloud.H @@ -381,7 +381,7 @@ public: IOstream::compressionType cmp ) const; - //- Write positions to _positions.obj file + //- Write positions to \_positions.obj file void writePositions() const; diff --git a/src/postProcessing/foamCalcFunctions/basic/addSubtract/addSubtract.H b/src/postProcessing/foamCalcFunctions/basic/addSubtract/addSubtract.H index b7755425a6..e8c8c56c95 100644 --- a/src/postProcessing/foamCalcFunctions/basic/addSubtract/addSubtract.H +++ b/src/postProcessing/foamCalcFunctions/basic/addSubtract/addSubtract.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,10 +28,10 @@ Description adds/subtracts a field or value to/from a base field. New field name specified by -resultName option, or automatically as: - _add_ - _add_value - _subtract_ - _subtract_value + \_add_ + \_add_value + \_subtract_ + \_subtract_value Example usage: addSubtract p add -value 100000 -resultName pAbs diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.H index ffc91e7454..ce15860eab 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Class - Foam::compressible::RASModels::mutRoughWallFunctionFvPatchScalarField + Foam::compressible::RASModels::mutkRoughWallFunctionFvPatchScalarField Description Boundary condition for turbulent (kinematic) viscosity when using wall diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H index 2b2687c407..85b98cc226 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Class - Foam::LESmodels::SpalartAllmaras + Foam::incompressible::LESModels::SpalartAllmaras Description SpalartAllmaras DES (SA + LES) turbulence model for incompressible flows diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.H b/src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.H index aeb936968f..048a7a4b54 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.H +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Class - Foam::LESmodels::SpalartAllmarasDDES + Foam::incompressible::LESModels::SpalartAllmarasDDES Description SpalartAllmaras DDES LES turbulence model for incompressible flows diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H index 80b13e1ec0..a4b8aedd5d 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Class - Foam::LESmodels::SpalartAllmarasIDDES + Foam::incompressible::LESModels::SpalartAllmarasIDDES Description SpalartAllmarasIDDES LES turbulence model for incompressible flows diff --git a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H index 444392668b..5ff2022a29 100644 --- a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H +++ b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Class - Foam::LESmodels::kOmegaSSTSAS + Foam::incompressible::LESModels::kOmegaSSTSAS Description kOmegaSSTSAS LES turbulence model for incompressible flows From ca0799cbc7f14100e2600438196c4e59be124535 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 8 Feb 2011 09:26:03 +0000 Subject: [PATCH 04/21] BUG: Use gSum instead of sum for fieldValues function object --- .../fieldValues/faceSource/faceSourceTemplates.C | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C index d8ab9fac28..a084b0766b 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -91,32 +91,32 @@ Type Foam::fieldValues::faceSource::processValues { case opSum: { - result = sum(values); + result = gSum(values); break; } case opAreaAverage: { - result = sum(values*magSf)/sum(magSf); + result = gSum(values*magSf)/gSum(magSf); break; } case opAreaIntegrate: { - result = sum(values*magSf); + result = gSum(values*magSf); break; } case opWeightedAverage: { - result = sum(values*weightField)/sum(weightField); + result = gSum(values*weightField)/gSum(weightField); break; } case opMin: { - result = min(values); + result = gMin(values); break; } case opMax: { - result = max(values); + result = gMax(values); break; } default: From b8c2cbaaec6c1b0ae2dcee668502655e198df2ee Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 8 Feb 2011 09:46:34 +0000 Subject: [PATCH 05/21] BUG: Contuation from commit ca0799cbc7f - updated cellSource --- .../cellSource/cellSourceTemplates.C | 18 +++++++++--------- .../faceSource/faceSourceTemplates.C | 3 +-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.C b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.C index 719393b252..77bcb85737 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -72,32 +72,32 @@ Type Foam::fieldValues::cellSource::processValues { case opSum: { - result = sum(values); + result = gSum(values); break; } case opVolAverage: { - result = sum(values*V)/sum(V); + result = gSum(values*V)/gSum(V); break; } case opVolIntegrate: { - result = sum(values*V); + result = gSum(values*V); break; } case opWeightedAverage: { - result = sum(values*weightField)/sum(weightField); + result = gSum(values*weightField)/gSum(weightField); break; } case opMin: { - result = min(values); + result = gMin(values); break; } case opMax: { - result = max(values); + result = gMax(values); break; } default: @@ -128,10 +128,10 @@ bool Foam::fieldValues::cellSource::writeValues(const word& fieldName) combineFields(setFieldValues(weightFieldName_)) ); + Type result = processValues(values, V, weightField); + if (Pstream::master()) { - Type result = processValues(values, V, weightField); - if (valueOutput_) { IOField diff --git a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C index a084b0766b..34ad992c0c 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C @@ -158,11 +158,10 @@ bool Foam::fieldValues::faceSource::writeValues(const word& fieldName) magSf = combineFields(magSf); weightField = combineFields(weightField); + Type result = processValues(values, magSf, weightField); if (Pstream::master()) { - Type result = processValues(values, magSf, weightField); - if (valueOutput_) { IOField From 67a2effecebb936d27d77a327f066bb35cad82f3 Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 8 Feb 2011 12:28:13 +0000 Subject: [PATCH 06/21] Doxygen: Updated lists in member documentation to conform to Doxygen limitations --- src/OpenFOAM/include/OSspecific.H | 5 +++-- src/OpenFOAM/meshes/meshShapes/edge/edge.H | 3 ++- src/OpenFOAM/meshes/meshShapes/face/face.H | 3 ++- src/OpenFOAM/meshes/meshShapes/triFace/triFace.H | 4 +++- .../meshes/polyMesh/globalMeshData/globalMeshData.H | 6 ++++-- .../primitiveMesh/PrimitivePatch/PrimitivePatch.H | 3 ++- src/OpenFOAM/primitives/Pair/Pair.H | 5 +++-- .../globalIndexAndTransform.H | 7 ++++--- src/dynamicMesh/polyMeshAdder/polyMeshAdder.H | 6 ++++-- .../polyTopoChange/polyTopoChange/hexRef8.H | 3 ++- .../polyTopoChange/polyTopoChange/removeCells.C | 12 ++---------- .../polyTopoChange/polyTopoChange/removeCells.H | 6 +++--- .../polyTopoChange/polyTopoChange/removeFaces.H | 5 +++-- .../InjectionModel/ConeInjection/ConeInjection.H | 1 - .../InjectionModel/ConeInjectionMP/ConeInjectionMP.H | 1 - .../InjectionModel/ManualInjection/ManualInjection.H | 1 - .../InjectionModel/PatchInjection/PatchInjection.H | 1 - src/mesh/blockMesh/curvedEdges/curvedEdge.H | 6 +++++- .../directMappedPolyPatch/directMappedPatchBase.H | 3 ++- src/meshTools/indexedOctree/indexedOctree.H | 10 ++++++---- src/meshTools/meshSearch/meshSearch.H | 11 ++++++----- src/meshTools/searchableSurface/searchableBox.H | 12 +++++++----- .../triSurface/surfaceLocation/surfaceLocation.H | 3 +-- .../triSurface/triSurfaceTools/triSurfaceTools.H | 8 ++++---- .../sampledTriSurfaceMesh/sampledTriSurfaceMesh.C | 1 + 25 files changed, 69 insertions(+), 57 deletions(-) diff --git a/src/OpenFOAM/include/OSspecific.H b/src/OpenFOAM/include/OSspecific.H index c690a7ef12..ed28623410 100644 --- a/src/OpenFOAM/include/OSspecific.H +++ b/src/OpenFOAM/include/OSspecific.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -90,7 +90,8 @@ fileName cwd(); // else return false bool chDir(const fileName& dir); -//- Search for @em name in the following hierarchy: +//- Search for @em name +// in the following hierarchy: // -# personal settings: // - ~/.OpenFOAM/\/ // for version-specific files diff --git a/src/OpenFOAM/meshes/meshShapes/edge/edge.H b/src/OpenFOAM/meshes/meshShapes/edge/edge.H index c04a33774c..24f19e4a9d 100644 --- a/src/OpenFOAM/meshes/meshShapes/edge/edge.H +++ b/src/OpenFOAM/meshes/meshShapes/edge/edge.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -122,6 +122,7 @@ public: inline linePointRef line(const pointField&) const; //- compare edges + // Returns: // - 0: different // - +1: identical // - -1: same edge, but different orientation diff --git a/src/OpenFOAM/meshes/meshShapes/face/face.H b/src/OpenFOAM/meshes/meshShapes/face/face.H index 90e0b1e4d5..34a66b8524 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/face.H +++ b/src/OpenFOAM/meshes/meshShapes/face/face.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -307,6 +307,7 @@ public: inline edge faceEdge(const label n) const; //- Return the edge direction on the face + // Returns: // - 0: edge not found on the face // - +1: forward (counter-clockwise) on the face // - -1: reverse (clockwise) on the face diff --git a/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H b/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H index 34e2dcc40f..03e992575f 100644 --- a/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H +++ b/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -201,12 +201,14 @@ public: inline edge faceEdge(const label n) const; //- Return the edge direction on the face + // Returns: // - +1: forward (counter-clockwise) on the face // - -1: reverse (clockwise) on the face // - 0: edge not found on the face inline int edgeDirection(const edge&) const; //- compare triFaces + // Returns: // - 0: different // - +1: identical // - -1: same face, but different orientation diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H index 94d0cf5715..1885baf762 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H @@ -509,7 +509,8 @@ public: // Other - //- Helper for merging mesh point data. Determines + //- Helper for merging mesh point data. + // Determines: // - my unique indices // - global numbering over all unique indices // - the global number for all local points (so this will @@ -520,7 +521,8 @@ public: labelList& uniquePoints ) const; - //- Helper for merging patch point data. Takes maps from + //- Helper for merging patch point data. + // Takes maps from: // local points to/from mesh. Determines // - my unique points. These are mesh points, not patch points // since the master might not be on the patch. diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H index 7d138178d3..fa03770085 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -415,6 +415,7 @@ public: // Check //- Calculate surface type formed by patch. + // Types: // - all edges have two neighbours (manifold) // - some edges have more than two neighbours (illegal) // - other (open) diff --git a/src/OpenFOAM/primitives/Pair/Pair.H b/src/OpenFOAM/primitives/Pair/Pair.H index ba889470b3..71b11c0f7a 100644 --- a/src/OpenFOAM/primitives/Pair/Pair.H +++ b/src/OpenFOAM/primitives/Pair/Pair.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -134,7 +134,8 @@ public: } - //- compare Pairs + //- Compare Pairs + // Returning: // - 0: different // - +1: identical // - -1: same pair, but reversed order diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.H b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.H index 5b7d2fc238..d9919309fe 100644 --- a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.H +++ b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.H @@ -65,9 +65,10 @@ public: // Public classes //- Less function class used in sorting encoded transforms and indices - // - minimum processor - // - minimum local index - // - minimum transform + // Minimum of: + // - processor + // - local index + // - transform class less { public: diff --git a/src/dynamicMesh/polyMeshAdder/polyMeshAdder.H b/src/dynamicMesh/polyMeshAdder/polyMeshAdder.H index 56f6ff2c52..eb5d52c153 100644 --- a/src/dynamicMesh/polyMeshAdder/polyMeshAdder.H +++ b/src/dynamicMesh/polyMeshAdder/polyMeshAdder.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -281,7 +281,8 @@ public: // Point merging - //- Find topologically&geometrically shared points. + //- Find topologically and geometrically shared points. + // // - should only be called for parallel correct mesh // (since uses mesh.globalData) // - returns Map from point to master point (all in mesh point @@ -293,6 +294,7 @@ public: ); //- Helper: Merge points. + // // - Gets map from point to destination point // - Removes all points that don't map to themselves // - Modifies all faces that use the points to be removed. diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H index 6e91e89c0a..240e8ace42 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -382,6 +382,7 @@ public: ) const; //- Like consistentRefinement but slower: + // // - specify number of cells between consecutive refinement levels // (consistentRefinement equivalent to 1) // - specify max level difference between point-connected cells. diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.C index 4b76acb0c7..e4f0c3377d 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,14 +36,11 @@ License namespace Foam { - -defineTypeNameAndDebug(removeCells, 0); - + defineTypeNameAndDebug(removeCells, 0); } // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -// Remove count of elements of f. void Foam::removeCells::uncount ( const labelList& f, @@ -59,7 +56,6 @@ void Foam::removeCells::uncount // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from mesh Foam::removeCells::removeCells ( const polyMesh& mesh, @@ -73,10 +69,6 @@ Foam::removeCells::removeCells // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -//- Get labels of exposed faces. These are -// - internal faces that become boundary faces -// - coupled faces that become uncoupled (since on of the sides -// gets deleted) Foam::labelList Foam::removeCells::getExposedFaces ( const labelList& cellLabels diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.H index a276c966f8..d2b46868ca 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -94,7 +94,8 @@ public: // Topology changes - //- Get labels of exposed faces. These are + //- Get labels of exposed faces. + // These are // - internal faces that become boundary faces // - coupled faces that become uncoupled (since one of the sides // gets deleted) @@ -114,7 +115,6 @@ public: //- Force recalculation of locally stored data on topological change void updateMesh(const mapPolyMesh&) {} - }; diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.H index 4852d008ee..ed389cca3f 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -178,7 +178,8 @@ public: // Member Functions - //- Given set of faces to pierce calculates: + //- Find faces including those with cells which have the same mastercell + // Given set of faces to pierce calculates: // - region for connected cells // - mastercell for each region. This is the lowest numbered cell // of all cells that get merged. diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H index 278b2a1bdd..1400108700 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H @@ -26,7 +26,6 @@ Class Description Cone injection - - User specifies - time of start of injection - injector position diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.H index 806799bb7e..2707e9cbc6 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.H @@ -26,7 +26,6 @@ Class Description Cone injection multi-point - - User specifies - time of start of injection - injector positions diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H index 972995a458..5421098cd8 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H @@ -26,7 +26,6 @@ Class Description Manual injection - - User specifies - Total mass to inject - Parcel positions in file @c positionsFile diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.H index 4ee540c7bf..2c1092bc21 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.H @@ -26,7 +26,6 @@ Class Description Patch injection - - User specifies - Total mass to inject - Name of patch diff --git a/src/mesh/blockMesh/curvedEdges/curvedEdge.H b/src/mesh/blockMesh/curvedEdges/curvedEdge.H index 3a9e3bdfde..ecd08433f6 100644 --- a/src/mesh/blockMesh/curvedEdges/curvedEdge.H +++ b/src/mesh/blockMesh/curvedEdges/curvedEdge.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -130,18 +130,21 @@ public: inline label end() const; //- Compare the given start and end points with this curve + // Return: // - 0: different // - +1: identical // - -1: same edge, but different orientation inline int compare(const curvedEdge&) const; //- Compare the given start and end points with this curve + // Return: // - 0: different // - +1: identical // - -1: same edge, but different orientation inline int compare(const edge&) const; //- Compare the given start and end points with this curve + // Return: // - 0: different // - +1: identical // - -1: same edge, but different orientation @@ -159,6 +162,7 @@ public: void operator=(const curvedEdge&); + // Ostream operator friend Ostream& operator<<(Ostream&, const curvedEdge&); diff --git a/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.H b/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.H index 8222454aa5..285f5c1f86 100644 --- a/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.H +++ b/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -107,6 +107,7 @@ public: //- Helper class for finding nearest + // Nearest: // - point+local index // - sqr(distance) // - processor diff --git a/src/meshTools/indexedOctree/indexedOctree.H b/src/meshTools/indexedOctree/indexedOctree.H index 8061c67c26..eaed305371 100644 --- a/src/meshTools/indexedOctree/indexedOctree.H +++ b/src/meshTools/indexedOctree/indexedOctree.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -511,7 +511,8 @@ public: // Queries - //- Calculate nearest point on nearest shape. Returns + //- Calculate nearest point on nearest shape. + // Returns // - bool : any point found nearer than nearestDistSqr // - label: index in shapes // - point: actual nearest point found @@ -532,7 +533,8 @@ public: point& nearestPoint ) const; - //- Find nearest to line. Returns + //- Find nearest to line. + // Returns // - bool : any point found? // - label: index in shapes // - point: actual nearest point found @@ -621,10 +623,10 @@ public: bool write(Ostream& os) const; + // IOstream Operators friend Ostream& operator<< (Ostream&, const indexedOctree&); - }; diff --git a/src/meshTools/meshSearch/meshSearch.H b/src/meshTools/meshSearch/meshSearch.H index ab146ba5ad..60bd550e8f 100644 --- a/src/meshTools/meshSearch/meshSearch.H +++ b/src/meshTools/meshSearch/meshSearch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -195,10 +195,11 @@ public: bool pointInCell(const point& p, const label celli) const; //- Find nearest cell in terms of cell centre. - // - use octree - // - use linear search - // - if seed is provided walk. (uses findNearestCellWalk; - // does not handle holes in domain) + // Options: + // - use octree + // - use linear search + // - if seed is provided walk. (uses findNearestCellWalk; + // does not handle holes in domain) label findNearestCell ( const point& location, diff --git a/src/meshTools/searchableSurface/searchableBox.H b/src/meshTools/searchableSurface/searchableBox.H index 9bc5135f63..cfd47d060c 100644 --- a/src/meshTools/searchableSurface/searchableBox.H +++ b/src/meshTools/searchableSurface/searchableBox.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -131,7 +131,8 @@ public: // Single point queries. - //- Calculate nearest point on surface. Returns + //- Calculate nearest point on surface. + // Returns // - bool : any point found nearer than nearestDistSqr // - label: relevant index in surface (=face 0..5) // - point: actual nearest point found @@ -141,7 +142,8 @@ public: const scalar nearestDistSqr ) const; - //- Calculate nearest point on edge. Returns + //- Calculate nearest point on edge. + // Returns // - bool : any point found nearer than nearestDistSqr // - label: relevant index in surface(=?) // - point: actual nearest point found @@ -151,7 +153,8 @@ public: const scalar nearestDistSqr ) const; - //- Find nearest to segment. Returns + //- Find nearest to segment. + // Returns // - bool : any point found? // - label: relevant index in shapes (=face 0..5) // - point: actual nearest point found @@ -241,7 +244,6 @@ public: notImplemented("searchableBox::writeData(Ostream&) const"); return false; } - }; diff --git a/src/meshTools/triSurface/surfaceLocation/surfaceLocation.H b/src/meshTools/triSurface/surfaceLocation/surfaceLocation.H index 9a6d8d65c0..c621ed164a 100644 --- a/src/meshTools/triSurface/surfaceLocation/surfaceLocation.H +++ b/src/meshTools/triSurface/surfaceLocation/surfaceLocation.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,6 @@ Class Description Contains information about location on a triSurface: - - pointIndexHit: - location - bool: hit/miss diff --git a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.H b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.H index 0feb0900c6..28dd7a4c43 100644 --- a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.H +++ b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -518,8 +518,7 @@ public: // Tracking - //- Test point on plane of triangle to see if on edge or point - // or inside. + //- Test point on plane of triangle to see if on edge or point or inside static surfaceLocation classify ( const triSurface&, @@ -527,7 +526,8 @@ public: const point& trianglePoint ); - //- Track on surface to get closer to point. Possible situations: + //- Track on surface to get closer to point. + // Possible situations: // - 1. reached endpoint // - 2. reached edge (normal situation) // - 3. reached end of surface (edge on single face) diff --git a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.C b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.C index 3e3d56c6ed..d14b0872ae 100644 --- a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.C +++ b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.C @@ -56,6 +56,7 @@ namespace Foam //- Private class for finding nearest + // Comprising: // - global index // - sqr(distance) typedef Tuple2 nearInfo; From 5339d687a4e66c64fc77aaa2e9ef9bbc7e34bc02 Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 8 Feb 2011 12:36:49 +0000 Subject: [PATCH 07/21] doxygen/Doxyfile: Reformatted --- doc/doxygen/Doxyfile | 131 +++++++++++++++++++++++++------------------ 1 file changed, 76 insertions(+), 55 deletions(-) diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile index 0c076b4fc2..2e41bf4d60 100644 --- a/doc/doxygen/Doxyfile +++ b/doc/doxygen/Doxyfile @@ -207,14 +207,16 @@ OPTIMIZE_FOR_FORTRAN = NO OPTIMIZE_OUTPUT_VHDL = NO -# Doxygen selects the parser to use depending on the extension of the files it parses. -# With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this tag. -# The format is ext=language, where ext is a file extension, and language is one of -# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, -# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat -# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), -# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, +# and language is one of the parsers supported by doxygen: IDL, Java, +# Javascript, C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, +# C++. For instance to make doxygen treat .inc files as Fortran files (default +# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note +# that for custom extensions you also need to set FILE_PATTERNS otherwise the +# files are not read by doxygen. EXTENSION_MAPPING = @@ -238,10 +240,10 @@ CPP_CLI_SUPPORT = NO SIP_SUPPORT = NO -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen to replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES (the +# default) will make doxygen to replace the get and set methods by a property in +# the documentation. This will only work if the methods are indeed getting or # setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO. @@ -411,7 +413,12 @@ SORT_MEMBER_DOCS = NO SORT_BRIEF_DOCS = NO -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO (the default) the constructors will +# appear in the respective orders defined by SORT_MEMBER_DOCS and +# SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is +# set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. SORT_MEMBERS_CTORS_1ST = NO @@ -505,12 +512,12 @@ SHOW_NAMESPACES = YES FILE_VERSION_FILTER = -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by -# doxygen. The layout file controls the global structure of the generated output files -# in an output format independent way. The create the layout file that represents -# doxygen's defaults, run doxygen with the -l option. You can optionally specify a -# file name after the option, if omitted DoxygenLayout.xml will be used as the name -# of the layout file. +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. The create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. LAYOUT_FILE = @@ -582,6 +589,7 @@ WARN_LOGFILE = INPUT = $(WM_PROJECT_DIR)/src/OpenFOAM/global \ $(WM_PROJECT_DIR)/src/OpenFOAM/containers \ $(WM_PROJECT_DIR)/src/OpenFOAM/primitives \ + $(WM_PROJECT_DIR)/sampling \ $(WM_PROJECT_DIR)/src/finiteVolume/fvMesh # This tag can be used to specify the character encoding of the source files @@ -837,15 +845,15 @@ HTML_ALIGN_MEMBERS = YES HTML_DYNAMIC_SECTIONS = NO -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment, introduced with OSX 10.5 (Leopard). To create a documentation +# set, doxygen will generate a Makefile in the HTML output directory. Running +# make will produce the docset in that directory and running "make install" will +# install the docset in ~/Library/Developer/Shared/Documentation/DocSets so that +# Xcode will find it at startup. See +# http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more +# information. GENERATE_DOCSET = NO @@ -907,10 +915,10 @@ BINARY_TOC = NO TOC_EXPAND = NO -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER -# are set, an additional index file will be generated that can be used as input for -# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated -# HTML documentation. +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. GENERATE_QHP = NO @@ -932,20 +940,23 @@ QHP_NAMESPACE = org.doxygen.Project QHP_VIRTUAL_FOLDER = doc -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. -# For more information please see +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see # http://doc.trolltech.com/qthelpproject.html#custom-filters QHP_CUST_FILTER_NAME = -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see -# Qt Help Project / Custom Filters. +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom +# filter to add.For more information please see Qt Help +# Project / Custom Filters. QHP_CUST_FILTER_ATTRS = -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's -# filter section matches. -# Qt Help Project / Filter Attributes. +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help +# Project / Filter Attributes. QHP_SECT_FILTER_ATTRS = @@ -956,13 +967,14 @@ QHP_SECT_FILTER_ATTRS = QHG_LOCATION = -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files -# will be generated, which together with the HTML files, form an Eclipse help +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, which together with the HTML files, form an Eclipse help # plugin. To install this plugin and make it available under the help contents -# menu in Eclipse, the contents of the directory containing the HTML and XML -# files needs to be copied into the plugins directory of eclipse. The name of -# the directory within the plugins directory should be the same as -# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before the help appears. +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as the +# ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before the +# help appears. GENERATE_ECLIPSEHELP = NO @@ -1012,16 +1024,23 @@ TREEVIEW_WIDTH = 250 FORMULA_FONTSIZE = 10 -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for the HTML output. The underlying search engine uses javascript -# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) there is already a search function so this one should -# typically be disabled. For large projects the javascript based search engine -# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be +# disabled. For large projects the javascript based search engine can be slow, +# then enabling SERVER_BASED_SEARCH may provide a better solution. SEARCHENGINE = YES -# When the SERVER_BASED_SEARCH tag is enabled the search engine will be implemented using a PHP enabled web server instead of at the web client using Javascript. Doxygen will generate the search PHP script and index -# file to put on the web server. The advantage of the server based approach is that it scales better to large projects and allows full text search. The disadvances is that it is more difficult to setup -# and does not have live searching capabilities. +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client using +# Javascript. Doxygen will generate the search PHP script and index file to put +# on the web server. The advantage of the server based approach is that it +# scales better to large projects and allows full text search. The disadvances +# is that it is more difficult to setup and does not have live searching +# capabilities. SERVER_BASED_SEARCH = NO # old default @@ -1106,7 +1125,9 @@ LATEX_BATCHMODE = NO LATEX_HIDE_INDICES = NO -# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER. +# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with +# syntax highlighting in the LaTeX output. Note that which sources are shown +# also depends on other settings such as SOURCE_BROWSER. LATEX_SOURCE_CODE = NO @@ -1409,8 +1430,8 @@ HIDE_UNDOC_RELATIONS = YES HAVE_DOT = YES # By default doxygen will write a font called FreeSans.ttf to the output -# directory and reference it in all dot files that doxygen generates. This -# font does not include all possible unicode characters however, so when you need +# directory and reference it in all dot files that doxygen generates. This font +# does not include all possible unicode characters however, so when you need # these (or just want a differently looking font) you can specify the font name # using DOT_FONTNAME. You need need to make sure dot is able to find the font, # which can be done by putting it in a standard location or by setting the From c9b8b5f05e22d9cce6bf4a777c1085ee77e32225 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 8 Feb 2011 15:45:43 +0000 Subject: [PATCH 08/21] BUG: Use dictionary copy instead of reference --- .../clouds/Templates/KinematicCloud/KinematicCloud.H | 2 +- src/lagrangian/intermediate/particleForces/particleForces.H | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H index dace4a6522..b1020c1e20 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H @@ -288,7 +288,7 @@ protected: typename ParcelType::constantProperties constProps_; //- Sub-models dictionary - const dictionary& subModelProperties_; + const dictionary subModelProperties_; //- Random number generator - used by some injection routines cachedRandom rndGen_; diff --git a/src/lagrangian/intermediate/particleForces/particleForces.H b/src/lagrangian/intermediate/particleForces/particleForces.H index feb5ea8ee4..0f655be004 100644 --- a/src/lagrangian/intermediate/particleForces/particleForces.H +++ b/src/lagrangian/intermediate/particleForces/particleForces.H @@ -70,7 +70,7 @@ class particleForces const fvMesh& mesh_; //- The particleForces dictionary - const dictionary& dict_; + const dictionary dict_; //- Gravity const vector g_; From 654b8d18cb90dd9520f2bd155f0d26caf8f36b2d Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 8 Feb 2011 15:52:22 +0000 Subject: [PATCH 09/21] Revert "BUG: Use gSum instead of sum for fieldValues function object" This reverts commit ca0799cbc7f14100e2600438196c4e59be124535. --- .../fieldValues/faceSource/faceSourceTemplates.C | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C index 34ad992c0c..e122d2f7f9 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -91,32 +91,32 @@ Type Foam::fieldValues::faceSource::processValues { case opSum: { - result = gSum(values); + result = sum(values); break; } case opAreaAverage: { - result = gSum(values*magSf)/gSum(magSf); + result = sum(values*magSf)/sum(magSf); break; } case opAreaIntegrate: { - result = gSum(values*magSf); + result = sum(values*magSf); break; } case opWeightedAverage: { - result = gSum(values*weightField)/gSum(weightField); + result = sum(values*weightField)/sum(weightField); break; } case opMin: { - result = gMin(values); + result = min(values); break; } case opMax: { - result = gMax(values); + result = max(values); break; } default: From 09427488198972993f43782441be2bcd7b52f6e1 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 8 Feb 2011 15:52:31 +0000 Subject: [PATCH 10/21] Revert "BUG: Contuation from commit ca0799cbc7f - updated cellSource" This reverts commit b8c2cbaaec6c1b0ae2dcee668502655e198df2ee. --- .../cellSource/cellSourceTemplates.C | 18 +++++++++--------- .../faceSource/faceSourceTemplates.C | 3 ++- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.C b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.C index 77bcb85737..719393b252 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -72,32 +72,32 @@ Type Foam::fieldValues::cellSource::processValues { case opSum: { - result = gSum(values); + result = sum(values); break; } case opVolAverage: { - result = gSum(values*V)/gSum(V); + result = sum(values*V)/sum(V); break; } case opVolIntegrate: { - result = gSum(values*V); + result = sum(values*V); break; } case opWeightedAverage: { - result = gSum(values*weightField)/gSum(weightField); + result = sum(values*weightField)/sum(weightField); break; } case opMin: { - result = gMin(values); + result = min(values); break; } case opMax: { - result = gMax(values); + result = max(values); break; } default: @@ -128,10 +128,10 @@ bool Foam::fieldValues::cellSource::writeValues(const word& fieldName) combineFields(setFieldValues(weightFieldName_)) ); - Type result = processValues(values, V, weightField); - if (Pstream::master()) { + Type result = processValues(values, V, weightField); + if (valueOutput_) { IOField diff --git a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C index e122d2f7f9..d8ab9fac28 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C @@ -158,10 +158,11 @@ bool Foam::fieldValues::faceSource::writeValues(const word& fieldName) magSf = combineFields(magSf); weightField = combineFields(weightField); - Type result = processValues(values, magSf, weightField); if (Pstream::master()) { + Type result = processValues(values, magSf, weightField); + if (valueOutput_) { IOField From 2adfd534db0fdb5a33d5e67e59a96e52dd2c9856 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 8 Feb 2011 16:16:50 +0000 Subject: [PATCH 11/21] ENH: globalMeshData, mapDistribute : added pointBoundaryFaces/pointBoundaryCells --- .../test/globalMeshData/Test-globalMeshData.C | 215 ++-- applications/test/syncTools/Test-syncTools.C | 10 +- .../Fields/transformList/transformList.C | 50 +- .../Fields/transformList/transformList.H | 26 +- .../polyMesh/globalMeshData/globalMeshData.C | 1005 ++++++++++------- .../polyMesh/globalMeshData/globalMeshData.H | 72 +- .../globalMeshData/globalMeshDataTemplates.C | 14 +- .../mapPolyMesh/mapDistribute/mapDistribute.C | 188 ++- .../mapPolyMesh/mapDistribute/mapDistribute.H | 206 +++- .../mapDistribute/mapDistributeTemplates.C | 65 +- .../meshes/polyMesh/syncTools/syncTools.C | 71 -- .../meshes/polyMesh/syncTools/syncTools.H | 324 +++--- .../polyMesh/syncTools/syncToolsTemplates.C | 288 ++--- 13 files changed, 1462 insertions(+), 1072 deletions(-) diff --git a/applications/test/globalMeshData/Test-globalMeshData.C b/applications/test/globalMeshData/Test-globalMeshData.C index 6feaf5cc05..3c789748bf 100644 --- a/applications/test/globalMeshData/Test-globalMeshData.C +++ b/applications/test/globalMeshData/Test-globalMeshData.C @@ -70,7 +70,12 @@ int main(int argc, char *argv[]) ); // Exchange data. Apply positional transforms. - globalPointSlavesMap.distribute(transforms, coords, true); + globalPointSlavesMap.distribute + ( + transforms, + coords, + mapDistribute::transformPosition() + ); // Print forAll(slaves, pointI) @@ -127,7 +132,12 @@ int main(int argc, char *argv[]) } // Exchange data Apply positional transforms. - globalEdgeSlavesMap.distribute(transforms, ec, true); + globalEdgeSlavesMap.distribute + ( + transforms, + ec, + mapDistribute::transformPosition() + ); // Print forAll(slaves, edgeI) @@ -163,82 +173,131 @@ int main(int argc, char *argv[]) } - //// Test: (collocated) point to faces addressing - //{ - // const labelListList& globalPointBoundaryFaces = - // globalData.globalPointBoundaryFaces(); - // const mapDistribute& globalPointBoundaryFacesMap = - // globalData.globalPointBoundaryFacesMap(); - // - // label nBnd = mesh.nFaces()-mesh.nInternalFaces(); - // - // pointField fc(globalPointBoundaryFacesMap.constructSize()); - // SubList(fc, nBnd).assign - // ( - // primitivePatch - // ( - // SubList - // ( - // mesh.faces(), - // nBnd, - // mesh.nInternalFaces() - // ), - // mesh.points() - // ).faceCentres() - // ); - // - // // Exchange data - // globalPointBoundaryFacesMap.distribute(fc); - // - // // Print - // forAll(globalPointBoundaryFaces, pointI) - // { - // const labelList& bFaces = globalPointBoundaryFaces[pointI]; - // - // Pout<< "Point:" << pointI - // << " at:" << coupledPatch.localPoints()[pointI] - // << " connected to faces:" << endl; - // - // forAll(bFaces, i) - // { - // Pout<< " " << fc[bFaces[i]] << endl; - // } - // } - //} - // - // - //// Test:(collocated) point to cells addressing - //{ - // const labelList& boundaryCells = globalData.boundaryCells(); - // const labelListList& globalPointBoundaryCells = - // globalData.globalPointBoundaryCells(); - // const mapDistribute& globalPointBoundaryCellsMap = - // globalData.globalPointBoundaryCellsMap(); - // - // pointField cc(globalPointBoundaryCellsMap.constructSize()); - // forAll(boundaryCells, i) - // { - // cc[i] = mesh.cellCentres()[boundaryCells[i]]; - // } - // - // // Exchange data - // globalPointBoundaryCellsMap.distribute(cc); - // - // // Print - // forAll(globalPointBoundaryCells, pointI) - // { - // const labelList& bCells = globalPointBoundaryCells[pointI]; - // - // Pout<< "Point:" << pointI - // << " at:" << coupledPatch.localPoints()[pointI] - // << " connected to cells:" << endl; - // - // forAll(bCells, i) - // { - // Pout<< " " << cc[bCells[i]] << endl; - // } - // } - //} + // Test: point to faces addressing + { + const mapDistribute& globalPointBoundaryFacesMap = + globalData.globalPointBoundaryFacesMap(); + const labelListList& slaves = + globalData.globalPointBoundaryFaces(); + const labelListList& transformedSlaves = + globalData.globalPointTransformedBoundaryFaces(); + + label nBnd = mesh.nFaces()-mesh.nInternalFaces(); + + pointField fc(globalPointBoundaryFacesMap.constructSize()); + SubList(fc, nBnd).assign + ( + primitivePatch + ( + SubList + ( + mesh.faces(), + nBnd, + mesh.nInternalFaces() + ), + mesh.points() + ).faceCentres() + ); + + // Exchange data + globalPointBoundaryFacesMap.distribute + ( + transforms, + fc, + mapDistribute::transformPosition() + ); + + // Print + forAll(slaves, pointI) + { + const labelList& slaveFaces = slaves[pointI]; + + if (slaveFaces.size() > 0) + { + Pout<< "Master point:" << pointI + << " at:" << coupledPatch.localPoints()[pointI] + << " connected to " << slaveFaces.size() + << " untransformed faces:" << endl; + + forAll(slaveFaces, i) + { + Pout<< " " << fc[slaveFaces[i]] << endl; + } + } + + const labelList& transformedSlaveFaces = transformedSlaves[pointI]; + + if (transformedSlaveFaces.size() > 0) + { + Pout<< "Master point:" << pointI + << " connected to " << transformedSlaveFaces.size() + << " transformed faces:" << endl; + + forAll(transformedSlaveFaces, i) + { + Pout<< " " << fc[transformedSlaveFaces[i]] << endl; + } + } + } + } + + + // Test: point to cells addressing + { + const labelList& boundaryCells = globalData.boundaryCells(); + const mapDistribute& globalPointBoundaryCellsMap = + globalData.globalPointBoundaryCellsMap(); + const labelListList& slaves = globalData.globalPointBoundaryCells(); + const labelListList& transformedSlaves = + globalData.globalPointTransformedBoundaryCells(); + + pointField cc(globalPointBoundaryCellsMap.constructSize()); + forAll(boundaryCells, i) + { + cc[i] = mesh.cellCentres()[boundaryCells[i]]; + } + + // Exchange data + globalPointBoundaryCellsMap.distribute + ( + transforms, + cc, + mapDistribute::transformPosition() + ); + + // Print + forAll(slaves, pointI) + { + const labelList& pointCells = slaves[pointI]; + + if (pointCells.size() > 0) + { + Pout<< "Master point:" << pointI + << " at:" << coupledPatch.localPoints()[pointI] + << " connected to " << pointCells.size() + << " untransformed boundaryCells:" << endl; + + forAll(pointCells, i) + { + Pout<< " " << cc[pointCells[i]] << endl; + } + } + + const labelList& transformPointCells = transformedSlaves[pointI]; + + if (transformPointCells.size() > 0) + { + Pout<< "Master point:" << pointI + << " connected to " << transformPointCells.size() + << " transformed boundaryCells:" << endl; + + forAll(transformPointCells, i) + { + Pout<< " " << cc[transformPointCells[i]] << endl; + } + } + } + } Info<< "End\n" << endl; diff --git a/applications/test/syncTools/Test-syncTools.C b/applications/test/syncTools/Test-syncTools.C index 094068e94a..6f9d5f408a 100644 --- a/applications/test/syncTools/Test-syncTools.C +++ b/applications/test/syncTools/Test-syncTools.C @@ -30,12 +30,12 @@ Description \*---------------------------------------------------------------------------*/ +#include "syncTools.H" #include "argList.H" #include "polyMesh.H" #include "Time.H" #include "Random.H" #include "PackedList.H" -#include "syncTools.H" using namespace Foam; @@ -285,7 +285,7 @@ void testSparseData(const polyMesh& mesh, Random& rndGen) { // Create some data. Use slightly perturbed positions. - EdgeMap sparseData; + EdgeMap sparseData; pointField fullData(mesh.nEdges(), point::max); const edgeList& edges = allBoundary.edges(); @@ -313,13 +313,13 @@ void testSparseData(const polyMesh& mesh, Random& rndGen) ( mesh, sparseData, - minEqOp() + minMagSqrEqOp() ); syncTools::syncEdgeList ( mesh, fullData, - minEqOp(), + minMagSqrEqOp(), point::max ); @@ -350,7 +350,7 @@ void testSparseData(const polyMesh& mesh, Random& rndGen) { const edge& e = mesh.edges()[meshEdgeI]; - EdgeMap::const_iterator iter = sparseData.find(e); + EdgeMap::const_iterator iter = sparseData.find(e); if (iter != sparseData.end()) { diff --git a/src/OpenFOAM/fields/Fields/transformList/transformList.C b/src/OpenFOAM/fields/Fields/transformList/transformList.C index 04cff1b22d..73353620d9 100644 --- a/src/OpenFOAM/fields/Fields/transformList/transformList.C +++ b/src/OpenFOAM/fields/Fields/transformList/transformList.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -46,11 +46,17 @@ Foam::List Foam::transform template -void Foam::transformList -( - const tensorField& rotTensor, - UList& field -) +void Foam::transformList(const tensor& rotTensor, UList& field) +{ + forAll(field, i) + { + field[i] = transform(rotTensor, field[i]); + } +} + + +template +void Foam::transformList(const tensorField& rotTensor, UList& field) { if (rotTensor.size() == 1) { @@ -79,11 +85,17 @@ void Foam::transformList template -void Foam::transformList -( - const tensorField& rotTensor, - Map& field -) +void Foam::transformList(const tensor& rotTensor, Map& field) +{ + forAllIter(typename Map, field, iter) + { + iter() = transform(rotTensor[0], iter()); + } +} + + +template +void Foam::transformList(const tensorField& rotTensor, Map& field) { if (rotTensor.size() == 1) { @@ -105,11 +117,17 @@ void Foam::transformList template -void Foam::transformList -( - const tensorField& rotTensor, - EdgeMap& field -) +void Foam::transformList(const tensor& rotTensor, EdgeMap& field) +{ + forAllIter(typename EdgeMap, field, iter) + { + iter() = transform(rotTensor[0], iter()); + } +} + + +template +void Foam::transformList(const tensorField& rotTensor, EdgeMap& field) { if (rotTensor.size() == 1) { diff --git a/src/OpenFOAM/fields/Fields/transformList/transformList.H b/src/OpenFOAM/fields/Fields/transformList/transformList.H index 3dde0e65bb..16fbc4b946 100644 --- a/src/OpenFOAM/fields/Fields/transformList/transformList.H +++ b/src/OpenFOAM/fields/Fields/transformList/transformList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -60,33 +60,57 @@ List transform //- Apply transformation to list. Either single transformation tensor // or one tensor per element. template +void transformList(const tensor&, UList&); +template void transformList(const tensorField&, UList&); +template +void transformList(const tensor&, Map&); template void transformList(const tensorField&, Map&); +template +void transformList(const tensor&, EdgeMap&); template void transformList(const tensorField&, EdgeMap&); +template<> +inline void transformList(const tensor&, labelUList&) +{} template<> inline void transformList(const tensorField&, labelUList&) {} template<> +inline void transformList(const tensor&, Map