mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -21,7 +21,7 @@ License
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\defgroup grpIOFunctionObjects Input/outuput function objects
|
||||
\defgroup grpIOFunctionObjects Input/output function objects
|
||||
@{
|
||||
\ingroup grpFunctionObjects
|
||||
This group contains input/output-based function objects
|
||||
|
||||
@ -375,6 +375,14 @@ void Foam::regionSizeDistribution::read(const dictionary& dict)
|
||||
|
||||
word format(dict.lookup("setFormat"));
|
||||
formatterPtr_ = writer<scalar>::New(format);
|
||||
|
||||
if (dict.found("coordinateSystem"))
|
||||
{
|
||||
coordSysPtr_.reset(new coordinateSystem(obr_, dict));
|
||||
|
||||
Info<< "Transforming all vectorFields with coordinate system "
|
||||
<< coordSysPtr_().name() << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -806,11 +814,21 @@ void Foam::regionSizeDistribution::write()
|
||||
const word& fldName = vectorNames[selected[i]];
|
||||
Info<< " Vector field " << fldName << endl;
|
||||
|
||||
const vectorField& fld = obr_.lookupObject
|
||||
vectorField fld = obr_.lookupObject
|
||||
<
|
||||
volVectorField
|
||||
>(fldName).internalField();
|
||||
|
||||
if (coordSysPtr_.valid())
|
||||
{
|
||||
Info<< "Transforming vector field " << fldName
|
||||
<< " with coordinate system "
|
||||
<< coordSysPtr_().name()
|
||||
<< endl;
|
||||
|
||||
fld = coordSysPtr_().localVector(fld);
|
||||
}
|
||||
|
||||
|
||||
// Components
|
||||
|
||||
|
||||
@ -69,6 +69,13 @@ Description
|
||||
maxDiameter 0.5e-4;
|
||||
minDiameter 0;
|
||||
setFormat gnuplot;
|
||||
coordinateSystem
|
||||
{
|
||||
type cartesian;
|
||||
origin (0 0 0);
|
||||
e3 (0 1 1);
|
||||
e1 (1 0 0);
|
||||
}
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
@ -84,6 +91,7 @@ Description
|
||||
maxDiameter | maximum region equivalent diameter | yes |
|
||||
minDiameter | minimum region equivalent diameter | no | 0
|
||||
setFormat | writing format | yes |
|
||||
coordinateSystem | transformation for vector fields | no |
|
||||
\endtable
|
||||
|
||||
SeeAlso
|
||||
@ -104,6 +112,7 @@ SourceFiles
|
||||
#include "Map.H"
|
||||
#include "volFieldsFwd.H"
|
||||
#include "wordReList.H"
|
||||
#include "coordinateSystem.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -159,6 +168,9 @@ class regionSizeDistribution
|
||||
//- Output formatter to write
|
||||
autoPtr<writer<scalar> > formatterPtr_;
|
||||
|
||||
//- Optional coordinate system
|
||||
autoPtr<coordinateSystem> coordSysPtr_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user